> 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.md).

# Get document list

## 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 %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://40factory.gitbook.io/wilson/3.11/rest-api/knowledge-base/get-document-list.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
