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:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-30 UTC."],[[["\u003cp\u003eImports a new version of data for a specified dataset using either a local file or a Google Cloud Storage source.\u003c/p\u003e\n"],["\u003cp\u003eThe request body requires specifying the data source (local file or GCS) and an optional description for the new version.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful import results in a response containing the resource name of the newly created dataset version.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires the \u003ccode\u003ecloud-platform\u003c/code\u003e OAuth scope and the \u003ccode\u003emapsplatformdatasets.datasets.import\u003c/code\u003e IAM permission.\u003c/p\u003e\n"]]],[],null,["# Method: media.upload\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ImportDatasetResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [IAM Permissions](#body.aspect_1)\n\nImports a new version of the data for the dataset.\n\n### HTTP request\n\n- Upload URI, for media upload requests: \n `POST https://mapsplatformdatasets.googleapis.com/upload/v1/{name=projects/*/datasets/*}:import`\n- Metadata URI, for metadata-only requests: \n `POST https://mapsplatformdatasets.googleapis.com/v1/{name=projects/*/datasets/*}:import`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|-----------------------------------------------------------------------------------|\n| `name` | `string` Required. Resource name. Format: projects/{project}/datasets/{datasetId} |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"versionDescription\": string, // Union field `data_source` can be only one of the following: \"localFileSource\": { object (/maps/documentation/datasets/reference/rest/v1/projects.datasets#LocalFileSource) }, \"gcsSource\": { object (/maps/documentation/datasets/reference/rest/v1/projects.datasets#GcsSource) } // End of list of possible types for union field `data_source`. } ``` |\n\n| Fields ||\n|----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `versionDescription` | `string` A description of the new data being imported. |\n| Union field `data_source`. Details about the source of the data for the dataset. `data_source` can be only one of the following: ||\n| `localFileSource` | `object (`[LocalFileSource](/maps/documentation/datasets/reference/rest/v1/projects.datasets#LocalFileSource)`)` A local file source for the dataset for a one time import. |\n| `gcsSource` | `object (`[GcsSource](/maps/documentation/datasets/reference/rest/v1/projects.datasets#GcsSource)`)` A Google Cloud Storage file source for the dataset for a one time import. |\n\n### Response body\n\nResponse object of media.upload.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------|\n| ``` { \"name\": string } ``` |\n\n| Fields ||\n|--------|------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Required. Resource name of the newly created dataset version. Format: projects/{project}/datasets/{datasetId}@{versionId} |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\n### IAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:\n\n- `mapsplatformdatasets.datasets.import`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]