> ## Documentation Index
> Fetch the complete documentation index at: https://docs.moorcheh.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# moorcheh namespace-delete-job-status

> Poll namespace delete job progress.

## Overview

Polls an async namespace delete started by [moorcheh namespace-delete](/on-prem/cli/namespaces/delete). Prints job progress as JSON.

## Synopsis

```bash theme={null}
moorcheh namespace-delete-job-status --namespace-name NAME --job-id JOB_ID [--base-url URL]
```

## Options

| Flag               | Required | Description                           |
| ------------------ | -------- | ------------------------------------- |
| `--namespace-name` | Yes      | Namespace the job belongs to          |
| `--job-id`         | Yes      | Job id from `namespace-delete` output |
| `--base-url`       | No       | Default `http://localhost:8080`       |

## Examples

```bash theme={null}
moorcheh namespace-delete --namespace-name my-documents

moorcheh namespace-delete-job-status \
  --namespace-name my-documents \
  --job-id job-682efd0be4484e49b7bf787466d6e9a4
```

## Output

Prints JSON from `GET /namespaces/{namespace_name}/delete-jobs/{job_id}`:

<ResponseField name="job_id" type="string">
  Delete job id.
</ResponseField>

<ResponseField name="namespace_name" type="string">
  Namespace being deleted.
</ResponseField>

<ResponseField name="status" type="string">
  Job state: `"running"`, `"completed"`, or `"failed"`. On lookup errors: `"failure"`.
</ResponseField>

<ResponseField name="total_items" type="number">
  Items in the namespace when delete started.
</ResponseField>

<ResponseField name="deleted_items" type="number">
  Items removed so far.
</ResponseField>

<ResponseField name="last_error" type="string | null">
  Error when job `status` is `"failed"`.
</ResponseField>

<ResponseField name="started_at" type="string">
  Job start time (ISO 8601 UTC).
</ResponseField>

<ResponseField name="updated_at" type="string">
  Last update time (ISO 8601 UTC).
</ResponseField>

<ResponseField name="finished_at" type="string | null">
  Job finish time; `null` while running.
</ResponseField>

<ResponseField name="message" type="string">
  Error description when the job cannot be found.
</ResponseField>

```json Example output (completed) theme={null}
{
  "job_id": "job-682efd0be4484e49b7bf787466d6e9a4",
  "namespace_name": "my-documents",
  "status": "completed",
  "total_items": 42,
  "deleted_items": 42,
  "last_error": null,
  "started_at": "2026-05-21T12:10:00.000Z",
  "updated_at": "2026-05-21T12:10:05.000Z",
  "finished_at": "2026-05-21T12:10:05.000Z"
}
```

## Exit codes

| Code | Meaning               |
| ---- | --------------------- |
| `0`  | Job status returned   |
| `1`  | API error (404, etc.) |

## Related

* [CLI: namespace-delete](/on-prem/cli/namespaces/delete)
* [API: Delete job status](/on-prem/api-references/namespaces/delete-job-status)
* [Python: namespaces.delete\_job\_status()](/on-prem/python-client/namespaces/delete-job-status)
