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 "Authorization: Basic [[basicHash]]" \
 -H "Accept: application/json,text/plain" \
 "http://localhost/kafkacruisecontrol/add_broker?brokerid=&dryrun=true&throttle_added_broker=true&allow_capacity_estimation=true&goals=["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]&concurrent_partition_movements_per_broker=56&max_partition_movements_in_cluster=56&concurrent_leader_movements=56&broker_concurrent_leader_movements=56&json=true&skip_hard_goal_check=true&excluded_topics=__CruiseControl.%2A&kafka_assigner=true&use_ready_default_goals=true&verbose=true&exclude_recently_demoted_brokers=true&exclude_recently_removed_brokers=true&replica_movement_strategies=["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]&execution_progress_check_interval_ms=789&stop_ongoing_execution=true&reason=reason_example&review_id=56&data_from=dataFrom_example&replication_throttle=789&get_response_schema=true&doAs=doAs_example&fast_mode=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Create an instance of the API class
        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 = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // 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 cluster ongoing leadership movements.
        Integer brokerConcurrentLeaderMovements = 56; // Integer | The upper bound of per broker 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 = __CruiseControl.%2A; // 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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // 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, brokerConcurrentLeaderMovements, 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 'package:openapi/api.dart';

final api_instance = DefaultApi();

final array[Integer] brokerid = new array[Integer](); // array[Integer] | List of target broker ids.
final Boolean dryrun = new Boolean(); // Boolean | Whether to dry-run the request or not.
final Boolean throttleAddedBroker = new Boolean(); // Boolean | Whether to throttle the added broker.
final Boolean allowCapacityEstimation = new Boolean(); // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
final array[String] 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.
final Integer concurrentPartitionMovementsPerBroker = new Integer(); // Integer | The upper bound of ongoing replica movements going into/out of each broker.
final Integer maxPartitionMovementsInCluster = new Integer(); // Integer | Change upper bound of ongoing inter broker partition movements in cluster.
final Integer concurrentLeaderMovements = new Integer(); // Integer | The upper bound of cluster ongoing leadership movements.
final Integer brokerConcurrentLeaderMovements = new Integer(); // Integer | The upper bound of per broker ongoing leadership movements.
final Boolean json = new Boolean(); // Boolean | Whether to return in JSON format or not.
final Boolean skipHardGoalCheck = new Boolean(); // Boolean | Whether to allow hard goals be skipped in proposal generation.
final String excludedTopics = new String(); // String | Specify topic whose partition is excluded from replica movement.
final Boolean kafkaAssigner = new Boolean(); // Boolean | Whether to use Kafka assigner mode to generate proposals.
final Boolean useReadyDefaultGoals = new Boolean(); // Boolean | Whether to only use ready goals to generate proposal.
final Boolean verbose = new Boolean(); // Boolean | Return detailed state information.
final Boolean excludeRecentlyDemotedBrokers = new Boolean(); // Boolean | Whether to allow leader replicas to be moved to recently demoted brokers.
final Boolean excludeRecentlyRemovedBrokers = new Boolean(); // Boolean | Whether to allow replicas to be moved to recently removed broker.
final array[String] replicaMovementStrategies = new array[String](); // array[String] | Replica movement strategies to use.
final Long executionProgressCheckIntervalMs = new Long(); // Long | Execution progress check interval in milliseconds.
final Boolean stopOngoingExecution = new Boolean(); // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
final String reason = new String(); // String | Reason for request.
final Integer reviewId = new Integer(); // Integer | Review id for 2-step verification.
final String dataFrom = new String(); // String | Whether to calculate proposal from available valid partitions or valid windows.
final Long replicationThrottle = new Long(); // Long | Upper bound on the bandwidth in bytes per second used to move replicas.
final Boolean getResponseSchema = new Boolean(); // Boolean | Whether to return JSON schema in response header or not.
final String doAs = new String(); // String | The user specified by a trusted proxy in that authentication model.
final Boolean fastMode = new Boolean(); // Boolean | True to compute proposals in fast mode, false otherwise

try {
    final result = await api_instance.addBroker(brokerid, dryrun, throttleAddedBroker, allowCapacityEstimation, goals, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentLeaderMovements, brokerConcurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, kafkaAssigner, useReadyDefaultGoals, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, executionProgressCheckIntervalMs, stopOngoingExecution, reason, reviewId, dataFrom, replicationThrottle, getResponseSchema, doAs, fastMode);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->addBroker: $e\n');
}

import org.openapitools.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 = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // 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 cluster ongoing leadership movements.
        Integer brokerConcurrentLeaderMovements = 56; // Integer | The upper bound of per broker 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 = __CruiseControl.%2A; // 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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // 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, brokerConcurrentLeaderMovements, 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();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
array[Integer] *brokerid = ; // List of target broker ids. (default to null)
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 = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional) (default to null)
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) (default to null)
Integer *concurrentLeaderMovements = 56; // The upper bound of cluster ongoing leadership movements. (optional) (default to 1000)
Integer *brokerConcurrentLeaderMovements = 56; // The upper bound of per broker ongoing leadership movements. (optional) (default to 250)
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 = __CruiseControl.%2A; // Specify topic whose partition is excluded from replica movement. (optional) (default to null)
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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // Replica movement strategies to use. (optional) (default to null)
Long *executionProgressCheckIntervalMs = 789; // Execution progress check interval in milliseconds. (optional) (default to null)
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) (default to null)
Integer *reviewId = 56; // Review id for 2-step verification. (optional) (default to null)
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) (default to null)
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) (default to null)
Boolean *fastMode = true; // True to compute proposals in fast mode, false otherwise (optional) (default to true)

// 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
    brokerConcurrentLeaderMovements:brokerConcurrentLeaderMovements
    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 defaultClient = CruiseControlApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

// Create an instance of the API class
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': ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"], // {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 cluster ongoing leadership movements.
  'brokerConcurrentLeaderMovements': 56, // {Integer} The upper bound of per broker 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': __CruiseControl.%2A, // {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': ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"], // {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 Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class addBrokerExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var brokerid = new array[Integer](); // array[Integer] | List of target broker ids. (default to null)
            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)  (default to null)
            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)  (default to null)
            var concurrentLeaderMovements = 56;  // Integer | The upper bound of cluster ongoing leadership movements. (optional)  (default to 1000)
            var brokerConcurrentLeaderMovements = 56;  // Integer | The upper bound of per broker ongoing leadership movements. (optional)  (default to 250)
            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 = __CruiseControl.%2A;  // String | Specify topic whose partition is excluded from replica movement. (optional)  (default to null)
            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)  (default to null)
            var executionProgressCheckIntervalMs = 789;  // Long | Execution progress check interval in milliseconds. (optional)  (default to null)
            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)  (default to null)
            var reviewId = 56;  // Integer | Review id for 2-step verification. (optional)  (default to null)
            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)  (default to null)
            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)  (default to null)
            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, brokerConcurrentLeaderMovements, 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');
// Configure HTTP basic authorization: basicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$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 = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // 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 cluster ongoing leadership movements.
$brokerConcurrentLeaderMovements = 56; // Integer | The upper bound of per broker 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 = __CruiseControl.%2A; // 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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // 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, $brokerConcurrentLeaderMovements, $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::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure HTTP basic authorization: basicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::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 = [["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]]; # 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 cluster ongoing leadership movements.
my $brokerConcurrentLeaderMovements = 56; # Integer | The upper bound of per broker 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 = __CruiseControl.%2A; # 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 = [["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]]; # 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, brokerConcurrentLeaderMovements => $brokerConcurrentLeaderMovements, 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 openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
brokerid =  # array[Integer] | List of target broker ids. (default to null)
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 = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"] # array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional) (default to null)
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) (default to null)
concurrentLeaderMovements = 56 # Integer | The upper bound of cluster ongoing leadership movements. (optional) (default to 1000)
brokerConcurrentLeaderMovements = 56 # Integer | The upper bound of per broker ongoing leadership movements. (optional) (default to 250)
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 = __CruiseControl.%2A # String | Specify topic whose partition is excluded from replica movement. (optional) (default to null)
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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"] # array[String] | Replica movement strategies to use. (optional) (default to null)
executionProgressCheckIntervalMs = 789 # Long | Execution progress check interval in milliseconds. (optional) (default to null)
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) (default to null)
reviewId = 56 # Integer | Review id for 2-step verification. (optional) (default to null)
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) (default to null)
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) (default to null)
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, brokerConcurrentLeaderMovements=brokerConcurrentLeaderMovements, 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)
extern crate DefaultApi;

pub fn main() {
    let brokerid = ; // array[Integer]
    let dryrun = true; // Boolean
    let throttleAddedBroker = true; // Boolean
    let allowCapacityEstimation = true; // Boolean
    let goals = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // array[String]
    let concurrentPartitionMovementsPerBroker = 56; // Integer
    let maxPartitionMovementsInCluster = 56; // Integer
    let concurrentLeaderMovements = 56; // Integer
    let brokerConcurrentLeaderMovements = 56; // Integer
    let json = true; // Boolean
    let skipHardGoalCheck = true; // Boolean
    let excludedTopics = __CruiseControl.%2A; // String
    let kafkaAssigner = true; // Boolean
    let useReadyDefaultGoals = true; // Boolean
    let verbose = true; // Boolean
    let excludeRecentlyDemotedBrokers = true; // Boolean
    let excludeRecentlyRemovedBrokers = true; // Boolean
    let replicaMovementStrategies = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // array[String]
    let executionProgressCheckIntervalMs = 789; // Long
    let stopOngoingExecution = true; // Boolean
    let reason = reason_example; // String
    let reviewId = 56; // Integer
    let dataFrom = dataFrom_example; // String
    let replicationThrottle = 789; // Long
    let getResponseSchema = true; // Boolean
    let doAs = doAs_example; // String
    let fastMode = true; // Boolean

    let mut context = DefaultApi::Context::default();
    let result = client.addBroker(brokerid, dryrun, throttleAddedBroker, allowCapacityEstimation, goals, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentLeaderMovements, brokerConcurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, kafkaAssigner, useReadyDefaultGoals, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, executionProgressCheckIntervalMs, stopOngoingExecution, reason, reviewId, dataFrom, replicationThrottle, getResponseSchema, doAs, fastMode, &context).wait();

    println!("{:?}", result);
}

Scopes

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 cluster ongoing leadership movements.
broker_concurrent_leader_movements
Integer (int32)
The upper bound of per broker 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


admin

Dynamically change some configs of Cruise Control.


/admin

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Basic [[basicHash]]" \
 -H "Accept: application/json,text/plain" \
 "http://localhost/kafkacruisecontrol/admin?disable_self_healing_for=["METRIC_ANOMALY"]&enable_self_healing_for=["GOAL_VIOLATION","BROKER_FAILURE"]&concurrent_partition_movements_per_broker=56&max_partition_movements_in_cluster=56&concurrent_intra_broker_partition_movements=56&concurrent_leader_movements=56&broker_concurrent_leader_movements=56&drop_recently_removed_brokers=[1,2,3]&drop_recently_demoted_brokers=[7,8,9]&execution_progress_check_interval_ms=789&review_id=56&json=true&get_response_schema=true&doAs=doAs_example&disable_concurrency_adjuster_for=["INTER_BROKER_REPLICA"]&enable_concurrency_adjuster_for=["INTER_BROKER_REPLICA"]&min_isr_based_concurrency_adjustment=true&reason=reason_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        array[String] disableSelfHealingFor = ["METRIC_ANOMALY"]; // array[String] | Disable self-healing for certain anomaly types.
        array[String] enableSelfHealingFor = ["GOAL_VIOLATION","BROKER_FAILURE"]; // 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 cluster ongoing leadership movements.
        Integer brokerConcurrentLeaderMovements = 56; // Integer | Change upper bound of per broker ongoing leadership movements.
        array[Integer] dropRecentlyRemovedBrokers = [1,2,3]; // array[Integer] | Drop broker ids from recently removed broker list so that Cruise Control can move replicas to these brokers.
        array[Integer] dropRecentlyDemotedBrokers = [7,8,9]; // 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 = ["INTER_BROKER_REPLICA"]; // array[String] | Disable concurrency adjuster for given concurrency types.
        array[String] enableConcurrencyAdjusterFor = ["INTER_BROKER_REPLICA"]; // 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, brokerConcurrentLeaderMovements, 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 'package:openapi/api.dart';

final api_instance = DefaultApi();

final array[String] disableSelfHealingFor = new array[String](); // array[String] | Disable self-healing for certain anomaly types.
final array[String] enableSelfHealingFor = new array[String](); // array[String] | Enable self-healing for certain anomaly types.
final Integer concurrentPartitionMovementsPerBroker = new Integer(); // Integer | Change upper bound of ongoing replica movements going into/out of each broker.
final Integer maxPartitionMovementsInCluster = new Integer(); // Integer | Change upper bound of ongoing inter broker partition movements in cluster.
final Integer concurrentIntraBrokerPartitionMovements = new Integer(); // Integer | Change upper bound of ongoing replica movements between disks within each broker.
final Integer concurrentLeaderMovements = new Integer(); // Integer | Change upper bound of cluster ongoing leadership movements.
final Integer brokerConcurrentLeaderMovements = new Integer(); // Integer | Change upper bound of per broker ongoing leadership movements.
final array[Integer] dropRecentlyRemovedBrokers = new array[Integer](); // array[Integer] | Drop broker ids from recently removed broker list so that Cruise Control can move replicas to these brokers.
final array[Integer] 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.
final Long executionProgressCheckIntervalMs = new Long(); // Long | Change execution progress check interval in milliseconds.
final Integer reviewId = new Integer(); // Integer | Review id for 2-step verification.
final Boolean json = new Boolean(); // Boolean | Whether to return in JSON format or not.
final Boolean getResponseSchema = new Boolean(); // Boolean | Whether to return JSON schema in response header or not.
final String doAs = new String(); // String | The user specified by a trusted proxy in that authentication model.
final array[String] disableConcurrencyAdjusterFor = new array[String](); // array[String] | Disable concurrency adjuster for given concurrency types.
final array[String] enableConcurrencyAdjusterFor = new array[String](); // array[String] | Enable concurrency adjuster for given concurrency types.
final Boolean minIsrBasedConcurrencyAdjustment = new Boolean(); // Boolean | Whether to enable (true) or disable (false) MinISR-based concurrency adjustment
final String reason = new String(); // String | Reason for request.

try {
    final result = await api_instance.admin(disableSelfHealingFor, enableSelfHealingFor, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentIntraBrokerPartitionMovements, concurrentLeaderMovements, brokerConcurrentLeaderMovements, dropRecentlyRemovedBrokers, dropRecentlyDemotedBrokers, executionProgressCheckIntervalMs, reviewId, json, getResponseSchema, doAs, disableConcurrencyAdjusterFor, enableConcurrencyAdjusterFor, minIsrBasedConcurrencyAdjustment, reason);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->admin: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        array[String] disableSelfHealingFor = ["METRIC_ANOMALY"]; // array[String] | Disable self-healing for certain anomaly types.
        array[String] enableSelfHealingFor = ["GOAL_VIOLATION","BROKER_FAILURE"]; // 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 cluster ongoing leadership movements.
        Integer brokerConcurrentLeaderMovements = 56; // Integer | Change upper bound of per broker ongoing leadership movements.
        array[Integer] dropRecentlyRemovedBrokers = [1,2,3]; // array[Integer] | Drop broker ids from recently removed broker list so that Cruise Control can move replicas to these brokers.
        array[Integer] dropRecentlyDemotedBrokers = [7,8,9]; // 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 = ["INTER_BROKER_REPLICA"]; // array[String] | Disable concurrency adjuster for given concurrency types.
        array[String] enableConcurrencyAdjusterFor = ["INTER_BROKER_REPLICA"]; // 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, brokerConcurrentLeaderMovements, 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();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
array[String] *disableSelfHealingFor = ["METRIC_ANOMALY"]; // Disable self-healing for certain anomaly types. (optional) (default to null)
array[String] *enableSelfHealingFor = ["GOAL_VIOLATION","BROKER_FAILURE"]; // Enable self-healing for certain anomaly types. (optional) (default to null)
Integer *concurrentPartitionMovementsPerBroker = 56; // Change upper bound of ongoing replica movements going into/out of each broker. (optional) (default to null)
Integer *maxPartitionMovementsInCluster = 56; // Change upper bound of ongoing inter broker partition movements in cluster. (optional) (default to null)
Integer *concurrentIntraBrokerPartitionMovements = 56; // Change upper bound of ongoing replica movements between disks within each broker. (optional) (default to null)
Integer *concurrentLeaderMovements = 56; // Change upper bound of cluster ongoing leadership movements. (optional) (default to null)
Integer *brokerConcurrentLeaderMovements = 56; // Change upper bound of per broker ongoing leadership movements. (optional) (default to null)
array[Integer] *dropRecentlyRemovedBrokers = [1,2,3]; // Drop broker ids from recently removed broker list so that Cruise Control can move replicas to these brokers. (optional) (default to null)
array[Integer] *dropRecentlyDemotedBrokers = [7,8,9]; // 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) (default to null)
Long *executionProgressCheckIntervalMs = 789; // Change execution progress check interval in milliseconds. (optional) (default to null)
Integer *reviewId = 56; // Review id for 2-step verification. (optional) (default to null)
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) (default to null)
array[String] *disableConcurrencyAdjusterFor = ["INTER_BROKER_REPLICA"]; // Disable concurrency adjuster for given concurrency types. (optional) (default to null)
array[String] *enableConcurrencyAdjusterFor = ["INTER_BROKER_REPLICA"]; // Enable concurrency adjuster for given concurrency types. (optional) (default to null)
Boolean *minIsrBasedConcurrencyAdjustment = true; // Whether to enable (true) or disable (false) MinISR-based concurrency adjustment (optional) (default to null)
String *reason = reason_example; // Reason for request. (optional) (default to null)

