# LogicalDocRestApi.TagApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**addDocumentTags**](TagApi.md#addDocumentTags) | **POST** /tag/addDocumentTags | Appends new tags to a document
[**addFolderTags**](TagApi.md#addFolderTags) | **POST** /tag/addFolderTags | Appends new tags to a folder
[**findDocumentsByTag**](TagApi.md#findDocumentsByTag) | **GET** /tag/findDocumentsByTag | Finds authorized documents for the current user having a specified tag.
[**findFoldersByTag**](TagApi.md#findFoldersByTag) | **GET** /tag/findFoldersByTag | Finds authorized folders for the current user having a specified tag.
[**getDocumentTags**](TagApi.md#getDocumentTags) | **GET** /tag/getDocumentTags | Gets all the tags of a document
[**getFolderTags**](TagApi.md#getFolderTags) | **GET** /tag/getFolderTags | Gets all the tags of a folder
[**getTagCloud**](TagApi.md#getTagCloud) | **GET** /tag/getTagCloud | Retrieves all tag clouds in the repository
[**getTags**](TagApi.md#getTags) | **GET** /tag/getTags | Gets all the tags used in the sysem
[**getTagsPreset**](TagApi.md#getTagsPreset) | **GET** /tag/getTagsPreset | Retrieves all the tags in the preset
[**setDocumentTags**](TagApi.md#setDocumentTags) | **POST** /tag/setDocumentTags | Set the tags of a document
[**setFolderTags**](TagApi.md#setFolderTags) | **POST** /tag/setFolderTags | Sets the tags of a folder


<a name="addDocumentTags"></a>
# **addDocumentTags**
> addDocumentTags(docId, opts)

Appends new tags to a document



### 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.TagApi();

var docId = 789; // Number | Document ID

var opts = { 
  'tag': ["tag_example"] // [String] | 
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **docId** | **Number**| Document ID | 
 **tag** | [**[String]**](String.md)|  | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/x-www-form-urlencoded
 - **Accept**: application/json

<a name="addFolderTags"></a>
# **addFolderTags**
> addFolderTags(folderId, opts)

Appends new tags to a folder



### 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.TagApi();

var folderId = 789; // Number | Folder ID

var opts = { 
  'tag': ["tag_example"] // [String] | 
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **folderId** | **Number**| Folder ID | 
 **tag** | [**[String]**](String.md)|  | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/x-www-form-urlencoded
 - **Accept**: application/json

<a name="findDocumentsByTag"></a>
# **findDocumentsByTag**
> [WSDocument] findDocumentsByTag(tag)

Finds authorized documents for the current user having a specified tag.



### 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.TagApi();

var tag = "tag_example"; // String | The tag


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **tag** | **String**| The tag | 

### Return type

[**[WSDocument]**](WSDocument.md)

### Authorization

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

### HTTP request headers

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

<a name="findFoldersByTag"></a>
# **findFoldersByTag**
> [WSFolder] findFoldersByTag(tag)

Finds authorized folders for the current user having a specified tag.



### 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.TagApi();

var tag = "tag_example"; // String | The tag


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **tag** | **String**| The tag | 

### Return type

[**[WSFolder]**](WSFolder.md)

### Authorization

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

### HTTP request headers

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

<a name="getDocumentTags"></a>
# **getDocumentTags**
> ['String'] getDocumentTags(docId)

Gets all the tags of a document



### 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.TagApi();

var docId = 789; // Number | Document ID


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **docId** | **Number**| Document ID | 

### Return type

**['String']**

### Authorization

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

### HTTP request headers

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

<a name="getFolderTags"></a>
# **getFolderTags**
> ['String'] getFolderTags(folderId)

Gets all the tags of a folder



### 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.TagApi();

var folderId = 789; // Number | Folder ID


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **folderId** | **Number**| Folder ID | 

### Return type

**['String']**

### Authorization

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

### HTTP request headers

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

<a name="getTagCloud"></a>
# **getTagCloud**
> [WSTagCloud] getTagCloud()

Retrieves all tag clouds in the repository



### 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.TagApi();

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

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

### Return type

[**[WSTagCloud]**](WSTagCloud.md)

### Authorization

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

### HTTP request headers

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

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

Gets all the tags used in the sysem



### 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.TagApi();

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

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

### Return type

**['String']**

### Authorization

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

### HTTP request headers

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

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

Retrieves all the tags in the preset

Retrieves all the tags specified in the preset, empty if input mode is free

### 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.TagApi();

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

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

### Return type

**['String']**

### Authorization

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

### HTTP request headers

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

<a name="setDocumentTags"></a>
# **setDocumentTags**
> setDocumentTags(docId, opts)

Set the tags of a document



### 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.TagApi();

var docId = 789; // Number | Document ID

var opts = { 
  'tag': ["tag_example"] // [String] | 
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **docId** | **Number**| Document ID | 
 **tag** | [**[String]**](String.md)|  | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/x-www-form-urlencoded
 - **Accept**: application/json

<a name="setFolderTags"></a>
# **setFolderTags**
> setFolderTags(folderId, opts)

Sets the tags of a folder



### 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.TagApi();

var folderId = 789; // Number | Folder ID

var opts = { 
  'tag': ["tag_example"] // [String] | 
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **folderId** | **Number**| Folder ID | 
 **tag** | [**[String]**](String.md)|  | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/x-www-form-urlencoded
 - **Accept**: application/json

