Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



Datasets: commit

Requires authorization

Commit a transaction, optionally creating, deleting or modifying some entities. Try it now .

Request

HTTP request

POST https://www.googleapis.com/datastore/v1beta2/datasets/datasetId/commit

Parameters

Parameter name Value Description
Path parameters
datasetId string Identifies the dataset.

Authorization

This request requires authorization with at least one of the following scopes ( read more about authentication and authorization ).

Scope
https://www.googleapis.com/auth/datastore
https://www.googleapis.com/auth/userinfo.email

Request body

In the request body, supply data with the following structure:

{
  "transaction": bytes,
  "mutation": {
    "upsert": [
      {
        "key": {
          "partitionId": {
            "datasetId": string,
            "namespace": string
          },
          "path": [
            {
              "kind": string,
              "id": long,
              "name": string
            }
          ]
        },
        "properties": {
          (key): {
            "booleanValue": boolean,
            "integerValue": long,
            "doubleValue": double,
            "dateTimeValue": datetime,
            "keyValue": {
              "partitionId": {
                "datasetId": string,
                "namespace": string
              },
              "path": [
                {
                  "kind": string,
                  "id": long,
                  "name": string
                }
              ]
            },
            "blobKeyValue": string,
            "stringValue": string,
            "blobValue": bytes,
            "entityValue": (Entity),
            "listValue": [
              {
                "booleanValue": boolean,
                "integerValue": long,
                "doubleValue": double,
                "dateTimeValue": datetime,
                "keyValue": {
                  "partitionId": {
                    "datasetId": string,
                    "namespace": string
                  },
                  "path": [
                    {
                      "kind": string,
                      "id": long,
                      "name": string
                    }
                  ]
                },
                "blobKeyValue": string,
                "stringValue": string,
                "blobValue": bytes,
                "entityValue": (Entity),
                "listValue": [
                  (Value)
                ],
                "meaning": integer,
                "indexed": boolean
              }
            ],
            "meaning": integer,
            "indexed": boolean
          }
        }
      }
    ],
    "update": [
      {
        "key": {
          "partitionId": {
            "datasetId": string,
            "namespace": string
          },
          "path": [
            {
              "kind": string,
              "id": long,
              "name": string
            }
          ]
        },
        "properties": {
          (key): {
            "booleanValue": boolean,
            "integerValue": long,
            "doubleValue": double,
            "dateTimeValue": datetime,
            "keyValue": {
              "partitionId": {
                "datasetId": string,
                "namespace": string
              },
              "path": [
                {
                  "kind": string,
                  "id": long,
                  "name": string
                }
              ]
            },
            "blobKeyValue": string,
            "stringValue": string,
            "blobValue": bytes,
            "entityValue": (Entity),
            "listValue": [
              {
                "booleanValue": boolean,
                "integerValue": long,
                "doubleValue": double,
                "dateTimeValue": datetime,
                "keyValue": {
                  "partitionId": {
                    "datasetId": string,
                    "namespace": string
                  },
                  "path": [
                    {
                      "kind": string,
                      "id": long,
                      "name": string
                    }
                  ]
                },
                "blobKeyValue": string,
                "stringValue": string,
                "blobValue": bytes,
                "entityValue": (Entity),
                "listValue": [
                  (Value)
                ],
                "meaning": integer,
                "indexed": boolean
              }
            ],
            "meaning": integer,
            "indexed": boolean
          }
        }
      }
    ],
    "insert": [
      {
        "key": {
          "partitionId": {
            "datasetId": string,
            "namespace": string
          },
          "path": [
            {
              "kind": string,
              "id": long,
              "name": string
            }
          ]
        },
        "properties": {
          (key): {
            "booleanValue": boolean,
            "integerValue": long,
            "doubleValue": double,
            "dateTimeValue": datetime,
            "keyValue": {
              "partitionId": {
                "datasetId": string,
                "namespace": string
              },
              "path": [
                {
                  "kind": string,
                  "id": long,
                  "name": string
                }
              ]
            },
            "blobKeyValue": string,
            "stringValue": string,
            "blobValue": bytes,
            "entityValue": (Entity),
            "listValue": [
              {
                "booleanValue": boolean,
                "integerValue": long,
                "doubleValue": double,
                "dateTimeValue": datetime,
                "keyValue": {
                  "partitionId": {
                    "datasetId": string,
                    "namespace": string
                  },
                  "path": [
                    {
                      "kind": string,
                      "id": long,
                      "name": string
                    }
                  ]
                },
                "blobKeyValue": string,
                "stringValue": string,
                "blobValue": bytes,
                "entityValue": (Entity),
                "listValue": [
                  (Value)
                ],
                "meaning": integer,
                "indexed": boolean
              }
            ],
            "meaning": integer,
            "indexed": boolean
          }
        }
      }
    ],
    "insertAutoId": [
      {
        "key": {
          "partitionId": {
            "datasetId": string,
            "namespace": string
          },
          "path": [
            {
              "kind": string,
              "id": long,
              "name": string
            }
          ]
        },
        "properties": {
          (key): {
            "booleanValue": boolean,
            "integerValue": long,
            "doubleValue": double,
            "dateTimeValue": datetime,
            "keyValue": {
              "partitionId": {
                "datasetId": string,
                "namespace": string
              },
              "path": [
                {
                  "kind": string,
                  "id": long,
                  "name": string
                }
              ]
            },
            "blobKeyValue": string,
            "stringValue": string,
            "blobValue": bytes,
            "entityValue": (Entity),
            "listValue": [
              {
                "booleanValue": boolean,
                "integerValue": long,
                "doubleValue": double,
                "dateTimeValue": datetime,
                "keyValue": {
                  "partitionId": {
                    "datasetId": string,
                    "namespace": string
                  },
                  "path": [
                    {
                      "kind": string,
                      "id": long,
                      "name": string
                    }
                  ]
                },
                "blobKeyValue": string,
                "stringValue": string,
                "blobValue": bytes,
                "entityValue": (Entity),
                "listValue": [
                  (Value)
                ],
                "meaning": integer,
                "indexed": boolean
              }
            ],
            "meaning": integer,
            "indexed": boolean
          }
        }
      }
    ],
    "delete": [
      {
        "partitionId": {
          "datasetId": string,
          "namespace": string
        },
        "path": [
          {
            "kind": string,
            "id": long,
            "name": string
          }
        ]
      }
    ],
    "force": boolean
  },
  "mode": string
}
Property name Value Description Notes
transaction bytes The transaction identifier, returned by a call to beginTransaction . Must be set when mode is TRANSACTIONAL.
mutation nested object The mutation to perform. Optional.
mutation. upsert[] list Entities to upsert. Each upserted entity's key must have a complete path and must not be reserved/read-only.
mutation.upsert[]. key nested object The entity's key.