// Dynamically change some configs of Cruise Control.
[apiInstance adminWith:disableSelfHealingFor
    enableSelfHealingFor:enableSelfHealingFor
    concurrentPartitionMovementsPerBroker:concurrentPartitionMovementsPerBroker
    maxPartitionMovementsInCluster:maxPartitionMovementsInCluster
    concurrentIntraBrokerPartitionMovements:concurrentIntraBrokerPartitionMovements
    concurrentLeaderMovements:concurrentLeaderMovements
    brokerConcurrentLeaderMovements:brokerConcurrentLeaderMovements
    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 defaultClient = CruiseControlApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

// Create an instance of the API class
var api = new CruiseControlApi.DefaultApi()
var opts = {
  'disableSelfHealingFor': ["METRIC_ANOMALY"], // {array[String]} Disable self-healing for certain anomaly types.
  'enableSelfHealingFor': ["GOAL_VIOLATION","BROKER_FAILURE"], // {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 cluster ongoing leadership movements.
  'brokerConcurrentLeaderMovements': 56, // {Integer} Change upper bound of per broker ongoing leadership movements.
  'dropRecentlyRemovedBrokers': [1,2,3], // {array[Integer]} Drop broker ids from recently removed broker list so that Cruise Control can move replicas to these brokers.
  'dropRecentlyDemotedBrokers': [7,8,9], // {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': ["INTER_BROKER_REPLICA"], // {array[String]} Disable concurrency adjuster for given concurrency types.
  'enableConcurrencyAdjusterFor': ["INTER_BROKER_REPLICA"], // {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 Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class adminExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var disableSelfHealingFor = new array[String](); // array[String] | Disable self-healing for certain anomaly types. (optional)  (default to null)
            var enableSelfHealingFor = new array[String](); // array[String] | Enable self-healing for certain anomaly types. (optional)  (default to null)
            var concurrentPartitionMovementsPerBroker = 56;  // Integer | Change upper bound of ongoing replica movements going into/out of each broker. (optional)  (default to null)
            var maxPartitionMovementsInCluster = 56;  // Integer | Change upper bound of ongoing inter broker partition movements in cluster. (optional)  (default to null)
            var concurrentIntraBrokerPartitionMovements = 56;  // Integer | Change upper bound of ongoing replica movements between disks within each broker. (optional)  (default to null)
            var concurrentLeaderMovements = 56;  // Integer | Change upper bound of cluster ongoing leadership movements. (optional)  (default to null)
            var brokerConcurrentLeaderMovements = 56;  // Integer | Change upper bound of per broker ongoing leadership movements. (optional)  (default to null)
            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)  (default to null)
            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)  (default to null)
            var executionProgressCheckIntervalMs = 789;  // Long | Change execution progress check interval in milliseconds. (optional)  (default to null)
            var reviewId = 56;  // Integer | Review id for 2-step verification. (optional)  (default to null)
            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)  (default to null)
            var disableConcurrencyAdjusterFor = new array[String](); // array[String] | Disable concurrency adjuster for given concurrency types. (optional)  (default to null)
            var enableConcurrencyAdjusterFor = new array[String](); // array[String] | Enable concurrency adjuster for given concurrency types. (optional)  (default to null)
            var minIsrBasedConcurrencyAdjustment = true;  // Boolean | Whether to enable (true) or disable (false) MinISR-based concurrency adjustment (optional)  (default to null)
            var reason = reason_example;  // String | Reason for request. (optional)  (default to null)

            try {
                // Dynamically change some configs of Cruise Control.
                AdminResult result = apiInstance.admin(disableSelfHealingFor, enableSelfHealingFor, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentIntraBrokerPartitionMovements, concurrentLeaderMovements, brokerConcurrentLeaderMovements, 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');
// Configure HTTP basic authorization: basicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$disableSelfHealingFor = ["METRIC_ANOMALY"]; // array[String] | Disable self-healing for certain anomaly types.
$enableSelfHealingFor = ["GOAL_VIOLATION","BROKER_FAILURE"]; // 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 cluster ongoing leadership movements.
$brokerConcurrentLeaderMovements = 56; // Integer | Change upper bound of per broker ongoing leadership movements.
$dropRecentlyRemovedBrokers = [1,2,3]; // array[Integer] | Drop broker ids from recently removed broker list so that Cruise Control can move replicas to these brokers.
$dropRecentlyDemotedBrokers = [7,8,9]; // 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 = ["INTER_BROKER_REPLICA"]; // array[String] | Disable concurrency adjuster for given concurrency types.
$enableConcurrencyAdjusterFor = ["INTER_BROKER_REPLICA"]; // 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, $brokerConcurrentLeaderMovements, $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::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure HTTP basic authorization: basicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $disableSelfHealingFor = [["METRIC_ANOMALY"]]; # array[String] | Disable self-healing for certain anomaly types.
my $enableSelfHealingFor = [["GOAL_VIOLATION","BROKER_FAILURE"]]; # 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 cluster ongoing leadership movements.
my $brokerConcurrentLeaderMovements = 56; # Integer | Change upper bound of per broker ongoing leadership movements.
my $dropRecentlyRemovedBrokers = [[1,2,3]]; # array[Integer] | Drop broker ids from recently removed broker list so that Cruise Control can move replicas to these brokers.
my $dropRecentlyDemotedBrokers = [[7,8,9]]; # 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 = [["INTER_BROKER_REPLICA"]]; # array[String] | Disable concurrency adjuster for given concurrency types.
my $enableConcurrencyAdjusterFor = [["INTER_BROKER_REPLICA"]]; # 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, brokerConcurrentLeaderMovements => $brokerConcurrentLeaderMovements, 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 openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
disableSelfHealingFor = ["METRIC_ANOMALY"] # array[String] | Disable self-healing for certain anomaly types. (optional) (default to null)
enableSelfHealingFor = ["GOAL_VIOLATION","BROKER_FAILURE"] # array[String] | Enable self-healing for certain anomaly types. (optional) (default to null)
concurrentPartitionMovementsPerBroker = 56 # Integer | Change upper bound of ongoing replica movements going into/out of each broker. (optional) (default to null)
maxPartitionMovementsInCluster = 56 # Integer | Change upper bound of ongoing inter broker partition movements in cluster. (optional) (default to null)
concurrentIntraBrokerPartitionMovements = 56 # Integer | Change upper bound of ongoing replica movements between disks within each broker. (optional) (default to null)
concurrentLeaderMovements = 56 # Integer | Change upper bound of cluster ongoing leadership movements. (optional) (default to null)
brokerConcurrentLeaderMovements = 56 # Integer | Change upper bound of per broker ongoing leadership movements. (optional) (default to null)
dropRecentlyRemovedBrokers = [1,2,3] # array[Integer] | Drop broker ids from recently removed broker list so that Cruise Control can move replicas to these brokers. (optional) (default to null)
dropRecentlyDemotedBrokers = [7,8,9] # 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) (default to null)
executionProgressCheckIntervalMs = 789 # Long | Change execution progress check interval in milliseconds. (optional) (default to null)
reviewId = 56 # Integer | Review id for 2-step verification. (optional) (default to null)
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) (default to null)
disableConcurrencyAdjusterFor = ["INTER_BROKER_REPLICA"] # array[String] | Disable concurrency adjuster for given concurrency types. (optional) (default to null)
enableConcurrencyAdjusterFor = ["INTER_BROKER_REPLICA"] # array[String] | Enable concurrency adjuster for given concurrency types. (optional) (default to null)
minIsrBasedConcurrencyAdjustment = true # Boolean | Whether to enable (true) or disable (false) MinISR-based concurrency adjustment (optional) (default to null)
reason = reason_example # String | Reason for request. (optional) (default to null)

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, brokerConcurrentLeaderMovements=brokerConcurrentLeaderMovements, 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)
extern crate DefaultApi;

pub fn main() {
    let disableSelfHealingFor = ["METRIC_ANOMALY"]; // array[String]
    let enableSelfHealingFor = ["GOAL_VIOLATION","BROKER_FAILURE"]; // array[String]
    let concurrentPartitionMovementsPerBroker = 56; // Integer
    let maxPartitionMovementsInCluster = 56; // Integer
    let concurrentIntraBrokerPartitionMovements = 56; // Integer
    let concurrentLeaderMovements = 56; // Integer
    let brokerConcurrentLeaderMovements = 56; // Integer
    let dropRecentlyRemovedBrokers = [1,2,3]; // array[Integer]
    let dropRecentlyDemotedBrokers = [7,8,9]; // array[Integer]
    let executionProgressCheckIntervalMs = 789; // Long
    let reviewId = 56; // Integer
    let json = true; // Boolean
    let getResponseSchema = true; // Boolean
    let doAs = doAs_example; // String
    let disableConcurrencyAdjusterFor = ["INTER_BROKER_REPLICA"]; // array[String]
    let enableConcurrencyAdjusterFor = ["INTER_BROKER_REPLICA"]; // array[String]
    let minIsrBasedConcurrencyAdjustment = true; // Boolean
    let reason = reason_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.admin(disableSelfHealingFor, enableSelfHealingFor, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentIntraBrokerPartitionMovements, concurrentLeaderMovements, brokerConcurrentLeaderMovements, dropRecentlyRemovedBrokers, dropRecentlyDemotedBrokers, executionProgressCheckIntervalMs, reviewId, json, getResponseSchema, doAs, disableConcurrencyAdjusterFor, enableConcurrencyAdjusterFor, minIsrBasedConcurrencyAdjustment, reason, &context).wait();

    println!("{:?}", result);
}

Scopes

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 cluster ongoing leadership movements.
broker_concurrent_leader_movements
Integer (int32)
Change upper bound of per broker 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


bootstrap

Bootstrap Cruise Control.


/bootstrap

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Basic [[basicHash]]" \
 -H "Accept: application/json,text/plain" \
 "http://localhost/kafkacruisecontrol/bootstrap?start=789&end=789&clearmetrics=true&developer_mode=true&json=true&get_response_schema=true&doAs=doAs_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Create an instance of the API class
        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 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Long start = new Long(); // Long | Timestamp in millisecond of earliest metrics sample to load during bootstrap.
final Long end = new Long(); // Long | Timestamp in millisecond of latest metrics sample to load during bootstrap, current time will be used if this parameter is not specified.
final Boolean clearmetrics = new Boolean(); // Boolean | Whether to clear the collected metric samples during bootstrap.
final Boolean developerMode = new Boolean(); // Boolean | Whether to run the request in developer mode.
final Boolean json = new Boolean(); // Boolean | Whether to return in JSON format or not.
final Boolean getResponseSchema = new Boolean(); // Boolean | Whether to return JSON schema in response header or not.
final String doAs = new String(); // String | The user specified by a trusted proxy in that authentication model.

try {
    final result = await api_instance.bootstrap(start, end, clearmetrics, developerMode, json, getResponseSchema, doAs);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->bootstrap: $e\n');
}

import org.openapitools.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();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
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) (default to null)
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) (default to null)

// 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 defaultClient = CruiseControlApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

// Create an instance of the API class
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 Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class bootstrapExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            // Create an instance of the API class
            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)  (default to null)
            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)  (default to null)

            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');
// Configure HTTP basic authorization: basicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$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::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure HTTP basic authorization: basicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::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 openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'

# Create an instance of the API class
api_instance = openapi_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) (default to null)
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) (default to null)

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)
extern crate DefaultApi;

pub fn main() {
    let start = 789; // Long
    let end = 789; // Long
    let clearmetrics = true; // Boolean
    let developerMode = true; // Boolean
    let json = true; // Boolean
    let getResponseSchema = true; // Boolean
    let doAs = doAs_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.bootstrap(start, end, clearmetrics, developerMode, json, getResponseSchema, doAs, &context).wait();

    println!("{:?}", result);
}

Scopes

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


demoteBroker

Demote specified brokers.


/demote_broker

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Basic [[basicHash]]" \
 -H "Accept: application/json,text/plain" \
 "http://localhost/kafkacruisecontrol/demote_broker?brokerid=&dryrun=true&concurrent_leader_movements=56&broker_concurrent_leader_movements=56&allow_capacity_estimation=true&json=true&skip_urp_demotion=true&exclude_follower_demotion=true&verbose=true&exclude_recently_demoted_brokers=true&replica_movement_strategies=["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]&brokerid_and_logdirs=&replication_throttle=789&reason=reason_example&execution_progress_check_interval_ms=789&stop_ongoing_execution=true&review_id=56&get_response_schema=true&doAs=doAs_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Create an instance of the API class
        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 cluster ongoing leadership movements.
        Integer brokerConcurrentLeaderMovements = 56; // Integer | The upper bound of per broker 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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // 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, brokerConcurrentLeaderMovements, 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 'package:openapi/api.dart';

final api_instance = DefaultApi();

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

try {
    final result = await api_instance.demoteBroker(brokerid, dryrun, concurrentLeaderMovements, brokerConcurrentLeaderMovements, allowCapacityEstimation, json, skipUrpDemotion, excludeFollowerDemotion, verbose, excludeRecentlyDemotedBrokers, replicaMovementStrategies, brokeridAndLogdirs, replicationThrottle, reason, executionProgressCheckIntervalMs, stopOngoingExecution, reviewId, getResponseSchema, doAs);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->demoteBroker: $e\n');
}

import org.openapitools.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 cluster ongoing leadership movements.
        Integer brokerConcurrentLeaderMovements = 56; // Integer | The upper bound of per broker 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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // 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, brokerConcurrentLeaderMovements, 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();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
array[Integer] *brokerid = ; // List of target broker ids. (default to null)
Boolean *dryrun = true; // Whether to dry-run the request or not. (optional) (default to true)
Integer *concurrentLeaderMovements = 56; // The upper bound of cluster ongoing leadership movements. (optional) (default to 1000)
Integer *brokerConcurrentLeaderMovements = 56; // The upper bound of per broker ongoing leadership movements. (optional) (default to 250)
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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // Replica movement strategies to use. (optional) (default to null)
map[String, array[String]] *brokeridAndLogdirs = ; // List of broker id and logdir pair to be demoted in the cluster. (optional) (default to null)
Long *replicationThrottle = 789; // Upper bound on the bandwidth in bytes per second used to move replicas. (optional) (default to null)
String *reason = reason_example; // Reason for request. (optional) (default to null)
Long *executionProgressCheckIntervalMs = 789; // Execution progress check interval in milliseconds. (optional) (default to null)
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) (default to null)
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) (default to null)

// Demote specified brokers.
[apiInstance demoteBrokerWith:brokerid
    dryrun:dryrun
    concurrentLeaderMovements:concurrentLeaderMovements
    brokerConcurrentLeaderMovements:brokerConcurrentLeaderMovements
    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 defaultClient = CruiseControlApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

// Create an instance of the API class
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 cluster ongoing leadership movements.
  'brokerConcurrentLeaderMovements': 56, // {Integer} The upper bound of per broker 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': ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"], // {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 Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class demoteBrokerExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var brokerid = new array[Integer](); // array[Integer] | List of target broker ids. (default to null)
            var dryrun = true;  // Boolean | Whether to dry-run the request or not. (optional)  (default to true)
            var concurrentLeaderMovements = 56;  // Integer | The upper bound of cluster ongoing leadership movements. (optional)  (default to 1000)
            var brokerConcurrentLeaderMovements = 56;  // Integer | The upper bound of per broker ongoing leadership movements. (optional)  (default to 250)
            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)  (default to null)
            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)  (default to null)
            var replicationThrottle = 789;  // Long | Upper bound on the bandwidth in bytes per second used to move replicas. (optional)  (default to null)
            var reason = reason_example;  // String | Reason for request. (optional)  (default to null)
            var executionProgressCheckIntervalMs = 789;  // Long | Execution progress check interval in milliseconds. (optional)  (default to null)
            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)  (default to null)
            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)  (default to null)

            try {
                // Demote specified brokers.
                OptimizationResult result = apiInstance.demoteBroker(brokerid, dryrun, concurrentLeaderMovements, brokerConcurrentLeaderMovements, 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');
// Configure HTTP basic authorization: basicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$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 cluster ongoing leadership movements.
$brokerConcurrentLeaderMovements = 56; // Integer | The upper bound of per broker 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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // 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, $brokerConcurrentLeaderMovements, $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::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure HTTP basic authorization: basicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::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 cluster ongoing leadership movements.
my $brokerConcurrentLeaderMovements = 56; # Integer | The upper bound of per broker 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 = [["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]]; # 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, brokerConcurrentLeaderMovements => $brokerConcurrentLeaderMovements, 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 openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
brokerid =  # array[Integer] | List of target broker ids. (default to null)
dryrun = true # Boolean | Whether to dry-run the request or not. (optional) (default to true)
concurrentLeaderMovements = 56 # Integer | The upper bound of cluster ongoing leadership movements. (optional) (default to 1000)
brokerConcurrentLeaderMovements = 56 # Integer | The upper bound of per broker ongoing leadership movements. (optional) (default to 250)
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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"] # array[String] | Replica movement strategies to use. (optional) (default to null)
brokeridAndLogdirs =  # map[String, array[String]] | List of broker id and logdir pair to be demoted in the cluster. (optional) (default to null)
replicationThrottle = 789 # Long | Upper bound on the bandwidth in bytes per second used to move replicas. (optional) (default to null)
reason = reason_example # String | Reason for request. (optional) (default to null)
executionProgressCheckIntervalMs = 789 # Long | Execution progress check interval in milliseconds. (optional) (default to null)
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) (default to null)
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) (default to null)

