> For the complete documentation index, see [llms.txt](https://40factory.gitbook.io/wilson/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://40factory.gitbook.io/wilson/3.12/rest-api/knowledge-base/get-document-list.md).

# Get document list

Get list of document loaded in Knowledge base.

## Request <a href="#request" id="request"></a>

### Url

```
GET 
https://wilson.40mat.com/apif/v2/company/<company_id>/knowledge-base
```

### Headers

<pre><code><strong>AUTH
</strong>Bearer "eyJ0eXAiOiJKV1QiLCJub25jZSI6IndUZXphSTNjdTNVYj..."
</code></pre>

### Parameters

* `path` (string): Full path of a folder where get documents. Default = "/"
* `offset` (number) Indicate offset index to start query on list. Default = 0
* `limit` (number): Indicate max number of results to return. Default = 20
* `search` (string): Search documents with the substring indicated
* `recursive` (boolean): If true, return all content of folders inside the result recursively

### Body

```
No body required for this endpoint.
```

***

## Response&#x20;

<pre class="language-json"><code class="lang-json"><strong>[
</strong>    {
        "create_at": "2025-01-23T11:07:35.079000",
        "id": "679222f7e02a...",
        "is_file": false,
        "is_folder": true,
        "object_name": "/example",
        "tags": [],
        "update_at": "2025-01-23T11:07:35.079000"
    },
    {
        "create_at": "2025-01-23T11:02:30.760000",
        "id": "679221c689fbe...",
        "is_file": true,
        "is_folder": false,
        "object_name": "/example/filename.pdf",
        "size": 326836,
        "tags": [],
        "update_at": "2025-01-29T11:10:17.582000"
    },
]
</code></pre>

The response is in JSON format contain array of object with following properties:

* `id` (string): Document id
* `object_name` (string): Document full path in knowledge base
* `tags` (string array): List of tags id associated to document
* `is_file` (boolean): True if document is a file
* `is_folder` (boolean): True if document is a folder
* `create_at` (string datetime): Date of creation
* `update_at` (string datetime): Date of last update

***

## Code example

{% tabs %}
{% tab title="Python" %}

```python
import requests
import json

url = "https://wilson.40mat.com/apif/v2/company/<company_id>/knowledge-base"

headers = {
  'Authorization': '••••••'
}

response = requests.request("GET", url, headers=headers)

print(response.text)
```

{% endtab %}

{% tab title="cURL" %}

```powershell
curl --location 'https://wilson.40mat.com/apif/v2/company/<company_id>/knowledge-base' \
--header 'Authorization: ••••••' 
```

{% endtab %}
{% endtabs %}
