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.
RunCommandexists 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.
| RPC | HTTP |
|---|---|
RunCommand | POST /v1/vbase/{service_id}/run-command |
Requires the RunVBaseCommand scope. Authenticate with Authorization: Bearer <IAM token>.
RunCommand
Request
HTTP
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
| Field | Type | Required | Description |
|---|---|---|---|
service_id | string | Yes | The database to run against (the service_id from allocation). |
method | string | Yes | The exact Milvus RPC name, e.g. ShowCollections, DescribeCollection, Search. |
input_payload | optional string | No | A JSON string interpreted as the request body for method. Quotes must be escaped. |
Response
HTTP
{
"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.
RunCommand | Milvus SDK | |
|---|---|---|
| Connection | Through the gateway, no Milvus connection needed | Direct to your allocated endpoint |
| Request shape | Manually escaped JSON in input_payload | Typed SDK methods |
| Vectors | Encode by hand | Handled by the SDK |
| Best for | One-off / scripted calls when you can’t open a Milvus connection | Everything else |
For day-to-day work — collections, indexes, insert, search, query — use Connecting with the Milvus SDK and Recipes.
See also
- Connecting with the Milvus SDK — the primary data-plane path.
- Databases (Serverless) — allocate and resolve access.