try:
    # Demote specified brokers.
    api_response = api_instance.demote_broker(brokerid, dryrun=dryrun, concurrentLeaderMovements=concurrentLeaderMovements, brokerConcurrentLeaderMovements=brokerConcurrentLeaderMovements, 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)
extern crate DefaultApi;

pub fn main() {
    let brokerid = ; // array[Integer]
    let dryrun = true; // Boolean
    let concurrentLeaderMovements = 56; // Integer
    let brokerConcurrentLeaderMovements = 56; // Integer
    let allowCapacityEstimation = true; // Boolean
    let json = true; // Boolean
    let skipUrpDemotion = true; // Boolean
    let excludeFollowerDemotion = true; // Boolean
    let verbose = true; // Boolean
    let excludeRecentlyDemotedBrokers = true; // Boolean
    let replicaMovementStrategies = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // array[String]
    let brokeridAndLogdirs = ; // map[String, array[String]]
    let replicationThrottle = 789; // Long
    let reason = reason_example; // String
    let executionProgressCheckIntervalMs = 789; // Long
    let stopOngoingExecution = true; // Boolean
    let reviewId = 56; // Integer
    let getResponseSchema = true; // Boolean
    let doAs = doAs_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.demoteBroker(brokerid, dryrun, concurrentLeaderMovements, brokerConcurrentLeaderMovements, allowCapacityEstimation, json, skipUrpDemotion, excludeFollowerDemotion, verbose, excludeRecentlyDemotedBrokers, replicaMovementStrategies, brokeridAndLogdirs, replicationThrottle, reason, executionProgressCheckIntervalMs, stopOngoingExecution, reviewId, getResponseSchema, doAs, &context).wait();

    println!("{:?}", result);
}

Scopes

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 cluster ongoing leadership movements.
broker_concurrent_leader_movements
Integer (int32)
The upper bound of per broker 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


fixOfflineReplicas

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


/fix_offline_replicas

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Basic [[basicHash]]" \
 -H "Accept: application/json,text/plain" \
 "http://localhost/kafkacruisecontrol/fix_offline_replicas?dryrun=true&goals=["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]&allow_capacity_estimation=true&concurrent_partition_movements_per_broker=56&max_partition_movements_in_cluster=56&concurrent_leader_movements=56&broker_concurrent_leader_movements=56&json=true&skip_hard_goal_check=true&excluded_topics=__CruiseControl.%2A&use_ready_default_goals=true&data_from=dataFrom_example&verbose=true&exclude_recently_demoted_brokers=true&exclude_recently_removed_brokers=true&replica_movement_strategies=["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]&review_id=56&replication_throttle=789&execution_progress_check_interval_ms=789&reason=Move offline replicas away from broken brokers.&stop_ongoing_execution=true&get_response_schema=true&doAs=doAs_example&fast_mode=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        Boolean dryrun = true; // Boolean | Whether dry-run the request or not.
        array[String] goals = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // 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 cluster ongoing leadership movements.
        Integer brokerConcurrentLeaderMovements = 56; // Integer | The upper bound of per broker 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 = __CruiseControl.%2A; // 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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // 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 = Move offline replicas away from broken brokers.; // 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, brokerConcurrentLeaderMovements, 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 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Boolean dryrun = new Boolean(); // Boolean | Whether dry-run the request or not.
final array[String] 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.
final Boolean allowCapacityEstimation = new Boolean(); // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
final Integer concurrentPartitionMovementsPerBroker = new Integer(); // Integer | The upper bound of ongoing replica movements going into/out of each broker.
final Integer maxPartitionMovementsInCluster = new Integer(); // Integer | Change upper bound of ongoing inter broker partition movements in cluster.
final Integer concurrentLeaderMovements = new Integer(); // Integer | The upper bound of cluster ongoing leadership movements.
final Integer brokerConcurrentLeaderMovements = new Integer(); // Integer | The upper bound of per broker ongoing leadership movements.
final Boolean json = new Boolean(); // Boolean | Whether to return in JSON format or not.
final Boolean skipHardGoalCheck = new Boolean(); // Boolean | Whether to allow hard goals be skipped in proposal generation.
final String excludedTopics = new String(); // String | Specify topic whose partition is excluded from replica movement.
final Boolean useReadyDefaultGoals = new Boolean(); // Boolean | Whether to only use ready goals to generate proposal.
final String dataFrom = new String(); // String | Whether to calculate proposal from available valid partitions or valid windows.
final Boolean verbose = new Boolean(); // Boolean | Return detailed state information.
final Boolean excludeRecentlyDemotedBrokers = new Boolean(); // Boolean | Whether to allow leader replicas to be moved to recently demoted brokers.
final Boolean excludeRecentlyRemovedBrokers = new Boolean(); // Boolean | Whether to allow leader replicas to be moved to recently removed broker.
final array[String] replicaMovementStrategies = new array[String](); // array[String] | Replica movement strategies to use.
final Integer reviewId = new Integer(); // Integer | Review id for 2-step verification.
final Long replicationThrottle = new Long(); // Long | Upper bound on the bandwidth in bytes per second used to move replicas.
final Long executionProgressCheckIntervalMs = new Long(); // Long | Execution progress check interval in milliseconds.
final String reason = new String(); // String | Reason for request.
final Boolean stopOngoingExecution = new Boolean(); // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
final Boolean getResponseSchema = new Boolean(); // Boolean | Whether to return JSON schema in response header or not.
final String doAs = new String(); // String | The user specified by a trusted proxy in that authentication model.
final Boolean fastMode = new Boolean(); // Boolean | True to compute proposals in fast mode, false otherwise

try {
    final result = await api_instance.fixOfflineReplicas(dryrun, goals, allowCapacityEstimation, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentLeaderMovements, brokerConcurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, useReadyDefaultGoals, dataFrom, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, reviewId, replicationThrottle, executionProgressCheckIntervalMs, reason, stopOngoingExecution, getResponseSchema, doAs, fastMode);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->fixOfflineReplicas: $e\n');
}

import org.openapitools.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 = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // 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 cluster ongoing leadership movements.
        Integer brokerConcurrentLeaderMovements = 56; // Integer | The upper bound of per broker 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 = __CruiseControl.%2A; // 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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // 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 = Move offline replicas away from broken brokers.; // 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, brokerConcurrentLeaderMovements, 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();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Boolean *dryrun = true; // Whether dry-run the request or not. (optional) (default to true)
array[String] *goals = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional) (default to null)
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) (default to null)
Integer *maxPartitionMovementsInCluster = 56; // Change upper bound of ongoing inter broker partition movements in cluster. (optional) (default to null)
Integer *concurrentLeaderMovements = 56; // The upper bound of cluster ongoing leadership movements. (optional) (default to null)
Integer *brokerConcurrentLeaderMovements = 56; // The upper bound of per broker ongoing leadership movements. (optional) (default to null)
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 = __CruiseControl.%2A; // Specify topic whose partition is excluded from replica movement. (optional) (default to null)
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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // Replica movement strategies to use. (optional) (default to null)
Integer *reviewId = 56; // Review id for 2-step verification. (optional) (default to null)
Long *replicationThrottle = 789; // Upper bound on the bandwidth in bytes per second used to move replicas. (optional) (default to null)
Long *executionProgressCheckIntervalMs = 789; // Execution progress check interval in milliseconds. (optional) (default to null)
String *reason = Move offline replicas away from broken brokers.; // Reason for request. (optional) (default to null)
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) (default to null)
Boolean *fastMode = true; // True to compute proposals in fast mode, false otherwise (optional) (default to true)

// Fix offline replicas by moving currently offline replicas to healthy brokers.
[apiInstance fixOfflineReplicasWith:dryrun
    goals:goals
    allowCapacityEstimation:allowCapacityEstimation
    concurrentPartitionMovementsPerBroker:concurrentPartitionMovementsPerBroker
    maxPartitionMovementsInCluster:maxPartitionMovementsInCluster
    concurrentLeaderMovements:concurrentLeaderMovements
    brokerConcurrentLeaderMovements:brokerConcurrentLeaderMovements
    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 defaultClient = CruiseControlApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

// Create an instance of the API class
var api = new CruiseControlApi.DefaultApi()
var opts = {
  'dryrun': true, // {Boolean} Whether dry-run the request or not.
  'goals': ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"], // {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 cluster ongoing leadership movements.
  'brokerConcurrentLeaderMovements': 56, // {Integer} The upper bound of per broker 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': __CruiseControl.%2A, // {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': ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"], // {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': Move offline replicas away from broken brokers., // {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 Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class fixOfflineReplicasExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            // Create an instance of the API class
            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)  (default to null)
            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)  (default to null)
            var maxPartitionMovementsInCluster = 56;  // Integer | Change upper bound of ongoing inter broker partition movements in cluster. (optional)  (default to null)
            var concurrentLeaderMovements = 56;  // Integer | The upper bound of cluster ongoing leadership movements. (optional)  (default to null)
            var brokerConcurrentLeaderMovements = 56;  // Integer | The upper bound of per broker ongoing leadership movements. (optional)  (default to null)
            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 = __CruiseControl.%2A;  // String | Specify topic whose partition is excluded from replica movement. (optional)  (default to null)
            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)  (default to null)
            var reviewId = 56;  // Integer | Review id for 2-step verification. (optional)  (default to null)
            var replicationThrottle = 789;  // Long | Upper bound on the bandwidth in bytes per second used to move replicas. (optional)  (default to null)
            var executionProgressCheckIntervalMs = 789;  // Long | Execution progress check interval in milliseconds. (optional)  (default to null)
            var reason = Move offline replicas away from broken brokers.;  // String | Reason for request. (optional)  (default to null)
            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)  (default to null)
            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, brokerConcurrentLeaderMovements, 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');
// Configure HTTP basic authorization: basicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$dryrun = true; // Boolean | Whether dry-run the request or not.
$goals = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // 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 cluster ongoing leadership movements.
$brokerConcurrentLeaderMovements = 56; // Integer | The upper bound of per broker 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 = __CruiseControl.%2A; // 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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // 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 = Move offline replicas away from broken brokers.; // 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, $brokerConcurrentLeaderMovements, $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::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure HTTP basic authorization: basicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $dryrun = true; # Boolean | Whether dry-run the request or not.
my $goals = [["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]]; # 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 cluster ongoing leadership movements.
my $brokerConcurrentLeaderMovements = 56; # Integer | The upper bound of per broker 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 = __CruiseControl.%2A; # 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 = [["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]]; # 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 = Move offline replicas away from broken brokers.; # 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, brokerConcurrentLeaderMovements => $brokerConcurrentLeaderMovements, 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 openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
dryrun = true # Boolean | Whether dry-run the request or not. (optional) (default to true)
goals = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"] # array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional) (default to null)
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) (default to null)
maxPartitionMovementsInCluster = 56 # Integer | Change upper bound of ongoing inter broker partition movements in cluster. (optional) (default to null)
concurrentLeaderMovements = 56 # Integer | The upper bound of cluster ongoing leadership movements. (optional) (default to null)
brokerConcurrentLeaderMovements = 56 # Integer | The upper bound of per broker ongoing leadership movements. (optional) (default to null)
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 = __CruiseControl.%2A # String | Specify topic whose partition is excluded from replica movement. (optional) (default to null)
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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"] # array[String] | Replica movement strategies to use. (optional) (default to null)
reviewId = 56 # Integer | Review id for 2-step verification. (optional) (default to null)
replicationThrottle = 789 # Long | Upper bound on the bandwidth in bytes per second used to move replicas. (optional) (default to null)
executionProgressCheckIntervalMs = 789 # Long | Execution progress check interval in milliseconds. (optional) (default to null)
reason = Move offline replicas away from broken brokers. # String | Reason for request. (optional) (default to null)
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) (default to null)
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, brokerConcurrentLeaderMovements=brokerConcurrentLeaderMovements, 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)
extern crate DefaultApi;

pub fn main() {
    let dryrun = true; // Boolean
    let goals = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // array[String]
    let allowCapacityEstimation = true; // Boolean
    let concurrentPartitionMovementsPerBroker = 56; // Integer
    let maxPartitionMovementsInCluster = 56; // Integer
    let concurrentLeaderMovements = 56; // Integer
    let brokerConcurrentLeaderMovements = 56; // Integer
    let json = true; // Boolean
    let skipHardGoalCheck = true; // Boolean
    let excludedTopics = __CruiseControl.%2A; // String
    let useReadyDefaultGoals = true; // Boolean
    let dataFrom = dataFrom_example; // String
    let verbose = true; // Boolean
    let excludeRecentlyDemotedBrokers = true; // Boolean
    let excludeRecentlyRemovedBrokers = true; // Boolean
    let replicaMovementStrategies = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // array[String]
    let reviewId = 56; // Integer
    let replicationThrottle = 789; // Long
    let executionProgressCheckIntervalMs = 789; // Long
    let reason = Move offline replicas away from broken brokers.; // String
    let stopOngoingExecution = true; // Boolean
    let getResponseSchema = true; // Boolean
    let doAs = doAs_example; // String
    let fastMode = true; // Boolean

    let mut context = DefaultApi::Context::default();
    let result = client.fixOfflineReplicas(dryrun, goals, allowCapacityEstimation, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentLeaderMovements, brokerConcurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, useReadyDefaultGoals, dataFrom, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, reviewId, replicationThrottle, executionProgressCheckIntervalMs, reason, stopOngoingExecution, getResponseSchema, doAs, fastMode, &context).wait();

    println!("{:?}", result);
}

Scopes

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 cluster ongoing leadership movements.
broker_concurrent_leader_movements
Integer (int32)
The upper bound of per broker 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


kafkaClusterState

Retrive the current Kafka cluster state.


/kafka_cluster_state

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Basic [[basicHash]]" \
 -H "Accept: application/json,text/plain" \
 "http://localhost/kafkacruisecontrol/kafka_cluster_state?topic=myTopic.*&verbose=true&json=true&get_response_schema=true&doAs=doAs_example&reason=reason_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        String topic = myTopic.*; // 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 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String topic = new String(); // String | Topic regex to filter partition information in response.
final Boolean verbose = new Boolean(); // Boolean | Return detailed state information.
final Boolean json = new Boolean(); // Boolean | Whether to return in JSON format or not.
final Boolean getResponseSchema = new Boolean(); // Boolean | Whether to return JSON schema in response header or not.
final String doAs = new String(); // String | The user specified by a trusted proxy in that authentication model.
final String reason = new String(); // String | Reason for request.

try {
    final result = await api_instance.kafkaClusterState(topic, verbose, json, getResponseSchema, doAs, reason);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->kafkaClusterState: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String topic = myTopic.*; // 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();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
String *topic = myTopic.*; // Topic regex to filter partition information in response. (optional) (default to null)
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) (default to null)
String *reason = reason_example; // Reason for request. (optional) (default to null)

// 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 defaultClient = CruiseControlApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

// Create an instance of the API class
var api = new CruiseControlApi.DefaultApi()
var opts = {
  'topic': myTopic.*, // {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 Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class kafkaClusterStateExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var topic = myTopic.*;  // String | Topic regex to filter partition information in response. (optional)  (default to null)
            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)  (default to null)
            var reason = reason_example;  // String | Reason for request. (optional)  (default to null)

            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');
// Configure HTTP basic authorization: basicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$topic = myTopic.*; // 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::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure HTTP basic authorization: basicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $topic = myTopic.*; # 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 openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
topic = myTopic.* # String | Topic regex to filter partition information in response. (optional) (default to null)
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) (default to null)
reason = reason_example # String | Reason for request. (optional) (default to null)

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)
extern crate DefaultApi;

pub fn main() {
    let topic = myTopic.*; // String
    let verbose = true; // Boolean
    let json = true; // Boolean
    let getResponseSchema = true; // Boolean
    let doAs = doAs_example; // String
    let reason = reason_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.kafkaClusterState(topic, verbose, json, getResponseSchema, doAs, reason, &context).wait();

    println!("{:?}", result);
}

Scopes

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


load

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


