# LogicalDocRestApi.SearchApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**find**](SearchApi.md#find) | **POST** /search/find | Search documents
[**findByFilename**](SearchApi.md#findByFilename) | **GET** /search/findByFilename | Search documents by Filename
[**findFolders**](SearchApi.md#findFolders) | **GET** /search/findFolders | Search folders by name


<a name="find"></a>
# **find**
> WSSearchResult find(body)

Search documents

Runs a search on the server

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

var body = new LogicalDocRestApi.WSSearchOptions(); // WSSearchOptions | Search options


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**WSSearchOptions**](WSSearchOptions.md)| Search options | 

### Return type

[**WSSearchResult**](WSSearchResult.md)

### Authorization

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

### HTTP request headers

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

<a name="findByFilename"></a>
# **findByFilename**
> [WSDocument] findByFilename(filename)

Search documents by Filename

Finds authorized documents for the current user containing the given filename (like operator is used)

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

var filename = "filename_example"; // String | Filename of the document


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **filename** | **String**| Filename of the document | 

### Return type

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

### Authorization

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

### HTTP request headers

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

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

Search folders by name

Finds authorized folders for the current user containing the given name (like operator is used)

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

var name = "name_example"; // String | Name of the folder


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **name** | **String**| Name of the folder | 

### Return type

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

### Authorization

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

### HTTP request headers

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

