# Reference

## Update Job Progress

<mark style="color:green;">`POST`</mark> `/queues/:queue-name/jobs/:job-id/progress`

Updates the progress of a given job. The progress can be a number or any other json serializable object.&#x20;

{% hint style="info" %}
Note, the token used as bearer token must be the [token](/http-api/authentication.md) received on the worker's endpoint specific for a given job.
{% endhint %}

**Headers**

| Name          | Value                |
| ------------- | -------------------- |
| Content-Type  | `application/json`   |
| Authorization | `Bearer <job-token>` |

**Body**

An integer or any JSON serializable object.

**Response**

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

```json
OK
```

{% endtab %}

{% tab title="400" %}

```
Message with the reason for the invalid request.
```

{% endtab %}
{% endtabs %}

## Add Job Logs

<mark style="color:green;">`POST`</mark> `/queues/:queue-name/jobs/:job-id/logs`

Add a log to a given job. Any number of logs can be added to a given job.

{% hint style="info" %}
Note, the token used as bearer token must be the [token](/http-api/authentication.md) received on the worker's endpoint specific for a given job.
{% endhint %}

**Headers**

| Name          | Value                |
| ------------- | -------------------- |
| Content-Type  | `application/json`   |
| Authorization | `Bearer <job-token>` |

**Body**

A plain string with the message to add as a log.

**Response**

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

```json
OK
```

{% endtab %}

{% tab title="400" %}

```
Message with the reason for the error
```

{% endtab %}
{% endtabs %}

## Get Job Logs

<mark style="color:green;">`GET`</mark> `/queues/:queue-name/jobs/:job-id/logs?start=0&length=10`

\<Description of the endpoint>

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Query**

| Name     | Type   | Description              |
| -------- | ------ | ------------------------ |
| `start`  | number | First log to return      |
| `length` | number | Number of logs to return |

**Response**

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

```json
{
  "count": number,
  "logs": string[],
}
```

{% endtab %}

{% tab title="400" %}

```
Message with the reason for the error
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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:

```
GET https://docs.bullmq.net/http-api/jobs/reference.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