An entity must have a key, unless otherwise documented (for example, an entity in Value.entityValue may have no key). An entity's kind is its key's path's last element's kind, or null if it has no key.

mutation.upsert[].key. partitionId nested object Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
mutation.upsert[].key.partitionId. datasetId string The dataset ID.
mutation.upsert[].key.partitionId. namespace string The namespace.
mutation.upsert[].key. path[] list The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity , the second element identifies a child of the root entity, the third element a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors . An entity path is always fully complete: ALL of the entity's ancestors are required to be in the path along with the entity identifier itself. The only exception is that in some documented cases, the identifier in the last path element (for the entity) itself may be omitted. A path can never be empty.
mutation.upsert[].key.path[]. kind string The kind of the entity. A kind matching regex "__.*__" is reserved/read-only. A kind must not contain more than 500 characters. Cannot be "".
mutation.upsert[].key.path[]. id long The ID of the entity. Never equal to zero. Values less than zero are discouraged and will not be supported in the future.
mutation.upsert[].key.path[]. name string The name of the entity. A name matching regex "__.*__" is reserved/read-only. A name must not be more than 500 characters. Cannot be "".
mutation.upsert[]. properties object The entity's properties.
mutation.upsert[].properties. (key) nested object The name of the property. A property name matching regex "__.*__" is reserved. A reserved property name is forbidden in certain documented contexts. The name must not contain more than 500 characters. Cannot be "".
mutation.upsert[].properties.(key). booleanValue boolean A boolean value.
mutation.upsert[].properties.(key). integerValue long An integer value.
mutation.upsert[].properties.(key). doubleValue double A double value.
mutation.upsert[].properties.(key). dateTimeValue datetime A timestamp value.
mutation.upsert[].properties.(key). keyValue nested object A key value.
mutation.upsert[].properties.(key).keyValue. partitionId nested object Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
mutation.upsert[].properties.(key).keyValue.partitionId. datasetId string The dataset ID.
mutation.upsert[].properties.(key).keyValue.partitionId. namespace string The namespace.
mutation.upsert[].properties.(key).keyValue. path[] list The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity , the second element identifies a child of the root entity, the third element a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors . An entity path is always fully complete: ALL of the entity's ancestors are required to be in the path along with the entity identifier itself. The only exception is that in some documented cases, the identifier in the last path element (for the entity) itself may be omitted. A path can never be empty.
mutation.upsert[].properties.(key).keyValue.path[]. kind string The kind of the entity. A kind matching regex "__.*__" is reserved/read-only. A kind must not contain more than 500 characters. Cannot be "".
mutation.upsert[].properties.(key).keyValue.path[]. id long The ID of the entity. Never equal to zero. Values less than zero are discouraged and will not be supported in the future.
mutation.upsert[].properties.(key).keyValue.path[]. name string The name of the entity. A name matching regex "__.*__" is reserved/read-only. A name must not be more than 500 characters. Cannot be "".
mutation.upsert[].properties.(key). blobKeyValue string A blob key value.
mutation.upsert[].properties.(key). stringValue string A UTF-8 encoded string value.
mutation.upsert[].properties.(key). blobValue bytes A blob value.
mutation.upsert[].properties.(key). entityValue nested object An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key.
mutation.upsert[].properties.(key). listValue[] list A list value. Cannot contain another list value. Cannot also have a meaning and indexing set.
mutation.upsert[].properties.(key).listValue[]. booleanValue boolean A boolean value.
mutation.upsert[].properties.(key).listValue[]. integerValue long An integer value.
mutation.upsert[].properties.(key).listValue[]. doubleValue double A double value.
mutation.upsert[].properties.(key).listValue[]. dateTimeValue datetime A timestamp value.
mutation.upsert[].properties.(key).listValue[]. keyValue nested object A key value.
mutation.upsert[].properties.(key).listValue[].keyValue. partitionId nested object Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
mutation.upsert[].properties.(key).listValue[].keyValue.partitionId. datasetId string The dataset ID.
mutation.upsert[].properties.(key).listValue[].keyValue.partitionId. namespace string The namespace.
mutation.upsert[].properties.(key).listValue[].keyValue. path[] list The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity , the second element identifies a child of the root entity, the third element a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors . An entity path is always fully complete: ALL of the entity's ancestors are required to be in the path along with the entity identifier itself. The only exception is that in some documented cases, the identifier in the last path element (for the entity) itself may be omitted. A path can never be empty.
mutation.upsert[].properties.(key).listValue[].keyValue.path[]. kind string The kind of the entity. A kind matching regex "__.*__" is reserved/read-only. A kind must not contain more than 500 characters. Cannot be "".
mutation.upsert[].properties.(key).listValue[].keyValue.path[]. id long The ID of the entity. Never equal to zero. Values less than zero are discouraged and will not be supported in the future.
mutation.upsert[].properties.(key).listValue[].keyValue.path[]. name string The name of the entity. A name matching regex "__.*__" is reserved/read-only. A name must not be more than 500 characters. Cannot be "".
mutation.upsert[].properties.(key).listValue[]. blobKeyValue string A blob key value.
mutation.upsert[].properties.(key).listValue[]. stringValue string A UTF-8 encoded string value.
mutation.upsert[].properties.(key).listValue[]. blobValue bytes A blob value.
mutation.upsert[].properties.(key).listValue[]. entityValue nested object An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key.
mutation.upsert[].properties.(key).listValue[]. listValue[] list A list value. Cannot contain another list value. Cannot also have a meaning and indexing set.
mutation.upsert[].properties.(key).listValue[]. meaning integer The meaning field is reserved and should not be used.
mutation.upsert[].properties.(key).listValue[]. indexed boolean If the value should be indexed.

