Imports entities into Google Cloud Datastore. Existing entities with the same key are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an projects.import operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Datastore.
HTTP request
POST https://datastore.googleapis.com/v1beta1/projects/{projectId}:import
An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
inputUrl
string
The full resource URL of the external storage location. Currently, only Google Cloud Storage is supported. So inputUrl should be of the form: gs://BUCKET_NAME[/NAMESPACE_PATH]/OVERALL_EXPORT_METADATA_FILE, where BUCKET_NAME is the name of the Cloud Storage bucket, NAMESPACE_PATH is an optional Cloud Storage namespace path (this is not a Cloud Datastore namespace), and OVERALL_EXPORT_METADATA_FILE is the metadata file written by the projects.export operation. For more information about Cloud Storage namespace paths, see Object name considerations.
For more information, see google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url.
entityFilter
object (EntityFilter)
Optionally specify which kinds/namespaces are to be imported. If provided, the list must be a subset of the EntityFilter used in creating the export, otherwise a FAILED_PRECONDITION error will be returned. If no filter is specified then all entities from the export are imported.
Response body
If successful, the response body contains an instance of Operation.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-09 UTC."],[[["Imports data into Google Cloud Datastore, overwriting existing entities with the same key, and runs in the background."],["Uses an HTTP POST request to `https://datastore.googleapis.com/v1beta1/projects/{projectId}:import`, with the `projectId` defined as a path parameter."],["Requires a request body in JSON format, including parameters like `labels`, `inputUrl` (specifying the Google Cloud Storage location), and `entityFilter` for selective imports."],["Upon success, returns an `Operation` resource to monitor the progress of the import."],["Requires either `https://www.googleapis.com/auth/datastore` or `https://www.googleapis.com/auth/cloud-platform` OAuth scopes for authorization."]]],[]]