Google Cloud Firestore Databases API

Operations on Firestore databases

OpenAPI Specification

google-cloud-firestore-databases-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Google Cloud Firestore Databases API
  description: The Cloud Firestore API provides RESTful access to Google Cloud Firestore, a flexible, scalable NoSQL cloud database for storing and syncing data. It enables CRUD operations on documents and collections, querying with filters and ordering, managing indexes, and handling real-time data synchronization across client apps.
  version: v1
  contact:
    name: Google Cloud
    url: https://cloud.google.com/firestore/docs/reference/rest
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://firestore.googleapis.com/v1
  description: Cloud Firestore API v1
tags:
- name: Databases
  description: Operations on Firestore databases
paths:
  /projects/{project}/databases:
    get:
      tags:
      - Databases
      summary: Google Cloud Firestore List databases
      description: List all the databases in the project.
      operationId: listDatabases
      parameters:
      - name: project
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListDatabasesResponse'
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
        - https://www.googleapis.com/auth/datastore
    post:
      tags:
      - Databases
      summary: Google Cloud Firestore Create a database
      description: Create a database.
      operationId: createDatabase
      parameters:
      - name: project
        in: path
        required: true
        schema:
          type: string
      - name: databaseId
        in: query
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Database'
      responses:
        '200':
          description: Database creation initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation'
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
        - https://www.googleapis.com/auth/datastore
  /projects/{project}/databases/{database}:
    get:
      tags:
      - Databases
      summary: Google Cloud Firestore Get a database
      description: Gets information about a database.
      operationId: getDatabase
      parameters:
      - name: project
        in: path
        required: true
        schema:
          type: string
      - name: database
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Database'
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
        - https://www.googleapis.com/auth/datastore
    delete:
      tags:
      - Databases
      summary: Google Cloud Firestore Delete a database
      description: Deletes a database.
      operationId: deleteDatabase
      parameters:
      - name: project
        in: path
        required: true
        schema:
          type: string
      - name: database
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Database deletion initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation'
      security:
      - oauth2:
        - https://www.googleapis.com/auth/cloud-platform
        - https://www.googleapis.com/auth/datastore
components:
  schemas:
    ListDatabasesResponse:
      type: object
      properties:
        databases:
          type: array
          items:
            $ref: '#/components/schemas/Database'
    Operation:
      type: object
      properties:
        name:
          type: string
        done:
          type: boolean
        metadata:
          type: object
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
    Database:
      type: object
      properties:
        name:
          type: string
          description: The resource name of the database.
        locationId:
          type: string
          description: The location of the database.
        type:
          type: string
          enum:
          - DATABASE_TYPE_UNSPECIFIED
          - FIRESTORE_NATIVE
          - DATASTORE_MODE
        concurrencyMode:
          type: string
          enum:
          - CONCURRENCY_MODE_UNSPECIFIED
          - OPTIMISTIC
          - PESSIMISTIC
          - OPTIMISTIC_WITH_ENTITY_GROUPS
        appEngineIntegrationMode:
          type: string
          enum:
          - APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED
          - ENABLED
          - DISABLED
        pointInTimeRecoveryEnablement:
          type: string
          enum:
          - POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED
          - POINT_IN_TIME_RECOVERY_ENABLED
          - POINT_IN_TIME_RECOVERY_DISABLED
        etag:
          type: string
        uid:
          type: string
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            https://www.googleapis.com/auth/cloud-platform: Full access to Cloud Platform
            https://www.googleapis.com/auth/datastore: View and manage Firestore data