Skip to main content
GET
https://api.moorcheh.ai
/
v1
/
namespaces
curl -X GET "https://api.moorcheh.ai/v1/namespaces" \
  -H "x-api-Key: your-api-key-here"
{
  "namespaces": [
    {
      "namespace_name": "my_documents",
      "type": "text",
      "vector_dimension": null,
      "itemCount": 1247,
      "createdAt": "2024-01-15T10:30:00.000Z"
    },
    {
      "namespace_name": "product_embeddings",
      "type": "vector",
      "vector_dimension": 1536,
      "itemCount": 5683,
      "createdAt": "2024-01-20T14:22:15.000Z"
    },
    {
      "namespace_name": "customer_support",
      "type": "text",
      "vector_dimension": null,
      "itemCount": 892,
      "createdAt": "2024-02-01T09:15:30.000Z"
    }
  ]
}

Overview

Retrieve a comprehensive list of all namespaces in your account, including their metadata, document counts, and usage statistics. This endpoint provides essential information for namespace management and monitoring.
The response includes both text and vector namespaces, with type-specific metadata for each.

Authentication

x-api-Key
string
required
Your API key for authentication
Content-Type
string
required
Must be application/json

Query Parameters

This endpoint does not accept query parameters. All namespaces for the authenticated user are returned.
curl -X GET "https://api.moorcheh.ai/v1/namespaces" \
  -H "x-api-Key: your-api-key-here"
{
  "namespaces": [
    {
      "namespace_name": "my_documents",
      "type": "text",
      "vector_dimension": null,
      "itemCount": 1247,
      "createdAt": "2024-01-15T10:30:00.000Z"
    },
    {
      "namespace_name": "product_embeddings",
      "type": "vector",
      "vector_dimension": 1536,
      "itemCount": 5683,
      "createdAt": "2024-01-20T14:22:15.000Z"
    },
    {
      "namespace_name": "customer_support",
      "type": "text",
      "vector_dimension": null,
      "itemCount": 892,
      "createdAt": "2024-02-01T09:15:30.000Z"
    }
  ]
}

Response Fields

Namespace Object

namespace_name
string
Unique name of the namespace
type
string
Namespace type: “text” or “vector”
vector_dimension
number|null
Vector dimension (null for text namespaces)
itemCount
number
Total number of items in the namespace
createdAt
string
ISO 8601 timestamp of creation

Use Cases

  • Dashboard Display: Show namespace overview with usage statistics
  • Data Management: Monitor storage usage and document counts
  • Namespace Selection: Populate dropdowns for namespace selection in applications
  • Usage Analytics: Track namespace growth and activity over time
  • Resource Planning: Understand storage and document distribution across namespaces