# 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](https://docs.bullmq.net/http-api/authentication) 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](https://docs.bullmq.net/http-api/authentication) 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 %}
