Method: projects.locations.datasets.dataItems.annotations.list

Lists Annotations belongs to a dataitem

HTTP request

GET https://{service-endpoint}/v1/{parent}/annotations

Where {service-endpoint} is one of the supported service endpoints.

Path parameters

Parameters
parent

string

Required. The resource name of the DataItem to list Annotations from. Format: projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{dataItem}

Query parameters

Parameters
filter

string

The standard list filter.

pageSize

integer

The standard list page size.

pageToken

string

The standard list page token.

readMask

string (FieldMask format)

Mask specifying which fields to read.

This is a comma-separated list of fully qualified names of fields. Example: "user.displayName,photo".

orderBy

string

A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

Response message for DatasetService.ListAnnotations.

JSON representation
{
  "annotations": [
    {
      object (Annotation)
    }
  ],
  "nextPageToken": string
}
Fields
annotations[]

object (Annotation)

A list of Annotations that matches the specified filter in the request.

nextPageToken

string

The standard List next-page token.

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 parent resource:

  • aiplatform.annotations.list

For more information, see the IAM documentation.

Annotation

Used to assign specific AnnotationSpec to a particular area of a DataItem or the whole part of the DataItem.

JSON representation
{
  "name": string,
  "payloadSchemaUri": string,
  "payload": value,
  "createTime": string,
  "updateTime": string,
  "etag": string,
  "annotationSource": {
    object (UserActionReference)
  },
  "labels": {
    string: string,
    ...
  }
}
Fields
name

string

Output only. Resource name of the Annotation.

payloadSchemaUri

string

Required. Google Cloud Storage URI points to a YAML file describing payload. The schema is defined as an OpenAPI 3.0.2 Schema Object. The schema files that can be used here are found in gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the chosen schema must be consistent with the parent Dataset's metadata.

payload

value (Value format)

Required. The schema of the payload can be found in payload_schema.

createTime

string (Timestamp format)

Output only. Timestamp when this Annotation was created.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Output only. Timestamp when this Annotation was last updated.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

etag

string

Optional. Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens.

annotationSource

object (UserActionReference)

Output only. The source of the Annotation.

labels

map (key: string, value: string)

Optional. The labels with user-defined metadata to organize your Annotations.

Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one Annotation(System labels are excluded).

See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with "aiplatform.googleapis.com/" and are immutable. Following system labels exist for each Annotation:

  • "aiplatform.googleapis.com/annotation_set_name": optional, name of the UI's annotation set this Annotation belongs to. If not set, the Annotation is not visible in the UI.

  • "aiplatform.googleapis.com/payload_schema": output only, its value is the payload_schema's title.

UserActionReference

References an API call. It contains more information about long running operation and Jobs that are triggered by the API call.

JSON representation
{
  "method": string,

  // Union field reference can be only one of the following:
  "operation": string,
  "dataLabelingJob": string
  // End of list of possible types for union field reference.
}
Fields
method

string

The method name of the API RPC call. For example, "/google.cloud.aiplatform.{apiVersion}.DatasetService.CreateDataset"

Union field reference.

reference can be only one of the following:

operation

string

For API calls that return a long running operation. Resource name of the long running operation. Format: 'projects/{project}/locations/{location}/operations/{operation}'

dataLabelingJob

string

For API calls that start a LabelingJob. Resource name of the LabelingJob. Format: 'projects/{project}/locations/{location}/dataLabelingJobs/{dataLabelingJob}'