# LogicalDocRestApi.DocumentMetadataApi

All URIs are relative to *https://localhost:8080/services/rest*

Method | HTTP request | Description
------------- | ------------- | -------------
[**deleteAttributeSet**](DocumentMetadataApi.md#deleteAttributeSet) | **DELETE** /documentMetadata/deleteAttributeSet | Deletes an attribute set
[**deleteTemplate**](DocumentMetadataApi.md#deleteTemplate) | **DELETE** /documentMetadata/deleteTemplate | Deletes a template
[**getAttributeOptions**](DocumentMetadataApi.md#getAttributeOptions) | **GET** /documentMetadata/getAttributeOptions | Retrieves the options for the given attribute
[**getAttributeSet**](DocumentMetadataApi.md#getAttributeSet) | **GET** /documentMetadata/getAttributeSet | Gets an attribute set by name
[**getAttributeSetById**](DocumentMetadataApi.md#getAttributeSetById) | **GET** /documentMetadata/getAttributeSetById | Gets attribute set's metadata
[**getTemplate**](DocumentMetadataApi.md#getTemplate) | **GET** /documentMetadata/getTemplate | Gets template's metadata
[**getTemplateById**](DocumentMetadataApi.md#getTemplateById) | **GET** /documentMetadata/getTemplateById | Gets template's metadata
[**listAttributeSets**](DocumentMetadataApi.md#listAttributeSets) | **GET** /documentMetadata/listAttributeSets | Lists the attribute sets
[**listTemplates**](DocumentMetadataApi.md#listTemplates) | **GET** /documentMetadata/listTemplates | Lists all the templates
[**setAttributeOptions**](DocumentMetadataApi.md#setAttributeOptions) | **PUT** /documentMetadata/setAttributeOptions | Save attribute options
[**storeAttributeSet**](DocumentMetadataApi.md#storeAttributeSet) | **POST** /documentMetadata/storeAttributeSet | Create/Update an attribute set
[**storeTemplate**](DocumentMetadataApi.md#storeTemplate) | **POST** /documentMetadata/storeTemplate | Create/Update a template


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

Deletes an attribute set

Deletes an existing attribute set with the given identifier

### Example
```javascript
var LogicalDocRestApi = require('logical_doc_rest_api');
var defaultClient = LogicalDocRestApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new LogicalDocRestApi.DocumentMetadataApi();

var opts = { 
  'setId': 789 // Number | Attribute set identifier (ID)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.deleteAttributeSet(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **setId** | **Number**| Attribute set identifier (ID) | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

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

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

Deletes a template

Deletes an existing template with the given identifier

### Example
```javascript
var LogicalDocRestApi = require('logical_doc_rest_api');
var defaultClient = LogicalDocRestApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new LogicalDocRestApi.DocumentMetadataApi();

var opts = { 
  'templateId': 789 // Number | A template ID
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.deleteTemplate(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **templateId** | **Number**| A template ID | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

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

<a name="getAttributeOptions"></a>
# **getAttributeOptions**
> ['String'] getAttributeOptions(opts)

Retrieves the options for the given attribute

Returns the list of all the attribute's options

### Example
```javascript
var LogicalDocRestApi = require('logical_doc_rest_api');
var defaultClient = LogicalDocRestApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new LogicalDocRestApi.DocumentMetadataApi();

var opts = { 
  'setId': 789, // Number | Attribute set identifier (ID)
  'attribute': "attribute_example" // String | The attribute's name
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **setId** | **Number**| Attribute set identifier (ID) | [optional] 
 **attribute** | **String**| The attribute's name | [optional] 

### Return type

**['String']**

### Authorization

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

### HTTP request headers

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

<a name="getAttributeSet"></a>
# **getAttributeSet**
> WSAttributeSet getAttributeSet(opts)

Gets an attribute set by name

Gets an attribute set by name. Returns a value object containing the attribute set's metadata

### Example
```javascript
var LogicalDocRestApi = require('logical_doc_rest_api');
var defaultClient = LogicalDocRestApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new LogicalDocRestApi.DocumentMetadataApi();

var opts = { 
  'name': "name_example" // String | The attribute set's name
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **name** | **String**| The attribute set's name | [optional] 

### Return type

[**WSAttributeSet**](WSAttributeSet.md)

### Authorization

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

### HTTP request headers

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

<a name="getAttributeSetById"></a>
# **getAttributeSetById**
> WSAttributeSet getAttributeSetById(opts)

Gets attribute set's metadata

Gets attribute set's metadata. Returns a value object containing the attribute set's metadata

### Example
```javascript
var LogicalDocRestApi = require('logical_doc_rest_api');
var defaultClient = LogicalDocRestApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new LogicalDocRestApi.DocumentMetadataApi();

var opts = { 
  'setId': 789 // Number | Attribute set identifier (ID)
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **setId** | **Number**| Attribute set identifier (ID) | [optional] 

### Return type

[**WSAttributeSet**](WSAttributeSet.md)

### Authorization

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

### HTTP request headers

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

<a name="getTemplate"></a>
# **getTemplate**
> WSTemplate getTemplate(opts)

Gets template's metadata

Gets an existing template by it's name

### Example
```javascript
var LogicalDocRestApi = require('logical_doc_rest_api');
var defaultClient = LogicalDocRestApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new LogicalDocRestApi.DocumentMetadataApi();

var opts = { 
  'name': "name_example" // String | The template name
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **name** | **String**| The template name | [optional] 

### Return type

[**WSTemplate**](WSTemplate.md)

### Authorization

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

### HTTP request headers

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

<a name="getTemplateById"></a>
# **getTemplateById**
> WSTemplate getTemplateById(opts)

Gets template's metadata

Gets an existing template by it's identifier

### Example
```javascript
var LogicalDocRestApi = require('logical_doc_rest_api');
var defaultClient = LogicalDocRestApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new LogicalDocRestApi.DocumentMetadataApi();

var opts = { 
  'templateId': 789 // Number | The template identifier (ID)
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **templateId** | **Number**| The template identifier (ID) | [optional] 

### Return type

[**WSTemplate**](WSTemplate.md)

### Authorization

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

### HTTP request headers

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

<a name="listAttributeSets"></a>
# **listAttributeSets**
> [WSAttributeSet] listAttributeSets()

Lists the attribute sets

Gets metadata of all existing attribute sets

### Example
```javascript
var LogicalDocRestApi = require('logical_doc_rest_api');
var defaultClient = LogicalDocRestApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new LogicalDocRestApi.DocumentMetadataApi();

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

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

### Return type

[**[WSAttributeSet]**](WSAttributeSet.md)

### Authorization

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

### HTTP request headers

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

<a name="listTemplates"></a>
# **listTemplates**
> [WSTemplate] listTemplates()

Lists all the templates

Gets metadata of all existing templates

### Example
```javascript
var LogicalDocRestApi = require('logical_doc_rest_api');
var defaultClient = LogicalDocRestApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new LogicalDocRestApi.DocumentMetadataApi();

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

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

### Return type

[**[WSTemplate]**](WSTemplate.md)

### Authorization

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

### HTTP request headers

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

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

Save attribute options

Updates the options for the given attribute

### Example
```javascript
var LogicalDocRestApi = require('logical_doc_rest_api');
var defaultClient = LogicalDocRestApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new LogicalDocRestApi.DocumentMetadataApi();

var opts = { 
  'setId': 789, // Number | 
  'attribute': "attribute_example", // String | 
  'values': ["values_example"] // [String] | 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.setAttributeOptions(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **setId** | **Number**|  | [optional] 
 **attribute** | **String**|  | [optional] 
 **values** | [**[String]**](String.md)|  | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

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

<a name="storeAttributeSet"></a>
# **storeAttributeSet**
> 'Number' storeAttributeSet(opts)

Create/Update an attribute set

Create/Update an attribute set. You can completely customize the attribute set through a value object containing the attribute set's metadata

### Example
```javascript
var LogicalDocRestApi = require('logical_doc_rest_api');
var defaultClient = LogicalDocRestApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new LogicalDocRestApi.DocumentMetadataApi();

var opts = { 
  'body': new LogicalDocRestApi.WSAttributeSet() // WSAttributeSet | 
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**WSAttributeSet**](WSAttributeSet.md)|  | [optional] 

### Return type

**'Number'**

### Authorization

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

### HTTP request headers

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

<a name="storeTemplate"></a>
# **storeTemplate**
> 'Number' storeTemplate(opts)

Create/Update a template

Create/Update a template. You can completely customize the template through a value object

### Example
```javascript
var LogicalDocRestApi = require('logical_doc_rest_api');
var defaultClient = LogicalDocRestApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new LogicalDocRestApi.DocumentMetadataApi();

var opts = { 
  'body': new LogicalDocRestApi.WSTemplate() // WSTemplate | 
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**WSTemplate**](WSTemplate.md)|  | [optional] 

### Return type

**'Number'**

### Authorization

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

### HTTP request headers

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

