Cloudera Documentation

Cloudera Streams Replication Manager for HDF and HDP REST API Reference

Default

clusterMetrics


/cluster-metrics/{cluster}/{metric}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"//cluster-metrics/{cluster}/{metric}?minutes=&hours=&samples="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String cluster = cluster_example; // String | 
        String metric = metric_example; // String | 
        Integer minutes = 56; // Integer | 
        Integer hours = 56; // Integer | 
        Integer samples = 56; // Integer | 
        try {
            TimeSeriesResponse result = apiInstance.clusterMetrics(cluster, metric, minutes, hours, samples);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clusterMetrics");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String cluster = cluster_example; // String | 
        String metric = metric_example; // String | 
        Integer minutes = 56; // Integer | 
        Integer hours = 56; // Integer | 
        Integer samples = 56; // Integer | 
        try {
            TimeSeriesResponse result = apiInstance.clusterMetrics(cluster, metric, minutes, hours, samples);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clusterMetrics");
            e.printStackTrace();
        }
    }
}
String *cluster = cluster_example; // 
String *metric = metric_example; // 
Integer *minutes = 56; //  (optional)
Integer *hours = 56; //  (optional)
Integer *samples = 56; //  (optional) (default to 1000)

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

[apiInstance clusterMetricsWith:cluster
    metric:metric
    minutes:minutes
    hours:hours
    samples:samples
              completionHandler: ^(TimeSeriesResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SwaggerJsClient = require('swagger-js-client');

var api = new SwaggerJsClient.DefaultApi()
var cluster = cluster_example; // {{String}} 
var metric = metric_example; // {{String}} 
var opts = { 
  'minutes': 56, // {{Integer}} 
  'hours': 56, // {{Integer}} 
  'samples': 56 // {{Integer}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clusterMetrics(cluster, metric, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new DefaultApi();
            var cluster = cluster_example;  // String | 
            var metric = metric_example;  // String | 
            var minutes = 56;  // Integer |  (optional) 
            var hours = 56;  // Integer |  (optional) 
            var samples = 56;  // Integer |  (optional)  (default to 1000)

            try
            {
                TimeSeriesResponse result = apiInstance.clusterMetrics(cluster, metric, minutes, hours, samples);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.clusterMetrics: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$cluster = cluster_example; // String | 
$metric = metric_example; // String | 
$minutes = 56; // Integer | 
$hours = 56; // Integer | 
$samples = 56; // Integer | 

try {
    $result = $api_instance->clusterMetrics($cluster, $metric, $minutes, $hours, $samples);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->clusterMetrics: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $cluster = cluster_example; # String | 
my $metric = metric_example; # String | 
my $minutes = 56; # Integer | 
my $hours = 56; # Integer | 
my $samples = 56; # Integer | 

eval { 
    my $result = $api_instance->clusterMetrics(cluster => $cluster, metric => $metric, minutes => $minutes, hours => $hours, samples => $samples);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->clusterMetrics: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
cluster = cluster_example # String | 
metric = metric_example # String | 
minutes = 56 # Integer |  (optional)
hours = 56 # Integer |  (optional)
samples = 56 # Integer |  (optional) (default to 1000)

try: 
    api_response = api_instance.cluster_metrics(cluster, metric, minutes=minutes, hours=hours, samples=samples)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->clusterMetrics: %s\n" % e)

Parameters

Path parameters
Name Description
cluster*
String
Required
metric*
String
Required
Query parameters
Name Description
minutes
Integer (int32)
hours
Integer (int32)
samples
Integer (int32)

Responses

Status: 200 - successful operation


clusterMetricsLocal


/cluster-metrics-local/{cluster}/{metric}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"//cluster-metrics-local/{cluster}/{metric}?minutes=&hours="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String cluster = cluster_example; // String | 
        String metric = metric_example; // String | 
        Integer minutes = 56; // Integer | 
        Integer hours = 56; // Integer | 
        try {
            TimeSeriesResponse result = apiInstance.clusterMetricsLocal(cluster, metric, minutes, hours);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clusterMetricsLocal");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String cluster = cluster_example; // String | 
        String metric = metric_example; // String | 
        Integer minutes = 56; // Integer | 
        Integer hours = 56; // Integer | 
        try {
            TimeSeriesResponse result = apiInstance.clusterMetricsLocal(cluster, metric, minutes, hours);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clusterMetricsLocal");
            e.printStackTrace();
        }
    }
}
String *cluster = cluster_example; // 
String *metric = metric_example; // 
Integer *minutes = 56; //  (optional)
Integer *hours = 56; //  (optional)

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

[apiInstance clusterMetricsLocalWith:cluster
    metric:metric
    minutes:minutes
    hours:hours
              completionHandler: ^(TimeSeriesResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SwaggerJsClient = require('swagger-js-client');

var api = new SwaggerJsClient.DefaultApi()
var cluster = cluster_example; // {{String}} 
var metric = metric_example; // {{String}} 
var opts = { 
  'minutes': 56, // {{Integer}} 
  'hours': 56 // {{Integer}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clusterMetricsLocal(cluster, metric, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new DefaultApi();
            var cluster = cluster_example;  // String | 
            var metric = metric_example;  // String | 
            var minutes = 56;  // Integer |  (optional) 
            var hours = 56;  // Integer |  (optional) 

            try
            {
                TimeSeriesResponse result = apiInstance.clusterMetricsLocal(cluster, metric, minutes, hours);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.clusterMetricsLocal: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$cluster = cluster_example; // String | 
$metric = metric_example; // String | 
$minutes = 56; // Integer | 
$hours = 56; // Integer | 

try {
    $result = $api_instance->clusterMetricsLocal($cluster, $metric, $minutes, $hours);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->clusterMetricsLocal: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $cluster = cluster_example; # String | 
my $metric = metric_example; # String | 
my $minutes = 56; # Integer | 
my $hours = 56; # Integer | 

eval { 
    my $result = $api_instance->clusterMetricsLocal(cluster => $cluster, metric => $metric, minutes => $minutes, hours => $hours);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->clusterMetricsLocal: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
cluster = cluster_example # String | 
metric = metric_example # String | 
minutes = 56 # Integer |  (optional)
hours = 56 # Integer |  (optional)

try: 
    api_response = api_instance.cluster_metrics_local(cluster, metric, minutes=minutes, hours=hours)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->clusterMetricsLocal: %s\n" % e)

Parameters

Path parameters
Name Description
cluster*
String
Required
metric*
String
Required
Query parameters
Name Description
minutes
Integer (int32)
hours
Integer (int32)

Responses

Status: 200 - successful operation


remoteTopics


/remote-topics/{source}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"//remote-topics/{source}?minutes=&hours="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String source = source_example; // String | 
        Integer minutes = 56; // Integer | 
        Integer hours = 56; // Integer | 
        try {
            map['String', TopicInfo] result = apiInstance.remoteTopics(source, minutes, hours);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#remoteTopics");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String source = source_example; // String | 
        Integer minutes = 56; // Integer | 
        Integer hours = 56; // Integer | 
        try {
            map['String', TopicInfo] result = apiInstance.remoteTopics(source, minutes, hours);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#remoteTopics");
            e.printStackTrace();
        }
    }
}
String *source = source_example; // 
Integer *minutes = 56; //  (optional)
Integer *hours = 56; //  (optional)

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

[apiInstance remoteTopicsWith:source
    minutes:minutes
    hours:hours
              completionHandler: ^(map['String', TopicInfo] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SwaggerJsClient = require('swagger-js-client');

var api = new SwaggerJsClient.DefaultApi()
var source = source_example; // {{String}} 
var opts = { 
  'minutes': 56, // {{Integer}} 
  'hours': 56 // {{Integer}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.remoteTopics(source, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new DefaultApi();
            var source = source_example;  // String | 
            var minutes = 56;  // Integer |  (optional) 
            var hours = 56;  // Integer |  (optional) 

            try
            {
                map['String', TopicInfo] result = apiInstance.remoteTopics(source, minutes, hours);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.remoteTopics: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$source = source_example; // String | 
$minutes = 56; // Integer | 
$hours = 56; // Integer | 

try {
    $result = $api_instance->remoteTopics($source, $minutes, $hours);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->remoteTopics: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $source = source_example; # String | 
my $minutes = 56; # Integer | 
my $hours = 56; # Integer | 

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

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
source = source_example # String | 
minutes = 56 # Integer |  (optional)
hours = 56 # Integer |  (optional)

try: 
    api_response = api_instance.remote_topics(source, minutes=minutes, hours=hours)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->remoteTopics: %s\n" % e)

Parameters

Path parameters
Name Description
source*
String
Required
Query parameters
Name Description
minutes
Integer (int32)
hours
Integer (int32)

Responses

Status: 200 - successful operation


replicationInfo


/replications

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"//replications?source=&minutes=&hours="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        array[String] source = ; // array[String] | 
        Integer minutes = 56; // Integer | 
        Integer hours = 56; // Integer | 
        try {
            map['String', ReplicationInfo] result = apiInstance.replicationInfo(source, minutes, hours);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#replicationInfo");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        array[String] source = ; // array[String] | 
        Integer minutes = 56; // Integer | 
        Integer hours = 56; // Integer | 
        try {
            map['String', ReplicationInfo] result = apiInstance.replicationInfo(source, minutes, hours);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#replicationInfo");
            e.printStackTrace();
        }
    }
}
array[String] *source = ; //  (optional)
Integer *minutes = 56; //  (optional)
Integer *hours = 56; //  (optional)

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

[apiInstance replicationInfoWith:source
    minutes:minutes
    hours:hours
              completionHandler: ^(map['String', ReplicationInfo] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SwaggerJsClient = require('swagger-js-client');

var api = new SwaggerJsClient.DefaultApi()
var opts = { 
  'source': , // {{array[String]}} 
  'minutes': 56, // {{Integer}} 
  'hours': 56 // {{Integer}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.replicationInfo(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new DefaultApi();
            var source = new array[String](); // array[String] |  (optional) 
            var minutes = 56;  // Integer |  (optional) 
            var hours = 56;  // Integer |  (optional) 

            try
            {
                map['String', ReplicationInfo] result = apiInstance.replicationInfo(source, minutes, hours);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.replicationInfo: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$source = ; // array[String] | 
$minutes = 56; // Integer | 
$hours = 56; // Integer | 

try {
    $result = $api_instance->replicationInfo($source, $minutes, $hours);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->replicationInfo: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $source = []; # array[String] | 
my $minutes = 56; # Integer | 
my $hours = 56; # Integer | 

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

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
source =  # array[String] |  (optional)
minutes = 56 # Integer |  (optional)
hours = 56 # Integer |  (optional)

try: 
    api_response = api_instance.replication_info(source=source, minutes=minutes, hours=hours)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->replicationInfo: %s\n" % e)

Parameters

Query parameters
Name Description
source
array[String]
minutes
Integer (int32)
hours
Integer (int32)

Responses

Status: 200 - successful operation


topicMetrics


/topic-metrics/{topic}/{metric}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"//topic-metrics/{topic}/{metric}?minutes=&hours=&samples="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String topic = topic_example; // String | 
        String metric = metric_example; // String | 
        Integer minutes = 56; // Integer | 
        Integer hours = 56; // Integer | 
        Integer samples = 56; // Integer | 
        try {
            TimeSeriesResponse result = apiInstance.topicMetrics(topic, metric, minutes, hours, samples);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#topicMetrics");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String topic = topic_example; // String | 
        String metric = metric_example; // String | 
        Integer minutes = 56; // Integer | 
        Integer hours = 56; // Integer | 
        Integer samples = 56; // Integer | 
        try {
            TimeSeriesResponse result = apiInstance.topicMetrics(topic, metric, minutes, hours, samples);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#topicMetrics");
            e.printStackTrace();
        }
    }
}
String *topic = topic_example; // 
String *metric = metric_example; // 
Integer *minutes = 56; //  (optional)
Integer *hours = 56; //  (optional)
Integer *samples = 56; //  (optional) (default to 1000)

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

[apiInstance topicMetricsWith:topic
    metric:metric
    minutes:minutes
    hours:hours
    samples:samples
              completionHandler: ^(TimeSeriesResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SwaggerJsClient = require('swagger-js-client');

var api = new SwaggerJsClient.DefaultApi()
var topic = topic_example; // {{String}} 
var metric = metric_example; // {{String}} 
var opts = { 
  'minutes': 56, // {{Integer}} 
  'hours': 56, // {{Integer}} 
  'samples': 56 // {{Integer}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.topicMetrics(topic, metric, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new DefaultApi();
            var topic = topic_example;  // String | 
            var metric = metric_example;  // String | 
            var minutes = 56;  // Integer |  (optional) 
            var hours = 56;  // Integer |  (optional) 
            var samples = 56;  // Integer |  (optional)  (default to 1000)

            try
            {
                TimeSeriesResponse result = apiInstance.topicMetrics(topic, metric, minutes, hours, samples);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.topicMetrics: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$topic = topic_example; // String | 
$metric = metric_example; // String | 
$minutes = 56; // Integer | 
$hours = 56; // Integer | 
$samples = 56; // Integer | 

try {
    $result = $api_instance->topicMetrics($topic, $metric, $minutes, $hours, $samples);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->topicMetrics: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $topic = topic_example; # String | 
my $metric = metric_example; # String | 
my $minutes = 56; # Integer | 
my $hours = 56; # Integer | 
my $samples = 56; # Integer | 

eval { 
    my $result = $api_instance->topicMetrics(topic => $topic, metric => $metric, minutes => $minutes, hours => $hours, samples => $samples);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->topicMetrics: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
topic = topic_example # String | 
metric = metric_example # String | 
minutes = 56 # Integer |  (optional)
hours = 56 # Integer |  (optional)
samples = 56 # Integer |  (optional) (default to 1000)

try: 
    api_response = api_instance.topic_metrics(topic, metric, minutes=minutes, hours=hours, samples=samples)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->topicMetrics: %s\n" % e)

Parameters

Path parameters
Name Description
topic*
String
Required
metric*
String
Required
Query parameters
Name Description
minutes
Integer (int32)
hours
Integer (int32)
samples
Integer (int32)

Responses

Status: 200 - successful operation


topicMetricsLocal


/topic-metrics-local/{topic}/{metric}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"//topic-metrics-local/{topic}/{metric}?minutes=&hours="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String topic = topic_example; // String | 
        String metric = metric_example; // String | 
        Integer minutes = 56; // Integer | 
        Integer hours = 56; // Integer | 
        try {
            TimeSeriesResponse result = apiInstance.topicMetricsLocal(topic, metric, minutes, hours);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#topicMetricsLocal");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String topic = topic_example; // String | 
        String metric = metric_example; // String | 
        Integer minutes = 56; // Integer | 
        Integer hours = 56; // Integer | 
        try {
            TimeSeriesResponse result = apiInstance.topicMetricsLocal(topic, metric, minutes, hours);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#topicMetricsLocal");
            e.printStackTrace();
        }
    }
}
String *topic = topic_example; // 
String *metric = metric_example; // 
Integer *minutes = 56; //  (optional)
Integer *hours = 56; //  (optional)

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

[apiInstance topicMetricsLocalWith:topic
    metric:metric
    minutes:minutes
    hours:hours
              completionHandler: ^(TimeSeriesResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SwaggerJsClient = require('swagger-js-client');

var api = new SwaggerJsClient.DefaultApi()
var topic = topic_example; // {{String}} 
var metric = metric_example; // {{String}} 
var opts = { 
  'minutes': 56, // {{Integer}} 
  'hours': 56 // {{Integer}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.topicMetricsLocal(topic, metric, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new DefaultApi();
            var topic = topic_example;  // String | 
            var metric = metric_example;  // String | 
            var minutes = 56;  // Integer |  (optional) 
            var hours = 56;  // Integer |  (optional) 

            try
            {
                TimeSeriesResponse result = apiInstance.topicMetricsLocal(topic, metric, minutes, hours);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.topicMetricsLocal: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$topic = topic_example; // String | 
$metric = metric_example; // String | 
$minutes = 56; // Integer | 
$hours = 56; // Integer | 

try {
    $result = $api_instance->topicMetricsLocal($topic, $metric, $minutes, $hours);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->topicMetricsLocal: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $topic = topic_example; # String | 
my $metric = metric_example; # String | 
my $minutes = 56; # Integer | 
my $hours = 56; # Integer | 

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

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
topic = topic_example # String | 
metric = metric_example # String | 
minutes = 56 # Integer |  (optional)
hours = 56 # Integer |  (optional)

try: 
    api_response = api_instance.topic_metrics_local(topic, metric, minutes=minutes, hours=hours)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->topicMetricsLocal: %s\n" % e)

Parameters

Path parameters
Name Description
topic*
String
Required
metric*
String
Required
Query parameters
Name Description
minutes
Integer (int32)
hours
Integer (int32)

Responses

Status: 200 - successful operation