/load

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Basic [[basicHash]]" \
 -H "Accept: application/json,text/plain" \
 "http://localhost/kafkacruisecontrol/load?start=789&end=789&time=789&allow_capacity_estimation=true&json=true&populate_disk_info=true&capacity_only=true&get_response_schema=true&doAs=doAs_example&reason=reason_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Create an instance of the API class
        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 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Long start = new Long(); // Long | Start time of the cluster load. Default is time of earliest valid window.
final Long end = new Long(); // Long | End time of the cluster load. Default is current system time.
final Long time = new Long(); // Long | End time of the clutser load. Default is current system time, mutually exclusive with end parameter.
final Boolean allowCapacityEstimation = new Boolean(); // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
final Boolean json = new Boolean(); // Boolean | Whether to return in JSON format or not.
final Boolean populateDiskInfo = new Boolean(); // Boolean | Whether show the load of each disk of broker.
final Boolean capacityOnly = new Boolean(); // Boolean | Whether show only the cluster capacity or the utilization, as well.
final Boolean getResponseSchema = new Boolean(); // Boolean | Whether to return JSON schema in response header or not.
final String doAs = new String(); // String | The user specified by a trusted proxy in that authentication model.
final String reason = new String(); // String | Reason for request.

try {
    final result = await api_instance.load(start, end, time, allowCapacityEstimation, json, populateDiskInfo, capacityOnly, getResponseSchema, doAs, reason);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->load: $e\n');
}

import org.openapitools.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();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
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) (default to null)
Long *time = 789; // End time of the clutser load. Default is current system time, mutually exclusive with end parameter. (optional) (default to null)
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) (default to null)
String *reason = reason_example; // Reason for request. (optional) (default to null)

// 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 defaultClient = CruiseControlApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

// Create an instance of the API class
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 Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class loadExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            // Create an instance of the API class
            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)  (default to null)
            var time = 789;  // Long | End time of the clutser load. Default is current system time, mutually exclusive with end parameter. (optional)  (default to null)
            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)  (default to null)
            var reason = reason_example;  // String | Reason for request. (optional)  (default to null)

            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');
// Configure HTTP basic authorization: basicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$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::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure HTTP basic authorization: basicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::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 openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'

# Create an instance of the API class
api_instance = openapi_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) (default to null)
time = 789 # Long | End time of the clutser load. Default is current system time, mutually exclusive with end parameter. (optional) (default to null)
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) (default to null)
reason = reason_example # String | Reason for request. (optional) (default to null)

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)
extern crate DefaultApi;

pub fn main() {
    let start = 789; // Long
    let end = 789; // Long
    let time = 789; // Long
    let allowCapacityEstimation = true; // Boolean
    let json = true; // Boolean
    let populateDiskInfo = true; // Boolean
    let capacityOnly = true; // Boolean
    let getResponseSchema = true; // Boolean
    let doAs = doAs_example; // String
    let reason = reason_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.load(start, end, time, allowCapacityEstimation, json, populateDiskInfo, capacityOnly, getResponseSchema, doAs, reason, &context).wait();

    println!("{:?}", result);
}

Scopes

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


partitionload

Get the resource load for each partition.


/partition_load

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Basic [[basicHash]]" \
 -H "Accept: application/json,text/plain" \
 "http://localhost/kafkacruisecontrol/partition_load?resource=resource_example&start=789&end=789&entries=56&topic=myTopic.*&partition=&min_valid_partition_ratio=1.2&allow_capacity_estimation=true&max_load=true&avg_load=true&brokerid=[1,2,3]&json=true&get_response_schema=true&doAs=doAs_example&reason=reason_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Create an instance of the API class
        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 = myTopic.*; // String | A regular expression used to filter the partition load returned based on topic.
        PartitionloadPartitionParameter partition = ; // PartitionloadPartitionParameter | 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 = [1,2,3]; // 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 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String resource = new String(); // String | The host and broker-level resource by which to sort the cruise-control response.
final Long start = new Long(); // Long | The timestamp in millisecond of the earliest metric sample use to generate load.
final Long end = new Long(); // 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.
final Integer entries = new Integer(); // Integer | The number of entries to show in the response.
final String topic = new String(); // String | A regular expression used to filter the partition load returned based on topic.
final PartitionloadPartitionParameter partition = new PartitionloadPartitionParameter(); // PartitionloadPartitionParameter | The partition or partition range to filter partition load returned.
final Double minValidPartitionRatio = new Double(); // Double | The minimum required ratio of partition load data completeness.
final Boolean allowCapacityEstimation = new Boolean(); // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
final Boolean maxLoad = new Boolean(); // Boolean | If true, the maximum load is returned.
final Boolean avgLoad = new Boolean(); // Boolean | If true, the average load is returned.
final array[Integer] brokerid = new array[Integer](); // array[Integer] | Set of broker ids used to filter partition load returned.
final Boolean json = new Boolean(); // Boolean | Whether to return in JSON format or not.
final Boolean getResponseSchema = new Boolean(); // Boolean | Whether to return JSON schema in response header or not.
final String doAs = new String(); // String | The user specified by a trusted proxy in that authentication model.
final String reason = new String(); // String | Reason for request.

try {
    final result = await api_instance.partitionload(resource, start, end, entries, topic, partition, minValidPartitionRatio, allowCapacityEstimation, maxLoad, avgLoad, brokerid, json, getResponseSchema, doAs, reason);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->partitionload: $e\n');
}

import org.openapitools.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 = myTopic.*; // String | A regular expression used to filter the partition load returned based on topic.
        PartitionloadPartitionParameter partition = ; // PartitionloadPartitionParameter | 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 = [1,2,3]; // 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();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
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) (default to null)
Integer *entries = 56; // The number of entries to show in the response. (optional) (default to 2147483647)
String *topic = myTopic.*; // A regular expression used to filter the partition load returned based on topic. (optional) (default to null)
PartitionloadPartitionParameter *partition = ; // The partition or partition range to filter partition load returned. (optional) (default to null)
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 = [1,2,3]; // Set of broker ids used to filter partition load returned. (optional) (default to null)
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) (default to null)
String *reason = reason_example; // Reason for request. (optional) (default to null)

// 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 defaultClient = CruiseControlApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

// Create an instance of the API class
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': myTopic.*, // {String} A regular expression used to filter the partition load returned based on topic.
  'partition': , // {PartitionloadPartitionParameter} 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': [1,2,3], // {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 Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class partitionloadExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            // Create an instance of the API class
            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)  (default to null)
            var entries = 56;  // Integer | The number of entries to show in the response. (optional)  (default to 2147483647)
            var topic = myTopic.*;  // String | A regular expression used to filter the partition load returned based on topic. (optional)  (default to null)
            var partition = new PartitionloadPartitionParameter(); // PartitionloadPartitionParameter | The partition or partition range to filter partition load returned. (optional)  (default to null)
            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)  (default to null)
            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)  (default to null)
            var reason = reason_example;  // String | Reason for request. (optional)  (default to null)

            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');
// Configure HTTP basic authorization: basicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$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 = myTopic.*; // String | A regular expression used to filter the partition load returned based on topic.
$partition = ; // PartitionloadPartitionParameter | 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 = [1,2,3]; // 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::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure HTTP basic authorization: basicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::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 = myTopic.*; # String | A regular expression used to filter the partition load returned based on topic.
my $partition = ; # PartitionloadPartitionParameter | 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 = [[1,2,3]]; # 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 openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'

# Create an instance of the API class
api_instance = openapi_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) (default to null)
entries = 56 # Integer | The number of entries to show in the response. (optional) (default to 2147483647)
topic = myTopic.* # String | A regular expression used to filter the partition load returned based on topic. (optional) (default to null)
partition =  # PartitionloadPartitionParameter | The partition or partition range to filter partition load returned. (optional) (default to null)
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 = [1,2,3] # array[Integer] | Set of broker ids used to filter partition load returned. (optional) (default to null)
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) (default to null)
reason = reason_example # String | Reason for request. (optional) (default to null)

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)
extern crate DefaultApi;

pub fn main() {
    let resource = resource_example; // String
    let start = 789; // Long
    let end = 789; // Long
    let entries = 56; // Integer
    let topic = myTopic.*; // String
    let partition = ; // PartitionloadPartitionParameter
    let minValidPartitionRatio = 1.2; // Double
    let allowCapacityEstimation = true; // Boolean
    let maxLoad = true; // Boolean
    let avgLoad = true; // Boolean
    let brokerid = [1,2,3]; // array[Integer]
    let json = true; // Boolean
    let getResponseSchema = true; // Boolean
    let doAs = doAs_example; // String
    let reason = reason_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.partitionload(resource, start, end, entries, topic, partition, minValidPartitionRatio, allowCapacityEstimation, maxLoad, avgLoad, brokerid, json, getResponseSchema, doAs, reason, &context).wait();

    println!("{:?}", result);
}

Scopes

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
PartitionloadPartitionParameter
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


pauseSampling

Pause metric sampling.


/pause_sampling

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Basic [[basicHash]]" \
 -H "Accept: application/json,text/plain" \
 "http://localhost/kafkacruisecontrol/pause_sampling?reason=reason_example&review_id=56&json=true&get_response_schema=true&doAs=doAs_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Create an instance of the API class
        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 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String reason = new String(); // String | Reason for request.
final Integer reviewId = new Integer(); // Integer | Review id for 2-step verification.
final Boolean json = new Boolean(); // Boolean | Whether to return in JSON format or not.
final Boolean getResponseSchema = new Boolean(); // Boolean | Whether to return JSON schema in response header or not.
final String doAs = new String(); // String | The user specified by a trusted proxy in that authentication model.

try {
    final result = await api_instance.pauseSampling(reason, reviewId, json, getResponseSchema, doAs);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->pauseSampling: $e\n');
}

import org.openapitools.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();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
String *reason = reason_example; // Reason for request. (optional) (default to null)
Integer *reviewId = 56; // Review id for 2-step verification. (optional) (default to null)
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) (default to null)

// 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 defaultClient = CruiseControlApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

// Create an instance of the API class
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 Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class pauseSamplingExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var reason = reason_example;  // String | Reason for request. (optional)  (default to null)
            var reviewId = 56;  // Integer | Review id for 2-step verification. (optional)  (default to null)
            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)  (default to null)

            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');
// Configure HTTP basic authorization: basicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$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::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure HTTP basic authorization: basicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::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 openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
reason = reason_example # String | Reason for request. (optional) (default to null)
reviewId = 56 # Integer | Review id for 2-step verification. (optional) (default to null)
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) (default to null)

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)
extern crate DefaultApi;

pub fn main() {
    let reason = reason_example; // String
    let reviewId = 56; // Integer
    let json = true; // Boolean
    let getResponseSchema = true; // Boolean
    let doAs = doAs_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.pauseSampling(reason, reviewId, json, getResponseSchema, doAs, &context).wait();

    println!("{:?}", result);
}

Scopes

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


permissions

Get the permissions of a user specified as a query parameter


/permissions

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Basic [[basicHash]]" \
 -H "Accept: application/json,text/plain" \
 "http://localhost/kafkacruisecontrol/permissions?json=true&reason=reason_example&get_response_schema=true&doAs=doAs_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Create an instance of the API class
        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 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Boolean json = new Boolean(); // Boolean | Whether to return in JSON format or not.
final String reason = new String(); // String | Reason for request.
final Boolean getResponseSchema = new Boolean(); // Boolean | Whether to return JSON schema in response header or not.
final String doAs = new String(); // String | The user specified by a trusted proxy in that authentication model.

try {
    final result = await api_instance.permissions(json, reason, getResponseSchema, doAs);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->permissions: $e\n');
}

import org.openapitools.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();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Boolean *json = true; // Whether to return in JSON format or not. (optional) (default to false)
String *reason = reason_example; // Reason for request. (optional) (default to null)
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) (default to null)

// 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 defaultClient = CruiseControlApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

// Create an instance of the API class
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 Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class permissionsExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            // Create an instance of the API class
            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)  (default to null)
            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)  (default to null)

            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');
// Configure HTTP basic authorization: basicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$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::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure HTTP basic authorization: basicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::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 openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'

# Create an instance of the API class
api_instance = openapi_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) (default to null)
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) (default to null)

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)
extern crate DefaultApi;

pub fn main() {
    let json = true; // Boolean
    let reason = reason_example; // String
    let getResponseSchema = true; // Boolean
    let doAs = doAs_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.permissions(json, reason, getResponseSchema, doAs, &context).wait();

    println!("{:?}", result);
}

Scopes

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


proposals

Get current proposals.


/proposals

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Basic [[basicHash]]" \
 -H "Accept: application/json,text/plain" \
 "http://localhost/kafkacruisecontrol/proposals?kafka_assigner=true&destination_broker_ids=[1,2,3]&ignore_proposal_cache=true&rebalance_disk=true&data_from=dataFrom_example&use_ready_default_goals=true&excluded_topics=__CruiseControl.%2A&exclude_recently_removed_brokers=true&goals=["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]&allow_capacity_estimation=true&verbose=true&exclude_recently_demoted_brokers=true&json=true&get_response_schema=true&doAs=doAs_example&fast_mode=true&reason=reason_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        Boolean kafkaAssigner = true; // Boolean | Whether to use Kafka assigner mode to generate proposals.
        array[Integer] destinationBrokerIds = [1,2,3]; // 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 = __CruiseControl.%2A; // 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 = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // 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 'package:openapi/api.dart';

final api_instance = DefaultApi();

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

try {
    final result = await api_instance.proposals(kafkaAssigner, destinationBrokerIds, ignoreProposalCache, rebalanceDisk, dataFrom, useReadyDefaultGoals, excludedTopics, excludeRecentlyRemovedBrokers, goals, allowCapacityEstimation, verbose, excludeRecentlyDemotedBrokers, json, getResponseSchema, doAs, fastMode, reason);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->proposals: $e\n');
}

import org.openapitools.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 = [1,2,3]; // 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 = __CruiseControl.%2A; // 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 = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // 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();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Boolean *kafkaAssigner = true; // Whether to use Kafka assigner mode to generate proposals. (optional) (default to false)
array[Integer] *destinationBrokerIds = [1,2,3]; // Specify brokers to move replicas to. (optional) (default to null)
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 = __CruiseControl.%2A; // Specify topic whose partition is excluded from replica movement. (optional) (default to null)
Boolean *excludeRecentlyRemovedBrokers = true; // Whether allow replicas to be moved to recently removed broker. (optional) (default to false)
array[String] *goals = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional) (default to null)
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) (default to null)
Boolean *fastMode = true; // True to compute proposals in fast mode, false otherwise (optional) (default to true)
String *reason = reason_example; // Reason for request. (optional) (default to null)

// 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 defaultClient = CruiseControlApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

// Create an instance of the API class
var api = new CruiseControlApi.DefaultApi()
var opts = {
  'kafkaAssigner': true, // {Boolean} Whether to use Kafka assigner mode to generate proposals.
  'destinationBrokerIds': [1,2,3], // {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': __CruiseControl.%2A, // {String} Specify topic whose partition is excluded from replica movement.
  'excludeRecentlyRemovedBrokers': true, // {Boolean} Whether allow replicas to be moved to recently removed broker.
  'goals': ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"], // {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 Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class proposalsExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            // Create an instance of the API class
            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)  (default to null)
            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 = __CruiseControl.%2A;  // String | Specify topic whose partition is excluded from replica movement. (optional)  (default to null)
            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)  (default to null)
            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)  (default to null)
            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)  (default to null)

            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');
// Configure HTTP basic authorization: basicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$kafkaAssigner = true; // Boolean | Whether to use Kafka assigner mode to generate proposals.
$destinationBrokerIds = [1,2,3]; // 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 = __CruiseControl.%2A; // String | Specify topic whose partition is excluded from replica movement.
$excludeRecentlyRemovedBrokers = true; // Boolean | Whether allow replicas to be moved to recently removed broker.
$goals = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // 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::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure HTTP basic authorization: basicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $kafkaAssigner = true; # Boolean | Whether to use Kafka assigner mode to generate proposals.
my $destinationBrokerIds = [[1,2,3]]; # 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 = __CruiseControl.%2A; # 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 = [["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]]; # 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 openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
kafkaAssigner = true # Boolean | Whether to use Kafka assigner mode to generate proposals. (optional) (default to false)
destinationBrokerIds = [1,2,3] # array[Integer] | Specify brokers to move replicas to. (optional) (default to null)
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 = __CruiseControl.%2A # String | Specify topic whose partition is excluded from replica movement. (optional) (default to null)
excludeRecentlyRemovedBrokers = true # Boolean | Whether allow replicas to be moved to recently removed broker. (optional) (default to false)
goals = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"] # array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional) (default to null)
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) (default to null)
fastMode = true # Boolean | True to compute proposals in fast mode, false otherwise (optional) (default to true)
reason = reason_example # String | Reason for request. (optional) (default to null)

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)
extern crate DefaultApi;