The indexed property may be set for a null value. When indexed is true , stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true ; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true .) If a value is itself an entity, it cannot have indexed set to true .

mutation.upsert[].properties.(key). meaning integer The meaning field is reserved and should not be used.
mutation.upsert[].properties.(key). indexed boolean If the value should be indexed.

The indexed property may be set for a null value. When indexed is true , stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true ; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true .) If a value is itself an entity, it cannot have indexed set to true .

mutation. update[] list Entities to update. Each updated entity's key must have a complete path and must not be reserved/read-only.
mutation.update[]. key nested object The entity's key.

An entity must have a key, unless otherwise documented (for example, an entity in Value.entityValue may have no key). An entity's kind is its key's path's last element's kind, or null if it has no key.

mutation.update[].key. partitionId nested object Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
mutation.update[].key.partitionId. datasetId string The dataset ID.
mutation.update[].key.partitionId. namespace string The namespace.
mutation.update[].key. path[] list The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity , the second element identifies a child of the root entity, the third element a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors . An entity path is always fully complete: ALL of the entity's ancestors are required to be in the path along with the entity identifier itself. The only exception is that in some documented cases, the identifier in the last path element (for the entity) itself may be omitted. A path can never be empty.
mutation.update[].key.path[]. kind string The kind of the entity. A kind matching regex "__.*__" is reserved/read-only. A kind must not contain more than 500 characters. Cannot be "".
mutation.update[].key.path[]. id long The ID of the entity. Never equal to zero. Values less than zero are discouraged and will not be supported in the future.
mutation.update[].key.path[]. name string The name of the entity. A name matching regex "__.*__" is reserved/read-only. A name must not be more than 500 characters. Cannot be "".
mutation.update[]. properties object The entity's properties.
mutation.update[].properties. (key) nested object The name of the property. A property name matching regex "__.*__" is reserved. A reserved property name is forbidden in certain documented contexts. The name must not contain more than 500 characters. Cannot be "".
mutation.update[].properties.(key). booleanValue boolean A boolean value.
mutation.update[].properties.(key). integerValue long An integer value.
mutation.update[].properties.(key). doubleValue double A double value.
mutation.update[].properties.(key). dateTimeValue datetime A timestamp value.
mutation.update[].properties.(key). keyValue nested object A key value.
mutation.update[].properties.(key).keyValue. partitionId nested object Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
mutation.update[].properties.(key).keyValue.partitionId. datasetId string The dataset ID.
mutation.update[].properties.(key).keyValue.partitionId. namespace string The namespace.
mutation.update[].properties.(key).keyValue. path[] list The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity , the second element identifies a child of the root entity, the third element a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors . An entity path is always fully complete: ALL of the entity's ancestors are required to be in the path along with the entity identifier itself. The only exception is that in some documented cases, the identifier in the last path element (for the entity) itself may be omitted. A path can never be empty.
mutation.update[].properties.(key).keyValue.path[]. kind string The kind of the entity. A kind matching regex "__.*__" is reserved/read-only. A kind must not contain more than 500 characters. Cannot be "".
mutation.update[].properties.(key).keyValue.path[]. id long The ID of the entity. Never equal to zero. Values less than zero are discouraged and will not be supported in the future.
mutation.update[].properties.(key).keyValue.path[]. name string The name of the entity. A name matching regex "__.*__" is reserved/read-only. A name must not be more than 500 characters. Cannot be "".
mutation.update[].properties.(key). blobKeyValue string A blob key value.
mutation.update[].properties.(key). stringValue string A UTF-8 encoded string value.
mutation.update[].properties.(key). blobValue bytes A blob value.
mutation.update[].properties.(key). entityValue nested object An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key.
mutation.update[].properties.(key). listValue[] list A list value. Cannot contain another list value. Cannot also have a meaning and indexing set.
mutation.update[].properties.(key).listValue[]. booleanValue boolean A boolean value.
mutation.update[].properties.(key).listValue[]. integerValue long An integer value.
mutation.update[].properties.(key).listValue[]. doubleValue double A double value.
mutation.update[].properties.(key).listValue[]. dateTimeValue datetime A timestamp value.
mutation.update[].properties.(key).listValue[]. keyValue nested object A key value.
mutation.update[].properties.(key).listValue[].keyValue. partitionId nested object Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
mutation.update[].properties.(key).listValue[].keyValue.partitionId. datasetId string The dataset ID.
mutation.update[].properties.(key).listValue[].keyValue.partitionId. namespace string The namespace.
mutation.update[].properties.(key).listValue[].keyValue. path[] list The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity , the second element identifies a child of the root entity, the third element a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors . An entity path is always fully complete: ALL of the entity's ancestors are required to be in the path along with the entity identifier itself. The only exception is that in some documented cases, the identifier in the last path element (for the entity) itself may be omitted. A path can never be empty.
mutation.update[].properties.(key).listValue[].keyValue.path[]. kind string The kind of the entity. A kind matching regex "__.*__" is reserved/read-only. A kind must not contain more than 500 characters. Cannot be "".
mutation.update[].properties.(key).listValue[].keyValue.path[]. id long The ID of the entity. Never equal to zero. Values less than zero are discouraged and will not be supported in the future.
mutation.update[].properties.(key).listValue[].keyValue.path[]. name string The name of the entity. A name matching regex "__.*__" is reserved/read-only. A name must not be more than 500 characters. Cannot be "".
mutation.update[].properties.(key).listValue[]. blobKeyValue string A blob key value.
mutation.update[].properties.(key).listValue[]. stringValue string A UTF-8 encoded string value.
mutation.update[].properties.(key).listValue[]. blobValue bytes A blob value.
mutation.update[].properties.(key).listValue[]. entityValue nested object An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key.
mutation.update[].properties.(key).listValue[]. listValue[] list A list value. Cannot contain another list value. Cannot also have a meaning and indexing set.
mutation.update[].properties.(key).listValue[]. meaning integer The meaning field is reserved and should not be used.
mutation.update[].properties.(key).listValue[]. indexed boolean If the value should be indexed.

