# HivelocityApi.BandwidthApi

All URIs are relative to *https://localhost/api/v2*

Method | HTTP request | Description
------------- | ------------- | -------------
[**postDeviceIdBandwidthImageResource**](BandwidthApi.md#postDeviceIdBandwidthImageResource) | **POST** /bandwidth/device/{deviceId}/image | Returns RRDTool Graph based bandwidth in PNG format
[**postDeviceIdBandwidthResource**](BandwidthApi.md#postDeviceIdBandwidthResource) | **POST** /bandwidth/device/{deviceId} | Returns RRDTool Xport based bandwidth data in JSON format
[**postServiceIdBandwidthImageResource**](BandwidthApi.md#postServiceIdBandwidthImageResource) | **POST** /bandwidth/service/{serviceId}/image | Returns RRDTool Graph based bandwidth in PNG format
[**postServiceIdBandwidthResource**](BandwidthApi.md#postServiceIdBandwidthResource) | **POST** /bandwidth/service/{serviceId} | Returns RRDTool Xport based bandwidth data in JSON format


<a name="postDeviceIdBandwidthImageResource"></a>
# **postDeviceIdBandwidthImageResource**
> [BandwidthImage] postDeviceIdBandwidthImageResource(deviceId, period, _interface, opts)

Returns RRDTool Graph based bandwidth in PNG format

### Example
```javascript
var HivelocityApi = require('hivelocity_api');
var defaultClient = HivelocityApi.ApiClient.instance;

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

var apiInstance = new HivelocityApi.BandwidthApi();

var deviceId = 56; // Number | ID of Device to View

var period = "day"; // String | Preconfigured Time Periods for Graph Data

var _interface = "eth0"; // String | Network Interface to use for Graph Data

var opts = { 
  'start': 0, // Number | Start Time of Custom Time Period. (Unix Epoch Time)
  'end': 1635778021, // Number | End Time of Custom Time Period (Unix Epoch Time)
  'xFields': "xFields_example" // String | An optional fields mask
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.postDeviceIdBandwidthImageResource(deviceId, period, _interface, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **deviceId** | **Number**| ID of Device to View | 
 **period** | **String**| Preconfigured Time Periods for Graph Data | [default to day]
 **_interface** | **String**| Network Interface to use for Graph Data | [default to eth0]
 **start** | **Number**| Start Time of Custom Time Period. (Unix Epoch Time) | [optional] [default to 0]
 **end** | **Number**| End Time of Custom Time Period (Unix Epoch Time) | [optional] [default to 1635778021]
 **xFields** | **String**| An optional fields mask | [optional] 

### Return type

[**[BandwidthImage]**](BandwidthImage.md)

### Authorization

[apiKey](../README.md#apiKey)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="postDeviceIdBandwidthResource"></a>
# **postDeviceIdBandwidthResource**
> [Bandwidth] postDeviceIdBandwidthResource(deviceId, period, _interface, step, opts)

Returns RRDTool Xport based bandwidth data in JSON format

### Example
```javascript
var HivelocityApi = require('hivelocity_api');
var defaultClient = HivelocityApi.ApiClient.instance;

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

var apiInstance = new HivelocityApi.BandwidthApi();

var deviceId = 56; // Number | ID of Device to View

var period = "day"; // String | Preconfigured Time Periods for Graph Data

var _interface = "eth0"; // String | Network Interface to use for Graph Data

var step = 300; // Number | Interval of Graph in Seconds

var opts = { 
  'historical': false, // Boolean | Include Historical Interface Data for Device for Resellers
  'start': 0, // Number | Start Time of Custom Time Period. (Unix Epoch Time)
  'end': 1635778021, // Number | End Time of Custom Time Period (Unix Epoch Time)
  'xFields': "xFields_example" // String | An optional fields mask
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.postDeviceIdBandwidthResource(deviceId, period, _interface, step, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **deviceId** | **Number**| ID of Device to View | 
 **period** | **String**| Preconfigured Time Periods for Graph Data | [default to day]
 **_interface** | **String**| Network Interface to use for Graph Data | [default to eth0]
 **step** | **Number**| Interval of Graph in Seconds | [default to 300]
 **historical** | **Boolean**| Include Historical Interface Data for Device for Resellers | [optional] [default to false]
 **start** | **Number**| Start Time of Custom Time Period. (Unix Epoch Time) | [optional] [default to 0]
 **end** | **Number**| End Time of Custom Time Period (Unix Epoch Time) | [optional] [default to 1635778021]
 **xFields** | **String**| An optional fields mask | [optional] 

### Return type

[**[Bandwidth]**](Bandwidth.md)

### Authorization

[apiKey](../README.md#apiKey)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="postServiceIdBandwidthImageResource"></a>
# **postServiceIdBandwidthImageResource**
> [BandwidthImage] postServiceIdBandwidthImageResource(serviceId, period, _interface, opts)

Returns RRDTool Graph based bandwidth in PNG format

### Example
```javascript
var HivelocityApi = require('hivelocity_api');
var defaultClient = HivelocityApi.ApiClient.instance;

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

var apiInstance = new HivelocityApi.BandwidthApi();

var serviceId = 56; // Number | ID of Service to View

var period = "day"; // String | Preconfigured Time Periods for Graph Data

var _interface = "eth0"; // String | Network Interface to use for Graph Data

var opts = { 
  'start': 0, // Number | Start Time of Custom Time Period. (Unix Epoch Time)
  'end': 1635778021, // Number | End Time of Custom Time Period (Unix Epoch Time)
  'xFields': "xFields_example" // String | An optional fields mask
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.postServiceIdBandwidthImageResource(serviceId, period, _interface, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **serviceId** | **Number**| ID of Service to View | 
 **period** | **String**| Preconfigured Time Periods for Graph Data | [default to day]
 **_interface** | **String**| Network Interface to use for Graph Data | [default to eth0]
 **start** | **Number**| Start Time of Custom Time Period. (Unix Epoch Time) | [optional] [default to 0]
 **end** | **Number**| End Time of Custom Time Period (Unix Epoch Time) | [optional] [default to 1635778021]
 **xFields** | **String**| An optional fields mask | [optional] 

### Return type

[**[BandwidthImage]**](BandwidthImage.md)

### Authorization

[apiKey](../README.md#apiKey)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="postServiceIdBandwidthResource"></a>
# **postServiceIdBandwidthResource**
> [Bandwidth] postServiceIdBandwidthResource(serviceId, period, _interface, step, opts)

Returns RRDTool Xport based bandwidth data in JSON format

### Example
```javascript
var HivelocityApi = require('hivelocity_api');
var defaultClient = HivelocityApi.ApiClient.instance;

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

var apiInstance = new HivelocityApi.BandwidthApi();

var serviceId = 56; // Number | ID of Service to View

var period = "day"; // String | Preconfigured Time Periods for Graph Data

var _interface = "eth0"; // String | Network Interface to use for Graph Data

var step = 300; // Number | Interval of Graph in Seconds

var opts = { 
  'start': 0, // Number | Start Time of Custom Time Period. (Unix Epoch Time)
  'end': 1635778021, // Number | End Time of Custom Time Period (Unix Epoch Time)
  'xFields': "xFields_example" // String | An optional fields mask
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.postServiceIdBandwidthResource(serviceId, period, _interface, step, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **serviceId** | **Number**| ID of Service to View | 
 **period** | **String**| Preconfigured Time Periods for Graph Data | [default to day]
 **_interface** | **String**| Network Interface to use for Graph Data | [default to eth0]
 **step** | **Number**| Interval of Graph in Seconds | [default to 300]
 **start** | **Number**| Start Time of Custom Time Period. (Unix Epoch Time) | [optional] [default to 0]
 **end** | **Number**| End Time of Custom Time Period (Unix Epoch Time) | [optional] [default to 1635778021]
 **xFields** | **String**| An optional fields mask | [optional] 

### Return type

[**[Bandwidth]**](Bandwidth.md)

### Authorization

[apiKey](../README.md#apiKey)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

