ResMon - distributed resources monitoring

Hosts

deleteMetric

Delete complex metric


/hosts/{hostname}/metrics/{metric_id}

Usage and SDK Samples

curl -X DELETE -H "Authorization: [[apiKey]]" "http://tbajorek.pl:4000/hosts/{hostname}/metrics/{metric_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.HostsApi;

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

public class HostsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        HostsApi apiInstance = new HostsApi();
        String metricId = metricId_example; // String | Metric identyfier. It has the same form as `metric_id` field of `Metric` model
        String hostname = hostname_example; // String | Target host (domain name)
        try {
            Object result = apiInstance.deleteMetric(metricId, hostname);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HostsApi#deleteMetric");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.HostsApi;

public class HostsApiExample {

    public static void main(String[] args) {
        HostsApi apiInstance = new HostsApi();
        String metricId = metricId_example; // String | Metric identyfier. It has the same form as `metric_id` field of `Metric` model
        String hostname = hostname_example; // String | Target host (domain name)
        try {
            Object result = apiInstance.deleteMetric(metricId, hostname);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HostsApi#deleteMetric");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *metricId = metricId_example; // Metric identyfier. It has the same form as `metric_id` field of `Metric` model
String *hostname = hostname_example; // Target host (domain name)

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

// Delete complex metric
[apiInstance deleteMetricWith:metricId
    hostname:hostname
              completionHandler: ^(Object output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ResMonDistributedResourcesMonitoring = require('res_mon___distributed_resources_monitoring');
var defaultClient = ResMonDistributedResourcesMonitoring.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['Authorization'] = "Token"

var api = new ResMonDistributedResourcesMonitoring.HostsApi()

var metricId = metricId_example; // {String} Metric identyfier. It has the same form as `metric_id` field of `Metric` model

var hostname = hostname_example; // {String} Target host (domain name)


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteMetric(metricId, hostname, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteMetricExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new HostsApi();
            var metricId = metricId_example;  // String | Metric identyfier. It has the same form as `metric_id` field of `Metric` model
            var hostname = hostname_example;  // String | Target host (domain name)

            try
            {
                // Delete complex metric
                Object result = apiInstance.deleteMetric(metricId, hostname);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling HostsApi.deleteMetric: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\HostsApi();
$metricId = metricId_example; // String | Metric identyfier. It has the same form as `metric_id` field of `Metric` model
$hostname = hostname_example; // String | Target host (domain name)

try {
    $result = $api_instance->deleteMetric($metricId, $hostname);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling HostsApi->deleteMetric: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::HostsApi;

# Configure API key authorization: APIKeyHeader
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::HostsApi->new();
my $metricId = metricId_example; # String | Metric identyfier. It has the same form as `metric_id` field of `Metric` model
my $hostname = hostname_example; # String | Target host (domain name)

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

# Configure API key authorization: APIKeyHeader
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.HostsApi()
metricId = metricId_example # String | Metric identyfier. It has the same form as `metric_id` field of `Metric` model
hostname = hostname_example # String | Target host (domain name)

try: 
    # Delete complex metric
    api_response = api_instance.delete_metric(metricId, hostname)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling HostsApi->deleteMetric: %s\n" % e)

Parameters

Path parameters
Name Description
metric_id*
String
Metric identyfier. It has the same form as `metric_id` field of `Metric` model
Required
hostname*
String
Target host (domain name)
Required

Responses

Status: 200 - Success

Name Type Format Description
Access-Control-Allow-Origin String It indicates whether the response can be shared with resources with the given origin
Access-Control-Allow-Headers String It is used in response to a preflight request to indicate which HTTP headers can be used during the actual request
Access-Control-Allow-Methods String It specifies the method or methods allowed when accessing the resource in response to a preflight request

Status: 401 - User is not authorized

Status: 403 - You aren't a creator of complex metric

Status: 404 - Unknown metric or hostname


getHosts

Get list of hosts


/hosts

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "http://tbajorek.pl:4000/hosts?q="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.HostsApi;

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

public class HostsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        HostsApi apiInstance = new HostsApi();
        String q = q_example; // String | Filters out used metrics and hosts according to provided keys. String needs to match the following schema: `KEY1:VAL1,KEY2:VAL2;KEY3:VAL4...`. Comma is used to indicate `AND` operation while semicolon relates to `OR`. When `VAL` paramater is wrapped into slashes then regex mode is activated. For example when we query for `metric_id:cpu,os:/.*nix.*/;metric_id:cpu,os:/.*win.*/` we should receive cpu metric measurements for hosts containing either nix or win as substring in `os` metadata. Note that `AND` operation has higher priority than `OR`. Allowed keys: `metric_id`, `description`, `complex` (metric parameters) and all available host metadata fields. When not provided: No filtering performed - all available metrics and hosts are taken
        try {
            array[Host] result = apiInstance.getHosts(q);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HostsApi#getHosts");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.HostsApi;

public class HostsApiExample {

    public static void main(String[] args) {
        HostsApi apiInstance = new HostsApi();
        String q = q_example; // String | Filters out used metrics and hosts according to provided keys. String needs to match the following schema: `KEY1:VAL1,KEY2:VAL2;KEY3:VAL4...`. Comma is used to indicate `AND` operation while semicolon relates to `OR`. When `VAL` paramater is wrapped into slashes then regex mode is activated. For example when we query for `metric_id:cpu,os:/.*nix.*/;metric_id:cpu,os:/.*win.*/` we should receive cpu metric measurements for hosts containing either nix or win as substring in `os` metadata. Note that `AND` operation has higher priority than `OR`. Allowed keys: `metric_id`, `description`, `complex` (metric parameters) and all available host metadata fields. When not provided: No filtering performed - all available metrics and hosts are taken
        try {
            array[Host] result = apiInstance.getHosts(q);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HostsApi#getHosts");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *q = q_example; // Filters out used metrics and hosts according to provided keys. String needs to match the following schema: `KEY1:VAL1,KEY2:VAL2;KEY3:VAL4...`. Comma is used to indicate `AND` operation while semicolon relates to `OR`. When `VAL` paramater is wrapped into slashes then regex mode is activated. For example when we query for `metric_id:cpu,os:/.*nix.*/;metric_id:cpu,os:/.*win.*/` we should receive cpu metric measurements for hosts containing either nix or win as substring in `os` metadata. Note that `AND` operation has higher priority than `OR`. Allowed keys: `metric_id`, `description`, `complex` (metric parameters) and all available host metadata fields. When not provided: No filtering performed - all available metrics and hosts are taken (optional)

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

// Get list of hosts
[apiInstance getHostsWith:q
              completionHandler: ^(array[Host] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ResMonDistributedResourcesMonitoring = require('res_mon___distributed_resources_monitoring');
var defaultClient = ResMonDistributedResourcesMonitoring.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['Authorization'] = "Token"

var api = new ResMonDistributedResourcesMonitoring.HostsApi()

var opts = { 
  'q': q_example // {String} Filters out used metrics and hosts according to provided keys. String needs to match the following schema: `KEY1:VAL1,KEY2:VAL2;KEY3:VAL4...`. Comma is used to indicate `AND` operation while semicolon relates to `OR`. When `VAL` paramater is wrapped into slashes then regex mode is activated. For example when we query for `metric_id:cpu,os:/.*nix.*/;metric_id:cpu,os:/.*win.*/` we should receive cpu metric measurements for hosts containing either nix or win as substring in `os` metadata. Note that `AND` operation has higher priority than `OR`. Allowed keys: `metric_id`, `description`, `complex` (metric parameters) and all available host metadata fields. When not provided: No filtering performed - all available metrics and hosts are taken
};

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

namespace Example
{
    public class getHostsExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new HostsApi();
            var q = q_example;  // String | Filters out used metrics and hosts according to provided keys. String needs to match the following schema: `KEY1:VAL1,KEY2:VAL2;KEY3:VAL4...`. Comma is used to indicate `AND` operation while semicolon relates to `OR`. When `VAL` paramater is wrapped into slashes then regex mode is activated. For example when we query for `metric_id:cpu,os:/.*nix.*/;metric_id:cpu,os:/.*win.*/` we should receive cpu metric measurements for hosts containing either nix or win as substring in `os` metadata. Note that `AND` operation has higher priority than `OR`. Allowed keys: `metric_id`, `description`, `complex` (metric parameters) and all available host metadata fields. When not provided: No filtering performed - all available metrics and hosts are taken (optional) 

            try
            {
                // Get list of hosts
                array[Host] result = apiInstance.getHosts(q);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling HostsApi.getHosts: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\HostsApi();
$q = q_example; // String | Filters out used metrics and hosts according to provided keys. String needs to match the following schema: `KEY1:VAL1,KEY2:VAL2;KEY3:VAL4...`. Comma is used to indicate `AND` operation while semicolon relates to `OR`. When `VAL` paramater is wrapped into slashes then regex mode is activated. For example when we query for `metric_id:cpu,os:/.*nix.*/;metric_id:cpu,os:/.*win.*/` we should receive cpu metric measurements for hosts containing either nix or win as substring in `os` metadata. Note that `AND` operation has higher priority than `OR`. Allowed keys: `metric_id`, `description`, `complex` (metric parameters) and all available host metadata fields. When not provided: No filtering performed - all available metrics and hosts are taken

try {
    $result = $api_instance->getHosts($q);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling HostsApi->getHosts: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::HostsApi;

# Configure API key authorization: APIKeyHeader
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::HostsApi->new();
my $q = q_example; # String | Filters out used metrics and hosts according to provided keys. String needs to match the following schema: `KEY1:VAL1,KEY2:VAL2;KEY3:VAL4...`. Comma is used to indicate `AND` operation while semicolon relates to `OR`. When `VAL` paramater is wrapped into slashes then regex mode is activated. For example when we query for `metric_id:cpu,os:/.*nix.*/;metric_id:cpu,os:/.*win.*/` we should receive cpu metric measurements for hosts containing either nix or win as substring in `os` metadata. Note that `AND` operation has higher priority than `OR`. Allowed keys: `metric_id`, `description`, `complex` (metric parameters) and all available host metadata fields. When not provided: No filtering performed - all available metrics and hosts are taken

eval { 
    my $result = $api_instance->getHosts(q => $q);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling HostsApi->getHosts: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.HostsApi()
q = q_example # String | Filters out used metrics and hosts according to provided keys. String needs to match the following schema: `KEY1:VAL1,KEY2:VAL2;KEY3:VAL4...`. Comma is used to indicate `AND` operation while semicolon relates to `OR`. When `VAL` paramater is wrapped into slashes then regex mode is activated. For example when we query for `metric_id:cpu,os:/.*nix.*/;metric_id:cpu,os:/.*win.*/` we should receive cpu metric measurements for hosts containing either nix or win as substring in `os` metadata. Note that `AND` operation has higher priority than `OR`. Allowed keys: `metric_id`, `description`, `complex` (metric parameters) and all available host metadata fields. When not provided: No filtering performed - all available metrics and hosts are taken (optional)

try: 
    # Get list of hosts
    api_response = api_instance.get_hosts(q=q)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling HostsApi->getHosts: %s\n" % e)

Parameters

Query parameters
Name Description
q
String
Filters out used metrics and hosts according to provided keys. String needs to match the following schema: `KEY1:VAL1,KEY2:VAL2;KEY3:VAL4...`. Comma is used to indicate `AND` operation while semicolon relates to `OR`. When `VAL` paramater is wrapped into slashes then regex mode is activated. For example when we query for `metric_id:cpu,os:/.*nix.*/;metric_id:cpu,os:/.*win.*/` we should receive cpu metric measurements for hosts containing either nix or win as substring in `os` metadata. Note that `AND` operation has higher priority than `OR`. Allowed keys: `metric_id`, `description`, `complex` (metric parameters) and all available host metadata fields. When not provided: No filtering performed - all available metrics and hosts are taken

Responses

Status: 200 - Success

Name Type Format Description
Access-Control-Allow-Origin String It indicates whether the response can be shared with resources with the given origin
Access-Control-Allow-Headers String It is used in response to a preflight request to indicate which HTTP headers can be used during the actual request
Access-Control-Allow-Methods String It specifies the method or methods allowed when accessing the resource in response to a preflight request

Status: 400 - Bad request - error in extra parameters

Status: 401 - User is not authorized


postMetric

Add complex metric


/hosts/{hostname}/metrics

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "http://tbajorek.pl:4000/hosts/{hostname}/metrics"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.HostsApi;

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

public class HostsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        HostsApi apiInstance = new HostsApi();
        String hostname = hostname_example; // String | Target host (domain name)
        Payload payload = ; // Payload | Complex mertic payload
        try {
            inline_response_201 result = apiInstance.postMetric(hostname, payload);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HostsApi#postMetric");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.HostsApi;

public class HostsApiExample {

    public static void main(String[] args) {
        HostsApi apiInstance = new HostsApi();
        String hostname = hostname_example; // String | Target host (domain name)
        Payload payload = ; // Payload | Complex mertic payload
        try {
            inline_response_201 result = apiInstance.postMetric(hostname, payload);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HostsApi#postMetric");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *hostname = hostname_example; // Target host (domain name)
Payload *payload = ; // Complex mertic payload

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

// Add complex metric
[apiInstance postMetricWith:hostname
    payload:payload
              completionHandler: ^(inline_response_201 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ResMonDistributedResourcesMonitoring = require('res_mon___distributed_resources_monitoring');
var defaultClient = ResMonDistributedResourcesMonitoring.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['Authorization'] = "Token"

var api = new ResMonDistributedResourcesMonitoring.HostsApi()

var hostname = hostname_example; // {String} Target host (domain name)

var payload = ; // {Payload} Complex mertic payload


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.postMetric(hostname, payload, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class postMetricExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new HostsApi();
            var hostname = hostname_example;  // String | Target host (domain name)
            var payload = new Payload(); // Payload | Complex mertic payload

            try
            {
                // Add complex metric
                inline_response_201 result = apiInstance.postMetric(hostname, payload);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling HostsApi.postMetric: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\HostsApi();
$hostname = hostname_example; // String | Target host (domain name)
$payload = ; // Payload | Complex mertic payload

try {
    $result = $api_instance->postMetric($hostname, $payload);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling HostsApi->postMetric: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::HostsApi;

# Configure API key authorization: APIKeyHeader
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::HostsApi->new();
my $hostname = hostname_example; # String | Target host (domain name)
my $payload = WWW::SwaggerClient::Object::Payload->new(); # Payload | Complex mertic payload

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

# Configure API key authorization: APIKeyHeader
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.HostsApi()
hostname = hostname_example # String | Target host (domain name)
payload =  # Payload | Complex mertic payload

try: 
    # Add complex metric
    api_response = api_instance.post_metric(hostname, payload)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling HostsApi->postMetric: %s\n" % e)

Parameters

Path parameters
Name Description
hostname*
String
Target host (domain name)
Required
Body parameters
Name Description
payload *

Responses

Status: 201 - metric_id of created complex metric

Name Type Format Description
Access-Control-Allow-Origin String It indicates whether the response can be shared with resources with the given origin
Access-Control-Allow-Headers String It is used in response to a preflight request to indicate which HTTP headers can be used during the actual request
Access-Control-Allow-Methods String It specifies the method or methods allowed when accessing the resource in response to a preflight request

Status: 400 - Incorrect metric data

Status: 401 - User is not authorized

Status: 404 - Unknown hostname or metric passed as `parent_id`

Status: 409 - If metric already exists, you can't change any field of it


Measurements

getMeasurements

Selected measurements


/measurements

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "http://tbajorek.pl:4000/measurements?start=&end=&q=&limit=&last="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MeasurementsApi;

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

public class MeasurementsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        MeasurementsApi apiInstance = new MeasurementsApi();
        Date start = 2013-10-20T19:20:30+01:00; // Date | ISO 8601 datetime format with 1s accuracy. Default value is current time subtracted by 1 day
        Date end = 2013-10-20T19:20:30+01:00; // Date | ISO 8601 datetime format with 1s accuracy. Default value is current time.
        String q = q_example; // String | Filters out used metrics and hosts according to provided keys. String needs to match the following schema: `KEY1:VAL1,KEY2:VAL2;KEY3:VAL4...`. Comma is used to indicate `AND` operation while semicolon relates to `OR`. When `VAL` paramater is wrapped into slashes then regex mode is activated. For example when we query for `metric_id:cpu,os:/.*nix.*/;metric_id:cpu,os:/.*win.*/` we should receive cpu metric measurements for hosts containing either nix or win as substring in `os` metadata. Note that `AND` operation has higher priority than `OR`. Allowed keys: `metric_id`, `description`, `complex` (metric parameters) and all available host metadata fields. When not provided: No filtering performed - all available metrics and hosts are taken
        BigDecimal limit = 8.14; // BigDecimal | Number of maximal amount of measurements given as a result of the query
        Boolean last = true; // Boolean | If it is set as `TRUE` then the only last measurement meeting the criteria from `q` parameter is returned
        try {
            array[Measurement] result = apiInstance.getMeasurements(start, end, q, limit, last);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MeasurementsApi#getMeasurements");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MeasurementsApi;

public class MeasurementsApiExample {

    public static void main(String[] args) {
        MeasurementsApi apiInstance = new MeasurementsApi();
        Date start = 2013-10-20T19:20:30+01:00; // Date | ISO 8601 datetime format with 1s accuracy. Default value is current time subtracted by 1 day
        Date end = 2013-10-20T19:20:30+01:00; // Date | ISO 8601 datetime format with 1s accuracy. Default value is current time.
        String q = q_example; // String | Filters out used metrics and hosts according to provided keys. String needs to match the following schema: `KEY1:VAL1,KEY2:VAL2;KEY3:VAL4...`. Comma is used to indicate `AND` operation while semicolon relates to `OR`. When `VAL` paramater is wrapped into slashes then regex mode is activated. For example when we query for `metric_id:cpu,os:/.*nix.*/;metric_id:cpu,os:/.*win.*/` we should receive cpu metric measurements for hosts containing either nix or win as substring in `os` metadata. Note that `AND` operation has higher priority than `OR`. Allowed keys: `metric_id`, `description`, `complex` (metric parameters) and all available host metadata fields. When not provided: No filtering performed - all available metrics and hosts are taken
        BigDecimal limit = 8.14; // BigDecimal | Number of maximal amount of measurements given as a result of the query
        Boolean last = true; // Boolean | If it is set as `TRUE` then the only last measurement meeting the criteria from `q` parameter is returned
        try {
            array[Measurement] result = apiInstance.getMeasurements(start, end, q, limit, last);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MeasurementsApi#getMeasurements");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

Date *start = 2013-10-20T19:20:30+01:00; // ISO 8601 datetime format with 1s accuracy. Default value is current time subtracted by 1 day (optional)
Date *end = 2013-10-20T19:20:30+01:00; // ISO 8601 datetime format with 1s accuracy. Default value is current time. (optional)
String *q = q_example; // Filters out used metrics and hosts according to provided keys. String needs to match the following schema: `KEY1:VAL1,KEY2:VAL2;KEY3:VAL4...`. Comma is used to indicate `AND` operation while semicolon relates to `OR`. When `VAL` paramater is wrapped into slashes then regex mode is activated. For example when we query for `metric_id:cpu,os:/.*nix.*/;metric_id:cpu,os:/.*win.*/` we should receive cpu metric measurements for hosts containing either nix or win as substring in `os` metadata. Note that `AND` operation has higher priority than `OR`. Allowed keys: `metric_id`, `description`, `complex` (metric parameters) and all available host metadata fields. When not provided: No filtering performed - all available metrics and hosts are taken (optional)
BigDecimal *limit = 8.14; // Number of maximal amount of measurements given as a result of the query (optional)
Boolean *last = true; // If it is set as `TRUE` then the only last measurement meeting the criteria from `q` parameter is returned (optional)

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

// Selected measurements
[apiInstance getMeasurementsWith:start
    end:end
    q:q
    limit:limit
    last:last
              completionHandler: ^(array[Measurement] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ResMonDistributedResourcesMonitoring = require('res_mon___distributed_resources_monitoring');
var defaultClient = ResMonDistributedResourcesMonitoring.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['Authorization'] = "Token"

var api = new ResMonDistributedResourcesMonitoring.MeasurementsApi()

var opts = { 
  'start': 2013-10-20T19:20:30+01:00, // {Date} ISO 8601 datetime format with 1s accuracy. Default value is current time subtracted by 1 day
  'end': 2013-10-20T19:20:30+01:00, // {Date} ISO 8601 datetime format with 1s accuracy. Default value is current time.
  'q': q_example, // {String} Filters out used metrics and hosts according to provided keys. String needs to match the following schema: `KEY1:VAL1,KEY2:VAL2;KEY3:VAL4...`. Comma is used to indicate `AND` operation while semicolon relates to `OR`. When `VAL` paramater is wrapped into slashes then regex mode is activated. For example when we query for `metric_id:cpu,os:/.*nix.*/;metric_id:cpu,os:/.*win.*/` we should receive cpu metric measurements for hosts containing either nix or win as substring in `os` metadata. Note that `AND` operation has higher priority than `OR`. Allowed keys: `metric_id`, `description`, `complex` (metric parameters) and all available host metadata fields. When not provided: No filtering performed - all available metrics and hosts are taken
  'limit': 8.14, // {BigDecimal} Number of maximal amount of measurements given as a result of the query
  'last': true // {Boolean} If it is set as `TRUE` then the only last measurement meeting the criteria from `q` parameter is returned
};

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

namespace Example
{
    public class getMeasurementsExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new MeasurementsApi();
            var start = 2013-10-20T19:20:30+01:00;  // Date | ISO 8601 datetime format with 1s accuracy. Default value is current time subtracted by 1 day (optional) 
            var end = 2013-10-20T19:20:30+01:00;  // Date | ISO 8601 datetime format with 1s accuracy. Default value is current time. (optional) 
            var q = q_example;  // String | Filters out used metrics and hosts according to provided keys. String needs to match the following schema: `KEY1:VAL1,KEY2:VAL2;KEY3:VAL4...`. Comma is used to indicate `AND` operation while semicolon relates to `OR`. When `VAL` paramater is wrapped into slashes then regex mode is activated. For example when we query for `metric_id:cpu,os:/.*nix.*/;metric_id:cpu,os:/.*win.*/` we should receive cpu metric measurements for hosts containing either nix or win as substring in `os` metadata. Note that `AND` operation has higher priority than `OR`. Allowed keys: `metric_id`, `description`, `complex` (metric parameters) and all available host metadata fields. When not provided: No filtering performed - all available metrics and hosts are taken (optional) 
            var limit = 8.14;  // BigDecimal | Number of maximal amount of measurements given as a result of the query (optional) 
            var last = true;  // Boolean | If it is set as `TRUE` then the only last measurement meeting the criteria from `q` parameter is returned (optional) 

            try
            {
                // Selected measurements
                array[Measurement] result = apiInstance.getMeasurements(start, end, q, limit, last);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MeasurementsApi.getMeasurements: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\MeasurementsApi();
$start = 2013-10-20T19:20:30+01:00; // Date | ISO 8601 datetime format with 1s accuracy. Default value is current time subtracted by 1 day
$end = 2013-10-20T19:20:30+01:00; // Date | ISO 8601 datetime format with 1s accuracy. Default value is current time.
$q = q_example; // String | Filters out used metrics and hosts according to provided keys. String needs to match the following schema: `KEY1:VAL1,KEY2:VAL2;KEY3:VAL4...`. Comma is used to indicate `AND` operation while semicolon relates to `OR`. When `VAL` paramater is wrapped into slashes then regex mode is activated. For example when we query for `metric_id:cpu,os:/.*nix.*/;metric_id:cpu,os:/.*win.*/` we should receive cpu metric measurements for hosts containing either nix or win as substring in `os` metadata. Note that `AND` operation has higher priority than `OR`. Allowed keys: `metric_id`, `description`, `complex` (metric parameters) and all available host metadata fields. When not provided: No filtering performed - all available metrics and hosts are taken
$limit = 8.14; // BigDecimal | Number of maximal amount of measurements given as a result of the query
$last = true; // Boolean | If it is set as `TRUE` then the only last measurement meeting the criteria from `q` parameter is returned

try {
    $result = $api_instance->getMeasurements($start, $end, $q, $limit, $last);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MeasurementsApi->getMeasurements: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MeasurementsApi;

# Configure API key authorization: APIKeyHeader
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::MeasurementsApi->new();
my $start = 2013-10-20T19:20:30+01:00; # Date | ISO 8601 datetime format with 1s accuracy. Default value is current time subtracted by 1 day
my $end = 2013-10-20T19:20:30+01:00; # Date | ISO 8601 datetime format with 1s accuracy. Default value is current time.
my $q = q_example; # String | Filters out used metrics and hosts according to provided keys. String needs to match the following schema: `KEY1:VAL1,KEY2:VAL2;KEY3:VAL4...`. Comma is used to indicate `AND` operation while semicolon relates to `OR`. When `VAL` paramater is wrapped into slashes then regex mode is activated. For example when we query for `metric_id:cpu,os:/.*nix.*/;metric_id:cpu,os:/.*win.*/` we should receive cpu metric measurements for hosts containing either nix or win as substring in `os` metadata. Note that `AND` operation has higher priority than `OR`. Allowed keys: `metric_id`, `description`, `complex` (metric parameters) and all available host metadata fields. When not provided: No filtering performed - all available metrics and hosts are taken
my $limit = 8.14; # BigDecimal | Number of maximal amount of measurements given as a result of the query
my $last = true; # Boolean | If it is set as `TRUE` then the only last measurement meeting the criteria from `q` parameter is returned

eval { 
    my $result = $api_instance->getMeasurements(start => $start, end => $end, q => $q, limit => $limit, last => $last);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MeasurementsApi->getMeasurements: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.MeasurementsApi()
start = 2013-10-20T19:20:30+01:00 # Date | ISO 8601 datetime format with 1s accuracy. Default value is current time subtracted by 1 day (optional)
end = 2013-10-20T19:20:30+01:00 # Date | ISO 8601 datetime format with 1s accuracy. Default value is current time. (optional)
q = q_example # String | Filters out used metrics and hosts according to provided keys. String needs to match the following schema: `KEY1:VAL1,KEY2:VAL2;KEY3:VAL4...`. Comma is used to indicate `AND` operation while semicolon relates to `OR`. When `VAL` paramater is wrapped into slashes then regex mode is activated. For example when we query for `metric_id:cpu,os:/.*nix.*/;metric_id:cpu,os:/.*win.*/` we should receive cpu metric measurements for hosts containing either nix or win as substring in `os` metadata. Note that `AND` operation has higher priority than `OR`. Allowed keys: `metric_id`, `description`, `complex` (metric parameters) and all available host metadata fields. When not provided: No filtering performed - all available metrics and hosts are taken (optional)
limit = 8.14 # BigDecimal | Number of maximal amount of measurements given as a result of the query (optional)
last = true # Boolean | If it is set as `TRUE` then the only last measurement meeting the criteria from `q` parameter is returned (optional)

try: 
    # Selected measurements
    api_response = api_instance.get_measurements(start=start, end=end, q=q, limit=limit, last=last)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MeasurementsApi->getMeasurements: %s\n" % e)

Parameters

Query parameters
Name Description
start
Date (date-time)
ISO 8601 datetime format with 1s accuracy. Default value is current time subtracted by 1 day
end
Date (date-time)
ISO 8601 datetime format with 1s accuracy. Default value is current time.
q
String
Filters out used metrics and hosts according to provided keys. String needs to match the following schema: `KEY1:VAL1,KEY2:VAL2;KEY3:VAL4...`. Comma is used to indicate `AND` operation while semicolon relates to `OR`. When `VAL` paramater is wrapped into slashes then regex mode is activated. For example when we query for `metric_id:cpu,os:/.*nix.*/;metric_id:cpu,os:/.*win.*/` we should receive cpu metric measurements for hosts containing either nix or win as substring in `os` metadata. Note that `AND` operation has higher priority than `OR`. Allowed keys: `metric_id`, `description`, `complex` (metric parameters) and all available host metadata fields. When not provided: No filtering performed - all available metrics and hosts are taken
limit
BigDecimal
Number of maximal amount of measurements given as a result of the query
last
Boolean
If it is set as `TRUE` then the only last measurement meeting the criteria from `q` parameter is returned

Responses

Status: 200 - Success

Name Type Format Description
Access-Control-Allow-Origin String It indicates whether the response can be shared with resources with the given origin
Access-Control-Allow-Headers String It is used in response to a preflight request to indicate which HTTP headers can be used during the actual request
Access-Control-Allow-Methods String It specifies the method or methods allowed when accessing the resource in response to a preflight request

Status: 400 - Bad request - error in extra parameters

Status: 401 - User is not authorized


Metrics

getMetrics

List of metrics


/metrics

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "http://tbajorek.pl:4000/metrics"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MetricsApi;

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

public class MetricsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        MetricsApi apiInstance = new MetricsApi();
        try {
            array[Metric] result = apiInstance.getMetrics();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MetricsApi#getMetrics");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MetricsApi;

public class MetricsApiExample {

    public static void main(String[] args) {
        MetricsApi apiInstance = new MetricsApi();
        try {
            array[Metric] result = apiInstance.getMetrics();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MetricsApi#getMetrics");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];


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

// List of metrics
[apiInstance getMetricsWithCompletionHandler: 
              ^(array[Metric] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ResMonDistributedResourcesMonitoring = require('res_mon___distributed_resources_monitoring');
var defaultClient = ResMonDistributedResourcesMonitoring.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['Authorization'] = "Token"

var api = new ResMonDistributedResourcesMonitoring.MetricsApi()

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

namespace Example
{
    public class getMetricsExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new MetricsApi();

            try
            {
                // List of metrics
                array[Metric] result = apiInstance.getMetrics();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MetricsApi.getMetrics: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\MetricsApi();

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

# Configure API key authorization: APIKeyHeader
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::MetricsApi->new();

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

# Configure API key authorization: APIKeyHeader
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.MetricsApi()

try: 
    # List of metrics
    api_response = api_instance.get_metrics()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MetricsApi->getMetrics: %s\n" % e)

Parameters

Responses

Status: 200 - Success

Name Type Format Description
Access-Control-Allow-Origin String It indicates whether the response can be shared with resources with the given origin
Access-Control-Allow-Headers String It is used in response to a preflight request to indicate which HTTP headers can be used during the actual request
Access-Control-Allow-Methods String It specifies the method or methods allowed when accessing the resource in response to a preflight request

Status: 401 - User is not authorized