メインコンテンツまでスキップ

取得 (V2)

この操作は、ID を指定して特定のエンティティを取得します。

POST/v2/vectordb/entities/get
接続エンドポイント

https://{cluster-id}.{region}.vectordb.zillizcloud.com:19530

📘ノート
  • サービングクラスターを使用している場合は、クラスターエンドポイントを使用してください。
    • Free & Serverless

      https://{cluster-id}.serverless.{region}.vectordb.zillizcloud.com

    • Dedicated

      https://{cluster-id}.{region}.vectordb.zillizcloud.com:19530

  • ${CLUSTER_ENDPOINT} を、あなたのZilliz Cloudクラスターのエンドポイントに置き換える必要があります。
  • エンドポイントを取得するには、Describe Cluster V2 APIを使用してレスポンスから値を抽出してください。
shell
export CLUSTER_ENDPOINT="https://{cluster-id}.{region}.vectordb.zillizcloud.com:19530"
パラメータ
Authorizationstringheader必要

認証トークンには、適切な権限を持つ API key、または username:password のようにコロンで結合した username と password のペアを指定する必要があります。project endpoint を使用する場合は、十分な権限を持つ有効な API key のみ使用できます。

値の例: Bearer {{TOKEN}}
リクエスト・ボディ
dbNamestring

データベースの名前。

collectionNamestring必要

この操作が適用されるコレクションの名前。

idobject必要

特定のエンティティ ID、またはエンティティ ID のリスト。

outputFieldsarray

クエリ結果とともに返すフィールドの配列。

[]outputFieldsstring

出力フィールド名。

partitionNamesarray

この操作が適用されるパーティションの名前。

[]partitionNamesstring

パーティション名。

consistencyLevelstring

この操作の整合性レベル。デフォルト値は Bounded です。

partitionNamestring

エンティティの取得元となるパーティション名。

bash
export TOKEN="db_admin:xxxxxxxxxxxxx"

curl --request POST \
--url "${CLUSTER_ENDPOINT}/v2/vectordb/entities/get" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"collectionName": "quick_setup",
"id": [
1,
3,
5
],
"outputFields": [
"color"
]
}'
レスポンス

クエリ結果を返します。

codeinteger

レスポンスコード。

costinteger

この操作のコスト。これは free cluster と serverless cluster にのみ適用され、現在のリクエストの vCU 使用量を示します。

dataarray

クエリ結果。

[]dataobject

エンティティオブジェクト。

scanned_remote_bytesinteger

デプロイメントで tiered storage を使用し、usage tracking が有効で、かつこの操作が remote/disk storage から読み取る場合に返されます。すべてのデータが local cache から提供される場合は省略されます。

scanned_total_bytesinteger

デプロイメントで tiered storage を使用し、usage tracking が有効で、かつこの操作が remote/disk storage から読み取る場合に返されます。すべてのデータが local cache から提供される場合は省略されます。

cache_hit_rationumber

デプロイメントで tiered storage を使用し、usage tracking が有効で、かつこの操作が remote/disk storage から読み取る場合に返されます。すべてのデータが local cache から提供される場合は省略されます。

エラーメッセージを返します。

codeinteger

レスポンスコード。

messagestring

エラーメッセージ。

Successjson
{
"code": 0,
"data": [
{
"color": "red_7025",
"id": 1
},
{
"color": "pink_9298",
"id": 3
},
{
"color": "yellow_4222",
"id": 5
}
]
}