Method: projects.locations.datasets.examples.list

Lists sentence pairs in the dataset.

HTTP request

GET https://translate.googleapis.com/v3/{parent=projects/*/locations/*/datasets/*}/examples

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. Name of the parent dataset. In form of projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}

Query parameters

Parameters
filter

string

Optional. An expression for filtering the examples that will be returned. Example filter: * usage=TRAIN

pageSize

integer

Optional. Requested page size. The server can return fewer results than requested.

pageToken

string

Optional. A token identifying a page of results for the server to return. Typically obtained from nextPageToken field in the response of a examples.list call.

Request body

The request body must be empty.

Response body

Response message for examples.list.

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

JSON representation
{
  "examples": [
    {
      object (Example)
    }
  ],
  "nextPageToken": string
}
Fields
examples[]

object (Example)

The sentence pairs.

nextPageToken

string

A token to retrieve next page of results. Pass this token to the pageToken field in the ListExamplesRequest to obtain the corresponding page.

Authorization scopes

Requires one of the following OAuth scopes:

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

For more information, see the Authentication Overview.

Example

A sentence pair.

JSON representation
{
  "name": string,
  "sourceText": string,
  "targetText": string,
  "usage": string
}
Fields
name

string

Output only. The resource name of the example, in form of `projects/{project-number-or-id}/locations/{locationId}/datasets/{datasetId}/examples/{example_id}'

sourceText

string

Sentence in source language.

targetText

string

Sentence in target language.

usage

string

Output only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST.