Skip to main content
POST
/
v1
/
taxonomies
/
execute
/
{taxonomy_identifier}
Test taxonomy configuration (validation only)
curl --request POST \
  --url https://api.mixpeek.com/v1/taxonomies/execute/{taxonomy_identifier} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'X-Namespace: <x-namespace>' \
  --data '
{
  "batch_size": 1000,
  "join_mode": "on_demand",
  "source_collection_id": "col_catalog_v2",
  "target_collection_id": "col_catalog_enriched_v2",
  "taxonomy": {
    "config": {
      "input_mappings": [
        {
          "input_key": "image_vector",
          "path": "features.clip",
          "source_type": "vector"
        }
      ],
      "retriever_id": "ret_clip_v1",
      "source_collection": {
        "collection_id": "col_products_v1"
      },
      "taxonomy_type": "flat"
    },
    "input_mappings": [
      {
        "input_key": "image_vector",
        "path": "features.clip",
        "source_type": "vector"
      }
    ],
    "namespace_id": "ns_123",
    "retriever_id": "ret_clip_v1",
    "taxonomy_name": "product_tags"
  }
}
'
{
  "stats": {
    "processed_docs": 0,
    "batches": 0,
    "errors": 0
  },
  "results": [
    {}
  ]
}

Headers

Authorization
string
required

REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings.

X-Namespace
string
required

REQUIRED: Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace'

Path Parameters

taxonomy_identifier
string
required

Taxonomy ID or name to validate

Query Parameters

version
integer | null

Optional taxonomy version (defaults to latest)

Body

application/json

Request model for on-demand taxonomy validation and testing ONLY.

⚠️ IMPORTANT: This endpoint is ONLY for testing taxonomy configuration with sample documents.

DO NOT USE THIS FOR BATCH ENRICHMENT: ❌ Do NOT use this to enrich an entire collection ❌ Do NOT use source_collection_id expecting batch processing ❌ Do NOT use target_collection_id expecting persistence

HOW TAXONOMY ENRICHMENT ACTUALLY WORKS: ✅ Automatic during ingestion: Attach taxonomies to collections via taxonomy_applications ✅ On-the-fly in retrieval: Add taxonomy_join stage to retriever pipelines

This endpoint validates:

  • Taxonomy configuration is correct
  • Retriever can find matching taxonomy nodes
  • Enrichment fields are properly applied

For production enrichment, see:

  • Collections API: attach taxonomies via taxonomy_applications field
  • Retrievers API: add taxonomy_join stage for on-the-fly enrichment
taxonomy
TaxonomyModel · object
required

Full taxonomy model with configuration (fetched from DB by controller)

retriever
RetrieverModel · object

Optional retriever configuration override for testing. If omitted, uses the retriever configured in the taxonomy.

source_documents
Source Documents · object[] | null

Sample documents to test enrichment (typically 1-5 docs). Results are returned immediately, not persisted. ⚠️ Do NOT pass collection_id expecting batch processing!

source_collection_id
string | null

⚠️ IGNORED IN ON_DEMAND MODE. This field exists for legacy compatibility only. To enrich collections, use taxonomy_applications on the collection.

target_collection_id
string | null

⚠️ IGNORED IN ON_DEMAND MODE. This field exists for legacy compatibility only. Results are never persisted via this endpoint.

join_mode
enum<string>
default:on_demand

Must be 'on_demand'. BATCH mode is NOT supported via API. Batch enrichment is automatic (triggered by engine during ingestion).

Available options:
on_demand,
batch
batch_size
integer
default:1000

Batch size for the scroll iterator

Required range: 1 <= x <= 10000
scroll_filters
LogicalOperator · object

Additional filters applied to the source collection prior to enrichment.

Response

Successful Response

stats
JoinStats · object
required
results
Results · object[] | null