The indexed property may be set for a null value. When indexed is true , stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true ; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true .) If a value is itself an entity, it cannot have indexed set to true .

mutation.update[].properties.(key). meaning integer The meaning field is reserved and should not be used.
mutation.update[].properties.(key). indexed boolean If the value should be indexed.

The indexed property may be set for a null value. When indexed is true , stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true ; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true .) If a value is itself an entity, it cannot have indexed set to true .

mutation. insert[] list Entities to insert. Each inserted entity's key must have a complete path and must not be reserved/read-only.
mutation.insert[]. key nested object The entity's key.

An entity must have a key, unless otherwise documented (for example, an entity in Value.entityValue may have no key). An entity's kind is its key's path's last element's kind, or null if it has no key.

mutation.insert[].key. partitionId nested object Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
mutation.insert[].key.partitionId. datasetId string The dataset ID.
mutation.insert[].key.partitionId. namespace string The namespace.
mutation.insert[].key. path[] list The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity , the second element identifies a child of the root entity, the third element a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors . An entity path is always fully complete: ALL of the entity's ancestors are required to be in the path along with the entity identifier itself. The only exception is that in some documented cases, the identifier in the last path element (for the entity) itself may be omitted. A path can never be empty.
mutation.insert[].key.path[]. kind string The kind of the entity. A kind matching regex "__.*__" is reserved/read-only. A kind must not contain more than 500 characters. Cannot be "".
mutation.insert[].key.path[]. id long The ID of the entity. Never equal to zero. Values less than zero are discouraged and will not be supported in the future.
mutation.insert[].key.path[]. name string The name of the entity. A name matching regex "__.*__" is reserved/read-only. A name must not be more than 500 characters. Cannot be "".
mutation.insert[]. properties object The entity's properties.
mutation.insert[].properties. (key) nested object The name of the property. A property name matching regex "__.*__" is reserved. A reserved property name is forbidden in certain documented contexts. The name must not contain more than 500 characters. Cannot be "".
mutation.insert[].properties.(key). booleanValue boolean A boolean value.
mutation.insert[].properties.(key). integerValue long An integer value.
mutation.insert[].properties.(key). doubleValue double A double value.
mutation.insert[].properties.(key). dateTimeValue datetime A timestamp value.
mutation.insert[].properties.(key). keyValue nested object A key value.
mutation.insert[].properties.(key).keyValue. partitionId nested object Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
mutation.insert[].properties.(key).keyValue.partitionId. datasetId string The dataset ID.
mutation.insert[].properties.(key).keyValue.partitionId. namespace string The namespace.
mutation.insert[].properties.(key).keyValue. path[] list The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity , the second element identifies a child of the root entity, the third element a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors . An entity path is always fully complete: ALL of the entity's ancestors are required to be in the path along with the entity identifier itself. The only exception is that in some documented cases, the identifier in the last path element (for the entity) itself may be omitted. A path can never be empty.
mutation.insert[].properties.(key).keyValue.path[]. kind string The kind of the entity. A kind matching regex "__.*__" is reserved/read-only. A kind must not contain more than 500 characters. Cannot be "".
mutation.insert[].properties.(key).keyValue.path[]. id long The ID of the entity. Never equal to zero. Values less than zero are discouraged and will not be supported in the future.
mutation.insert[].properties.(key).keyValue.path[]. name string The name of the entity. A name matching regex "__.*__" is reserved/read-only. A name must not be more than 500 characters. Cannot be "".
mutation.insert[].properties.(key). blobKeyValue string A blob key value.
mutation.insert[].properties.(key). stringValue string A UTF-8 encoded string value.
mutation.insert[].properties.(key). blobValue bytes A blob value.
mutation.insert[].properties.(key). entityValue nested object An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key.
mutation.insert[].properties.(key). listValue[] list A list value. Cannot contain another list value. Cannot also have a meaning and indexing set.
mutation.insert[].properties.(key).listValue[]. booleanValue boolean A boolean value.
mutation.insert[].properties.(key).listValue[]. integerValue long An integer value.
mutation.insert[].properties.(key).listValue[]. doubleValue double A double value.
mutation.insert[].properties.(key).listValue[]. dateTimeValue datetime A timestamp value.
mutation.insert[].properties.(key).listValue[]. keyValue nested object A key value.
mutation.insert[].properties.(key).listValue[].keyValue. partitionId nested object Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
mutation.insert[].properties.(key).listValue[].keyValue.partitionId. datasetId string The dataset ID.
mutation.insert[].properties.(key).listValue[].keyValue.partitionId. namespace string The namespace.
mutation.insert[].properties.(key).listValue[].keyValue. path[] list The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity , the second element identifies a child of the root entity, the third element a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors . An entity path is always fully complete: ALL of the entity's ancestors are required to be in the path along with the entity identifier itself. The only exception is that in some documented cases, the identifier in the last path element (for the entity) itself may be omitted. A path can never be empty.
mutation.insert[].properties.(key).listValue[].keyValue.path[]. kind string The kind of the entity. A kind matching regex "__.*__" is reserved/read-only. A kind must not contain more than 500 characters. Cannot be "".
mutation.insert[].properties.(key).listValue[].keyValue.path[]. id long The ID of the entity. Never equal to zero. Values less than zero are discouraged and will not be supported in the future.
mutation.insert[].properties.(key).listValue[].keyValue.path[]. name string The name of the entity. A name matching regex "__.*__" is reserved/read-only. A name must not be more than 500 characters. Cannot be "".
mutation.insert[].properties.(key).listValue[]. blobKeyValue string A blob key value.
mutation.insert[].properties.(key).listValue[]. stringValue string A UTF-8 encoded string value.
mutation.insert[].properties.(key).listValue[]. blobValue bytes A blob value.
mutation.insert[].properties.(key).listValue[]. entityValue nested object An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key.
mutation.insert[].properties.(key).listValue[]. listValue[] list A list value. Cannot contain another list value. Cannot also have a meaning and indexing set.
mutation.insert[].properties.(key).listValue[]. meaning integer The meaning field is reserved and should not be used.
mutation.insert[].properties.(key).listValue[]. indexed boolean If the value should be indexed.