pub fn main() {
    let kafkaAssigner = true; // Boolean
    let destinationBrokerIds = [1,2,3]; // array[Integer]
    let ignoreProposalCache = true; // Boolean
    let rebalanceDisk = true; // Boolean
    let dataFrom = dataFrom_example; // String
    let useReadyDefaultGoals = true; // Boolean
    let excludedTopics = __CruiseControl.%2A; // String
    let excludeRecentlyRemovedBrokers = true; // Boolean
    let goals = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // array[String]
    let allowCapacityEstimation = true; // Boolean
    let verbose = true; // Boolean
    let excludeRecentlyDemotedBrokers = true; // Boolean
    let json = true; // Boolean
    let getResponseSchema = true; // Boolean
    let doAs = doAs_example; // String
    let fastMode = true; // Boolean
    let reason = reason_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.proposals(kafkaAssigner, destinationBrokerIds, ignoreProposalCache, rebalanceDisk, dataFrom, useReadyDefaultGoals, excludedTopics, excludeRecentlyRemovedBrokers, goals, allowCapacityEstimation, verbose, excludeRecentlyDemotedBrokers, json, getResponseSchema, doAs, fastMode, reason, &context).wait();

    println!("{:?}", result);
}

Scopes

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


rebalance

Rebalance a Kafka cluster based on goals.


/rebalance

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Basic [[basicHash]]" \
 -H "Accept: application/json,text/plain" \
 "http://localhost/kafkacruisecontrol/rebalance?dryrun=true&goals=["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]&allow_capacity_estimation=true&stop_ongoing_execution=true&concurrent_partition_movements_per_broker=56&max_partition_movements_in_cluster=56&concurrent_intra_broker_partition_movements=56&concurrent_leader_movements=56&broker_concurrent_leader_movements=56&json=true&skip_hard_goal_check=true&excluded_topics=__CruiseControl.%2A&use_ready_default_goals=true&data_from=dataFrom_example&verbose=true&exclude_recently_demoted_brokers=true&exclude_recently_removed_brokers=true&replica_movement_strategies=["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]&ignore_proposal_cache=true&destination_broker_ids=[1,2,3]&kafka_assigner=true&rebalance_disk=true&review_id=56&replication_throttle=789&execution_progress_check_interval_ms=789&reason=Balance disk utilization across all brokers in the cluster.&get_response_schema=true&doAs=doAs_example&fast_mode=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        Boolean dryrun = true; // Boolean | Whether to dry-run the request or not.
        array[String] goals = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // 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 cluster ongoing leadership movements.
        Integer brokerConcurrentLeaderMovements = 56; // Integer | The upper bound of per broker 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 = __CruiseControl.%2A; // 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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // array[String] | Replica movement strategies to use.
        Boolean ignoreProposalCache = true; // Boolean | Whether to ignore the cached proposal or not.
        array[String] destinationBrokerIds = [1,2,3]; // 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 = Balance disk utilization across all brokers in the cluster.; // 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, brokerConcurrentLeaderMovements, 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 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Boolean dryrun = new Boolean(); // Boolean | Whether to dry-run the request or not.
final array[String] 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.
final Boolean allowCapacityEstimation = new Boolean(); // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
final Boolean stopOngoingExecution = new Boolean(); // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
final Integer concurrentPartitionMovementsPerBroker = new Integer(); // Integer | The upper bound of ongoing replica movements going into/out of each broker.
final Integer maxPartitionMovementsInCluster = new Integer(); // Integer | Change upper bound of ongoing inter broker partition movements in cluster.
final Integer concurrentIntraBrokerPartitionMovements = new Integer(); // Integer | The upper bound of ongoing replica movements between disks within each broker.
final Integer concurrentLeaderMovements = new Integer(); // Integer | The upper bound of cluster ongoing leadership movements.
final Integer brokerConcurrentLeaderMovements = new Integer(); // Integer | The upper bound of per broker ongoing leadership movements.
final Boolean json = new Boolean(); // Boolean | Whether to return in JSON format or not.
final Boolean skipHardGoalCheck = new Boolean(); // Boolean | Whether to allow hard goals be skipped in proposal generation.
final String excludedTopics = new String(); // String | Specify topic whose partition is excluded from replica movement.
final Boolean useReadyDefaultGoals = new Boolean(); // Boolean | Whether to only use ready goals to generate proposal.
final String dataFrom = new String(); // String | Whether to calculate proposal from available valid partitions or valid windows.
final Boolean verbose = new Boolean(); // Boolean | Return detailed state information.
final Boolean excludeRecentlyDemotedBrokers = new Boolean(); // Boolean | Whether to allow leader replicas to be moved to recently demoted brokers.
final Boolean excludeRecentlyRemovedBrokers = new Boolean(); // Boolean | Whether to allow replicas to be moved to recently removed broker.
final array[String] replicaMovementStrategies = new array[String](); // array[String] | Replica movement strategies to use.
final Boolean ignoreProposalCache = new Boolean(); // Boolean | Whether to ignore the cached proposal or not.
final array[String] destinationBrokerIds = new array[String](); // array[String] | Specify the destination brokers for partitions to move replicas to.
final Boolean kafkaAssigner = new Boolean(); // Boolean | Whether to use Kafka assigner mode to generate proposals.
final Boolean rebalanceDisk = new Boolean(); // Boolean | Whether to balance load between disks within brokers (requires JBOD Kafka deployment).
final Integer reviewId = new Integer(); // Integer | Review id for 2-step verification.
final Long replicationThrottle = new Long(); // Long | Upper bound on the bandwidth in bytes per second used to move replicas.
final Long executionProgressCheckIntervalMs = new Long(); // Long | Execution progress check interval in milliseconds.
final String reason = new String(); // String | Reason for request.
final Boolean getResponseSchema = new Boolean(); // Boolean | Whether to return JSON schema in response header or not.
final String doAs = new String(); // String | The user specified by a trusted proxy in that authentication model.
final Boolean fastMode = new Boolean(); // Boolean | True to compute proposals in fast mode, false otherwise

try {
    final result = await api_instance.rebalance(dryrun, goals, allowCapacityEstimation, stopOngoingExecution, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentIntraBrokerPartitionMovements, concurrentLeaderMovements, brokerConcurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, useReadyDefaultGoals, dataFrom, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, ignoreProposalCache, destinationBrokerIds, kafkaAssigner, rebalanceDisk, reviewId, replicationThrottle, executionProgressCheckIntervalMs, reason, getResponseSchema, doAs, fastMode);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->rebalance: $e\n');
}

import org.openapitools.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 = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // 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 cluster ongoing leadership movements.
        Integer brokerConcurrentLeaderMovements = 56; // Integer | The upper bound of per broker 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 = __CruiseControl.%2A; // 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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // array[String] | Replica movement strategies to use.
        Boolean ignoreProposalCache = true; // Boolean | Whether to ignore the cached proposal or not.
        array[String] destinationBrokerIds = [1,2,3]; // 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 = Balance disk utilization across all brokers in the cluster.; // 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, brokerConcurrentLeaderMovements, 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();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Boolean *dryrun = true; // Whether to dry-run the request or not. (optional) (default to true)
array[String] *goals = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional) (default to null)
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) (default to null)
Integer *maxPartitionMovementsInCluster = 56; // Change upper bound of ongoing inter broker partition movements in cluster. (optional) (default to null)
Integer *concurrentIntraBrokerPartitionMovements = 56; // The upper bound of ongoing replica movements between disks within each broker. (optional) (default to null)
Integer *concurrentLeaderMovements = 56; // The upper bound of cluster ongoing leadership movements. (optional) (default to null)
Integer *brokerConcurrentLeaderMovements = 56; // The upper bound of per broker ongoing leadership movements. (optional) (default to null)
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 = __CruiseControl.%2A; // Specify topic whose partition is excluded from replica movement. (optional) (default to null)
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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // Replica movement strategies to use. (optional) (default to null)
Boolean *ignoreProposalCache = true; // Whether to ignore the cached proposal or not. (optional) (default to false)
array[String] *destinationBrokerIds = [1,2,3]; // Specify the destination brokers for partitions to move replicas to. (optional) (default to null)
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) (default to null)
Long *replicationThrottle = 789; // Upper bound on the bandwidth in bytes per second used to move replicas. (optional) (default to null)
Long *executionProgressCheckIntervalMs = 789; // Execution progress check interval in milliseconds. (optional) (default to null)
String *reason = Balance disk utilization across all brokers in the cluster.; // Reason for request. (optional) (default to null)
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) (default to null)
Boolean *fastMode = true; // True to compute proposals in fast mode, false otherwise (optional) (default to true)

// Rebalance a Kafka cluster based on goals.
[apiInstance rebalanceWith:dryrun
    goals:goals
    allowCapacityEstimation:allowCapacityEstimation
    stopOngoingExecution:stopOngoingExecution
    concurrentPartitionMovementsPerBroker:concurrentPartitionMovementsPerBroker
    maxPartitionMovementsInCluster:maxPartitionMovementsInCluster
    concurrentIntraBrokerPartitionMovements:concurrentIntraBrokerPartitionMovements
    concurrentLeaderMovements:concurrentLeaderMovements
    brokerConcurrentLeaderMovements:brokerConcurrentLeaderMovements
    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 defaultClient = CruiseControlApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

// Create an instance of the API class
var api = new CruiseControlApi.DefaultApi()
var opts = {
  'dryrun': true, // {Boolean} Whether to dry-run the request or not.
  'goals': ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"], // {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 cluster ongoing leadership movements.
  'brokerConcurrentLeaderMovements': 56, // {Integer} The upper bound of per broker 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': __CruiseControl.%2A, // {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': ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"], // {array[String]} Replica movement strategies to use.
  'ignoreProposalCache': true, // {Boolean} Whether to ignore the cached proposal or not.
  'destinationBrokerIds': [1,2,3], // {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': Balance disk utilization across all brokers in the cluster., // {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 Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class rebalanceExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            // Create an instance of the API class
            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)  (default to null)
            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)  (default to null)
            var maxPartitionMovementsInCluster = 56;  // Integer | Change upper bound of ongoing inter broker partition movements in cluster. (optional)  (default to null)
            var concurrentIntraBrokerPartitionMovements = 56;  // Integer | The upper bound of ongoing replica movements between disks within each broker. (optional)  (default to null)
            var concurrentLeaderMovements = 56;  // Integer | The upper bound of cluster ongoing leadership movements. (optional)  (default to null)
            var brokerConcurrentLeaderMovements = 56;  // Integer | The upper bound of per broker ongoing leadership movements. (optional)  (default to null)
            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 = __CruiseControl.%2A;  // String | Specify topic whose partition is excluded from replica movement. (optional)  (default to null)
            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)  (default to null)
            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)  (default to null)
            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)  (default to null)
            var replicationThrottle = 789;  // Long | Upper bound on the bandwidth in bytes per second used to move replicas. (optional)  (default to null)
            var executionProgressCheckIntervalMs = 789;  // Long | Execution progress check interval in milliseconds. (optional)  (default to null)
            var reason = Balance disk utilization across all brokers in the cluster.;  // String | Reason for request. (optional)  (default to null)
            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)  (default to null)
            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, brokerConcurrentLeaderMovements, 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');
// Configure HTTP basic authorization: basicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$dryrun = true; // Boolean | Whether to dry-run the request or not.
$goals = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // 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 cluster ongoing leadership movements.
$brokerConcurrentLeaderMovements = 56; // Integer | The upper bound of per broker 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 = __CruiseControl.%2A; // 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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // array[String] | Replica movement strategies to use.
$ignoreProposalCache = true; // Boolean | Whether to ignore the cached proposal or not.
$destinationBrokerIds = [1,2,3]; // 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 = Balance disk utilization across all brokers in the cluster.; // 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, $brokerConcurrentLeaderMovements, $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::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure HTTP basic authorization: basicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $dryrun = true; # Boolean | Whether to dry-run the request or not.
my $goals = [["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]]; # 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 cluster ongoing leadership movements.
my $brokerConcurrentLeaderMovements = 56; # Integer | The upper bound of per broker 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 = __CruiseControl.%2A; # 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 = [["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]]; # array[String] | Replica movement strategies to use.
my $ignoreProposalCache = true; # Boolean | Whether to ignore the cached proposal or not.
my $destinationBrokerIds = [[1,2,3]]; # 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 = Balance disk utilization across all brokers in the cluster.; # 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, brokerConcurrentLeaderMovements => $brokerConcurrentLeaderMovements, 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 openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
dryrun = true # Boolean | Whether to dry-run the request or not. (optional) (default to true)
goals = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"] # array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional) (default to null)
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) (default to null)
maxPartitionMovementsInCluster = 56 # Integer | Change upper bound of ongoing inter broker partition movements in cluster. (optional) (default to null)
concurrentIntraBrokerPartitionMovements = 56 # Integer | The upper bound of ongoing replica movements between disks within each broker. (optional) (default to null)
concurrentLeaderMovements = 56 # Integer | The upper bound of cluster ongoing leadership movements. (optional) (default to null)
brokerConcurrentLeaderMovements = 56 # Integer | The upper bound of per broker ongoing leadership movements. (optional) (default to null)
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 = __CruiseControl.%2A # String | Specify topic whose partition is excluded from replica movement. (optional) (default to null)
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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"] # array[String] | Replica movement strategies to use. (optional) (default to null)
ignoreProposalCache = true # Boolean | Whether to ignore the cached proposal or not. (optional) (default to false)
destinationBrokerIds = [1,2,3] # array[String] | Specify the destination brokers for partitions to move replicas to. (optional) (default to null)
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) (default to null)
replicationThrottle = 789 # Long | Upper bound on the bandwidth in bytes per second used to move replicas. (optional) (default to null)
executionProgressCheckIntervalMs = 789 # Long | Execution progress check interval in milliseconds. (optional) (default to null)
reason = Balance disk utilization across all brokers in the cluster. # String | Reason for request. (optional) (default to null)
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) (default to null)
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, brokerConcurrentLeaderMovements=brokerConcurrentLeaderMovements, 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)
extern crate DefaultApi;

pub fn main() {
    let dryrun = true; // Boolean
    let goals = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // array[String]
    let allowCapacityEstimation = true; // Boolean
    let stopOngoingExecution = true; // Boolean
    let concurrentPartitionMovementsPerBroker = 56; // Integer
    let maxPartitionMovementsInCluster = 56; // Integer
    let concurrentIntraBrokerPartitionMovements = 56; // Integer
    let concurrentLeaderMovements = 56; // Integer
    let brokerConcurrentLeaderMovements = 56; // Integer
    let json = true; // Boolean
    let skipHardGoalCheck = true; // Boolean
    let excludedTopics = __CruiseControl.%2A; // String
    let useReadyDefaultGoals = true; // Boolean
    let dataFrom = dataFrom_example; // String
    let verbose = true; // Boolean
    let excludeRecentlyDemotedBrokers = true; // Boolean
    let excludeRecentlyRemovedBrokers = true; // Boolean
    let replicaMovementStrategies = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // array[String]
    let ignoreProposalCache = true; // Boolean
    let destinationBrokerIds = [1,2,3]; // array[String]
    let kafkaAssigner = true; // Boolean
    let rebalanceDisk = true; // Boolean
    let reviewId = 56; // Integer
    let replicationThrottle = 789; // Long
    let executionProgressCheckIntervalMs = 789; // Long
    let reason = Balance disk utilization across all brokers in the cluster.; // String
    let getResponseSchema = true; // Boolean
    let doAs = doAs_example; // String
    let fastMode = true; // Boolean

    let mut context = DefaultApi::Context::default();
    let result = client.rebalance(dryrun, goals, allowCapacityEstimation, stopOngoingExecution, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentIntraBrokerPartitionMovements, concurrentLeaderMovements, brokerConcurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, useReadyDefaultGoals, dataFrom, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, ignoreProposalCache, destinationBrokerIds, kafkaAssigner, rebalanceDisk, reviewId, replicationThrottle, executionProgressCheckIntervalMs, reason, getResponseSchema, doAs, fastMode, &context).wait();

    println!("{:?}", result);
}

Scopes

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 cluster ongoing leadership movements.
broker_concurrent_leader_movements
Integer (int32)
The upper bound of per broker 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


removeBroker

Remove/decomission specified brokers.


/remove_broker

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Basic [[basicHash]]" \
 -H "Accept: application/json,text/plain" \
 "http://localhost/kafkacruisecontrol/remove_broker?brokerid=&dryrun=true&throttle_removed_broker=true&goals=["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]&allow_capacity_estimation=true&concurrent_partition_movements_per_broker=56&max_partition_movements_in_cluster=56&concurrent_leader_movements=56&broker_concurrent_leader_movements=56&json=true&skip_hard_goal_check=true&excluded_topics=__CruiseControl.%2A&kafka_assigner=true&use_ready_default_goals=true&verbose=true&exclude_recently_demoted_brokers=true&exclude_recently_removed_brokers=true&replica_movement_strategies=["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]&destination_broker_ids=&execution_progress_check_interval_ms=789&stop_ongoing_execution=true&reason=reason_example&review_id=56&data_from=dataFrom_example&replication_throttle=789&get_response_schema=true&doAs=doAs_example&fast_mode=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Create an instance of the API class
        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 = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // 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 cluster ongoing leadership movements.
        Integer brokerConcurrentLeaderMovements = 56; // Integer | The upper bound of per broker 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 = __CruiseControl.%2A; // 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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // 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, brokerConcurrentLeaderMovements, 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 'package:openapi/api.dart';

final api_instance = DefaultApi();

