AI-generated Key Takeaways
- 
          
Imports a new version of data for a specified dataset using either a local file or a Google Cloud Storage source.
 - 
          
The request body requires specifying the data source (local file or GCS) and an optional description for the new version.
 - 
          
Successful import results in a response containing the resource name of the newly created dataset version.
 - 
          
Authorization requires the
cloud-platformOAuth scope and themapsplatformdatasets.datasets.importIAM permission. 
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 | 
                
                   
 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  | 
                
| Fields | |
|---|---|
versionDescription | 
                  
                     
 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 | 
                  
                     
 A local file source for the dataset for a one time import.  | 
                
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 | 
                    
                       
 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.