# Document

This chapter includes how to upload documents to Enadoc and how to retrieve documents from Enadoc via Enadoc API.

### Upload Document to My Workspace

<mark style="color:blue;">`GET`</mark> `[ENADOC_URL] /api/v3/myworkspace/documents/{name}`

My Workspace is a temporary storage for the documents. You can keep document in my workspace until you upload document to Enadoc library. Follow below steps to upload documents to my workspace via Enadoc API.

#### Path Parameters

| Name | Type   | Description                                 |
| ---- | ------ | ------------------------------------------- |
| name | string | Uploading file name, without file extension |

#### Headers

| Name          | Type   | Description                                                          |
| ------------- | ------ | -------------------------------------------------------------------- |
| Authorization | string | <p>Type - Bearer<br>Access token will be sent in request headers</p> |
| Content-type  | string | File mime type                                                       |

#### Request Body

| Name    | Type  | Description        |
| ------- | ----- | ------------------ |
| Content | array | Byte array context |

{% tabs %}
{% tab title="201 If document upload to My workspace successfully, you will get the response of status code 201. Respond does not contain a body." %}

{% endtab %}
{% endtabs %}

## Upload Document to Enadoc Library

*Pre-requisites from Enadoc:*

*You must follow the below-mentioned steps from Enadoc before you upload the document to Enadoc via API.*

* *Create library*

*First, create library/s to store various types of documents separately.*&#x20;

* *Create indexes for the library*

*You must create specific indexes under each library to insert document metadata while uploading documents.*&#x20;

* *Create document permission*

*Document accessibility is managed by document permission.*&#x20;

* *Create tag profiles*

*Tag Profiles are required to upload documents to the library. While uploading documents, you must select a tag profile. You can create multiple tag profiles for one library with different security levels and different permission scopes. The document permission and security level are identified by the system through the tag profile you have selected while uploading. Therefore, you must create tag profiles before starting the upload document process to the new library.*&#x20;

* *Configure tag profile accessibility and other library level user permission*

*Since you keep user groups globally, you are required to manage their library level permission. You must assign accessible tag profiles for each user group otherwise that user group has no permission to upload documents via tag profile.*&#x20;

* *You can define library level user rights for each user individually. If you expect to manage index accessibility for each user, configure it before uploading documents.*&#x20;

***Enadoc API document upload methods***

There are three different API methods you can use for document uploading. You can use any of the following methods as per the purpose.

* Upload document - simple
* Upload document - Resumable
* Upload document - Index-only

### Upload Document - Simple

<mark style="color:green;">`POST`</mark> `[ENADOC_URL] /api/v3/documents/?type=simple`

You can upload full document using this method.&#x20;

#### Path Parameters

| Name                                   | Type   | Description                                                                                    |
| -------------------------------------- | ------ | ---------------------------------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark> | string | Use the document type as ‘simple’ at the end of URL. Because this upload method called simple. |

#### Headers

| Name                                            | Type   | Description                                                          |
| ----------------------------------------------- | ------ | -------------------------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | <p>Type - Bearer<br>Access token will be sent in request headers</p> |
| Content-type<mark style="color:red;">\*</mark>  | string | multipart/form-data; boundary={{boundary}}                           |

#### Request Body

| Name                                               | Type   | Description                                                                                                                                       |
| -------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| document-indexes<mark style="color:red;">\*</mark> | string | Request body should contain multi part content. The indexes and the file. Follow the format given in the code block below. :arrow\_heading\_down: |
| file<mark style="color:red;">\*</mark>             | String | Request body should contain multi part content. The indexes and the file. Follow the format given in the code block below. :arrow\_heading\_down: |

