# VmosoApi.RuleApi

All URIs are relative to *https://www.vmoso.com/svc*

Method | HTTP request | Description
------------- | ------------- | -------------
[**deleteRule**](RuleApi.md#deleteRule) | **DELETE** /rules/{key} | 
[**getAttributes**](RuleApi.md#getAttributes) | **GET** /rulesv2/metadata/get | 
[**getByName**](RuleApi.md#getByName) | **GET** /rules/name | 
[**getDefaultPresetRules**](RuleApi.md#getDefaultPresetRules) | **GET** /rules/defaultpreset | 
[**getFilters**](RuleApi.md#getFilters) | **GET** /rulesv2/filters/get | 
[**getLocationsDefaultRules**](RuleApi.md#getLocationsDefaultRules) | **GET** /rules/locations/default/get | 
[**getMetaData**](RuleApi.md#getMetaData) | **GET** /rules/metadata/get | 
[**getPresetRules**](RuleApi.md#getPresetRules) | **GET** /rules/preset | 
[**getPushMetaData**](RuleApi.md#getPushMetaData) | **GET** /rules/pushmetadata/get | 
[**getRedNutDefaultRules**](RuleApi.md#getRedNutDefaultRules) | **GET** /rules/rednut/default/get | 
[**getRuleMetaData**](RuleApi.md#getRuleMetaData) | **GET** /rules/rulemetadata/get | 
[**getRules**](RuleApi.md#getRules) | **GET** /rules | 
[**getTypesMetaData**](RuleApi.md#getTypesMetaData) | **GET** /rules/typesmetadata/get | 


<a name="deleteRule"></a>
# **deleteRule**
> DeleteRuleResult deleteRule(key)





### Example
```javascript
var VmosoApi = require('vmoso-api');
var defaultClient = VmosoApi.ApiClient.default;

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

var apiInstance = new VmosoApi.RuleApi()

var key = "key_example"; // {String} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteRule(key, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **key** | **String**|  | 

### Return type

[**DeleteRuleResult**](DeleteRuleResult.md)

### Authorization

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

### HTTP reuqest headers

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

<a name="getAttributes"></a>
# **getAttributes**
> GetAttributesResult getAttributes(zone)



Use the API to get the focus attributes.

### Example
```javascript
var VmosoApi = require('vmoso-api');
var defaultClient = VmosoApi.ApiClient.default;

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

var apiInstance = new VmosoApi.RuleApi()

var zone = "zone_example"; // {String} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAttributes(zone, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **zone** | **String**|  | 

### Return type

[**GetAttributesResult**](GetAttributesResult.md)

### Authorization

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

### HTTP reuqest headers

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

<a name="getByName"></a>
# **getByName**
> GetByNameResult getByName(name, ruleGroup)





### Example
```javascript
var VmosoApi = require('vmoso-api');
var defaultClient = VmosoApi.ApiClient.default;

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

var apiInstance = new VmosoApi.RuleApi()

var name = "name_example"; // {String} 

var ruleGroup = "ruleGroup_example"; // {String} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getByName(name, ruleGroup, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **name** | **String**|  | 
 **ruleGroup** | **String**|  | 

### Return type

[**GetByNameResult**](GetByNameResult.md)

### Authorization

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

### HTTP reuqest headers

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

<a name="getDefaultPresetRules"></a>
# **getDefaultPresetRules**
> GetDefaultPresetRulesResult getDefaultPresetRules(ruleGroup, opts)





### Example
```javascript
var VmosoApi = require('vmoso-api');
var defaultClient = VmosoApi.ApiClient.default;

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

var apiInstance = new VmosoApi.RuleApi()

var ruleGroup = "ruleGroup_example"; // {String} 

var opts = { 
  'pg': "pg_example", // {String} 
  'contentKey': "contentKey_example" // {String} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getDefaultPresetRules(ruleGroup, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ruleGroup** | **String**|  | 
 **pg** | **String**|  | [optional] 
 **contentKey** | **String**|  | [optional] 

### Return type

[**GetDefaultPresetRulesResult**](GetDefaultPresetRulesResult.md)

### Authorization

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

### HTTP reuqest headers

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

<a name="getFilters"></a>
# **getFilters**
> GetFiltersResult getFilters(zone, opts)



Use the API to get the focus filters.

### Example
```javascript
var VmosoApi = require('vmoso-api');
var defaultClient = VmosoApi.ApiClient.default;

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

var apiInstance = new VmosoApi.RuleApi()

var zone = "zone_example"; // {String} 

var opts = { 
  'type': "type_example" // {String} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getFilters(zone, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **zone** | **String**|  | 
 **type** | **String**|  | [optional] 

### Return type

[**GetFiltersResult**](GetFiltersResult.md)

### Authorization

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

### HTTP reuqest headers

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

<a name="getLocationsDefaultRules"></a>
# **getLocationsDefaultRules**
> GetLocationsDefaultRulesResult getLocationsDefaultRules





### Example
```javascript
var VmosoApi = require('vmoso-api');
var defaultClient = VmosoApi.ApiClient.default;

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

var apiInstance = new VmosoApi.RuleApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLocationsDefaultRules(callback);
```

### Parameters
This endpoint does not need any parameter.

### Return type

[**GetLocationsDefaultRulesResult**](GetLocationsDefaultRulesResult.md)

### Authorization

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

### HTTP reuqest headers

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

<a name="getMetaData"></a>
# **getMetaData**
> GetMetaDataResult getMetaData(opts)





### Example
```javascript
var VmosoApi = require('vmoso-api');
var defaultClient = VmosoApi.ApiClient.default;

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

var apiInstance = new VmosoApi.RuleApi()

var opts = { 
  'ruleAttributeGroupName': "ruleAttributeGroupName_example" // {String} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getMetaData(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ruleAttributeGroupName** | **String**|  | [optional] 

### Return type

[**GetMetaDataResult**](GetMetaDataResult.md)

### Authorization

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

### HTTP reuqest headers

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

<a name="getPresetRules"></a>
# **getPresetRules**
> GetPresetRulesResult getPresetRules(presetType, opts)





### Example
```javascript
var VmosoApi = require('vmoso-api');
var defaultClient = VmosoApi.ApiClient.default;

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

var apiInstance = new VmosoApi.RuleApi()

var presetType = "presetType_example"; // {String} 

var opts = { 
  'pg': "pg_example" // {String} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPresetRules(presetType, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **presetType** | **String**|  | 
 **pg** | **String**|  | [optional] 

### Return type

[**GetPresetRulesResult**](GetPresetRulesResult.md)

### Authorization

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

### HTTP reuqest headers

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

<a name="getPushMetaData"></a>
# **getPushMetaData**
> GetPushMetaDataResult getPushMetaData(opts)





### Example
```javascript
var VmosoApi = require('vmoso-api');
var defaultClient = VmosoApi.ApiClient.default;

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

var apiInstance = new VmosoApi.RuleApi()

var opts = { 
  'ruleKey': "ruleKey_example" // {String} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPushMetaData(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ruleKey** | **String**|  | [optional] 

### Return type

[**GetPushMetaDataResult**](GetPushMetaDataResult.md)

### Authorization

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

### HTTP reuqest headers

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

<a name="getRedNutDefaultRules"></a>
# **getRedNutDefaultRules**
> GetRedNutDefaultRulesResult getRedNutDefaultRules





### Example
```javascript
var VmosoApi = require('vmoso-api');
var defaultClient = VmosoApi.ApiClient.default;

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

var apiInstance = new VmosoApi.RuleApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getRedNutDefaultRules(callback);
```

### Parameters
This endpoint does not need any parameter.

### Return type

[**GetRedNutDefaultRulesResult**](GetRedNutDefaultRulesResult.md)

### Authorization

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

### HTTP reuqest headers

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

<a name="getRuleMetaData"></a>
# **getRuleMetaData**
> GetRuleMetaDataResult getRuleMetaData(opts)





### Example
```javascript
var VmosoApi = require('vmoso-api');
var defaultClient = VmosoApi.ApiClient.default;

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

var apiInstance = new VmosoApi.RuleApi()

var opts = { 
  'ruleKey': "ruleKey_example" // {String} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getRuleMetaData(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ruleKey** | **String**|  | [optional] 

### Return type

[**GetRuleMetaDataResult**](GetRuleMetaDataResult.md)

### Authorization

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

### HTTP reuqest headers

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

<a name="getRules"></a>
# **getRules**
> GetRulesResult getRules(options, pg, opts)





### Example
```javascript
var VmosoApi = require('vmoso-api');
var defaultClient = VmosoApi.ApiClient.default;

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

var apiInstance = new VmosoApi.RuleApi()

var options = "options_example"; // {String} 

var pg = "pg_example"; // {String} 

var opts = { 
  'contentKey': "contentKey_example" // {String} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getRules(options, pg, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **options** | **String**|  | 
 **pg** | **String**|  | 
 **contentKey** | **String**|  | [optional] 

### Return type

[**GetRulesResult**](GetRulesResult.md)

### Authorization

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

### HTTP reuqest headers

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

<a name="getTypesMetaData"></a>
# **getTypesMetaData**
> GetTypesMetaDataResult getTypesMetaData(ruleAttributeGroupName)





### Example
```javascript
var VmosoApi = require('vmoso-api');
var defaultClient = VmosoApi.ApiClient.default;

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

var apiInstance = new VmosoApi.RuleApi()

var ruleAttributeGroupName = "ruleAttributeGroupName_example"; // {String} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTypesMetaData(ruleAttributeGroupName, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ruleAttributeGroupName** | **String**|  | 

### Return type

[**GetTypesMetaDataResult**](GetTypesMetaDataResult.md)

### Authorization

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

### HTTP reuqest headers

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

