Skip to main content

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.

Overview

Removes a namespace and every item in it. The operation runs in the background. Use the returned job_id with delete_namespace_job_status to poll until the job completes. When the delete job completes, global item quota is freed for all items that were in the namespace.

Method

client.delete_namespace(namespace_name: str) -> dict

API

DELETE /namespaces/{namespace_name} — see Delete namespace

Parameters

namespace_name
string
required
Name of the namespace to delete.

Example

from moorcheh import MoorchehApiClient, MoorchehApiError

client = MoorchehApiClient("http://localhost:8080")
resp = client.delete_namespace("my-documents")
job_id = resp["job_id"]
Poll with delete_namespace_job_status.

Returns

status
string
"success" when the delete job was started.
message
string
Human-readable result description.
namespace_name
string
Name of the namespace being deleted.
job_id
string
Id of the async delete job. Poll delete_namespace_job_status with this value.
Example return value
{
  "status": "success",
  "message": "Namespace delete started. Poll delete job status for progress.",
  "namespace_name": "my-documents",
  "job_id": "job-682efd0be4484e49b7bf787466d6e9a4",
}

Errors

Non-2xx responses raise MoorchehApiError.
from moorcheh import MoorchehApiError

try:
    resp = client.delete_namespace("my-documents")
except MoorchehApiError as e:
    print(e.status_code, e.body)  # 404 if namespace not found
StatusCause
404Namespace not found