{% tabs %}
{% tab title="201 If document upload to Enadoc library successfully, you will get the response of status code 201; And you will get the document token. This token is needed to get document later.
" %}

```c
{
  "documentToken": "AfafsdE453$%w4ghfdghfdhdFszgfs45Hr54$65645HHdfg"
}
```

{% endtab %}
{% endtabs %}

Follow the format given in the following example to send multipart content as the body parameter of the request.&#x20;

#### Request Header

```
Content-Type: multipart/form-data; boundary=---1234567890
```

#### Request Body

```json
---1234567890
Content-Disposition: form-data; name="indexes" 
Content-Type: text/json
{
  "documentName": "testfile",
  "tagProfileId": 12,
  "indexes": [
    {
      "id": 1,
      "value": "Invoice"
    },
    {
      "id": 2,
      "referenceId": 4
    },
    {
      "id": 3,
      "value": "2018/10/14"
    }
  ]
}
---1234567890
Content-Disposition: form-data; name="document"; filename="testfile.pdf" 
Content-Type: text/pdf
<File Content>

---1234567890--
```

&#x20;

### Upload Document (Resumable)

You can upload documents as multiple parts using this method. This is applicable for large file sending. First, send the document indexes/data and receive the upload token. Next send your document parts by parts using an upload token.

When you upload the document as resumable, you must execute two methods. You can include document data to the first method and then attach documents to the second method.

***Execute the first method to send document data***

#### Upload Document (Resumable) - Part I

<mark style="color:green;">`POST`</mark> `[ENADOC_URL] /api/v3/documents/?type=resumable`

First send the document indexes/data and receive upload token using this method. Next send your document parts by parts using second method.&#x20;

#### Path Parameters

| Name | Type   | Description                                                                                                   |
| ---- | ------ | ------------------------------------------------------------------------------------------------------------- |
| Type | string | Use the document type as ‘resumable’ at the end of document url. Because this upload method called Resumable. |

#### Headers

| Name          | Type   | Description                                                          |
| ------------- | ------ | -------------------------------------------------------------------- |
| Authorization | string | <p>Type - Bearer<br>Access token will be sent in request headers</p> |
| Content-type  | string | multipart/related                                                    |

#### Request Body

| Name             | Type   | Description                                                                                                                                   |
| ---------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------- |
| Document details | object | Request body should contain the document name, tag profile, index values and file meta data. Follow the format given in the code block below. |

{% tabs %}
{% tab title="200 upload token = Created document token (JSON object)
blockLength = Block size (Int)
block Count = No of blocks which document to be broken (Int)
uploadurl (String)
expiration date time = Upload token expiration date and time (Int)
" %}

```c
{
   "uploadToken":"626dae12-9ddf-46da-9c64-03cbe6e8cf24",
   "blockLength":10485760,
   "blockCount":2,
   "uploadUrl":"http://localhost:8008/api/v3/documents/626dae12-9ddf-46da-9c64- 03cbe6e8cf24/1",
   "expirationDateTime":"2020-04-28T15:18:41.3054714+05:30"
}
```

{% endtab %}
{% endtabs %}

Follow the format given in the code block to send the document details as the body parameter of the API request.

The Request body should contain the document name, tag profile, index values and file metadata. File metadata consists of the block length (Block size), file length (file size), content type (pdf/jpeg), hash signature (a security tag). Refer to the json example included in the body table.

*Note: Obtain your document hash signature using the SHA256 algorithm before uploading your document.*

```
Content-type: application/json
{
 "documentName": "testfile",
 "tagProfileId": 12,
 "indexData": [
 {
 "id": 1,
 "value": "vq"
 },
 {
 "id": 2,
 "value": "fdsf"
 },
 {
 "id": 3,
 "value": "vsdffdfd"
 }
 ]
"fileMetaData": {
"blockLength": 1024,
"fileLength": 2142133212,
 "contentType": "applicatiin/pdf",
"hasSignature":
 "HASSAKKSALSJSLDSDLDSJJDSJD"
 }}
```

&#x20;***Execute next method to send the document to Enadoc***

#### Upload Document (Resumable) - Part II

<mark style="color:orange;">`PUT`</mark> `[ENADOC_URL] /api/v3/documents/documenttoken/chunk sequence`

Now send your document part by part using upload token.&#x20;

#### Path Parameters

| Name           | Type    | Description    |
| -------------- | ------- | -------------- |
| document token | string  | Document token |
| chunk sequence | integer | Chunk Id       |

#### Headers

| Name          | Type   | Description                                                          |
| ------------- | ------ | -------------------------------------------------------------------- |
| Authorization | string | <p>Type - Bearer<br>Access token will be sent in request headers</p> |
| Content-type  | string | application/octet-stream                                             |

#### Request Body

| Name    | Type  | Description                     |
| ------- | ----- | ------------------------------- |
| Content | array | File chunk - byte array content |

{% tabs %}
{% tab title="200 Until you finish uploading the last chunk, you will get a response as below. The response content of nextblocksequenceid, blocklength, uploadurl, expiration date and time. The nextblocksequence id is the block id that you should send next.
nextBlockSequenceId (Integer)
blockLength (Integer)
uploadurl (String)
expiration date time = Upload token expiration date and time (Integer)

```
" %}
```

```c
{
   "nextBlockSequenceId":1,
   "blockLength":10485760,
   "uploadUrl":"http://localhost:8008/api/v3/documents/626dae12-9ddf-46da-9c64-03cbe6e8cf24/2",
   "expirationDateTime":"2020-04-28T15:18:41.307"
}       
```

{% endtab %}

{% tab title="201 After last chunk upload and if document has been sent successfully, you will get the response of status code 201; The response body consists of document token (Type- String) and document url. These data will useful to get document after uploading.
" %}

```c
{"documentToken":"8KKGX3U5p9EqVmIJXML3ZNa9uAUDNvMgA5APyX3U","url":"
http://enadoc.trafficmanager.net/newdocumentviewer.aspx?eapi=1&auth2=YXBpdjJ%2bMX42ODF%2bNn5zYW5qZQ%3d%3d-TEtuUxEcIFI%3d&rand=Mg%3d%3d-kcHwoeitXlA%3d&Identifier=a5dfcedeb1a348fd8fd0a165a12da4c4"}

```

{% endtab %}
{% endtabs %}

### Upload Document (Index-only)

<mark style="color:green;">`POST`</mark> `[ENADOC_URL] api/v3/documents/?type=index`

Use this upload method to send only document indexes without document.

#### Path Parameters

| Name | Type   | Description                                    |
| ---- | ------ | ---------------------------------------------- |
| type | string | <p>Document uploading type -<br>index-only</p> |

#### Headers

| Name          | Type   | Description                                                          |
| ------------- | ------ | -------------------------------------------------------------------- |
| Authorization | string | <p>Type - Bearer<br>Access token will be sent in request headers</p> |
|               | string | Application/json                                                     |

#### Request Body

| Name    | Type  | Description                                                                                       |
| ------- | ----- | ------------------------------------------------------------------------------------------------- |
| Content | array | Request body should contain the index meta data. Follow the format given in the code block below. |

{% tabs %}
{% tab title="201 if the request proceeds successfully, you will get the response of status code 201; And you will get the document token.
Response Type - JSON object" %}

```c
{"documentToken":"JSKDKSDLSDLSLDSLDSSDSJDSKDSJDSLDSDSMDSKDSD"}
```

{% endtab %}
{% endtabs %}

Follow the format given in the code block to send as the index metadata body parameter of the API request.

```c
{
  "tagProfileId": 8,

  "Indexes":
 [

    {"Id":22,"value":"permission_078"},{"id":23,"referenceID":"33"}
   ],

 "documentPath": "D:\\Sample DOC\\alltype\\a (1).bmp",

 "documentName":"a (1)"

 }
```

### Get Document (Byte Array)

<mark style="color:blue;">`GET`</mark> `[ENADOC_URL] /api/v3/documents/{document-token}`

Use this method to get document byte array.

#### Path Parameters

| Name           | Type   | Description                                                                                                                |
| -------------- | ------ | -------------------------------------------------------------------------------------------------------------------------- |
| document-token | string | <p>Document reference token<br>‘Document token’ is the one you have obtained after upload document to Enadoc via API. </p> |

#### Headers

| Name          | Type   | Description                                                            |
| ------------- | ------ | ---------------------------------------------------------------------- |
| Authorization | string | <p>Type - Bearer<br>Access token should be sent in request headers</p> |

{% tabs %}
{% tab title="200 If the request process successfully, you will get the response of status code 200 with file byte array.
Content-type: {File content type EX: application/pdf}
Body will contain file byte array. " %}

```
```

{% endtab %}
{% endtabs %}

### Put Document Comments

<mark style="color:orange;">`PUT`</mark> `[ENADOC_URL] /api/v3/documents/{documentToken}/comments`

***Pre-requisites from Enadoc:*** *You must have already uploaded document.*&#x20;

#### Path Parameters

| Name           | Type   | Description              |
| -------------- | ------ | ------------------------ |
| Document-token | string | Document reference token |

#### Headers

| Name          | Type   | Description                                                          |
| ------------- | ------ | -------------------------------------------------------------------- |
| Authorization | string | <p>Type - Bearer<br>Access token will be sent in request headers</p> |

#### Request Body

| Name    | Type   | Description                                                                                                                                                |
| ------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Comment | string | <p>Content Type - Application/Json<br>Request body should contain the comment. Follow the format given in the code block below.<br>"Document is okay"'</p> |

{% tabs %}
{% tab title="201 If your request proceeds successfully, you will receive status code 201 with the description of newly created comment. The comment description consists of comment id, content, user Id, user name, date and type." %}

```c
{
"id":68,
"content":"Document is okay",
"userId":8,
"userName":"John Smith",
"date":"01-02-2021 00:41:55",
"type":1
}
```

{% endtab %}
{% endtabs %}

Follow the format given in the code block to send document comments as the body parameter of the API request.&#x20;

```c
"Document is okay"
```

### &#x20;Get document comments

<mark style="color:blue;">`GET`</mark> `[ENADOC_URL] /api/v3/documents/{documentToken}/comments`

***Pre-requisites from Enadoc -*** You must have already put document comments.&#x20;

#### Path Parameters

| Name           | Type   | Description                                                                                                                   |
| -------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------- |
| Document-token | string | <p>Document reference token<br>Use ‘Document token’ which you have received after upload document to Enadoc via API. <br></p> |

#### Headers

| Name          | Type   | Description                                                         |
| ------------- | ------ | ------------------------------------------------------------------- |
| Authorization | string | <p>Type - Bearer<br>Access token will be sent in request header</p> |

{% tabs %}
{% tab title="200 If the request is proceeds successfully, you will receive status code 200. You will get the details of all comments put into the document. The details consist of comment id, content, user id, user name, date and type.
" %}

```c
{
"id":68,
"content":"Document is okay",
"userId":8,
"userName":"John Smith",
"date":"01-02-2021 00:41:55",
"type":1
}
```

{% endtab %}
{% endtabs %}

### Put document flags

<mark style="color:orange;">`PUT`</mark> `[ENADOC_URL] /api/v3/documents/{documentToken}/flags`

***Pre-requisites from Enadoc:*** *You must have already uploaded document.*&#x20;

#### Path Parameters

| Name          | Type   | Description              |
| ------------- | ------ | ------------------------ |
| documentToken | string | Document reference token |

#### Headers

| Name          | Type   | Description                                                         |
| ------------- | ------ | ------------------------------------------------------------------- |
| Authorization | string | <p>Type - Bearer<br>Access token will be sent in request header</p> |

#### Request Body

| Name          | Type   | Description                                                                                                                       |
| ------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------- |
| Document Flag | string | <p>Content type - Application/Json Request body should  contain the flag. Follow the format given in the code block below<br></p> |

{% tabs %}
{% tab title="201 If your request proceeds successfully, you will receive status code 201 with the description of newly created flag. The flag description consists of flag id, content, user Id, user name, date and type." %}

```c
{
"id":211,
"content":"Do not change",
"userId":8,
"userName":"John Smith",
"date":"01-02-2021 02:31:10",
"type":2
}
```

{% endtab %}
{% endtabs %}

Follow the format given in the code block to send the flag as the body parameter of the API request

```c
"Do not Change"
```

### Get Document Flags

<mark style="color:blue;">`GET`</mark> `[ENADOC_URL] /api/v3/documents/{documentToken}/flags`

***Pre-requisites from Enadoc:*** *You must have already put document flags.*&#x20;

#### Path Parameters

| Name          | Type   | Description                                                                                                                    |
| ------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------ |
| documentToken | string | Attach document token at the end of url. Use ‘Document token’ which you have received after upload document to Enadoc via API. |

#### Headers

| Name          | Type   | Description                                                            |
| ------------- | ------ | ---------------------------------------------------------------------- |
| Authorization | string | <p>Type - Required<br>Access token will be sent in request headers</p> |

{% tabs %}
{% tab title="200 If the request is proceeds successfully, you will receive status code 200. You will get the details of all flags put into the document. The details consist of flag id, content, user id, user name, date and type." %}

```c
[
{
"id":211,
"content":"Do not change",
"userId":8,
"userName":"John Smith",
"date":"01-02-2021 02:31:10",
"type":2
}
]
```

{% endtab %}
{% endtabs %}

### Get Document User Tags

<mark style="color:blue;">`GET`</mark> `[ENADOC_URL] /api/v3/documents/{documentToken}/usertags`

***Pre-requisites from Enadoc:*** *You must have already put document user tags.*

#### Path Parameters

| Name           | Type   | Description                                                                                                                    |
| -------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------ |
| Document-token | string | Attach document token at the end of url. Use ‘Document token’ which you have received after upload document to Enadoc via API. |

#### Headers

| Name          | Type   | Description                                                          |
| ------------- | ------ | -------------------------------------------------------------------- |
| Authorization | string | <p>Type - Bearer<br>Access token will be sent in request headers</p> |

{% tabs %}
{% tab title="200 If the request is proceeds successfully, you will receive status code 200. You will get the details of all user tags which has been put to the document. The details consist of user Id, date, user name, user tag id, tag, color." %}

```c
[
{
"userId":8,
"date":"01-02-2021 02:53:02",
"userName":"John Smith",
"id":212,
"tag":"Office transport service",
"color":"cdb838"
}
]
```

{% endtab %}
{% endtabs %}

### Get Document URL

<mark style="color:blue;">`GET`</mark> `[ENADOC_URL] /api/v3/documents/{document-token}/url`

Use this method to get document url

#### Path Parameters

| Name           | Type   | Description                                                                                                                    |
| -------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------ |
| document-token | string | Attach document token as url parameter. ‘Document token’ is the one you have obtained after upload document to Enadoc via API. |

#### Headers

| Name          | Type   | Description                                                          |
| ------------- | ------ | -------------------------------------------------------------------- |
| Authorization | string | <p>Type - Bearer<br>Access token will be sent in request headers</p> |

{% tabs %}
{% tab title="200 If the request processing successfully, you will receive response of status code 200 with document url.
" %}

```c
{"url":"https://enadocapp.com/newdocumentviewer.aspx?eapi=1&auth2=YXBpdjJ%2bM34yOTV%2bMTM1MTF%2bc2FuamU%3d-ae8q3MrRIvo%3d&rand=MTE3-%2f2bOxIjU9vk%3d&Identifier=75ef8273b16c4f809fb80af5ccd15fbf"}
```

{% endtab %}
{% endtabs %}

### Document Re-Indexing

<mark style="color:orange;">`PUT`</mark> `[ENADOC_URL]  /api/v3/documents/{documentToken}/$reindex`

***Pre-requisites from Enadoc:*** *You must have already uploaded document.*&#x20;

#### Path Parameters

| Name           | Type   | Description                                                                                                                    |
| -------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------ |
| Document-token | string | Attach document token at the end of url. Use ‘Document token’ which you have received after upload document to Enadoc via API. |

#### Headers

| Name          | Type   | Description                                                         |
| ------------- | ------ | ------------------------------------------------------------------- |
| Authorization | string | <p>Type - Bearer<br>Access token will be sent in request header</p> |

#### Request Body

| Name            | Type   | Description                                                                   |
| --------------- | ------ | ----------------------------------------------------------------------------- |
| Re-index values | string | Content type - Application/Json Request body should  contain re-index values. |

{% tabs %}
{% tab title="200 If your request proceeds successfully, you will receive status code 200 with details of re-index values.
" %}

```c
[
{"indexId": "3",
"value": "Bank"
},
{
"indexId": "1",
"referenceId": "2"
},
{
"indexId": "2",
"newDate": "2021-11-06T00:00:00"
}
]
```

{% endtab %}
{% endtabs %}

Follow the format given in the code block to send re-index values as the body parameter of API request.

```c
{
 "TextProperties": [
 {
   "id":"3",
   "Value":"Bank"
 }
 ],
 "dropDownProperties":[
 {
   "id":"1",
   "referenceID":"2"
 }
 ],
   "dateProperties" [
 {
   "id": "2",
   "date":"11.06.2021"
 }
 ]
 }  
```

### Get Document Meta Data

<mark style="color:blue;">`GET`</mark> `[ENADOC_URL] api/v3/documents/{document-token}/metadata`

Use this method to get document meta data.&#x20;

#### Path Parameters

| Name           | Type   | Description              |
| -------------- | ------ | ------------------------ |
| document-token | string | Document reference token |

#### Headers

| Name          | Type   | Description                                                          |
| ------------- | ------ | -------------------------------------------------------------------- |
| Authorization | string | <p>Type - Bearer<br>Access token will be sent in request headers</p> |

{% tabs %}
{% tab title="200 If the request processing successfully, you will receive response of status code 200 with document metadata. Document metadata consists of tag profile id, security level, page count, document name and document index data." %}

```c
{
"tagProfileId":77,
"securityLevel":1,
"pageCount":1,
"documentName":"Invoice.pdf",
"indexData":
[
{"name":"Emp ID","value":"1011"},
{"name":"Home town","value":"Kegalle"},
{"name":"Transport mode","value":"Office bus"}
]
}
"2f2bOxIjU9vk%3d&Identifier=75ef8273b16c4f809fb80af5ccd15fbf"
}
```

{% endtab %}
{% endtabs %}

### Get Document Code

<mark style="color:blue;">`GET`</mark> `GET/api/v3/documents?code={document code}`

Use below url to get document token

#### Headers

| Name                                            | Type   | Description |
| ----------------------------------------------- | ------ | ----------- |
| Authorization<mark style="color:red;">\*</mark> | String |             |

{% tabs %}
{% tab title="200: OK If the request processing successfully  you will receive status code 200 with the document token" %}

```javascript
{
"documentToken":"dbhdgjhdgjshDFGGGGGGggdhjsjjhdsdjhdsggsdjgfdsjgfjsdgfhj"  
}
```

{% endtab %}
{% endtabs %}

### Verify Document

<mark style="color:blue;">`GET`</mark> `[ENADOC_URL] api/v3/documents/{document-hash}/verify`

Use this method to verify document.

#### Path Parameters

| Name          | Type   | Description            |
| ------------- | ------ | ---------------------- |
| document-hash | string | Document hash (SHA256) |

#### Headers

| Name          | Type   | Description                                                          |
| ------------- | ------ | -------------------------------------------------------------------- |
| Authorization | string | <p>Type - Bearer<br>Access token will be sent in request headers</p> |

{% tabs %}
{% tab title="200 If the request processing successfully, you will receive response of status code 200 with verified status (true/false)
" %}

```
{
    "status": "True"
}
```

{% endtab %}
{% endtabs %}

### Document/Keyword Search

<mark style="color:green;">`POST`</mark> `[ENADOC_URL] api/v3/documents/$search?from=1&to=100`

User can use this method to search document using keyword or date range. This method returns list of results along with index values according to the given search criteria.

#### Query Parameters

| Name | Type    | Description               |
| ---- | ------- | ------------------------- |
| From | integer | Start point of result set |
| to   | integer | End point of result set   |

#### Request Body

| Name                 | Type   | Description                                                                                                                                         |
| -------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Search value filters | string | Request body contain search value filters as keyword, from date, To date and library/libraries id. Follow the format given in the code block below. |

{% tabs %}
{% tab title="200 If the request proceeds successfully, you will receive response of status code 200 with search results." %}

```c
[
 {
 "count": 5,
 “libraryId”: 1,
 "documents": [
 {
 "documentToken": "<document reference id>",
 "indexData": [
 {
 "name": "",
 "value": "Sri Lanka"
 }
 ]
 }
 ]
 }
 ]
```

{% endtab %}
{% endtabs %}

**Body:**

Request body consists of search value filters as a keyword, from date, To date and library/libraries id. Method parameters are as below.

keyWord: This is the keyword that users provide

fromDate: The date user provides to get the results. Results will be returned from the given date

toDate: The date user provides to get the results. Results will be returned till the given date.

libraries: Provide library/libraries ids that need to receive results.

```c
{
 "keyWord": "<keyword>",
 "fromDate": "<Date from>",
 "toDate": "<To date>",
 "libraries": [
 libid#1,
 libid#2,
 libid#3
]
}
```
