getAllConsumerGroupMetrics
Get all consumer group details.
/api/v1/admin/metrics/aggregated/groups
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json"\
"//api/v1/admin/metrics/aggregated/groups?duration=&from=&to=&requireTimelineMetrics=&state="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AggregatedMetricOperationsApi;
import java.io.File;
import java.util.*;
public class AggregatedMetricOperationsApiExample {
public static void main(String[] args) {
AggregatedMetricOperationsApi apiInstance = new AggregatedMetricOperationsApi();
String duration = duration_example; // String | Pre-defined Time duration. Supply either 'duration' [OR] 'from' & 'to' params
Long from = 789; // Long | Beginning of the time period. Provide '-1' to fetch the latest value
Long to = 789; // Long | End of the time period. Provide '-1' to fetch the latest value
Boolean requireTimelineMetrics = true; // Boolean | Whether to fetch timeline metrics
String state = state_example; // String | State of the Client
try {
array[AggrConsumerMetrics] result = apiInstance.getAllConsumerGroupMetrics(duration, from, to, requireTimelineMetrics, state);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AggregatedMetricOperationsApi#getAllConsumerGroupMetrics");
e.printStackTrace();
}
}
}
import io.swagger.client.api.AggregatedMetricOperationsApi;
public class AggregatedMetricOperationsApiExample {
public static void main(String[] args) {
AggregatedMetricOperationsApi apiInstance = new AggregatedMetricOperationsApi();
String duration = duration_example; // String | Pre-defined Time duration. Supply either 'duration' [OR] 'from' & 'to' params
Long from = 789; // Long | Beginning of the time period. Provide '-1' to fetch the latest value
Long to = 789; // Long | End of the time period. Provide '-1' to fetch the latest value
Boolean requireTimelineMetrics = true; // Boolean | Whether to fetch timeline metrics
String state = state_example; // String | State of the Client
try {
array[AggrConsumerMetrics] result = apiInstance.getAllConsumerGroupMetrics(duration, from, to, requireTimelineMetrics, state);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AggregatedMetricOperationsApi#getAllConsumerGroupMetrics");
e.printStackTrace();
}
}
}
String *duration = duration_example; // Pre-defined Time duration. Supply either 'duration' [OR] 'from' & 'to' params (optional)
Long *from = 789; // Beginning of the time period. Provide '-1' to fetch the latest value (optional)
Long *to = 789; // End of the time period. Provide '-1' to fetch the latest value (optional)
Boolean *requireTimelineMetrics = true; // Whether to fetch timeline metrics (optional)
String *state = state_example; // State of the Client (optional)
AggregatedMetricOperationsApi *apiInstance = [[AggregatedMetricOperationsApi alloc] init];
// Get all consumer group details.
[apiInstance getAllConsumerGroupMetricsWith:duration
from:from
to:to
requireTimelineMetrics:requireTimelineMetrics
state:state
completionHandler: ^(array[AggrConsumerMetrics] output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var SwaggerJsClient = require('swagger-js-client');
var api = new SwaggerJsClient.AggregatedMetricOperationsApi()
var opts = {
'duration': duration_example, // {{String}} Pre-defined Time duration. Supply either 'duration' [OR] 'from' & 'to' params
'from': 789, // {{Long}} Beginning of the time period. Provide '-1' to fetch the latest value
'to': 789, // {{Long}} End of the time period. Provide '-1' to fetch the latest value
'requireTimelineMetrics': true, // {{Boolean}} Whether to fetch timeline metrics
'state': state_example // {{String}} State of the Client
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getAllConsumerGroupMetrics(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getAllConsumerGroupMetricsExample
{
public void main()
{
var apiInstance = new AggregatedMetricOperationsApi();
var duration = duration_example; // String | Pre-defined Time duration. Supply either 'duration' [OR] 'from' & 'to' params (optional)
var from = 789; // Long | Beginning of the time period. Provide '-1' to fetch the latest value (optional)
var to = 789; // Long | End of the time period. Provide '-1' to fetch the latest value (optional)
var requireTimelineMetrics = true; // Boolean | Whether to fetch timeline metrics (optional)
var state = state_example; // String | State of the Client (optional)
try
{
// Get all consumer group details.
array[AggrConsumerMetrics] result = apiInstance.getAllConsumerGroupMetrics(duration, from, to, requireTimelineMetrics, state);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling AggregatedMetricOperationsApi.getAllConsumerGroupMetrics: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiAggregatedMetricOperationsApi();
$duration = duration_example; // String | Pre-defined Time duration. Supply either 'duration' [OR] 'from' & 'to' params
$from = 789; // Long | Beginning of the time period. Provide '-1' to fetch the latest value
$to = 789; // Long | End of the time period. Provide '-1' to fetch the latest value
$requireTimelineMetrics = true; // Boolean | Whether to fetch timeline metrics
$state = state_example; // String | State of the Client
try {
$result = $api_instance->getAllConsumerGroupMetrics($duration, $from, $to, $requireTimelineMetrics, $state);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AggregatedMetricOperationsApi->getAllConsumerGroupMetrics: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AggregatedMetricOperationsApi;
my $api_instance = WWW::SwaggerClient::AggregatedMetricOperationsApi->new();
my $duration = duration_example; # String | Pre-defined Time duration. Supply either 'duration' [OR] 'from' & 'to' params
my $from = 789; # Long | Beginning of the time period. Provide '-1' to fetch the latest value
my $to = 789; # Long | End of the time period. Provide '-1' to fetch the latest value
my $requireTimelineMetrics = true; # Boolean | Whether to fetch timeline metrics
my $state = state_example; # String | State of the Client
eval {
my $result = $api_instance->getAllConsumerGroupMetrics(duration => $duration, from => $from, to => $to, requireTimelineMetrics => $requireTimelineMetrics, state => $state);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AggregatedMetricOperationsApi->getAllConsumerGroupMetrics: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.AggregatedMetricOperationsApi()
duration = duration_example # String | Pre-defined Time duration. Supply either 'duration' [OR] 'from' & 'to' params (optional)
from = 789 # Long | Beginning of the time period. Provide '-1' to fetch the latest value (optional)
to = 789 # Long | End of the time period. Provide '-1' to fetch the latest value (optional)
requireTimelineMetrics = true # Boolean | Whether to fetch timeline metrics (optional)
state = state_example # String | State of the Client (optional)
try:
# Get all consumer group details.
api_response = api_instance.get_all_consumer_group_metrics(duration=duration, from=from, to=to, requireTimelineMetrics=requireTimelineMetrics, state=state)
pprint(api_response)
except ApiException as e:
print("Exception when calling AggregatedMetricOperationsApi->getAllConsumerGroupMetrics: %s\n" % e)
Parameters
Name | Description |
---|---|
duration |
String
Pre-defined Time duration. Supply either 'duration' [OR] 'from' & 'to' params
|
from |
Long
(int64)
Beginning of the time period. Provide '-1' to fetch the latest value
|
to |
Long
(int64)
End of the time period. Provide '-1' to fetch the latest value
|
requireTimelineMetrics |
Boolean
Whether to fetch timeline metrics
|
state |
String
State of the Client
|