The indexed property may be set for a null value. When indexed is true , stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true ; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true .) If a value is itself an entity, it cannot have indexed set to true .

mutation.insert[].properties.(key). meaning integer The meaning field is reserved and should not be used.
mutation.insert[].properties.(key). indexed boolean If the value should be indexed.

The indexed property may be set for a null value. When indexed is true , stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true ; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true .) If a value is itself an entity, it cannot have indexed set to true .

mutation. insertAutoId[] list Insert entities with a newly allocated ID. Each inserted entity's key must omit the final identifier in its path and must not be reserved/read-only.
mutation.insertAutoId[]. key nested object The entity's key.

An entity must have a key, unless otherwise documented (for example, an entity in Value.entityValue may have no key). An entity's kind is its key's path's last element's kind, or null if it has no key.

mutation.insertAutoId[].key. partitionId nested object Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
mutation.insertAutoId[].key.partitionId. datasetId string The dataset ID.
mutation.insertAutoId[].key.partitionId. namespace string The namespace.
mutation.insertAutoId[].key. path[] list The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity , the second element identifies a child of the root entity, the third element a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors . An entity path is always fully complete: ALL of the entity's ancestors are required to be in the path along with the entity identifier itself. The only exception is that in some documented cases, the identifier in the last path element (for the entity) itself may be omitted. A path can never be empty.
mutation.insertAutoId[].key.path[]. kind string The kind of the entity. A kind matching regex "__.*__" is reserved/read-only. A kind must not contain more than 500 characters. Cannot be "".
mutation.insertAutoId[].key.path[]. id long The ID of the entity. Never equal to zero. Values less than zero are discouraged and will not be supported in the future.
mutation.insertAutoId[].key.path[]. name string The name of the entity. A name matching regex "__.*__" is reserved/read-only. A name must not be more than 500 characters. Cannot be "".
mutation.insertAutoId[]. properties object The entity's properties.
mutation.insertAutoId[].properties. (key) nested object The name of the property. A property name matching regex "__.*__" is reserved. A reserved property name is forbidden in certain documented contexts. The name must not contain more than 500 characters. Cannot be "".
mutation.insertAutoId[].properties.(key). booleanValue boolean A boolean value.
mutation.insertAutoId[].properties.(key). integerValue long An integer value.
mutation.insertAutoId[].properties.(key). doubleValue double A double value.
mutation.insertAutoId[].properties.(key). dateTimeValue datetime A timestamp value.
mutation.insertAutoId[].properties.(key). keyValue nested object A key value.
mutation.insertAutoId[].properties.(key).keyValue. partitionId nested object Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
mutation.insertAutoId[].properties.(key).keyValue.partitionId. datasetId string The dataset ID.
mutation.insertAutoId[].properties.(key).keyValue.partitionId. namespace string The namespace.
mutation.insertAutoId[].properties.(key).keyValue. path[] list The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity , the second element identifies a child of the root entity, the third element a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors . An entity path is always fully complete: ALL of the entity's ancestors are required to be in the path along with the entity identifier itself. The only exception is that in some documented cases, the identifier in the last path element (for the entity) itself may be omitted. A path can never be empty.
mutation.insertAutoId[].properties.(key).keyValue.path[]. kind string The kind of the entity. A kind matching regex "__.*__" is reserved/read-only. A kind must not contain more than 500 characters. Cannot be "".
mutation.insertAutoId[].properties.(key).keyValue.path[]. id long The ID of the entity. Never equal to zero. Values less than zero are discouraged and will not be supported in the future.
mutation.insertAutoId[].properties.(key).keyValue.path[]. name string The name of the entity. A name matching regex "__.*__" is reserved/read-only. A name must not be more than 500 characters. Cannot be "".
mutation.insertAutoId[].properties.(key). blobKeyValue string A blob key value.
mutation.insertAutoId[].properties.(key). stringValue string A UTF-8 encoded string value.
mutation.insertAutoId[].properties.(key). blobValue bytes A blob value.
mutation.insertAutoId[].properties.(key). entityValue nested object An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key.
mutation.insertAutoId[].properties.(key). listValue[] list A list value. Cannot contain another list value. Cannot also have a meaning and indexing set.
mutation.insertAutoId[].properties.(key).listValue[]. booleanValue boolean A boolean value.
mutation.insertAutoId[].properties.(key).listValue[]. integerValue long An integer value.
mutation.insertAutoId[].properties.(key).listValue[]. doubleValue double A double value.
mutation.insertAutoId[].properties.(key).listValue[]. dateTimeValue datetime A timestamp value.
mutation.insertAutoId[].properties.(key).listValue[]. keyValue nested object A key value.
mutation.insertAutoId[].properties.(key).listValue[].keyValue. partitionId nested object Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
mutation.insertAutoId[].properties.(key).listValue[].keyValue.partitionId. datasetId string The dataset ID.
mutation.insertAutoId[].properties.(key).listValue[].keyValue.partitionId. namespace string The namespace.
mutation.insertAutoId[].properties.(key).listValue[].keyValue. path[] list The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity , the second element identifies a child of the root entity, the third element a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors . An entity path is always fully complete: ALL of the entity's ancestors are required to be in the path along with the entity identifier itself. The only exception is that in some documented cases, the identifier in the last path element (for the entity) itself may be omitted. A path can never be empty.
mutation.insertAutoId[].properties.(key).listValue[].keyValue.path[]. kind string The kind of the entity. A kind matching regex "__.*__" is reserved/read-only. A kind must not contain more than 500 characters. Cannot be "".
mutation.insertAutoId[].properties.(key).listValue[].keyValue.path[]. id long The ID of the entity. Never equal to zero. Values less than zero are discouraged and will not be supported in the future.
mutation.insertAutoId[].properties.(key).listValue[].keyValue.path[]. name string The name of the entity. A name matching regex "__.*__" is reserved/read-only. A name must not be more than 500 characters. Cannot be "".
mutation.insertAutoId[].properties.(key).listValue[]. blobKeyValue string A blob key value.
mutation.insertAutoId[].properties.(key).listValue[]. stringValue string A UTF-8 encoded string value.
mutation.insertAutoId[].properties.(key).listValue[]. blobValue bytes A blob value.
mutation.insertAutoId[].properties.(key).listValue[]. entityValue nested object An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key.
mutation.insertAutoId[].properties.(key).listValue[]. listValue[] list A list value. Cannot contain another list value. Cannot also have a meaning and indexing set.
mutation.insertAutoId[].properties.(key).listValue[]. meaning integer The meaning field is reserved and should not be used.
mutation.insertAutoId[].properties.(key).listValue[]. indexed boolean If the value should be indexed.

