Google Cloud Datastore Projects API

The Projects API from Google Cloud Datastore — 9 operation(s) for projects.

OpenAPI Specification

google-cloud-datastore-projects-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Cloud Datastore Projects API
  description: 'The Cloud Datastore API provides entity lookups, queries (including GQL),

    transactions, and project operations against datastore.googleapis.com. The

    service is also offered as Firestore in Datastore mode, which preserves

    this API surface while running on the Firestore storage layer.

    '
  version: v1
servers:
- url: https://datastore.googleapis.com
security:
- OAuth2:
  - cloud-platform
- OAuth2:
  - datastore
tags:
- name: Projects
paths:
  /v1/projects/{projectId}:allocateIds:
    post:
      summary: Allocate IDs
      description: Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted.
      operationId: allocateIds
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                keys:
                  type: array
                  items:
                    $ref: '#/components/schemas/Key'
                databaseId:
                  type: string
      responses:
        '200':
          description: Allocated keys
          content:
            application/json:
              schema:
                type: object
                properties:
                  keys:
                    type: array
                    items:
                      $ref: '#/components/schemas/Key'
      tags:
      - Projects
  /v1/projects/{projectId}:beginTransaction:
    post:
      summary: Begin transaction
      operationId: beginTransaction
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                transactionOptions:
                  type: object
                databaseId:
                  type: string
      responses:
        '200':
          description: New transaction
          content:
            application/json:
              schema:
                type: object
                properties:
                  transaction:
                    type: string
      tags:
      - Projects
  /v1/projects/{projectId}:commit:
    post:
      summary: Commit transaction
      description: Commits a transaction, optionally creating, deleting or modifying some entities.
      operationId: commit
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                mode:
                  type: string
                  enum:
                  - MODE_UNSPECIFIED
                  - TRANSACTIONAL
                  - NON_TRANSACTIONAL
                transaction:
                  type: string
                mutations:
                  type: array
                  items:
                    $ref: '#/components/schemas/Mutation'
                databaseId:
                  type: string
      responses:
        '200':
          description: Commit response
          content:
            application/json:
              schema:
                type: object
                properties:
                  mutationResults:
                    type: array
                    items:
                      type: object
                  indexUpdates:
                    type: integer
      tags:
      - Projects
  /v1/projects/{projectId}:lookup:
    post:
      summary: Lookup entities
      operationId: lookup
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                readOptions:
                  type: object
                keys:
                  type: array
                  items:
                    $ref: '#/components/schemas/Key'
                databaseId:
                  type: string
      responses:
        '200':
          description: Lookup response
          content:
            application/json:
              schema:
                type: object
                properties:
                  found:
                    type: array
                    items:
                      $ref: '#/components/schemas/EntityResult'
                  missing:
                    type: array
                    items:
                      $ref: '#/components/schemas/EntityResult'
                  deferred:
                    type: array
                    items:
                      $ref: '#/components/schemas/Key'
      tags:
      - Projects
  /v1/projects/{projectId}:reserveIds:
    post:
      summary: Reserve IDs
      operationId: reserveIds
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                keys:
                  type: array
                  items:
                    $ref: '#/components/schemas/Key'
                databaseId:
                  type: string
      responses:
        '200':
          description: Empty
      tags:
      - Projects
  /v1/projects/{projectId}:rollback:
    post:
      summary: Rollback transaction
      operationId: rollback
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                transaction:
                  type: string
                databaseId:
                  type: string
      responses:
        '200':
          description: Empty rollback response
      tags:
      - Projects
  /v1/projects/{projectId}:runQuery:
    post:
      summary: Run query
      operationId: runQuery
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                partitionId:
                  type: object
                readOptions:
                  type: object
                query:
                  type: object
                gqlQuery:
                  type: object
                databaseId:
                  type: string
      responses:
        '200':
          description: Query result
          content:
            application/json:
              schema:
                type: object
                properties:
                  batch:
                    type: object
                  query:
                    type: object
      tags:
      - Projects
  /v1/projects/{projectId}:runAggregationQuery:
    post:
      summary: Run aggregation query
      operationId: runAggregationQuery
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: Aggregation query result
          content:
            application/json:
              schema:
                type: object
      tags:
      - Projects
  /v1/projects/{projectId}/operations:
    get:
      summary: List operations
      operationId: listOperations
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
      - name: filter
        in: query
        schema:
          type: string
      - name: pageSize
        in: query
        schema:
          type: integer
      - name: pageToken
        in: query
        schema:
          type: string
      responses:
        '200':
          description: List of long-running operations
          content:
            application/json:
              schema:
                type: object
                properties:
                  operations:
                    type: array
                    items:
                      type: object
      tags:
      - Projects
components:
  schemas:
    Mutation:
      type: object
      properties:
        insert:
          $ref: '#/components/schemas/Entity'
        update:
          $ref: '#/components/schemas/Entity'
        upsert:
          $ref: '#/components/schemas/Entity'
        delete:
          $ref: '#/components/schemas/Key'
        baseVersion:
          type: string
    Key:
      type: object
      properties:
        partitionId:
          type: object
          properties:
            projectId:
              type: string
            namespaceId:
              type: string
            databaseId:
              type: string
        path:
          type: array
          items:
            type: object
            properties:
              kind:
                type: string
              id:
                type: string
              name:
                type: string
    EntityResult:
      type: object
      properties:
        entity:
          $ref: '#/components/schemas/Entity'
        version:
          type: string
        cursor:
          type: string
    Entity:
      type: object
      properties:
        key:
          $ref: '#/components/schemas/Key'
        properties:
          type: object
          additionalProperties:
            type: object
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/v2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            cloud-platform: View and manage your data across Google Cloud Platform services
            datastore: View and manage your Google Cloud Datastore data