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/v1/projects/{projectId}:import
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
projectId |
Required. Project ID against which to make the request. |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{
"labels": {
string: string,
...
},
"inputUrl": string,
"entityFilter": {
object ( |
Fields | |
---|---|
labels |
Client-assigned labels. An object containing a list of |
inputUrl |
Required. The full resource URL of the external storage location. Currently, only Google Cloud Storage is supported. So inputUrl should be of the form: For more information, see |
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
.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/datastore
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.