- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- ImageQuery
Search a deployed index endpoint (IMAGE corpus type only).
HTTP request
POST https://visionai.googleapis.com/v1/{indexEndpoint=projects/*/locations/*/indexEndpoints/*}:searchIndexEndpoint
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
indexEndpoint |
Required. The index endpoint to search. Format: `projects/{projectId}/locations/{locationId}/indexEndpoints/{indexEndpointId}' |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "criteria": [ { object ( |
Fields | |
---|---|
criteria[] |
Criteria applied to search results. |
exclusionCriteria[] |
Criteria to exclude from search results. Note that |
pageSize |
Requested page size. API may return fewer results than requested. If negative, INVALID_ARGUMENT error will be returned. If unspecified or 0, API will pick a default size, which is 10. If the requested page size is larger than the maximum size, API will pick the maximum size, which is 100. |
pageToken |
The continuation token to fetch the next page. If empty, it means it is fetching the first page. |
Union field query . The oneof global search query. query can be only one of the following: |
|
imageQuery |
An image-only query. |
textQuery |
A text-only query. |
Response body
Response message for indexEndpoints.searchIndexEndpoint.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"searchResultItems": [
{
object ( |
Fields | |
---|---|
searchResultItems[] |
Returned search results. |
nextPageToken |
The next-page continuation token. If this field is omitted, there are no subsequent pages. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the indexEndpoint
resource:
visionai.indexEndpoints.search
For more information, see the IAM documentation.
ImageQuery
Image query for search endpoint request.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
inputImage |
Input image in raw bytes. A base64-encoded string. |
asset |
Resource name of the asset. Only supported in IMAGE corpus type. Format: |