Method: media.upload

Imports a new version of the data for the dataset.

HTTP request

  • Upload URI, for media upload requests:
    POST https://mapsplatformdatasets.googleapis.com/upload/v1/{name=projects/*/datasets/*}:import
  • Metadata URI, for metadata-only requests:
    POST https://mapsplatformdatasets.googleapis.com/v1/{name=projects/*/datasets/*}:import

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. Resource name. Format: projects/{project}/datasets/{datasetId}

Request body

The request body contains data with the following structure:

JSON representation
{
  "versionDescription": string,

  // Union field data_source can be only one of the following:
  "localFileSource": {
    object (LocalFileSource)
  },
  "gcsSource": {
    object (GcsSource)
  }
  // End of list of possible types for union field data_source.
}
Fields
versionDescription

string

A description of the new data being imported.

Union field data_source. Details about the source of the data for the dataset. data_source can be only one of the following:
localFileSource

object (LocalFileSource)

A local file source for the dataset for a one time import.

gcsSource

object (GcsSource)

A Google Cloud Storage file source for the dataset for a one time import.

Response body

Response object of media.upload.

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

JSON representation
{
  "name": string
}
Fields
name

string

Required. Resource name of the newly created dataset version. Format: projects/{project}/datasets/{datasetId}@{versionId}

Authorization scopes

Requires the following OAuth scope:

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

IAM Permissions

Requires the following IAM permission on the name resource:

  • mapsplatformdatasets.datasets.import

For more information, see the IAM documentation.