Conversation
Hand-written OpenAPI 3.0 counterpart to proto/qdrant/serverless/collections.proto.
Rather than transcoding the gRPC shapes one to one, the REST surface follows the
conventions of the Qdrant server collections API: PUT/GET/DELETE on
/collections/{collection_name}, a /exists probe, the {result, status, time}
envelope, qdrant-style enum values, single-or-named `vectors`, and payload
indexes given either as a bare type name or as an object with options.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
PR Packages Published Python Package:
NPM Package:
|
|
The latest Buf updates on your PR. Results from workflow Pull Request / linting (pull_request).
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PREVIEW
What
Adds
openapi/qdrant/serverless/collections/collections.json, a hand-written OpenAPI 3.0.3 description of the REST face ofqdrant.serverless.CollectionsService(proto/qdrant/serverless/collections.proto).The generated
gen/openapiv2/.../collections.swagger.jsonis empty (the proto has nogoogle.api.httpannotations, by design), and a 1:1 gRPC transcoding would givePOST /qdrant.serverless.CollectionsService/CreateCollectionwithdense_vectors: { "": { ... } }bodies. Instead this spec models the API the way the Qdrant server describes its own collections API, so anyone who knows Qdrant feels at home and can copy from its docs.The REST surface
GET/collections?limit=&offset=ListCollectionsoffset/next_page_offsetare the opaque cursor (offset_token/next_offset_tokenin proto), named after Qdrant's scroll APIPUT/collections/{collection_name}CreateCollectionCollectionConfig; idempotent,result.createdisfalsewhen it already existedGET/collections/{collection_name}GetCollection404instead ofexists: falseDELETE/collections/{collection_name}DeleteCollectionresult: true;404if missingGET/collections/{collection_name}/existsGetCollection404Design choices borrowed from the Qdrant server OpenAPI:
{ "result": ..., "status": "ok", "time": ... }envelope and{ "status": { "error": "..." } }error body, so responses look like the points/search API served on the same space.vectorsis either a single unnamed vector ({ "size", "distance" }) or a map of named ones, exactly likeVectorsConfig. The proto's""map key is never visible.Cosine/Euclid/Dot/Manhattan,whitespace/word/..., sparsemodifier: "idf"instead ofuse_idf: true."user_id": "keyword") or an object with options ({ "type": "text", "tokenizer": "word" }), likePayloadFieldSchema. Keywordprefixis a boolean rather than an empty-message presence flag; the stemmer is atype-discriminatedoneOf;stopwordsaccepts a single language string or a{ languages, custom }set.precision_tier→precision(low/medium/high),point_count→points_count.objects_deletedfromDeleteCollectionResponseis not exposed: it counts storage objects, which is an implementation detail of the manager.Examples
Create a hybrid-search collection with payload indexes:
{ "result": { "name": "documents", "created": true }, "status": "ok", "time": 0.031 }The simplest possible collection, and a ColBERT-style one:
Read it back, list with pagination, delete:
{ "result": { "name": "documents", "config": { "vectors": { "text": { "size": 1024, "distance": "Cosine", "multivector": false, "precision": "medium" } }, "sparse_vectors": { "bm25": { "modifier": "idf", "precision": "high" } }, "payload_indexes": { "user_id": { "type": "keyword", "prefix": false }, "created_at": { "type": "datetime" } } }, "points_count": 12873 }, "status": "ok", "time": 0.004 }The same walkthrough is embedded in
info.description, so it renders at the top of the Redoc page as it does for the Qdrant server API. ThePUTrequest body also carries three named examples (single_dense,hybrid,multivector).Open questions for review
api-keyheader, plusAuthorization: Bearer). Confirm this matches what the serverless auth sidecar actually accepts.{space_endpoint}variable (theSpaceEndpoint.urlfrom the space API). If spaces have a predictable hostname pattern we can put it in the default.offset,precision,modifier,points_count, booleanprefix,Cosinecasing). They are deliberate so the REST API reads like Qdrant, but the REST layer needs to translate them; happy to pull any of them back to the proto names.404for GET/DELETE on a missing collection, idempotent200on re-create. The proto instead returnsexists: false/deleted: false.PATCH(update) yet, since the proto has noUpdateCollection. The path is reserved for it.Validation
openapi-spec-validator: OKredocly lint(recommended ruleset): valid, no warnings"cosine"and unknown index types are rejected as intended.🤖 Generated with Claude Code