Method: projects.reserveIds

Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore.

HTTP request

POST https://datastore.googleapis.com/v1/projects/{projectId}:reserveIds

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
projectId

string

Required. The ID of the project against which to make the request.

Request body

The request body contains data with the following structure:

JSON representation
{
  "databaseId": string,
  "keys": [
    {
      object (Key)
    }
  ]
}
Fields
databaseId

string

The ID of the database against which to make the request.

'(default)' is not allowed; please use empty string '' to refer the default database.

keys[]

object (Key)

Required. A list of keys with complete key paths whose numeric IDs should not be auto-allocated.

Response body

If successful, the response body is empty.

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.