Skip to main content

data_items

Creates, updates, deletes, gets or lists a data_items resource.

Overview

Namedata_items
TypeResource
Idgoogle.datalabeling.data_items

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. Name of the data item, in format of: projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
imagePayloadobjectThe image payload, a container of the image bytes/uri. (id: GoogleCloudDatalabelingV1beta1ImagePayload)
textPayloadobjectThe text payload, a container of text content. (id: GoogleCloudDatalabelingV1beta1TextPayload)
videoPayloadobjectThe video payload, a container of the video uri. (id: GoogleCloudDatalabelingV1beta1VideoPayload)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_datasets_annotated_datasets_data_items_getselectprojectsId, datasetsId, annotatedDatasetsId, dataItemsIdGets a data item in a dataset by resource name. This API can be called after data are imported into dataset.
projects_datasets_data_items_getselectprojectsId, datasetsId, dataItemsIdGets a data item in a dataset by resource name. This API can be called after data are imported into dataset.
projects_datasets_annotated_datasets_data_items_listselectprojectsId, datasetsId, annotatedDatasetsIdfilter, pageSize, pageTokenLists data items in a dataset. This API can be called after data are imported into dataset. Pagination is supported.
projects_datasets_data_items_listselectprojectsId, datasetsIdfilter, pageSize, pageTokenLists data items in a dataset. This API can be called after data are imported into dataset. Pagination is supported.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
annotatedDatasetsIdstring
dataItemsIdstring
datasetsIdstring
projectsIdstring
filterstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Gets a data item in a dataset by resource name. This API can be called after data are imported into dataset.

SELECT
name,
imagePayload,
textPayload,
videoPayload
FROM google.datalabeling.data_items
WHERE projectsId = '{{ projectsId }}' -- required
AND datasetsId = '{{ datasetsId }}' -- required
AND annotatedDatasetsId = '{{ annotatedDatasetsId }}' -- required
AND dataItemsId = '{{ dataItemsId }}' -- required;