The indexed property may be set for a null value. When indexed is true , stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true ; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true .) If a value is itself an entity, it cannot have indexed set to true .

mutation.insertAutoId[].properties.(key). meaning integer The meaning field is reserved and should not be used.
mutation.insertAutoId[].properties.(key). indexed boolean If the value should be indexed.

The indexed property may be set for a null value. When indexed is true , stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true ; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true .) If a value is itself an entity, it cannot have indexed set to true .

mutation. delete[] list Keys of entities to delete. Each key must have a complete key path and must not be reserved/read-only.
mutation.delete[]. partitionId nested object Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
mutation.delete[].partitionId. datasetId string The dataset ID.
mutation.delete[].partitionId. namespace string The namespace.
mutation.delete[]. path[] list The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity , the second element identifies a child of the root entity, the third element a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors . An entity path is always fully complete: ALL of the entity's ancestors are required to be in the path along with the entity identifier itself. The only exception is that in some documented cases, the identifier in the last path element (for the entity) itself may be omitted. A path can never be empty.
mutation.delete[].path[]. kind string The kind of the entity. A kind matching regex "__.*__" is reserved/read-only. A kind must not contain more than 500 characters. Cannot be "".
mutation.delete[].path[]. id long The ID of the entity. Never equal to zero. Values less than zero are discouraged and will not be supported in the future.
mutation.delete[].path[]. name string The name of the entity. A name matching regex "__.*__" is reserved/read-only. A name must not be more than 500 characters. Cannot be "".
mutation. force boolean Ignore a user specified read-only period. Optional.
mode string The type of commit to perform. Either TRANSACTIONAL or NON_TRANSACTIONAL.

