Method: projects.locations.indexEndpoints.searchIndexEndpoint

デプロイされたインデックス エンドポイントを検索します(IMAGE コーパス タイプのみ)。

HTTP リクエスト

POST https://visionai.googleapis.com/v1/{indexEndpoint=projects/*/locations/*/indexEndpoints/*}:searchIndexEndpoint

この URL は gRPC Transcoding 構文を使用します。

パスパラメータ

パラメータ
indexEndpoint

string

必須。検索するインデックス エンドポイント。形式: `projects/{projectId}/locations/{locationId}/indexEndpoints/{indexEndpointId}'

リクエストの本文

リクエストの本文には、次の構造のデータが含まれます。

JSON 表現
{
  "criteria": [
    {
      object (Criteria)
    }
  ],
  "exclusionCriteria": [
    {
      object (Criteria)
    }
  ],
  "pageSize": integer,
  "pageToken": string,

  // Union field query can be only one of the following:
  "imageQuery": {
    object (ImageQuery)
  },
  "textQuery": string
  // End of list of possible types for union field query.
}
フィールド
criteria[]

object (Criteria)

検索結果に適用される条件。

exclusionCriteria[]

object (Criteria)

検索結果から除外する条件。fetchMatchedAnnotations は無視されます。

pageSize

integer

リクエストされたページサイズです。 API から返される結果は、リクエストされた数よりも少ない場合があります。負の値を指定すると、INVALID_ARGUMENT エラーが返されます。指定しない場合、または 0 の場合、API はデフォルトのサイズ(10)を選択します。リクエストされたページサイズが最大サイズを超える場合、API は最大サイズ(100)を選択します。

pageToken

string

次のページを取得するための継続トークン。空の場合は、最初のページを取得中であることを意味します。

共用体フィールド query。oneof グローバル検索クエリ。query は次のいずれかになります。
imageQuery

object (ImageQuery)

画像のみのクエリ。

textQuery

string

テキストのみのクエリ。

レスポンスの本文

indexEndpoints.searchIndexEndpoint に対するレスポンス メッセージ。

成功した場合、レスポンスの本文には次の構造のデータが含まれます。

JSON 表現
{
  "searchResultItems": [
    {
      object (SearchResultItem)
    }
  ],
  "nextPageToken": string
}
フィールド
searchResultItems[]

object (SearchResultItem)

返された検索結果。

nextPageToken

string

次のページの継続トークン。このフィールドを省略すると、後続のページはなくなります。

認可スコープ

次の OAuth スコープが必要です。

  • https://www.googleapis.com/auth/cloud-platform

詳細については、認証の概要をご覧ください。

IAM 権限

indexEndpoint リソースに対する次の IAM 権限が必要です。

  • visionai.indexEndpoints.search

詳細については、IAM のドキュメントをご覧ください。

ImageQuery

検索エンドポイント リクエストの画像クエリ。

JSON 表現
{

  // Union field image can be only one of the following:
  "inputImage": string,
  "asset": string
  // End of list of possible types for union field image.
}
フィールド

共用体フィールド image

image は次のいずれかになります。

inputImage

string (bytes format)

未加工バイトでの入力画像。

Base64 でエンコードされた文字列。

asset

string

アセットのリソース名。IMAGE コーパス タイプでのみサポートされます。形式: projects/{project_number}/locations/{locationId}/corpora/{corpus_id}/assets/{assetId}