> 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/queue-status.md).

# Queue status

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

### Url

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

### Headers

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

### Parameters

* `stream` (boolean): If False, response not in stream. Default = True

### Body

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

***

## Response&#x20;

<pre class="language-json"><code class="lang-json"><strong>[
</strong><strong>    {
</strong>        "task_id": "683429f74d9...",
        "file_id": "650053b85e6...",
        "object_name": "/folder/document.pdf",
        "start_time": "2025-05-26T10:44:59.851000",
        "state": "PROCESSING"
    }
]
</code></pre>

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

* `task_id` (string): Task id
* `file_id` (string): Document id
* `object_name` (string): Document full path in knowledge base
* `state` (string): State of document embedding: `PENDING`, `PROCESSING`, `PROCESSED`, `ERROR`
* `start_time` (string datetime): Start of document processing

***

## Code example

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

```python
import requests
import json

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

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/queue' \
--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/queue-status.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.