final array[Integer] brokerid = new array[Integer](); // array[Integer] | List of target broker ids.
final Boolean dryrun = new Boolean(); // Boolean | Whether to dry-run the request or not.
final Boolean throttleRemovedBroker = new Boolean(); // Boolean | Whether to throttle the added broker.
final array[String] 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.
final Boolean allowCapacityEstimation = new Boolean(); // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
final Integer concurrentPartitionMovementsPerBroker = new Integer(); // Integer | The upper bound of ongoing replica movements going into/out of each broker.
final Integer maxPartitionMovementsInCluster = new Integer(); // Integer | Change upper bound of ongoing inter broker partition movements in cluster.
final Integer concurrentLeaderMovements = new Integer(); // Integer | The upper bound of cluster ongoing leadership movements.
final Integer brokerConcurrentLeaderMovements = new Integer(); // Integer | The upper bound of per broker ongoing leadership movements.
final Boolean json = new Boolean(); // Boolean | Whether to return in JSON format or not.
final Boolean skipHardGoalCheck = new Boolean(); // Boolean | Whether to allow hard goals be skipped in proposal generation.
final String excludedTopics = new String(); // String | Specify topic whose partition is excluded from replica movement.
final Boolean kafkaAssigner = new Boolean(); // Boolean | Whether to use Kafka assigner mode to generate proposals.
final Boolean useReadyDefaultGoals = new Boolean(); // Boolean | Whether to only use ready goals to generate proposal.
final Boolean verbose = new Boolean(); // Boolean | Return detailed state information.
final Boolean excludeRecentlyDemotedBrokers = new Boolean(); // Boolean | Whether to allow leader replicas to be moved to recently demoted brokers.
final Boolean excludeRecentlyRemovedBrokers = new Boolean(); // Boolean | Whether to allow replicas to be moved to recently removed broker.
final array[String] replicaMovementStrategies = new array[String](); // array[String] | Replica movement strategies to use.
final array[Integer] destinationBrokerIds = new array[Integer](); // array[Integer] | Comma-separated and/or space-separated list of broker IDs.
final Long executionProgressCheckIntervalMs = new Long(); // Long | Execution progress check interval in milliseconds.
final Boolean stopOngoingExecution = new Boolean(); // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
final String reason = new String(); // String | Reason for request.
final Integer reviewId = new Integer(); // Integer | Review id for 2-step verification.
final String dataFrom = new String(); // String | Whether to calculate proposal from available valid partitions or valid windows.
final Long replicationThrottle = new Long(); // Long | Upper bound on the bandwidth in bytes per second used to move replicas.
final Boolean getResponseSchema = new Boolean(); // Boolean | Whether to return JSON schema in response header or not.
final String doAs = new String(); // String | The user specified by a trusted proxy in that authentication model.
final Boolean fastMode = new Boolean(); // Boolean | True to compute proposals in fast mode, false otherwise

try {
    final result = await api_instance.removeBroker(brokerid, dryrun, throttleRemovedBroker, goals, allowCapacityEstimation, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentLeaderMovements, brokerConcurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, kafkaAssigner, useReadyDefaultGoals, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, destinationBrokerIds, executionProgressCheckIntervalMs, stopOngoingExecution, reason, reviewId, dataFrom, replicationThrottle, getResponseSchema, doAs, fastMode);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->removeBroker: $e\n');
}

import org.openapitools.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 = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // 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 cluster ongoing leadership movements.
        Integer brokerConcurrentLeaderMovements = 56; // Integer | The upper bound of per broker 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 = __CruiseControl.%2A; // 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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // 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, brokerConcurrentLeaderMovements, 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();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
array[Integer] *brokerid = ; // List of target broker ids. (default to null)
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 = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional) (default to null)
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) (default to null)
Integer *concurrentLeaderMovements = 56; // The upper bound of cluster ongoing leadership movements. (optional) (default to 1000)
Integer *brokerConcurrentLeaderMovements = 56; // The upper bound of per broker ongoing leadership movements. (optional) (default to 250)
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 = __CruiseControl.%2A; // Specify topic whose partition is excluded from replica movement. (optional) (default to null)
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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // Replica movement strategies to use. (optional) (default to null)
array[Integer] *destinationBrokerIds = ; // Comma-separated and/or space-separated list of broker IDs. (optional) (default to null)
Long *executionProgressCheckIntervalMs = 789; // Execution progress check interval in milliseconds. (optional) (default to null)
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) (default to null)
Integer *reviewId = 56; // Review id for 2-step verification. (optional) (default to null)
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) (default to null)
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) (default to null)
Boolean *fastMode = true; // True to compute proposals in fast mode, false otherwise (optional) (default to true)

// Remove/decomission specified brokers.
[apiInstance removeBrokerWith:brokerid
    dryrun:dryrun
    throttleRemovedBroker:throttleRemovedBroker
    goals:goals
    allowCapacityEstimation:allowCapacityEstimation
    concurrentPartitionMovementsPerBroker:concurrentPartitionMovementsPerBroker
    maxPartitionMovementsInCluster:maxPartitionMovementsInCluster
    concurrentLeaderMovements:concurrentLeaderMovements
    brokerConcurrentLeaderMovements:brokerConcurrentLeaderMovements
    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 defaultClient = CruiseControlApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

// Create an instance of the API class
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': ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"], // {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 cluster ongoing leadership movements.
  'brokerConcurrentLeaderMovements': 56, // {Integer} The upper bound of per broker 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': __CruiseControl.%2A, // {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': ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"], // {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 Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class removeBrokerExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var brokerid = new array[Integer](); // array[Integer] | List of target broker ids. (default to null)
            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)  (default to null)
            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)  (default to null)
            var concurrentLeaderMovements = 56;  // Integer | The upper bound of cluster ongoing leadership movements. (optional)  (default to 1000)
            var brokerConcurrentLeaderMovements = 56;  // Integer | The upper bound of per broker ongoing leadership movements. (optional)  (default to 250)
            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 = __CruiseControl.%2A;  // String | Specify topic whose partition is excluded from replica movement. (optional)  (default to null)
            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)  (default to null)
            var destinationBrokerIds = new array[Integer](); // array[Integer] | Comma-separated and/or space-separated list of broker IDs. (optional)  (default to null)
            var executionProgressCheckIntervalMs = 789;  // Long | Execution progress check interval in milliseconds. (optional)  (default to null)
            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)  (default to null)
            var reviewId = 56;  // Integer | Review id for 2-step verification. (optional)  (default to null)
            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)  (default to null)
            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)  (default to null)
            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, brokerConcurrentLeaderMovements, 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');
// Configure HTTP basic authorization: basicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$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 = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // 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 cluster ongoing leadership movements.
$brokerConcurrentLeaderMovements = 56; // Integer | The upper bound of per broker 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 = __CruiseControl.%2A; // 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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // 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, $brokerConcurrentLeaderMovements, $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::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure HTTP basic authorization: basicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::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 = [["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]]; # 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 cluster ongoing leadership movements.
my $brokerConcurrentLeaderMovements = 56; # Integer | The upper bound of per broker 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 = __CruiseControl.%2A; # 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 = [["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]]; # 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, brokerConcurrentLeaderMovements => $brokerConcurrentLeaderMovements, 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 openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
brokerid =  # array[Integer] | List of target broker ids. (default to null)
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 = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"] # array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional) (default to null)
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) (default to null)
concurrentLeaderMovements = 56 # Integer | The upper bound of cluster ongoing leadership movements. (optional) (default to 1000)
brokerConcurrentLeaderMovements = 56 # Integer | The upper bound of per broker ongoing leadership movements. (optional) (default to 250)
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 = __CruiseControl.%2A # String | Specify topic whose partition is excluded from replica movement. (optional) (default to null)
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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"] # array[String] | Replica movement strategies to use. (optional) (default to null)
destinationBrokerIds =  # array[Integer] | Comma-separated and/or space-separated list of broker IDs. (optional) (default to null)
executionProgressCheckIntervalMs = 789 # Long | Execution progress check interval in milliseconds. (optional) (default to null)
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) (default to null)
reviewId = 56 # Integer | Review id for 2-step verification. (optional) (default to null)
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) (default to null)
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) (default to null)
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, brokerConcurrentLeaderMovements=brokerConcurrentLeaderMovements, 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)
extern crate DefaultApi;

pub fn main() {
    let brokerid = ; // array[Integer]
    let dryrun = true; // Boolean
    let throttleRemovedBroker = true; // Boolean
    let goals = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // array[String]
    let allowCapacityEstimation = true; // Boolean
    let concurrentPartitionMovementsPerBroker = 56; // Integer
    let maxPartitionMovementsInCluster = 56; // Integer
    let concurrentLeaderMovements = 56; // Integer
    let brokerConcurrentLeaderMovements = 56; // Integer
    let json = true; // Boolean
    let skipHardGoalCheck = true; // Boolean
    let excludedTopics = __CruiseControl.%2A; // String
    let kafkaAssigner = true; // Boolean
    let useReadyDefaultGoals = true; // Boolean
    let verbose = true; // Boolean
    let excludeRecentlyDemotedBrokers = true; // Boolean
    let excludeRecentlyRemovedBrokers = true; // Boolean
    let replicaMovementStrategies = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // array[String]
    let destinationBrokerIds = ; // array[Integer]
    let executionProgressCheckIntervalMs = 789; // Long
    let stopOngoingExecution = true; // Boolean
    let reason = reason_example; // String
    let reviewId = 56; // Integer
    let dataFrom = dataFrom_example; // String
    let replicationThrottle = 789; // Long
    let getResponseSchema = true; // Boolean
    let doAs = doAs_example; // String
    let fastMode = true; // Boolean

    let mut context = DefaultApi::Context::default();
    let result = client.removeBroker(brokerid, dryrun, throttleRemovedBroker, goals, allowCapacityEstimation, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentLeaderMovements, brokerConcurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, kafkaAssigner, useReadyDefaultGoals, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, destinationBrokerIds, executionProgressCheckIntervalMs, stopOngoingExecution, reason, reviewId, dataFrom, replicationThrottle, getResponseSchema, doAs, fastMode, &context).wait();

    println!("{:?}", result);
}

Scopes

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 cluster ongoing leadership movements.
broker_concurrent_leader_movements
Integer (int32)
The upper bound of per broker 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


removeDisks

Move all replicas from the specified disk to other disks of the same broker.


