> 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.11/rest-api/knowledge-base/get-document-list-grouped.md).

# Get document list grouped

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

### Url

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

### Headers

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

### Parameters

* `files` (boolean): If not present, True. If False, don't return files list
* `folders` (boolean): If not present, True. If False, don't return folder list
* `tags` (boolean): If not present, True. If False, don't return tag list

### Body

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

***

## Response&#x20;

```json
{
    "files": [
        {
            "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"
        }
    ],
    "folders": [
        {
            "create_at": "2025-01-23T11:07:35.079000",
            "id": "679222f7e02a...",
            "is_file": false,
            "is_folder": true,
            "object_name": "/example",
            "update_at": "2025-01-23T11:07:35.079000"
        }
    ],
    "tags": [
        {
            "create_at": "2025-01-15T15:56:53.008000",
            "id": "6787dac5977e...",
            "name": "tag_name",
            "update_at": "2025-01-15T16:23:57.809000"
        }
    ]
}
```

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

* `files` (object array): List of files in knowledge base
  * `id` (string): Document id
  * `object_name` (string): Document full path in knowledge base
  * `size` (number): Document size
  * `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
* `folders` (object array): List of folders in knowledge base
  * `id` (string): Document id
  * `object_name` (string): Document full path in knowledge base
  * `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
* `tags` (object array): List of tags
  * `id` (string): Tag id
  * `name` (string): Tag name (label)
  * `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/info"

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

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

print(response.text)
```

{% endtab %}

{% tab title="cURL" %}

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

{% endtab %}
{% endtabs %}
