# See how a combine is going

`GET https://api.mailmasker.org/api/v1/drive/append-jobs/:id`

Whether a combine has finished, and how far along it is.

- Who can use it: Any signed-in account
- Area: Drive
- Answers 200 OK when it works
- Page: https://developer.mailmasker.org/drive-combine-status

`state` goes from `pending` to `processing` and `finalizing`, then ends as `completed` or `failed`. While it runs, `received_bytes` of `total_bytes` have been written (`total_bytes` is null until it starts). Once it completes, `file_id` is the new file; if it fails, `error` says why.

## Parameters

| Name | In | Required | What it is | Example |
|---|---|---|---|---|
| `id` | path | yes | The job id from Combine files into one. | `12` |

## Good to know

- A job that isn't yours, or doesn't exist, answers 404.

## Examples

cURL:

```bash
curl -s 'https://api.mailmasker.org/api/v1/drive/append-jobs/12' \
  -H "Authorization: Bearer $TOKEN"
```

Perl:

```perl
use Mojo::Base -strict;
use Mojo::UserAgent;

my $ua  = Mojo::UserAgent->new;
my $res = $ua->get('https://api.mailmasker.org/api/v1/drive/append-jobs/12',
    { Authorization => "Bearer $ENV{TOKEN}" })->result;
die $res->code, ' ', ($res->json('/error') // $res->message), "\n" unless $res->is_success;
print $res->body, "\n";
```

homelab-cli:

There is no homelab-cli command for this yet.

## Response

200 OK:

```json
{
  "id": 12,
  "state": "processing",
  "output_name": "backup.iso",
  "received_bytes": 1073741824,
  "total_bytes": 4294967296,
  "file_id": null,
  "error": null
}
```