/remove_disks

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Basic [[basicHash]]" \
 -H "Accept: application/json,text/plain" \
 "http://localhost/kafkacruisecontrol/remove_disks?dryrun=true&stop_ongoing_execution=true&reason=Balance disk utilization across all brokers in the cluster.&brokerid_and_logdirs=101-/tmp/kafka-logs-1,101-/tmp/kafka-logs-2&json=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        map[String, array[String]] brokeridAndLogdirs = 101-/tmp/kafka-logs-1,101-/tmp/kafka-logs-2; // map[String, array[String]] | List of broker id and logdir pair to be demoted in the cluster.
        Boolean dryrun = true; // Boolean | Whether to dry-run the request or not.
        Boolean stopOngoingExecution = true; // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
        String reason = Balance disk utilization across all brokers in the cluster.; // String | Reason for request.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.

        try {
            OptimizationResult result = apiInstance.removeDisks(brokeridAndLogdirs, dryrun, stopOngoingExecution, reason, json);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#removeDisks");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final map[String, array[String]] brokeridAndLogdirs = new map[String, array[String]](); // map[String, array[String]] | List of broker id and logdir pair to be demoted in the cluster.
final Boolean dryrun = new Boolean(); // Boolean | Whether to dry-run the request or not.
final Boolean stopOngoingExecution = new Boolean(); // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
final String reason = new String(); // String | Reason for request.
final Boolean json = new Boolean(); // Boolean | Whether to return in JSON format or not.

try {
    final result = await api_instance.removeDisks(brokeridAndLogdirs, dryrun, stopOngoingExecution, reason, json);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->removeDisks: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        map[String, array[String]] brokeridAndLogdirs = 101-/tmp/kafka-logs-1,101-/tmp/kafka-logs-2; // map[String, array[String]] | List of broker id and logdir pair to be demoted in the cluster.
        Boolean dryrun = true; // Boolean | Whether to dry-run the request or not.
        Boolean stopOngoingExecution = true; // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
        String reason = Balance disk utilization across all brokers in the cluster.; // String | Reason for request.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.

        try {
            OptimizationResult result = apiInstance.removeDisks(brokeridAndLogdirs, dryrun, stopOngoingExecution, reason, json);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#removeDisks");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
map[String, array[String]] *brokeridAndLogdirs = 101-/tmp/kafka-logs-1,101-/tmp/kafka-logs-2; // List of broker id and logdir pair to be demoted in the cluster. (default to null)
Boolean *dryrun = true; // Whether to dry-run the request or not. (optional) (default to true)
Boolean *stopOngoingExecution = true; // Whether to stop the ongoing execution (if any) and start executing the given request. (optional) (default to false)
String *reason = Balance disk utilization across all brokers in the cluster.; // Reason for request. (optional) (default to null)
Boolean *json = true; // Whether to return in JSON format or not. (optional) (default to false)

// Move all replicas from the specified disk to other disks of the same broker.
[apiInstance removeDisksWith:brokeridAndLogdirs
    dryrun:dryrun
    stopOngoingExecution:stopOngoingExecution
    reason:reason
    json:json
              completionHandler: ^(OptimizationResult output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var CruiseControlApi = require('cruise_control_api');
var defaultClient = CruiseControlApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

// Create an instance of the API class
var api = new CruiseControlApi.DefaultApi()
var brokeridAndLogdirs = 101-/tmp/kafka-logs-1,101-/tmp/kafka-logs-2; // {map[String, array[String]]} List of broker id and logdir pair to be demoted in the cluster.
var opts = {
  'dryrun': true, // {Boolean} Whether to dry-run the request or not.
  'stopOngoingExecution': true, // {Boolean} Whether to stop the ongoing execution (if any) and start executing the given request.
  'reason': Balance disk utilization across all brokers in the cluster., // {String} Reason for request.
  'json': true // {Boolean} Whether to return in JSON format or not.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.removeDisks(brokeridAndLogdirs, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class removeDisksExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var brokeridAndLogdirs = new map[String, array[String]](); // map[String, array[String]] | List of broker id and logdir pair to be demoted in the cluster. (default to null)
            var dryrun = true;  // Boolean | Whether to dry-run the request or not. (optional)  (default to true)
            var stopOngoingExecution = true;  // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request. (optional)  (default to false)
            var reason = Balance disk utilization across all brokers in the cluster.;  // String | Reason for request. (optional)  (default to null)
            var json = true;  // Boolean | Whether to return in JSON format or not. (optional)  (default to false)

            try {
                // Move all replicas from the specified disk to other disks of the same broker.
                OptimizationResult result = apiInstance.removeDisks(brokeridAndLogdirs, dryrun, stopOngoingExecution, reason, json);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.removeDisks: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$brokeridAndLogdirs = 101-/tmp/kafka-logs-1,101-/tmp/kafka-logs-2; // map[String, array[String]] | List of broker id and logdir pair to be demoted in the cluster.
$dryrun = true; // Boolean | Whether to dry-run the request or not.
$stopOngoingExecution = true; // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
$reason = Balance disk utilization across all brokers in the cluster.; // String | Reason for request.
$json = true; // Boolean | Whether to return in JSON format or not.

try {
    $result = $api_instance->removeDisks($brokeridAndLogdirs, $dryrun, $stopOngoingExecution, $reason, $json);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->removeDisks: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure HTTP basic authorization: basicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $brokeridAndLogdirs = 101-/tmp/kafka-logs-1,101-/tmp/kafka-logs-2; # map[String, array[String]] | List of broker id and logdir pair to be demoted in the cluster.
my $dryrun = true; # Boolean | Whether to dry-run the request or not.
my $stopOngoingExecution = true; # Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
my $reason = Balance disk utilization across all brokers in the cluster.; # String | Reason for request.
my $json = true; # Boolean | Whether to return in JSON format or not.

eval {
    my $result = $api_instance->removeDisks(brokeridAndLogdirs => $brokeridAndLogdirs, dryrun => $dryrun, stopOngoingExecution => $stopOngoingExecution, reason => $reason, json => $json);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->removeDisks: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
brokeridAndLogdirs = 101-/tmp/kafka-logs-1,101-/tmp/kafka-logs-2 # map[String, array[String]] | List of broker id and logdir pair to be demoted in the cluster. (default to null)
dryrun = true # Boolean | Whether to dry-run the request or not. (optional) (default to true)
stopOngoingExecution = true # Boolean | Whether to stop the ongoing execution (if any) and start executing the given request. (optional) (default to false)
reason = Balance disk utilization across all brokers in the cluster. # String | Reason for request. (optional) (default to null)
json = true # Boolean | Whether to return in JSON format or not. (optional) (default to false)

try:
    # Move all replicas from the specified disk to other disks of the same broker.
    api_response = api_instance.remove_disks(brokeridAndLogdirs, dryrun=dryrun, stopOngoingExecution=stopOngoingExecution, reason=reason, json=json)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->removeDisks: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let brokeridAndLogdirs = 101-/tmp/kafka-logs-1,101-/tmp/kafka-logs-2; // map[String, array[String]]
    let dryrun = true; // Boolean
    let stopOngoingExecution = true; // Boolean
    let reason = Balance disk utilization across all brokers in the cluster.; // String
    let json = true; // Boolean

    let mut context = DefaultApi::Context::default();
    let result = client.removeDisks(brokeridAndLogdirs, dryrun, stopOngoingExecution, reason, json, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
dryrun
Boolean
Whether to dry-run the request or not.
stop_ongoing_execution
Boolean
Whether to stop the ongoing execution (if any) and start executing the given request.
reason
String
Reason for request.
brokerid_and_logdirs*
map[String, array[String]]
List of broker id and logdir pair to be demoted in the cluster.
Required
json
Boolean
Whether to return in JSON format or not.

Responses


resumeSampling

Resume metric sampling.


/resume_sampling

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Basic [[basicHash]]" \
 -H "Accept: application/json,text/plain" \
 "http://localhost/kafkacruisecontrol/resume_sampling?reason=reason_example&review_id=56&json=true&get_response_schema=true&doAs=doAs_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Create an instance of the API class
        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 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String reason = new String(); // String | Reason for request.
final Integer reviewId = new Integer(); // Integer | Review id for 2-step verification.
final Boolean json = new Boolean(); // Boolean | Whether to return in JSON format or not.
final Boolean getResponseSchema = new Boolean(); // Boolean | Whether to return JSON schema in response header or not.
final String doAs = new String(); // String | The user specified by a trusted proxy in that authentication model.

try {
    final result = await api_instance.resumeSampling(reason, reviewId, json, getResponseSchema, doAs);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->resumeSampling: $e\n');
}

import org.openapitools.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();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
String *reason = reason_example; // Reason for request. (optional) (default to null)
Integer *reviewId = 56; // Review id for 2-step verification. (optional) (default to null)
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) (default to null)

// 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 defaultClient = CruiseControlApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

// Create an instance of the API class
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 Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class resumeSamplingExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var reason = reason_example;  // String | Reason for request. (optional)  (default to null)
            var reviewId = 56;  // Integer | Review id for 2-step verification. (optional)  (default to null)
            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)  (default to null)

            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');
// Configure HTTP basic authorization: basicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$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::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure HTTP basic authorization: basicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::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 openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
reason = reason_example # String | Reason for request. (optional) (default to null)
reviewId = 56 # Integer | Review id for 2-step verification. (optional) (default to null)
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) (default to null)

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)
extern crate DefaultApi;

pub fn main() {
    let reason = reason_example; // String
    let reviewId = 56; // Integer
    let json = true; // Boolean
    let getResponseSchema = true; // Boolean
    let doAs = doAs_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.resumeSampling(reason, reviewId, json, getResponseSchema, doAs, &context).wait();

    println!("{:?}", result);
}

Scopes

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


review

Reivew pending Cruise Control requests.


/review

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Basic [[basicHash]]" \
 -H "Accept: application/json,text/plain" \
 "http://localhost/kafkacruisecontrol/review?approve=[1,2,3]&discard=[4,5,6]&reason=reason_example&json=true&get_response_schema=true&doAs=doAs_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        array[Integer] approve = [1,2,3]; // array[Integer] | Approve one or more pending Cruise Control requests.
        array[Integer] discard = [4,5,6]; // 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 'package:openapi/api.dart';

final api_instance = DefaultApi();

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

try {
    final result = await api_instance.review(approve, discard, reason, json, getResponseSchema, doAs);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->review: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        array[Integer] approve = [1,2,3]; // array[Integer] | Approve one or more pending Cruise Control requests.
        array[Integer] discard = [4,5,6]; // 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();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
array[Integer] *approve = [1,2,3]; // Approve one or more pending Cruise Control requests. (optional) (default to null)
array[Integer] *discard = [4,5,6]; // Reject one or more pending Cruise Control requests. (optional) (default to null)
String *reason = reason_example; // Reason of approval or rejection. (optional) (default to null)
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) (default to null)

// 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 defaultClient = CruiseControlApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

// Create an instance of the API class
var api = new CruiseControlApi.DefaultApi()
var opts = {
  'approve': [1,2,3], // {array[Integer]} Approve one or more pending Cruise Control requests.
  'discard': [4,5,6], // {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 Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class reviewExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var approve = new array[Integer](); // array[Integer] | Approve one or more pending Cruise Control requests. (optional)  (default to null)
            var discard = new array[Integer](); // array[Integer] | Reject one or more pending Cruise Control requests. (optional)  (default to null)
            var reason = reason_example;  // String | Reason of approval or rejection. (optional)  (default to null)
            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)  (default to null)

            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');
// Configure HTTP basic authorization: basicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$approve = [1,2,3]; // array[Integer] | Approve one or more pending Cruise Control requests.
$discard = [4,5,6]; // 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::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure HTTP basic authorization: basicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $approve = [[1,2,3]]; # array[Integer] | Approve one or more pending Cruise Control requests.
my $discard = [[4,5,6]]; # 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 openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
approve = [1,2,3] # array[Integer] | Approve one or more pending Cruise Control requests. (optional) (default to null)
discard = [4,5,6] # array[Integer] | Reject one or more pending Cruise Control requests. (optional) (default to null)
reason = reason_example # String | Reason of approval or rejection. (optional) (default to null)
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) (default to null)

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)
extern crate DefaultApi;

pub fn main() {
    let approve = [1,2,3]; // array[Integer]
    let discard = [4,5,6]; // array[Integer]
    let reason = reason_example; // String
    let json = true; // Boolean
    let getResponseSchema = true; // Boolean
    let doAs = doAs_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.review(approve, discard, reason, json, getResponseSchema, doAs, &context).wait();

    println!("{:?}", result);
}

Scopes

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


reviewBoard

Check review status of Cruise Control requests.


/review_board

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Basic [[basicHash]]" \
 -H "Accept: application/json,text/plain" \
 "http://localhost/kafkacruisecontrol/review_board?review_ids=[1,2,3]&json=true&get_response_schema=true&doAs=doAs_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        array[Integer] reviewIds = [1,2,3]; // 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 'package:openapi/api.dart';

final api_instance = DefaultApi();

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

try {
    final result = await api_instance.reviewBoard(reviewIds, json, getResponseSchema, doAs);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->reviewBoard: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        array[Integer] reviewIds = [1,2,3]; // 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();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
array[Integer] *reviewIds = [1,2,3]; // Ids for selected request to check. (optional) (default to null)
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) (default to null)

// 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 defaultClient = CruiseControlApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

// Create an instance of the API class
var api = new CruiseControlApi.DefaultApi()
var opts = {
  'reviewIds': [1,2,3], // {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 Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class reviewBoardExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var reviewIds = new array[Integer](); // array[Integer] | Ids for selected request to check. (optional)  (default to null)
            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)  (default to null)

            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');
// Configure HTTP basic authorization: basicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$reviewIds = [1,2,3]; // 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::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure HTTP basic authorization: basicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $reviewIds = [[1,2,3]]; # 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 openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
reviewIds = [1,2,3] # array[Integer] | Ids for selected request to check. (optional) (default to null)
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) (default to null)

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)
extern crate DefaultApi;

pub fn main() {
    let reviewIds = [1,2,3]; // array[Integer]
    let json = true; // Boolean
    let getResponseSchema = true; // Boolean
    let doAs = doAs_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.reviewBoard(reviewIds, json, getResponseSchema, doAs, &context).wait();

    println!("{:?}", result);
}

Scopes

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


rightsize

Manually invoke provisioner rightsizing of the cluster.


/rightsize

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Basic [[basicHash]]" \
 -H "Accept: application/json,text/plain" \
 "http://localhost/kafkacruisecontrol/rightsize?num_brokers_to_add=56&partition_count=56&topic=topic_%5B0-9%5D.%2A&doAs=doAs_example&get_response_schema=true&json=true&reason=reason_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Create an instance of the API class
        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_%5B0-9%5D.%2A; // 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 'package:openapi/api.dart';

final api_instance = DefaultApi();

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

try {
    final result = await api_instance.rightsize(numBrokersToAdd, partitionCount, topic, doAs, getResponseSchema, json, reason);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->rightsize: $e\n');
}

import org.openapitools.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_%5B0-9%5D.%2A; // 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();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Integer *numBrokersToAdd = 56; // The difference in broker count to rightsize towards. (optional) (default to null)
Integer *partitionCount = 56; // The target number of partitions to rightsize towards. (optional) (default to null)
String *topic = topic_%5B0-9%5D.%2A; // Regular expression to specify subject topics. (optional) (default to null)
String *doAs = doAs_example; // The user specified by a trusted proxy in that authentication model. (optional) (default to null)
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) (default to null)

// 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 defaultClient = CruiseControlApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

// Create an instance of the API class
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_%5B0-9%5D.%2A, // {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 Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class rightsizeExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var numBrokersToAdd = 56;  // Integer | The difference in broker count to rightsize towards. (optional)  (default to null)
            var partitionCount = 56;  // Integer | The target number of partitions to rightsize towards. (optional)  (default to null)
            var topic = topic_%5B0-9%5D.%2A;  // String | Regular expression to specify subject topics. (optional)  (default to null)
            var doAs = doAs_example;  // String | The user specified by a trusted proxy in that authentication model. (optional)  (default to null)
            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)  (default to null)

            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');
// Configure HTTP basic authorization: basicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$numBrokersToAdd = 56; // Integer | The difference in broker count to rightsize towards.
$partitionCount = 56; // Integer | The target number of partitions to rightsize towards.
$topic = topic_%5B0-9%5D.%2A; // 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::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure HTTP basic authorization: basicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::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_%5B0-9%5D.%2A; # 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 openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
numBrokersToAdd = 56 # Integer | The difference in broker count to rightsize towards. (optional) (default to null)
partitionCount = 56 # Integer | The target number of partitions to rightsize towards. (optional) (default to null)
topic = topic_%5B0-9%5D.%2A # String | Regular expression to specify subject topics. (optional) (default to null)
doAs = doAs_example # String | The user specified by a trusted proxy in that authentication model. (optional) (default to null)
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) (default to null)

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)
extern crate DefaultApi;

pub fn main() {
    let numBrokersToAdd = 56; // Integer
    let partitionCount = 56; // Integer
    let topic = topic_%5B0-9%5D.%2A; // String
    let doAs = doAs_example; // String
    let getResponseSchema = true; // Boolean
    let json = true; // Boolean
    let reason = reason_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.rightsize(numBrokersToAdd, partitionCount, topic, doAs, getResponseSchema, json, reason, &context).wait();

    println!("{:?}", result);
}

Scopes

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


state

Get the state of cruise control.


/state

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Basic [[basicHash]]" \
 -H "Accept: application/json,text/plain" \
 "http://localhost/kafkacruisecontrol/state?substates=&json=true&verbose=true&super_verbose=true&get_response_schema=true&doAs=doAs_example&reason=reason_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Create an instance of the API class
        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 'package:openapi/api.dart';

final api_instance = DefaultApi();

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

try {
    final result = await api_instance.state(substates, json, verbose, superVerbose, getResponseSchema, doAs, reason);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->state: $e\n');
}

import org.openapitools.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();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
array[String] *substates = ; // The substates for which to retrieve state from cruise-control. (optional) (default to null)
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) (default to null)
String *reason = reason_example; // Reason for request. (optional) (default to null)

// 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 defaultClient = CruiseControlApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

// Create an instance of the API class
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 Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class stateExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var substates = new array[String](); // array[String] | The substates for which to retrieve state from cruise-control. (optional)  (default to null)
            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)  (default to null)
            var reason = reason_example;  // String | Reason for request. (optional)  (default to null)

            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');
// Configure HTTP basic authorization: basicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$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::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure HTTP basic authorization: basicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::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 openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
substates =  # array[String] | The substates for which to retrieve state from cruise-control. (optional) (default to null)
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) (default to null)
reason = reason_example # String | Reason for request. (optional) (default to null)

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)
extern crate DefaultApi;

pub fn main() {
    let substates = ; // array[String]
    let json = true; // Boolean
    let verbose = true; // Boolean
    let superVerbose = true; // Boolean
    let getResponseSchema = true; // Boolean
    let doAs = doAs_example; // String
    let reason = reason_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.state(substates, json, verbose, superVerbose, getResponseSchema, doAs, reason, &context).wait();

    println!("{:?}", result);
}

Scopes

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


stopProposalExecution

Stop ongoing execution in Cruise Control.


/stop_proposal_execution

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Basic [[basicHash]]" \
 -H "Accept: application/json,text/plain" \
 "http://localhost/kafkacruisecontrol/stop_proposal_execution?force_stop=true&stop_external_agent=true&review_id=56&json=true&get_response_schema=true&doAs=doAs_example&reason=reason_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        Boolean forceStop = true; // Boolean | If true, stop execution forcefully.
        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 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Boolean forceStop = new Boolean(); // Boolean | If true, stop execution forcefully.
final Boolean stopExternalAgent = new Boolean(); // 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.
final Integer reviewId = new Integer(); // Integer | Review id for 2-step verification.
final Boolean json = new Boolean(); // Boolean | Whether to return in JSON format or not.
final Boolean getResponseSchema = new Boolean(); // Boolean | Whether to return JSON schema in response header or not.
final String doAs = new String(); // String | The user specified by a trusted proxy in that authentication model.
final String reason = new String(); // String | Reason for request.

try {
    final result = await api_instance.stopProposalExecution(forceStop, stopExternalAgent, reviewId, json, getResponseSchema, doAs, reason);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->stopProposalExecution: $e\n');
}

import org.openapitools.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.
        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();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Boolean *forceStop = true; // If true, stop execution forcefully. (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) (default to null)
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) (default to null)
String *reason = reason_example; // Reason for request. (optional) (default to null)

// 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 defaultClient = CruiseControlApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

// Create an instance of the API class
var api = new CruiseControlApi.DefaultApi()
var opts = {
  'forceStop': true, // {Boolean} If true, stop execution forcefully.
  '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 Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class stopProposalExecutionExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var forceStop = true;  // Boolean | If true, stop execution forcefully. (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)  (default to null)
            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)  (default to null)
            var reason = reason_example;  // String | Reason for request. (optional)  (default to null)

            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');
// Configure HTTP basic authorization: basicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$forceStop = true; // Boolean | If true, stop execution forcefully.
$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::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure HTTP basic authorization: basicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $forceStop = true; # Boolean | If true, stop execution forcefully.
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 openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
forceStop = true # Boolean | If true, stop execution forcefully. (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) (default to null)
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) (default to null)
reason = reason_example # String | Reason for request. (optional) (default to null)

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)
extern crate DefaultApi;

