Method: media.upload
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-08-31 UTC.
[null,null,["Ultimo aggiornamento 2025-08-31 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)."]]