{"openapi":"3.0.3","info":{"title":"Qdrant Vector Database API","version":"1.13.0","description":"REST API for Qdrant vector database on the Haiven Intelligence Platform.\n\nQdrant stores embeddings for conversations, artifacts, projects, knowledge, and services\nusing 4096-dimensional vectors from Qwen3-Embedding-8B model.\n\n**Base URL**: https://qdrant.haiven.site\n\n**Collections**:\n- `chats` - Conversation message embeddings\n- `artifacts` - Generated content embeddings\n- `projects` - Project documentation\n- `knowledge` - Derived patterns and preferences\n- `services` - Haiven service documentation\n\n**Authentication**: None (internal network only)\n","contact":{"name":"Haiven Intelligence Platform","url":"https://home.haiven.site"},"license":{"name":"Apache 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0.html"}},"servers":[{"url":"https://qdrant.haiven.site","description":"Production (via Traefik)"},{"url":"http://localhost:6333","description":"Direct access (local)"},{"url":"http://qdrant:6333","description":"Docker network (internal)"}],"tags":[{"name":"health","description":"Health and status endpoints"},{"name":"collections","description":"Collection management"},{"name":"points","description":"Vector points operations"},{"name":"search","description":"Vector search operations"},{"name":"snapshots","description":"Backup and restore"},{"name":"metrics","description":"Prometheus metrics"}],"paths":{"/healthz":{"get":{"summary":"Health check","description":"Returns service health status","tags":["health"],"responses":{"200":{"description":"Service is healthy","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"ok"}}}}}}}}},"/":{"get":{"summary":"Get cluster info","description":"Returns version and configuration information","tags":["health"],"responses":{"200":{"description":"Cluster information","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","example":"qdrant - vector search engine"},"version":{"type":"string","example":"1.13.0"}}}}}}}}},"/telemetry":{"get":{"summary":"Get telemetry status","description":"Returns telemetry configuration (should be disabled)","tags":["health"],"responses":{"200":{"description":"Telemetry status","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","nullable":true,"example":null}}}}}}}}},"/collections":{"get":{"summary":"List collections","description":"Returns list of all collections","tags":["collections"],"responses":{"200":{"description":"List of collections","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"collections":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"chats"}}}}}},"status":{"type":"string","example":"ok"},"time":{"type":"number","example":0.001}}}}}}}}},"/collections/{collection_name}":{"get":{"summary":"Get collection info","description":"Returns detailed information about a specific collection","tags":["collections"],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","enum":["chats","artifacts","projects","knowledge","services"]},"description":"Name of the collection"}],"responses":{"200":{"description":"Collection information","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"status":{"type":"string","example":"green"},"vectors_count":{"type":"integer","example":1234},"indexed_vectors_count":{"type":"integer","example":1234},"points_count":{"type":"integer","example":1234},"segments_count":{"type":"integer","example":2},"config":{"type":"object"}}},"status":{"type":"string","example":"ok"}}}}}},"404":{"description":"Collection not found"}}}},"/collections/{collection_name}/points":{"put":{"summary":"Upsert points","description":"Insert or update vector points in a collection","tags":["points"],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string"},"description":"Name of the collection"},{"name":"wait","in":"query","schema":{"type":"boolean","default":true},"description":"Wait for operation to complete"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"points":{"type":"array","items":{"type":"object","required":["id","vector","payload"],"properties":{"id":{"type":"string","example":"msg-001"},"vector":{"type":"array","items":{"type":"number"},"minItems":4096,"maxItems":4096,"description":"4096-dimensional embedding vector"},"payload":{"type":"object","description":"Metadata for the point","example":{"user_id":"elijah","conversation_id":"conv-123","text":"How do I deploy Docker?","source":"claude_code","timestamp":"2025-01-15T10:30:00Z"}}}}}}}}}},"responses":{"200":{"description":"Points upserted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"operation_id":{"type":"integer","example":0},"status":{"type":"string","example":"completed"}}},"status":{"type":"string","example":"ok"}}}}}}}},"post":{"summary":"Get points by ID","description":"Retrieve specific points by their IDs","tags":["points"],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"example":["msg-001","msg-002"]},"with_payload":{"type":"boolean","default":true},"with_vector":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"Retrieved points","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"payload":{"type":"object"},"vector":{"type":"array","items":{"type":"number"}}}}}}}}}}}}},"/collections/{collection_name}/points/search":{"post":{"summary":"Search vectors","description":"Perform semantic search in a collection","tags":["search"],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string"},"description":"Name of the collection"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["vector"],"properties":{"vector":{"type":"array","items":{"type":"number"},"minItems":4096,"maxItems":4096,"description":"Query embedding vector"},"limit":{"type":"integer","default":10,"minimum":1,"maximum":1000,"description":"Maximum number of results"},"with_payload":{"type":"boolean","default":true,"description":"Include payload in results"},"with_vector":{"type":"boolean","default":false,"description":"Include vector in results"},"filter":{"type":"object","description":"Payload filter conditions","properties":{"must":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","example":"source"},"match":{"type":"object","properties":{"value":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"integer"}],"example":"claude_code"}}}}}},"should":{"type":"array","items":{"type":"object"}},"must_not":{"type":"array","items":{"type":"object"}}}},"score_threshold":{"type":"number","minimum":0,"maximum":1,"description":"Minimum similarity score"}}},"examples":{"basic_search":{"summary":"Basic vector search","value":{"vector":[0.1,0.2,0.3],"limit":5,"with_payload":true}},"filtered_search":{"summary":"Search with filters","value":{"vector":[0.1,0.2,0.3],"limit":10,"filter":{"must":[{"key":"source","match":{"value":"claude_code"}},{"key":"has_code","match":{"value":true}}]}}}}}}},"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"msg-001"},"score":{"type":"number","example":0.95,"description":"Similarity score (0-1)"},"payload":{"type":"object","description":"Point metadata"},"vector":{"type":"array","items":{"type":"number"}}}}},"status":{"type":"string","example":"ok"},"time":{"type":"number","example":0.025}}}}}}}}},"/collections/{collection_name}/points/delete":{"post":{"summary":"Delete points","description":"Delete points from a collection","tags":["points"],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"points":{"type":"array","items":{"type":"string"},"description":"IDs of points to delete","example":["msg-001","msg-002"]}}}}}},"responses":{"200":{"description":"Points deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"operation_id":{"type":"integer"},"status":{"type":"string","example":"completed"}}},"status":{"type":"string","example":"ok"}}}}}}}}},"/collections/{collection_name}/snapshots":{"get":{"summary":"List snapshots","description":"Get list of available snapshots for a collection","tags":["snapshots"],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of snapshots","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"chats-2025-01-24-03-00.snapshot"},"creation_time":{"type":"string","format":"date-time"},"size":{"type":"integer"}}}}}}}}}}},"post":{"summary":"Create snapshot","description":"Create a new snapshot of the collection for backup","tags":["snapshots"],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Snapshot created","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"name":{"type":"string","example":"chats-2025-01-24-03-00.snapshot"}}},"status":{"type":"string","example":"ok"}}}}}}}}},"/collections/{collection_name}/index":{"post":{"summary":"Force collection optimization","description":"Trigger index optimization for better query performance","tags":["collections"],"parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"wait","in":"query","schema":{"type":"boolean","default":true},"description":"Wait for optimization to complete"}],"responses":{"200":{"description":"Optimization started","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"operation_id":{"type":"integer"}}},"status":{"type":"string","example":"ok"}}}}}}}}},"/metrics":{"get":{"summary":"Prometheus metrics","description":"Returns metrics in Prometheus format","tags":["metrics"],"responses":{"200":{"description":"Prometheus metrics","content":{"text/plain":{"schema":{"type":"string","example":"# HELP qdrant_collections_total Number of collections\n# TYPE qdrant_collections_total gauge\nqdrant_collections_total 5\n\n# HELP qdrant_collections_vector_total Total vectors across all collections\n# TYPE qdrant_collections_vector_total gauge\nqdrant_collections_vector_total 1234\n\n# HELP rest_responses_duration_seconds API response latency\n# TYPE rest_responses_duration_seconds histogram\nrest_responses_duration_seconds_bucket{le=\"0.005\"} 100\nrest_responses_duration_seconds_bucket{le=\"0.01\"} 200\n"}}}}}}},"/dashboard":{"get":{"summary":"Web dashboard","description":"Interactive web interface for exploring collections","tags":["health"],"responses":{"200":{"description":"Dashboard HTML page","content":{"text/html":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"Collection":{"type":"object","properties":{"name":{"type":"string","example":"chats"},"status":{"type":"string","enum":["green","yellow","red"]},"vectors_count":{"type":"integer"},"indexed_vectors_count":{"type":"integer"},"points_count":{"type":"integer"}}},"Point":{"type":"object","required":["id","vector","payload"],"properties":{"id":{"type":"string"},"vector":{"type":"array","items":{"type":"number"},"minItems":4096,"maxItems":4096},"payload":{"type":"object"}}},"SearchResult":{"type":"object","properties":{"id":{"type":"string"},"score":{"type":"number","minimum":0,"maximum":1},"payload":{"type":"object"},"vector":{"type":"array","items":{"type":"number"}}}},"Error":{"type":"object","properties":{"status":{"type":"object","properties":{"error":{"type":"string"}}},"time":{"type":"number"}}}}}}