pub fn main() {
    let forceStop = true; // Boolean
    let stopExternalAgent = true; // Boolean
    let reviewId = 56; // Integer
    let json = true; // Boolean
    let getResponseSchema = true; // Boolean
    let doAs = doAs_example; // String
    let reason = reason_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.stopProposalExecution(forceStop, stopExternalAgent, reviewId, json, getResponseSchema, doAs, reason, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
force_stop
Boolean
If true, stop execution forcefully.
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


topicConfiguration

Change the configuration of a topic


/topic_configuration

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Basic [[basicHash]]" \
 -H "Accept: application/json,text/plain" \
 "http://localhost/kafkacruisecontrol/topic_configuration?dryrun=true&topic=topic_%5B0-9%5D.%2A&replication_factor=56&data_from=dataFrom_example&goals=["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]&allow_capacity_estimation=true&concurrent_partition_movements_per_broker=56&max_partition_movements_in_cluster=56&concurrent_leader_movements=56&broker_concurrent_leader_movements=56&skip_hard_goal_check=true&exclude_recently_demoted_brokers=true&exclude_recently_removed_brokers=true&excluded_topics=__CruiseControl.%2A&execution_progress_check_interval_ms=789&reason=reason_example&replica_movement_strategies=["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]&replication_throttle=789&json=true&review_id=reviewId_example&skip_rack_awareness_check=true&stop_ongoing_execution=true&use_ready_default_goals=true&verbose=true&get_response_schema=true&doAs=doAs_example&fast_mode=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        Boolean dryrun = true; // Boolean | Whether to dry-run the request or not.
        String topic = topic_%5B0-9%5D.%2A; // 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 = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // 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 cluster ongoing leadership movements.
        Integer brokerConcurrentLeaderMovements = 56; // Integer | The upper bound of per broker 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 = __CruiseControl.%2A; // 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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // 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, brokerConcurrentLeaderMovements, 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 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Boolean dryrun = new Boolean(); // Boolean | Whether to dry-run the request or not.
final String topic = new String(); // String | Regular expression to specify subject topics.
final Integer replicationFactor = new Integer(); // Integer | Target replication factor.
final String dataFrom = new String(); // String | Whether to calculate proposal from available valid partitions or valid windows.
final array[String] 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.
final Boolean allowCapacityEstimation = new Boolean(); // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
final Integer concurrentPartitionMovementsPerBroker = new Integer(); // Integer | The upper bound of ongoing replica movements going into/out of each broker.
final Integer maxPartitionMovementsInCluster = new Integer(); // Integer | Change upper bound of ongoing inter broker partition movements in cluster.
final Integer concurrentLeaderMovements = new Integer(); // Integer | The upper bound of cluster ongoing leadership movements.
final Integer brokerConcurrentLeaderMovements = new Integer(); // Integer | The upper bound of per broker ongoing leadership movements.
final Boolean skipHardGoalCheck = new Boolean(); // Boolean | Whether to allow hard goals be skipped in proposal generation.
final Boolean excludeRecentlyDemotedBrokers = new Boolean(); // Boolean | Whether to allow leader replicas to be moved to recently demoted brokers.
final Boolean excludeRecentlyRemovedBrokers = new Boolean(); // Boolean | Whether to allow replicas to be moved to recently removed broker.
final String excludedTopics = new String(); // String | Specify topic whose partition is excluded from replica movement.
final Long executionProgressCheckIntervalMs = new Long(); // Long | Execution progress check interval in milliseconds.
final String reason = new String(); // String | Reason for request.
final array[String] replicaMovementStrategies = new array[String](); // array[String] | Replica movement strategies to use.
final Long replicationThrottle = new Long(); // Long | Upper bound on the bandwidth in bytes per second used to move replicas.
final Boolean json = new Boolean(); // Boolean | Whether to return in JSON format or not.
final String reviewId = new String(); // String | Review id for 2-step verification.
final Boolean skipRackAwarenessCheck = new Boolean(); // Boolean | Whether to allow rack awareness check to be skipped.
final Boolean stopOngoingExecution = new Boolean(); // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
final Boolean useReadyDefaultGoals = new Boolean(); // Boolean | Whether to only use ready goals to generate proposal.
final Boolean verbose = new Boolean(); // Boolean | Return detailed state information.
final Boolean getResponseSchema = new Boolean(); // Boolean | Whether to return JSON schema in response header or not.
final String doAs = new String(); // String | The user specified by a trusted proxy in that authentication model.
final Boolean fastMode = new Boolean(); // Boolean | True to compute proposals in fast mode, false otherwise

try {
    final result = await api_instance.topicConfiguration(dryrun, topic, replicationFactor, dataFrom, goals, allowCapacityEstimation, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentLeaderMovements, brokerConcurrentLeaderMovements, skipHardGoalCheck, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, excludedTopics, executionProgressCheckIntervalMs, reason, replicaMovementStrategies, replicationThrottle, json, reviewId, skipRackAwarenessCheck, stopOngoingExecution, useReadyDefaultGoals, verbose, getResponseSchema, doAs, fastMode);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->topicConfiguration: $e\n');
}

import org.openapitools.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_%5B0-9%5D.%2A; // 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 = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // 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 cluster ongoing leadership movements.
        Integer brokerConcurrentLeaderMovements = 56; // Integer | The upper bound of per broker 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 = __CruiseControl.%2A; // 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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // 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, brokerConcurrentLeaderMovements, 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();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Boolean *dryrun = true; // Whether to dry-run the request or not. (optional) (default to true)
String *topic = topic_%5B0-9%5D.%2A; // Regular expression to specify subject topics. (optional) (default to null)
Integer *replicationFactor = 56; // Target replication factor. (optional) (default to null)
String *dataFrom = dataFrom_example; // Whether to calculate proposal from available valid partitions or valid windows. (optional) (default to VALID_WINDOWS)
array[String] *goals = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional) (default to null)
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) (default to null)
Integer *maxPartitionMovementsInCluster = 56; // Change upper bound of ongoing inter broker partition movements in cluster. (optional) (default to null)
Integer *concurrentLeaderMovements = 56; // The upper bound of cluster ongoing leadership movements. (optional) (default to null)
Integer *brokerConcurrentLeaderMovements = 56; // The upper bound of per broker ongoing leadership movements. (optional) (default to null)
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 = __CruiseControl.%2A; // Specify topic whose partition is excluded from replica movement. (optional) (default to null)
Long *executionProgressCheckIntervalMs = 789; // Execution progress check interval in milliseconds. (optional) (default to null)
String *reason = reason_example; // Reason for request. (optional) (default to null)
array[String] *replicaMovementStrategies = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // Replica movement strategies to use. (optional) (default to null)
Long *replicationThrottle = 789; // Upper bound on the bandwidth in bytes per second used to move replicas. (optional) (default to null)
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) (default to null)
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) (default to null)
Boolean *fastMode = true; // True to compute proposals in fast mode, false otherwise (optional) (default to true)

// 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
    brokerConcurrentLeaderMovements:brokerConcurrentLeaderMovements
    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 defaultClient = CruiseControlApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

// Create an instance of the API class
var api = new CruiseControlApi.DefaultApi()
var opts = {
  'dryrun': true, // {Boolean} Whether to dry-run the request or not.
  'topic': topic_%5B0-9%5D.%2A, // {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': ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"], // {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 cluster ongoing leadership movements.
  'brokerConcurrentLeaderMovements': 56, // {Integer} The upper bound of per broker 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': __CruiseControl.%2A, // {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': ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"], // {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 Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class topicConfigurationExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var dryrun = true;  // Boolean | Whether to dry-run the request or not. (optional)  (default to true)
            var topic = topic_%5B0-9%5D.%2A;  // String | Regular expression to specify subject topics. (optional)  (default to null)
            var replicationFactor = 56;  // Integer | Target replication factor. (optional)  (default to null)
            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)  (default to null)
            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)  (default to null)
            var maxPartitionMovementsInCluster = 56;  // Integer | Change upper bound of ongoing inter broker partition movements in cluster. (optional)  (default to null)
            var concurrentLeaderMovements = 56;  // Integer | The upper bound of cluster ongoing leadership movements. (optional)  (default to null)
            var brokerConcurrentLeaderMovements = 56;  // Integer | The upper bound of per broker ongoing leadership movements. (optional)  (default to null)
            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 = __CruiseControl.%2A;  // String | Specify topic whose partition is excluded from replica movement. (optional)  (default to null)
            var executionProgressCheckIntervalMs = 789;  // Long | Execution progress check interval in milliseconds. (optional)  (default to null)
            var reason = reason_example;  // String | Reason for request. (optional)  (default to null)
            var replicaMovementStrategies = new array[String](); // array[String] | Replica movement strategies to use. (optional)  (default to null)
            var replicationThrottle = 789;  // Long | Upper bound on the bandwidth in bytes per second used to move replicas. (optional)  (default to null)
            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)  (default to null)
            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)  (default to null)
            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, brokerConcurrentLeaderMovements, 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');
// Configure HTTP basic authorization: basicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$dryrun = true; // Boolean | Whether to dry-run the request or not.
$topic = topic_%5B0-9%5D.%2A; // 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 = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // 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 cluster ongoing leadership movements.
$brokerConcurrentLeaderMovements = 56; // Integer | The upper bound of per broker 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 = __CruiseControl.%2A; // 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 = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // 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, $brokerConcurrentLeaderMovements, $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::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure HTTP basic authorization: basicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $dryrun = true; # Boolean | Whether to dry-run the request or not.
my $topic = topic_%5B0-9%5D.%2A; # 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 = [["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]]; # 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 cluster ongoing leadership movements.
my $brokerConcurrentLeaderMovements = 56; # Integer | The upper bound of per broker 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 = __CruiseControl.%2A; # 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 = [["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]]; # 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, brokerConcurrentLeaderMovements => $brokerConcurrentLeaderMovements, 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 openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
dryrun = true # Boolean | Whether to dry-run the request or not. (optional) (default to true)
topic = topic_%5B0-9%5D.%2A # String | Regular expression to specify subject topics. (optional) (default to null)
replicationFactor = 56 # Integer | Target replication factor. (optional) (default to null)
dataFrom = dataFrom_example # String | Whether to calculate proposal from available valid partitions or valid windows. (optional) (default to VALID_WINDOWS)
goals = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"] # array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional) (default to null)
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) (default to null)
maxPartitionMovementsInCluster = 56 # Integer | Change upper bound of ongoing inter broker partition movements in cluster. (optional) (default to null)
concurrentLeaderMovements = 56 # Integer | The upper bound of cluster ongoing leadership movements. (optional) (default to null)
brokerConcurrentLeaderMovements = 56 # Integer | The upper bound of per broker ongoing leadership movements. (optional) (default to null)
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 = __CruiseControl.%2A # String | Specify topic whose partition is excluded from replica movement. (optional) (default to null)
executionProgressCheckIntervalMs = 789 # Long | Execution progress check interval in milliseconds. (optional) (default to null)
reason = reason_example # String | Reason for request. (optional) (default to null)
replicaMovementStrategies = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"] # array[String] | Replica movement strategies to use. (optional) (default to null)
replicationThrottle = 789 # Long | Upper bound on the bandwidth in bytes per second used to move replicas. (optional) (default to null)
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) (default to null)
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) (default to null)
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, brokerConcurrentLeaderMovements=brokerConcurrentLeaderMovements, 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)
extern crate DefaultApi;

pub fn main() {
    let dryrun = true; // Boolean
    let topic = topic_%5B0-9%5D.%2A; // String
    let replicationFactor = 56; // Integer
    let dataFrom = dataFrom_example; // String
    let goals = ["RackAwareGoal","ReplicaCapacityGoal","ReplicaDistributionGoal"]; // array[String]
    let allowCapacityEstimation = true; // Boolean
    let concurrentPartitionMovementsPerBroker = 56; // Integer
    let maxPartitionMovementsInCluster = 56; // Integer
    let concurrentLeaderMovements = 56; // Integer
    let brokerConcurrentLeaderMovements = 56; // Integer
    let skipHardGoalCheck = true; // Boolean
    let excludeRecentlyDemotedBrokers = true; // Boolean
    let excludeRecentlyRemovedBrokers = true; // Boolean
    let excludedTopics = __CruiseControl.%2A; // String
    let executionProgressCheckIntervalMs = 789; // Long
    let reason = reason_example; // String
    let replicaMovementStrategies = ["PrioritizeLargeReplicaMovementStrategy","PostponeUrpReplicaMovementStrategy"]; // array[String]
    let replicationThrottle = 789; // Long
    let json = true; // Boolean
    let reviewId = reviewId_example; // String
    let skipRackAwarenessCheck = true; // Boolean
    let stopOngoingExecution = true; // Boolean
    let useReadyDefaultGoals = true; // Boolean
    let verbose = true; // Boolean
    let getResponseSchema = true; // Boolean
    let doAs = doAs_example; // String
    let fastMode = true; // Boolean

    let mut context = DefaultApi::Context::default();
    let result = client.topicConfiguration(dryrun, topic, replicationFactor, dataFrom, goals, allowCapacityEstimation, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentLeaderMovements, brokerConcurrentLeaderMovements, skipHardGoalCheck, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, excludedTopics, executionProgressCheckIntervalMs, reason, replicaMovementStrategies, replicationThrottle, json, reviewId, skipRackAwarenessCheck, stopOngoingExecution, useReadyDefaultGoals, verbose, getResponseSchema, doAs, fastMode, &context).wait();

    println!("{:?}", result);
}

Scopes

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 cluster ongoing leadership movements.
broker_concurrent_leader_movements
Integer (int32)
The upper bound of per broker 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


train

Train Cruise Control to better model broker cpu usage.


/train

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Basic [[basicHash]]" \
 -H "Accept: application/json,text/plain" \
 "http://localhost/kafkacruisecontrol/train?start=789&end=789&json=true&get_response_schema=true&doAs=doAs_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Create an instance of the API class
        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 'package:openapi/api.dart';

final api_instance = DefaultApi();

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

try {
    final result = await api_instance.train(start, end, json, getResponseSchema, doAs);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->train: $e\n');
}

import org.openapitools.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();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
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) (default to null)
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) (default to null)

// 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 defaultClient = CruiseControlApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

// Create an instance of the API class
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 Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class trainExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            // Create an instance of the API class
            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)  (default to null)
            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)  (default to null)

            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');
// Configure HTTP basic authorization: basicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$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::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure HTTP basic authorization: basicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::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 openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'

# Create an instance of the API class
api_instance = openapi_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) (default to null)
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) (default to null)

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)
extern crate DefaultApi;

pub fn main() {
    let start = 789; // Long
    let end = 789; // Long
    let json = true; // Boolean
    let getResponseSchema = true; // Boolean
    let doAs = doAs_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.train(start, end, json, getResponseSchema, doAs, &context).wait();

    println!("{:?}", result);
}

Scopes

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


userTasks

Get the recent user tasks from cruise control.


/user_tasks

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Basic [[basicHash]]" \
 -H "Accept: application/json,text/plain" \
 "http://localhost/kafkacruisecontrol/user_tasks?client_ids=[0.0.0.1]&endpoints=[PROPOSALS,REBALANCE]&entries=789&types=[COMPLETED, ACTIVE]&user_task_ids=userTaskIds_example&json=true&fetch_completed_task=true&get_response_schema=true&doAs=doAs_example&reason=reason_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        String clientIds = [0.0.0.1]; // String | Comma separated IP addresses to filter the task results Cruise Control report.
        String endpoints = [PROPOSALS,REBALANCE]; // 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 = [COMPLETED, ACTIVE]; // 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 'package:openapi/api.dart';

final api_instance = DefaultApi();

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

try {
    final result = await api_instance.userTasks(clientIds, endpoints, entries, types, userTaskIds, json, fetchCompletedTask, getResponseSchema, doAs, reason);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->userTasks: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String clientIds = [0.0.0.1]; // String | Comma separated IP addresses to filter the task results Cruise Control report.
        String endpoints = [PROPOSALS,REBALANCE]; // 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 = [COMPLETED, ACTIVE]; // 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();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
String *clientIds = [0.0.0.1]; // Comma separated IP addresses to filter the task results Cruise Control report. (optional) (default to null)
String *endpoints = [PROPOSALS,REBALANCE]; // Comma separated endpoints to filter the task results Cruise Control report. (optional) (default to null)
Long *entries = 789; // The number of entries to show in the response. (optional) (default to null)
String *types = [COMPLETED, ACTIVE]; // Comma separated HTTP request types to filter the task results Cruise Control report. (optional) (default to null)
String *userTaskIds = userTaskIds_example; // Comma separated UUIDs to filter the task results Cruise Control report. (optional) (default to null)
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) (default to null)
String *reason = reason_example; // Reason for request. (optional) (default to null)

// 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 defaultClient = CruiseControlApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

// Create an instance of the API class
var api = new CruiseControlApi.DefaultApi()
var opts = {
  'clientIds': [0.0.0.1], // {String} Comma separated IP addresses to filter the task results Cruise Control report.
  'endpoints': [PROPOSALS,REBALANCE], // {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': [COMPLETED, ACTIVE], // {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 Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class userTasksExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var clientIds = [0.0.0.1];  // String | Comma separated IP addresses to filter the task results Cruise Control report. (optional)  (default to null)
            var endpoints = [PROPOSALS,REBALANCE];  // String | Comma separated endpoints to filter the task results Cruise Control report. (optional)  (default to null)
            var entries = 789;  // Long | The number of entries to show in the response. (optional)  (default to null)
            var types = [COMPLETED, ACTIVE];  // String | Comma separated HTTP request types to filter the task results Cruise Control report. (optional)  (default to null)
            var userTaskIds = userTaskIds_example;  // String | Comma separated UUIDs to filter the task results Cruise Control report. (optional)  (default to null)
            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)  (default to null)
            var reason = reason_example;  // String | Reason for request. (optional)  (default to null)

            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');
// Configure HTTP basic authorization: basicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$clientIds = [0.0.0.1]; // String | Comma separated IP addresses to filter the task results Cruise Control report.
$endpoints = [PROPOSALS,REBALANCE]; // 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 = [COMPLETED, ACTIVE]; // 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::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure HTTP basic authorization: basicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $clientIds = [0.0.0.1]; # String | Comma separated IP addresses to filter the task results Cruise Control report.
my $endpoints = [PROPOSALS,REBALANCE]; # 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 = [COMPLETED, ACTIVE]; # 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 openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
clientIds = [0.0.0.1] # String | Comma separated IP addresses to filter the task results Cruise Control report. (optional) (default to null)
endpoints = [PROPOSALS,REBALANCE] # String | Comma separated endpoints to filter the task results Cruise Control report. (optional) (default to null)
entries = 789 # Long | The number of entries to show in the response. (optional) (default to null)
types = [COMPLETED, ACTIVE] # String | Comma separated HTTP request types to filter the task results Cruise Control report. (optional) (default to null)
userTaskIds = userTaskIds_example # String | Comma separated UUIDs to filter the task results Cruise Control report. (optional) (default to null)
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) (default to null)
reason = reason_example # String | Reason for request. (optional) (default to null)

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)
extern crate DefaultApi;

pub fn main() {
    let clientIds = [0.0.0.1]; // String
    let endpoints = [PROPOSALS,REBALANCE]; // String
    let entries = 789; // Long
    let types = [COMPLETED, ACTIVE]; // String
    let userTaskIds = userTaskIds_example; // String
    let json = true; // Boolean
    let fetchCompletedTask = true; // Boolean
    let getResponseSchema = true; // Boolean
    let doAs = doAs_example; // String
    let reason = reason_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.userTasks(clientIds, endpoints, entries, types, userTaskIds, json, fetchCompletedTask, getResponseSchema, doAs, reason, &context).wait();

    println!("{:?}", result);
}

Scopes

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