openapi: 3.0.1 info: title: Bytebase Auth Databases API description: Bytebase exposes a Connect/gRPC API that is also served as a RESTful HTTP API via gRPC transcoding (google.api.http annotations). Every action in the Bytebase web console is backed by this API. This document models the core RESTful HTTP surface - instances, databases, projects, issues (schema change / migration), plans, rollouts, sheets, users, roles, groups, and project webhooks. Authentication uses a short-lived access token obtained by logging in with a service account; the token is supplied as a Bearer token in the Authorization header. The server URL is the base of your own self-hosted or cloud Bytebase deployment (the public demo is shown). termsOfService: https://www.bytebase.com/terms contact: name: Bytebase Support url: https://www.bytebase.com/docs/ version: v1 servers: - url: https://demo.bytebase.com/v1 description: Bytebase public demo (replace with your own deployment host) security: - bearerAuth: [] tags: - name: Databases paths: /instances/{instance}/databases: get: operationId: listInstanceDatabases tags: - Databases summary: List databases discovered on an instance. parameters: - $ref: '#/components/parameters/InstancePath' responses: '200': description: Databases on the instance. content: application/json: schema: $ref: '#/components/schemas/ListDatabasesResponse' /instances/{instance}/databases/{database}: get: operationId: getDatabase tags: - Databases summary: Get a database. parameters: - $ref: '#/components/parameters/InstancePath' - name: database in: path required: true schema: type: string responses: '200': description: The requested database. content: application/json: schema: $ref: '#/components/schemas/Database' components: parameters: InstancePath: name: instance in: path required: true schema: type: string description: Instance resource id (the segment after instances/). schemas: Database: type: object properties: name: type: string description: Resource name, e.g. instances/prod-mysql/databases/shop. syncState: type: string enum: - OK - NOT_FOUND project: type: string schemaVersion: type: string ListDatabasesResponse: type: object properties: databases: type: array items: $ref: '#/components/schemas/Database' nextPageToken: type: string securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT description: 'Access token obtained from POST /v1/auth/login using a service-account email and service key. Supplied as `Authorization: Bearer `.'