Acceptable values are:
  • " NON_TRANSACTIONAL ":
  • " TRANSACTIONAL ":

Response

If successful, this method returns a response body with the following structure:

{
  "header": {
    "kind": "datastore#responseHeader"
  },
  "mutationResult": {
    "indexUpdates": integer,
    "insertAutoIdKeys": [
      {
        "partitionId": {
          "datasetId": string,
          "namespace": string
        },
        "path": [
          {
            "kind": string,
            "id": long,
            "name": string
          }
        ]
      }
    ]
  }
}
Property name Value Description Notes
header. kind string Identifies what kind of resource this is. Value: the fixed string "datastore#responseHeader" .
mutationResult nested object The result of performing the mutation (if any).
mutationResult. indexUpdates integer Number of index writes.
mutationResult. insertAutoIdKeys[] list Keys for insertAutoId entities. One per entity from the request, in the same order.
mutationResult.insertAutoIdKeys[]. partitionId nested object Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.
mutationResult.insertAutoIdKeys[].partitionId. datasetId string The dataset ID.
mutationResult.insertAutoIdKeys[].partitionId. namespace string The namespace.
mutationResult.insertAutoIdKeys[]. path[] list The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity , the second element identifies a child of the root entity, the third element a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors . An entity path is always fully complete: ALL of the entity's ancestors are required to be in the path along with the entity identifier itself. The only exception is that in some documented cases, the identifier in the last path element (for the entity) itself may be omitted. A path can never be empty.
mutationResult.insertAutoIdKeys[].path[]. kind string The kind of the entity. A kind matching regex "__.*__" is reserved/read-only. A kind must not contain more than 500 characters. Cannot be "".
mutationResult.insertAutoIdKeys[].path[]. id long The ID of the entity. Never equal to zero. Values less than zero are discouraged and will not be supported in the future.
mutationResult.insertAutoIdKeys[].path[]. name string The name of the entity. A name matching regex "__.*__" is reserved/read-only. A name must not be more than 500 characters. Cannot be "".

Try it!

Use the APIs Explorer below to call this method on live data and see the response. Alternatively, try the standalone Explorer .

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.