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

Returns every namespace on this Moorcheh instance, including type, vector dimension, item count, and created time.

Method

client.list_namespaces() -> dict

API

GET /namespaces — see List namespaces

Example

from moorcheh import MoorchehApiClient, MoorchehApiError

client = MoorchehApiClient("http://localhost:8080")
result = client.list_namespaces()

for ns in result["namespaces"]:
    print(
        ns["namespace_name"],
        ns["type"],
        ns["item_count"],
        ns["created_at"],
    )

Returns

namespaces
array
List of namespace objects. Empty list when no namespaces exist yet.
namespaces[].namespace_name
string
Unique name of the namespace.
namespaces[].type
string
"text" or "vector".
namespaces[].vector_dimension
number | null
Fixed vector length for vector namespaces. null for text namespaces.
namespaces[].item_count
number
Number of items stored in this namespace.
namespaces[].created_at
string
ISO 8601 UTC timestamp when the namespace was created.
status
string
"failure" on server error responses.
message
string
Error description when the request fails.
Example return value
{
  "namespaces": [
    {
      "namespace_name": "my-documents",
      "type": "text",
      "vector_dimension": None,
      "item_count": 42,
      "created_at": "2026-05-21T12:00:00.000Z",
    },
    {
      "namespace_name": "my-embeddings",
      "type": "vector",
      "vector_dimension": 768,
      "item_count": 10,
      "created_at": "2026-05-21T12:05:00.000Z",
    },
  ]
}

Errors

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

try:
    result = client.list_namespaces()
except MoorchehApiError as e:
    print(e.status_code, e.body)