Searches DataItems in a Dataset.
HTTP request
GET https://{service-endpoint}/v1/{dataset}:searchDataItems
Where {service-endpoint}
is one of the supported service endpoints.
Path parameters
Parameters | |
---|---|
dataset |
Required. The resource name of the Dataset from which to search DataItems. Format: |
Query parameters
Parameters | |
---|---|
savedQuery |
The resource name of a SavedQuery(annotation set in UI). Format: |
dataLabelingJob |
The resource name of a DataLabelingJob. Format: |
dataItemFilter |
An expression for filtering the DataItem that will be returned.
For example:
|
annotationsFilter |
An expression for filtering the Annotations that will be returned per DataItem. * |
annotationFilters[] |
An expression that specifies what Annotations will be returned per DataItem. Annotations satisfied either of the conditions will be returned. * |
fieldMask |
Mask specifying which fields of This is a comma-separated list of fully qualified names of fields. Example: |
annotationsLimit |
If set, only up to this many of Annotations will be returned per DataItemView. The maximum value is 1000. If not set, the maximum value will be used. |
pageSize |
Requested page size. Server may return fewer results than requested. Default and maximum page size is 100. |
orderBy |
A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. |
pageToken |
A token identifying a page of results for the server to return Typically obtained via |
Union parameter
|
|
orderByDataItem |
A comma-separated list of data item fields to order by, sorted in ascending order. Use "desc" after a field name for descending. |
orderByAnnotation |
Expression that allows ranking results based on annotation's property. |
Request body
The request body must be empty.
Response body
Response message for DatasetService.SearchDataItems
.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"dataItemViews": [
{
object ( |
Fields | |
---|---|
dataItemViews[] |
The DataItemViews read. |
nextPageToken |
A token to retrieve next page of results. Pass to |
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 dataset
resource:
aiplatform.dataItems.list
For more information, see the IAM documentation.
OrderByAnnotation
Expression that allows ranking results based on annotation's property.
JSON representation |
---|
{ "savedQuery": string, "orderBy": string } |
Fields | |
---|---|
savedQuery |
Required. Saved query of the Annotation. Only Annotations belong to this saved query will be considered for ordering. |
orderBy |
A comma-separated list of annotation fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Must also specify savedQuery. |
DataItemView
A container for a single DataItem and Annotations on it.
JSON representation |
---|
{ "dataItem": { object ( |
Fields | |
---|---|
dataItem |
The DataItem. |
annotations[] |
The Annotations on the DataItem. If too many Annotations should be returned for the DataItem, this field will be truncated per annotationsLimit in request. If it was, then the hasTruncatedAnnotations will be set to true. |
hasTruncatedAnnotations |
True if and only if the Annotations field has been truncated. It happens if more Annotations for this DataItem met the request's annotationFilter than are allowed to be returned by annotationsLimit. Note that if Annotations field is not being returned due to field mask, then this field will not be set to true no matter how many Annotations are there. |