blob: 0e3eea11f9bdeb617e92ad0be1e8240e8e299bdb [file] [log] [blame]
{
"kind": "discovery#restDescription",
"etag": "\"0kaFfN0xfjZjASExv-gUnrWhdto/paR1K2Q6CwwbZyLY9S3P-sOZwf4\"",
"discoveryVersion": "v1",
"id": "datastore:v1beta1",
"name": "datastore",
"version": "v1beta1",
"revision": "20130523",
"title": "Google Cloud Datastore API",
"description": "API for accessing Google Cloud Datastore.",
"ownerDomain": "google.com",
"ownerName": "Google",
"icons": {
"x16": "http://www.google.com/images/icons/product/search-16.gif",
"x32": "http://www.google.com/images/icons/product/search-32.gif"
},
"documentationLink": "https://developers.google.com/datastore/",
"protocol": "rest",
"baseUrl": "https://www.googleapis.com/datastore/v1beta1/datasets/",
"basePath": "/datastore/v1beta1/datasets/",
"rootUrl": "https://www.googleapis.com/",
"servicePath": "datastore/v1beta1/datasets/",
"batchPath": "batch",
"parameters": {
"alt": {
"type": "string",
"description": "Data format for the response.",
"default": "proto",
"enum": [
"json",
"proto"
],
"enumDescriptions": [
"Responses with Content-Type of application/json",
"Responses with Content-Type of application/x-protobuf"
],
"location": "query"
},
"fields": {
"type": "string",
"description": "Selector specifying which fields to include in a partial response.",
"location": "query"
},
"key": {
"type": "string",
"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
"location": "query"
},
"oauth_token": {
"type": "string",
"description": "OAuth 2.0 token for the current user.",
"location": "query"
},
"prettyPrint": {
"type": "boolean",
"description": "Returns response with indentations and line breaks.",
"default": "true",
"location": "query"
},
"quotaUser": {
"type": "string",
"description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.",
"location": "query"
},
"userIp": {
"type": "string",
"description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.",
"location": "query"
}
},
"auth": {
"oauth2": {
"scopes": {
"https://www.googleapis.com/auth/userinfo.email": {
"description": "View your email address"
}
}
}
},
"schemas": {
"AllocateIdsRequest": {
"id": "AllocateIdsRequest",
"type": "object",
"description": "The request for AllocateIds.",
"properties": {
"keys": {
"type": "array",
"description": "A list of keys with incomplete key paths to allocate IDs for. No key may be reserved/read-only.",
"items": {
"$ref": "Key"
}
}
}
},
"AllocateIdsResponse": {
"id": "AllocateIdsResponse",
"type": "object",
"description": "The response for AllocateIds.",
"properties": {
"keys": {
"type": "array",
"description": "The keys specified in the request (in the same order), each with its key path completed with a newly allocated ID.",
"items": {
"$ref": "Key"
}
},
"kind": {
"type": "string",
"description": "The kind, fixed to \"datastore#allocateIdsResponse\".",
"default": "datastore#allocateIdsResponse"
}
}
},
"BeginTransactionRequest": {
"id": "BeginTransactionRequest",
"type": "object",
"description": "The request for BeginTransaction.",
"properties": {
"isolationLevel": {
"type": "string",
"description": "The transaction isolation level. Either snapshot or serializable. The default isolation level is snapshot isolation, which means that another transaction may not concurrently modify the data that is modified by this transaction. Optionally, a transaction can request to be made serializable which means that another transaction cannot concurrently modify the data that is read or modified by this transaction."
}
}
},
"BeginTransactionResponse": {
"id": "BeginTransactionResponse",
"type": "object",
"description": "The response for BeginTransaction.",
"properties": {
"kind": {
"type": "string",
"description": "The kind, fixed to \"datastore#beginTransactionResponse\".",
"default": "datastore#beginTransactionResponse"
},
"transaction": {
"type": "string",
"description": "The transaction identifier (always present).",
"format": "byte"
}
}
},
"BlindWriteRequest": {
"id": "BlindWriteRequest",
"type": "object",
"description": "The request for BlindWrite.",
"properties": {
"mutation": {
"$ref": "Mutation",
"description": "The mutation to perform."
}
}
},
"BlindWriteResponse": {
"id": "BlindWriteResponse",
"type": "object",
"description": "The response for BlindWrite.",
"properties": {
"kind": {
"type": "string",
"description": "The kind, fixed to \"datastore#blindWriteResponse\".",
"default": "datastore#blindWriteResponse"
},
"mutationResult": {
"$ref": "MutationResult",
"description": "The result of performing the mutation."
}
}
},
"CommitRequest": {
"id": "CommitRequest",
"type": "object",
"description": "The request for Commit.",
"properties": {
"mutation": {
"$ref": "Mutation",
"description": "The mutation to perform as part of this transaction. Optional."
},
"transaction": {
"type": "string",
"description": "The transaction identifier, returned by a call to beginTransaction.",
"format": "byte"
}
}
},
"CommitResponse": {
"id": "CommitResponse",
"type": "object",
"description": "The response for Commit.",
"properties": {
"kind": {
"type": "string",
"description": "The kind, fixed to \"datastore#commitResponse\".",
"default": "datastore#commitResponse"
},
"mutationResult": {
"$ref": "MutationResult",
"description": "The result of performing the mutation (if any)."
}
}
},
"CompositeFilter": {
"id": "CompositeFilter",
"type": "object",
"description": "A filter that merges the multiple other filters using the given operation.",
"properties": {
"filters": {
"type": "array",
"description": "The list of filters to combine. Must contain at least one filter.",
"items": {
"$ref": "Filter"
}
},
"operator": {
"type": "string",
"description": "The operator for combining multiple filters. Only \"and\" is currently supported."
}
}
},
"Entity": {
"id": "Entity",
"type": "object",
"description": "An entity.\n\nAn entity is limited to 1 megabyte when stored. That *roughly* corresponds to a limit of 1 megabyte for the serialized form of this message.",
"properties": {
"key": {
"$ref": "Key",
"description": "The entity's key.\n\nAn 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."
},
"properties": {
"type": "object",
"description": "The entity's properties.",
"additionalProperties": {
"$ref": "Property",
"description": "The name of the property. Properties with names matching regex \"__.*__\" are reserved. A reserved property name is forbidden in certain documented contexts. The name cannot be \"\"."
}
}
}
},
"EntityResult": {
"id": "EntityResult",
"type": "object",
"description": "The result of fetching an entity from the datastore.",
"properties": {
"entity": {
"$ref": "Entity",
"description": "The resulting entity."
}
}
},
"Filter": {
"id": "Filter",
"type": "object",
"description": "A holder for any type of filter. Exactly one field should be specified.",
"properties": {
"compositeFilter": {
"$ref": "CompositeFilter",
"description": "A composite filter."
},
"propertyFilter": {
"$ref": "PropertyFilter",
"description": "A filter on a property."
}
}
},
"Key": {
"id": "Key",
"type": "object",
"description": "A unique identifier for an entity. If a key's partition id or any of its path kinds or names are reserved/read-only, the key is reserved/read-only. A reserved/read-only key is forbidden in certain documented contexts.",
"properties": {
"partitionId": {
"$ref": "PartitionId",
"description": "Entities are partitioned into subsets, identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition."
},
"path": {
"type": "array",
"description": "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.",
"items": {
"$ref": "KeyPathElement"
}
}
}
},
"KeyPathElement": {
"id": "KeyPathElement",
"type": "object",
"description": "A (kind, ID/name) pair used to construct a key path.\n\nAt most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.",
"properties": {
"id": {
"type": "string",
"description": "The ID of the entity. Always \u003e 0.",
"format": "int64"
},
"kind": {
"type": "string",
"description": "The kind of the entity. Kinds matching regex \"__.*__\" are reserved/read-only. Cannot be \"\"."
},
"name": {
"type": "string",
"description": "The name of the entity. Names matching regex \"__.*__\" are reserved/read-only. Cannot be \"\"."
}
}
},
"KindExpression": {
"id": "KindExpression",
"type": "object",
"description": "A representation of a kind.",
"properties": {
"name": {
"type": "string",
"description": "The name of the kind."
}
}
},
"LookupRequest": {
"id": "LookupRequest",
"type": "object",
"description": "The request for Lookup.",
"properties": {
"keys": {
"type": "array",
"description": "Keys of entities to look up from the datastore.",
"items": {
"$ref": "Key"
}
},
"readOptions": {
"$ref": "ReadOptions",
"description": "Options for this lookup request. Optional."
}
}
},
"LookupResponse": {
"id": "LookupResponse",
"type": "object",
"description": "The response for Lookup.",
"properties": {
"deferred": {
"type": "array",
"description": "A list of keys that were not looked up due to resource constraints.",
"items": {
"$ref": "Key"
}
},
"found": {
"type": "array",
"description": "Entities found.",
"items": {
"$ref": "EntityResult"
}
},
"kind": {
"type": "string",
"description": "The kind, fixed to \"datastore#lookupResponse\".",
"default": "datastore#lookupResponse"
},
"missing": {
"type": "array",
"description": "Entities not found, with only the key populated.",
"items": {
"$ref": "EntityResult"
}
}
}
},
"Mutation": {
"id": "Mutation",
"type": "object",
"description": "A set of changes to apply.\n\nNo entity in this message may have a reserved property name, not even a property in an entity in a value.\n\nIf entities with duplicate keys are present, an arbitrary choice will be made as to which is written.",
"properties": {
"delete": {
"type": "array",
"description": "Keys of entities to delete. Each key must have a complete key path and must not be reserved/read-only.",
"items": {
"$ref": "Key"
}
},
"force": {
"type": "boolean",
"description": "Ignore a user specified read-only period. Optional."
},
"insert": {
"type": "array",
"description": "Entities to insert. Each inserted entity's key must have a complete path and must not be reserved/read-only.",
"items": {
"$ref": "Entity"
}
},
"insertAutoId": {
"type": "array",
"description": "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.",
"items": {
"$ref": "Entity"
}
},
"update": {
"type": "array",
"description": "Entities to update. Each updated entity's key must have a complete path and must not be reserved/read-only.",
"items": {
"$ref": "Entity"
}
},
"upsert": {
"type": "array",
"description": "Entities to upsert. Each upserted entity's key must have a complete path and must not be reserved/read-only.",
"items": {
"$ref": "Entity"
}
}
}
},
"MutationResult": {
"id": "MutationResult",
"type": "object",
"description": "The result of applying a mutation.",
"properties": {
"indexUpdates": {
"type": "integer",
"description": "Number of index writes.",
"format": "int32"
},
"insertAutoIdKeys": {
"type": "array",
"description": "Keys for insertAutoId entities. One per entity from the request, in the same order.",
"items": {
"$ref": "Key"
}
}
}
},
"PartitionId": {
"id": "PartitionId",
"type": "object",
"description": "An identifier for a particular subset of entities.\n\nEntities are partitioned into various subsets, each used by different datasets and different namespaces within a dataset and so forth.\n\nAll input partition IDs are normalized before use. A partition ID is normalized as follows: If the partition ID is unset, replace it with an empty partition ID. If the partition ID has no dataset ID, assign it the context dataset ID.\n\nPartition dimension: A dimension may be unset. A dimension's value must never contain \"!\". A dimension's value must never be \"\". If the value of any dimension matches regex \"__.*__\", the partition is reserved/read-only. A reserved/read-only partition ID is forbidden in certain documented contexts.",
"properties": {
"datasetId": {
"type": "string",
"description": "The dataset ID."
},
"namespace": {
"type": "string",
"description": "The namespace."
}
}
},
"Property": {
"id": "Property",
"type": "object",
"description": "An entity property.",
"properties": {
"multi": {
"type": "boolean",
"description": "If this property contains a list of values. Input values may explicitly set multi to false, but otherwise false is always represented by omitting multi."
},
"values": {
"type": "array",
"description": "The value(s) of the property. When multi is false there is always exactly one value. When multi is true there is always one or more values. Each value can have only one value property populated. For example, you cannot have a values list of { values: [ { integerValue: 22, stringValue: \"a\" } ] }, but you can have { multi: true, values: [ { integerValue: 22 }, { stringValue: \"a\" } ] }.",
"items": {
"$ref": "Value"
}
}
}
},
"PropertyExpression": {
"id": "PropertyExpression",
"type": "object",
"description": "A representation of a property in a projection.",
"properties": {
"aggregationFunction": {
"type": "string",
"description": "The aggregation function to apply to the property. Optional. Can only be used when grouping by at least one property. Must then be set on all properties in the projection that are not being grouped by. Aggregation functions: first selects the first result as determined by the query's order."
},
"property": {
"$ref": "PropertyReference",
"description": "The property to project."
}
}
},
"PropertyFilter": {
"id": "PropertyFilter",
"type": "object",
"description": "A filter on a specific property.",
"properties": {
"operator": {
"type": "string",
"description": "The operator to filter by. One of lessThan, lessThanOrEqual, greaterThan, greaterThanOrEqual, equal, or hasAncestor."
},
"property": {
"$ref": "PropertyReference",
"description": "The property to filter by."
},
"value": {
"$ref": "Value",
"description": "The value to compare the property to."
}
}
},
"PropertyOrder": {
"id": "PropertyOrder",
"type": "object",
"description": "The desired order for a specific property.",
"properties": {
"direction": {
"type": "string",
"description": "The direction to order by. One of ascending or descending. Optional, defaults to ascending."
},
"property": {
"$ref": "PropertyReference",
"description": "The property to order by."
}
}
},
"PropertyReference": {
"id": "PropertyReference",
"type": "object",
"description": "A reference to a property relative to the kind expressions.",
"properties": {
"name": {
"type": "string",
"description": "The name of the property."
}
}
},
"Query": {
"id": "Query",
"type": "object",
"description": "A query.",
"properties": {
"endCursor": {
"type": "string",
"description": "An ending point for the query results. Optional. Query cursors are returned in query result batches.",
"format": "byte"
},
"filter": {
"$ref": "Filter",
"description": "The filter to apply (optional)."
},
"groupBy": {
"type": "array",
"description": "The properties to group by (if empty, no grouping is applied to the result set).",
"items": {
"$ref": "PropertyReference"
}
},
"kinds": {
"type": "array",
"description": "The kinds to query (if empty, returns entities from all kinds).",
"items": {
"$ref": "KindExpression"
}
},
"limit": {
"type": "integer",
"description": "The maximum number of results to return. Applies after all other constraints. Optional.",
"format": "int32"
},
"offset": {
"type": "integer",
"description": "The number of results to skip. Applies before limit, but after all other constraints (optional, defaults to 0).",
"format": "int32"
},
"order": {
"type": "array",
"description": "The order to apply to the query results (if empty, order is unspecified).",
"items": {
"$ref": "PropertyOrder"
}
},
"projection": {
"type": "array",
"description": "The projection to return. If not set the entire entity is returned.",
"items": {
"$ref": "PropertyExpression"
}
},
"startCursor": {
"type": "string",
"description": "A starting point for the query results. Optional. Query cursors are returned in query result batches.",
"format": "byte"
}
}
},
"QueryResultBatch": {
"id": "QueryResultBatch",
"type": "object",
"description": "A batch of results produced by a query.",
"properties": {
"endCursor": {
"type": "string",
"description": "A cursor that points to the position after the last result in the batch. May be absent.",
"format": "byte"
},
"entityResultType": {
"type": "string",
"description": "The result type for every entity in entityResults. full for full entities, projection for entities with only projected properties, keyOnly for entities with only a key."
},
"entityResults": {
"type": "array",
"description": "The results for this batch.",
"items": {
"$ref": "EntityResult"
}
},
"moreResults": {
"type": "string",
"description": "The state of the query after the current batch. One of notFinished, moreResultsAfterLimit, noMoreResults."
},
"skippedResults": {
"type": "integer",
"description": "The number of results skipped because of Query.offset.",
"format": "int32"
}
}
},
"ReadOptions": {
"id": "ReadOptions",
"type": "object",
"description": "Options shared by read requests.",
"properties": {
"readConsistency": {
"type": "string",
"description": "The read consistency to use. One of default, strong, or eventual. Cannot be set when transaction is set. Lookup and ancestor queries default to strong, global queries default to eventual and cannot be set to strong. Optional. Default is default."
},
"transaction": {
"type": "string",
"description": "The transaction to use. Optional.",
"format": "byte"
}
}
},
"RollbackRequest": {
"id": "RollbackRequest",
"type": "object",
"description": "The request for Rollback.",
"properties": {
"transaction": {
"type": "string",
"description": "The transaction identifier, returned by a call to beginTransaction.",
"format": "byte"
}
}
},
"RollbackResponse": {
"id": "RollbackResponse",
"type": "object",
"description": "The response for Rollback.",
"properties": {
"kind": {
"type": "string",
"description": "The kind, fixed to \"datastore#rollbackResponse\".",
"default": "datastore#rollbackResponse"
}
}
},
"RunQueryRequest": {
"id": "RunQueryRequest",
"type": "object",
"description": "The request for RunQuery.",
"properties": {
"partitionId": {
"$ref": "PartitionId",
"description": "Entities are partitioned into subsets, identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition."
},
"query": {
"$ref": "Query",
"description": "The query to run."
},
"readOptions": {
"$ref": "ReadOptions",
"description": "The options for this query."
}
}
},
"RunQueryResponse": {
"id": "RunQueryResponse",
"type": "object",
"description": "The response for RunQuery.",
"properties": {
"batch": {
"$ref": "QueryResultBatch",
"description": "A batch of query results (always present)."
},
"kind": {
"type": "string",
"description": "The kind, fixed to \"datastore#runQueryResponse\".",
"default": "datastore#runQueryResponse"
}
}
},
"Value": {
"id": "Value",
"type": "object",
"description": "A message that can hold any of the supported value types and associated metadata.\n\nAt most one of the Value fields may be set. If none are set the value is \"null\".",
"properties": {
"blobKeyValue": {
"type": "string",
"description": "A blob key value."
},
"blobValue": {
"type": "string",
"description": "A blob value.",
"format": "byte"
},
"booleanValue": {
"type": "boolean",
"description": "A boolean value."
},
"dateTimeValue": {
"type": "string",
"description": "A timestamp value.",
"format": "date-time"
},
"doubleValue": {
"type": "number",
"description": "A double value.",
"format": "double"
},
"entityValue": {
"$ref": "Entity",
"description": "An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key."
},
"indexed": {
"type": "boolean",
"description": "If the value should be indexed.\n\nThe indexed property may be set to null. 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."
},
"integerValue": {
"type": "string",
"description": "An integer value.",
"format": "int64"
},
"keyValue": {
"$ref": "Key",
"description": "A key value."
},
"meaning": {
"type": "integer",
"description": "The meaning field is reserved and should not be used.",
"format": "int32"
},
"stringValue": {
"type": "string",
"description": "A UTF-8 encoded string value."
}
}
}
},
"resources": {
"datasets": {
"methods": {
"allocateIds": {
"id": "datastore.datasets.allocateIds",
"path": "{datasetId}/allocateIds",
"httpMethod": "POST",
"description": "Allocate IDs for incomplete keys (useful for referencing an entity before it is inserted).",
"parameters": {
"datasetId": {
"type": "string",
"description": "Identifies the dataset.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"datasetId"
],
"request": {
"$ref": "AllocateIdsRequest"
},
"response": {
"$ref": "AllocateIdsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/userinfo.email"
]
},
"beginTransaction": {
"id": "datastore.datasets.beginTransaction",
"path": "{datasetId}/beginTransaction",
"httpMethod": "POST",
"description": "Begin a new transaction.",
"parameters": {
"datasetId": {
"type": "string",
"description": "Identifies the dataset.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"datasetId"
],
"request": {
"$ref": "BeginTransactionRequest"
},
"response": {
"$ref": "BeginTransactionResponse"
},
"scopes": [
"https://www.googleapis.com/auth/userinfo.email"
]
},
"blindWrite": {
"id": "datastore.datasets.blindWrite",
"path": "{datasetId}/blindWrite",
"httpMethod": "POST",
"description": "Create, delete or modify some entities outside a transaction.",
"parameters": {
"datasetId": {
"type": "string",
"description": "Identifies the dataset.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"datasetId"
],
"request": {
"$ref": "BlindWriteRequest"
},
"response": {
"$ref": "BlindWriteResponse"
},
"scopes": [
"https://www.googleapis.com/auth/userinfo.email"
]
},
"commit": {
"id": "datastore.datasets.commit",
"path": "{datasetId}/commit",
"httpMethod": "POST",
"description": "Commit a transaction, optionally creating, deleting or modifying some entities.",
"parameters": {
"datasetId": {
"type": "string",
"description": "Identifies the dataset.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"datasetId"
],
"request": {
"$ref": "CommitRequest"
},
"response": {
"$ref": "CommitResponse"
},
"scopes": [
"https://www.googleapis.com/auth/userinfo.email"
]
},
"lookup": {
"id": "datastore.datasets.lookup",
"path": "{datasetId}/lookup",
"httpMethod": "POST",
"description": "Look up some entities by key.",
"parameters": {
"datasetId": {
"type": "string",
"description": "Identifies the dataset.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"datasetId"
],
"request": {
"$ref": "LookupRequest"
},
"response": {
"$ref": "LookupResponse"
},
"scopes": [
"https://www.googleapis.com/auth/userinfo.email"
]
},
"rollback": {
"id": "datastore.datasets.rollback",
"path": "{datasetId}/rollback",
"httpMethod": "POST",
"description": "Roll back a transaction.",
"parameters": {
"datasetId": {
"type": "string",
"description": "Identifies the dataset.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"datasetId"
],
"request": {
"$ref": "RollbackRequest"
},
"response": {
"$ref": "RollbackResponse"
},
"scopes": [
"https://www.googleapis.com/auth/userinfo.email"
]
},
"runQuery": {
"id": "datastore.datasets.runQuery",
"path": "{datasetId}/runQuery",
"httpMethod": "POST",
"description": "Query for entities.",
"parameters": {
"datasetId": {
"type": "string",
"description": "Identifies the dataset.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"datasetId"
],
"request": {
"$ref": "RunQueryRequest"
},
"response": {
"$ref": "RunQueryResponse"
},
"scopes": [
"https://www.googleapis.com/auth/userinfo.email"
]
}
}
}
}
}