Google Cloud Datastore Admin API
The Datastore Admin API provides several admin services for Cloud Datastore.
Concepts: Project, namespace, kind, and entity as defined in the Google Cloud
Datastore API.
Operation: An Operation represents work being performed in the background.
EntityFilter: Allows specifying a subset of entities in a project. This is
specified as a combination of kinds and namespaces (either or both of which
may be all).
Export/Import Service:
The Export/Import service provides the ability to copy all or a subset of
entities to/from Google Cloud Storage.
Exported data may be imported into Cloud Datastore for any Google Cloud
Platform project. It is not restricted to the export source project. It is
possible to export from one project and then import into another.
Exported data can also be loaded into Google BigQuery for analysis.
Exports and imports are performed asynchronously. An Operation resource is
created for each export/import. The state (including any errors encountered)
of the export/import may be queried via the Operation resource.
Index Service:
The index service manages Cloud Datastore composite indexes.
Index creation and deletion are performed asynchronously.
An Operation resource is created for each such asynchronous operation.
The state of the operation (including any errors encountered)
may be queried via the Operation resource.
Operation Service:
The Operations collection provides a record of actions performed for the
specified project (including any operations in progress). Operations are not
created directly but through calls on other collections or resources.
An operation that is not yet done may be cancelled. The request to cancel
is asynchronous and the operation may continue to run for some time after the
request to cancel is made.
An operation that is done may be deleted so that it is no longer listed as
part of the Operation collection.
ListOperations returns all pending operations, but not completed
operations.
Operations are created by service DatastoreAdmin, but are accessed via
service google.longrunning.Operations.
Creates the specified index.
A newly created index's initial state is CREATING. On completion of the
returned google.longrunning.Operation, the
state will be READY. If the index already exists, the call will return an
ALREADY_EXISTS status.
During index creation, the process could result in an error, in which
case the index will move to the ERROR state. The process can be recovered
by fixing the data that caused the error, removing the index with
delete, then
re-creating the index with [create]
[google.datastore.admin.v1.DatastoreAdmin.CreateIndex].
Indexes with a single property cannot be created.
Deletes an existing index.
An index can only be deleted if it is in a READY or ERROR state. On
successful execution of the request, the index will be in a DELETINGstate. And on completion of the
returned google.longrunning.Operation, the
index will be removed.
During index deletion, the process could result in an error, in which
case the index will move to the ERROR state. The process can be recovered
by fixing the data that caused the error, followed by calling
delete again.
Exports a copy of all or a subset of entities from Google Cloud Datastore
to another storage system, such as Google Cloud Storage. Recent updates to
entities may not be reflected in the export. The export occurs in the
background and its progress can be monitored and managed via the
Operation resource that is created. The output of an export may only be
used once the associated operation is done. If an export operation is
cancelled before completion it may leave partial data behind in Google
Cloud Storage.
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.
Lists the indexes that match the specified filters. Datastore uses an
eventually consistent query to fetch the list of indexes and may
occasionally return stale results.
[[["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 2025-09-04 UTC."],[],[],null,["# Interface DatastoreAdminGrpc.AsyncService (2.31.2)\n\nVersion latestkeyboard_arrow_down\n\n- [2.31.2 (latest)](/java/docs/reference/google-cloud-datastore/latest/com.google.datastore.admin.v1.DatastoreAdminGrpc.AsyncService)\n- [2.31.1](/java/docs/reference/google-cloud-datastore/2.31.1/com.google.datastore.admin.v1.DatastoreAdminGrpc.AsyncService)\n- [2.30.0](/java/docs/reference/google-cloud-datastore/2.30.0/com.google.datastore.admin.v1.DatastoreAdminGrpc.AsyncService)\n- [2.29.1](/java/docs/reference/google-cloud-datastore/2.29.1/com.google.datastore.admin.v1.DatastoreAdminGrpc.AsyncService)\n- [2.28.2](/java/docs/reference/google-cloud-datastore/2.28.2/com.google.datastore.admin.v1.DatastoreAdminGrpc.AsyncService)\n- [2.27.1](/java/docs/reference/google-cloud-datastore/2.27.1/com.google.datastore.admin.v1.DatastoreAdminGrpc.AsyncService)\n- [2.26.4](/java/docs/reference/google-cloud-datastore/2.26.4/com.google.datastore.admin.v1.DatastoreAdminGrpc.AsyncService)\n- [2.25.2](/java/docs/reference/google-cloud-datastore/2.25.2/com.google.datastore.admin.v1.DatastoreAdminGrpc.AsyncService)\n- [2.24.3](/java/docs/reference/google-cloud-datastore/2.24.3/com.google.datastore.admin.v1.DatastoreAdminGrpc.AsyncService)\n- [2.23.0](/java/docs/reference/google-cloud-datastore/2.23.0/com.google.datastore.admin.v1.DatastoreAdminGrpc.AsyncService)\n- [2.22.0](/java/docs/reference/google-cloud-datastore/2.22.0/com.google.datastore.admin.v1.DatastoreAdminGrpc.AsyncService)\n- [2.21.3](/java/docs/reference/google-cloud-datastore/2.21.3/com.google.datastore.admin.v1.DatastoreAdminGrpc.AsyncService)\n- [2.20.2](/java/docs/reference/google-cloud-datastore/2.20.2/com.google.datastore.admin.v1.DatastoreAdminGrpc.AsyncService)\n- [2.19.2](/java/docs/reference/google-cloud-datastore/2.19.2/com.google.datastore.admin.v1.DatastoreAdminGrpc.AsyncService)\n- [2.18.5](/java/docs/reference/google-cloud-datastore/2.18.5/com.google.datastore.admin.v1.DatastoreAdminGrpc.AsyncService)\n- [2.17.6](/java/docs/reference/google-cloud-datastore/2.17.6/com.google.datastore.admin.v1.DatastoreAdminGrpc.AsyncService) \n\n public static interface DatastoreAdminGrpc.AsyncService\n\nGoogle Cloud Datastore Admin API\nThe Datastore Admin API provides several admin services for Cloud Datastore.\nConcepts: Project, namespace, kind, and entity as defined in the Google Cloud\nDatastore API.\nOperation: An Operation represents work being performed in the background.\nEntityFilter: Allows specifying a subset of entities in a project. This is\nspecified as a combination of kinds and namespaces (either or both of which\nmay be all).\nExport/Import Service:\n\n- The Export/Import service provides the ability to copy all or a subset of entities to/from Google Cloud Storage.\n- Exported data may be imported into Cloud Datastore for any Google Cloud Platform project. It is not restricted to the export source project. It is possible to export from one project and then import into another.\n- Exported data can also be loaded into Google BigQuery for analysis.\n- Exports and imports are performed asynchronously. An Operation resource is created for each export/import. The state (including any errors encountered) of the export/import may be queried via the Operation resource. Index Service:\n- The index service manages Cloud Datastore composite indexes.\n- Index creation and deletion are performed asynchronously. An Operation resource is created for each such asynchronous operation. The state of the operation (including any errors encountered) may be queried via the Operation resource. Operation Service:\n- The Operations collection provides a record of actions performed for the specified project (including any operations in progress). Operations are not created directly but through calls on other collections or resources.\n- An operation that is not yet done may be cancelled. The request to cancel is asynchronous and the operation may continue to run for some time after the request to cancel is made.\n- An operation that is done may be deleted so that it is no longer listed as part of the Operation collection.\n- ListOperations returns all pending operations, but not completed operations.\n- Operations are created by service DatastoreAdmin, but are accessed via service google.longrunning.Operations.\n\nMethods\n-------\n\n### createIndex(CreateIndexRequest request, StreamObserver\\\u003cOperation\\\u003e responseObserver)\n\n public default void createIndex(CreateIndexRequest request, StreamObserver\u003cOperation\u003e responseObserver)\n\nCreates the specified index.\nA newly created index's initial state is `CREATING`. On completion of the\nreturned google.longrunning.Operation, the\nstate will be `READY`. If the index already exists, the call will return an\n`ALREADY_EXISTS` status.\nDuring index creation, the process could result in an error, in which\ncase the index will move to the `ERROR` state. The process can be recovered\nby fixing the data that caused the error, removing the index with\ndelete, then\nre-creating the index with \\[create\\]\n\\[google.datastore.admin.v1.DatastoreAdmin.CreateIndex\\].\nIndexes with a single property cannot be created.\n\n### deleteIndex(DeleteIndexRequest request, StreamObserver\\\u003cOperation\\\u003e responseObserver)\n\n public default void deleteIndex(DeleteIndexRequest request, StreamObserver\u003cOperation\u003e responseObserver)\n\nDeletes an existing index.\nAn index can only be deleted if it is in a `READY` or `ERROR` state. On\nsuccessful execution of the request, the index will be in a `DELETING`\nstate. And on completion of the\nreturned google.longrunning.Operation, the\nindex will be removed.\nDuring index deletion, the process could result in an error, in which\ncase the index will move to the `ERROR` state. The process can be recovered\nby fixing the data that caused the error, followed by calling\ndelete again.\n\n### exportEntities(ExportEntitiesRequest request, StreamObserver\\\u003cOperation\\\u003e responseObserver)\n\n public default void exportEntities(ExportEntitiesRequest request, StreamObserver\u003cOperation\u003e responseObserver)\n\nExports a copy of all or a subset of entities from Google Cloud Datastore\nto another storage system, such as Google Cloud Storage. Recent updates to\nentities may not be reflected in the export. The export occurs in the\nbackground and its progress can be monitored and managed via the\nOperation resource that is created. The output of an export may only be\nused once the associated operation is done. If an export operation is\ncancelled before completion it may leave partial data behind in Google\nCloud Storage.\n\n### getIndex(GetIndexRequest request, StreamObserver\\\u003cIndex\\\u003e responseObserver)\n\n public default void getIndex(GetIndexRequest request, StreamObserver\u003cIndex\u003e responseObserver)\n\nGets an index.\n\n### importEntities(ImportEntitiesRequest request, StreamObserver\\\u003cOperation\\\u003e responseObserver)\n\n public default void importEntities(ImportEntitiesRequest request, StreamObserver\u003cOperation\u003e responseObserver)\n\nImports entities into Google Cloud Datastore. Existing entities with the\nsame key are overwritten. The import occurs in the background and its\nprogress can be monitored and managed via the Operation resource that is\ncreated. If an ImportEntities operation is cancelled, it is possible\nthat a subset of the data has already been imported to Cloud Datastore.\n\n### listIndexes(ListIndexesRequest request, StreamObserver\\\u003cListIndexesResponse\\\u003e responseObserver)\n\n public default void listIndexes(ListIndexesRequest request, StreamObserver\u003cListIndexesResponse\u003e responseObserver)\n\nLists the indexes that match the specified filters. Datastore uses an\neventually consistent query to fetch the list of indexes and may\noccasionally return stale results."]]