---
title: "POST /v1/projects/{projectId}:import"
method: POST
path: "/v1/projects/{projectId}:import"
tags: ["projects"]
---

# POST /v1/projects/{projectId}:import

`POST /v1/projects/{projectId}:import`

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 ImportEntities operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Datastore.

## Path parameters

- `projectId` string, required

## Request body

- GoogleDatastoreAdminV1ImportEntitiesRequest — The request for google.datastore.admin.v1.DatastoreAdmin.ImportEntities.
  - `inputUrl` string — Required. The full resource URL of the external storage location. Currently, only Google Cloud Storage is supported. So input_url 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 ExportEntities operation. For more information about Cloud Storage namespace paths, see [Object name considerations](https://cloud.google.com/storage/docs/naming#object-considerations). For more information, see google.datastore.admin.v1.ExportEntitiesResponse.output_url.
  - `labels` object — Client-assigned labels.
  - `entityFilter` GoogleDatastoreAdminV1EntityFilter — Identifies a subset of entities in a project. This is specified as combinations of kinds and namespaces (either or both of which may be all, as described in the following examples). Example usage: Entire project: kinds=[], namespace_ids=[] Kinds Foo and Bar in all namespaces: kinds=['Foo', 'Bar'], namespace_ids=[] Kinds Foo and Bar only in the default namespace: kinds=['Foo', 'Bar'], namespace_ids=[''] Kinds Foo and Bar in both the default and Baz namespaces: kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz'] The entire Baz namespace: kinds=[], namespace_ids=['Baz']
    - `namespaceIds` string[] — An empty list represents all namespaces. This is the preferred usage for projects that don't use namespaces. An empty string element represents the default namespace. This should be used if the project has data in non-default namespaces, but doesn't want to include them. Each namespace in this list must be unique.
    - `kinds` string[] — If empty, then this represents all kinds.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/datastore.md) · [All operations](https://skmtc.dev/google/apis/datastore/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/datastore/revisions/aef4907227b2/schema)
