Skip to Content
We are live but in Staging 🎉
API ReferenceRunCommand (Advanced)

RunCommand (Advanced) — API Reference

Package: dodil.vbase.v1 · Service: VBaseService

Advanced / fallback. The primary way to do any data-plane operation is the Milvus SDK pointed at your allocated endpoint. RunCommand exists for the rare case where you want to issue a Milvus operation through the control-plane gateway instead of connecting directly — for example a one-off call from an environment that already holds a gateway token but cannot open a Milvus connection. Reach for the SDK first.

RunCommand forwards a single Milvus unary RPC, named by string, to the database identified by service_id. The request body for that RPC is supplied as a JSON string in input_payload.

RPCHTTP
RunCommandPOST /v1/vbase/{service_id}/run-command

Requires the RunVBaseCommand scope. Authenticate with Authorization: Bearer <IAM token>.

RunCommand

Request

curl -sS -X POST "https://api.dev.dodil.io/v1/vbase/svc-7f3a9c2e/run-command" \ -H "Authorization: Bearer $DODIL_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "serviceId": "svc-7f3a9c2e", "method": "ShowCollections", "inputPayload": "{\"db_name\":\"db_7f3a9c2e\"}" }'

Fields

FieldTypeRequiredDescription
service_idstringYesThe database to run against (the service_id from allocation).
methodstringYesThe exact Milvus RPC name, e.g. ShowCollections, DescribeCollection, Search.
input_payloadoptional stringNoA JSON string interpreted as the request body for method. Quotes must be escaped.

Response

{ "outputPayload": "{\"collection_names\":[\"products\"]}", "response": { "success": true } }

output_payload is the Milvus response, serialized as a JSON string. Parse it client-side.

Why prefer the Milvus SDK

RunCommand works, but it asks you to hand-author and escape JSON payloads for Milvus request protos, and to parse JSON responses yourself. The Milvus SDK does all of that for you with typed methods, handles vector encoding, and is the path Recipes are written against.

RunCommandMilvus SDK
ConnectionThrough the gateway, no Milvus connection neededDirect to your allocated endpoint
Request shapeManually escaped JSON in input_payloadTyped SDK methods
VectorsEncode by handHandled by the SDK
Best forOne-off / scripted calls when you can’t open a Milvus connectionEverything else

For day-to-day work — collections, indexes, insert, search, query — use Connecting with the Milvus SDK and Recipes.


See also