Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

feat(mcp): add OpenAPI-based API discovery for MCP server (#18439)

p0ny95f90f947882
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yaml
new file mode 100644
index 0000000000..1457985ac3
--- /dev/null
+++ b/backend/api/mcp/gen/openapi.yaml
@@ -0,0 +1,19698 @@
+openapi: 3.1.0
+info: {}
+paths:
+ /bytebase.v1.ActuatorService/DeleteCache:
+ post:
+ tags:
+ - bytebase.v1.ActuatorService
+ summary: 'Clears the system cache to force data refresh. Permissions required: None'
+ description: |-
+ Clears the system cache to force data refresh.
+ Permissions required: None
+ operationId: bytebase.v1.ActuatorService.DeleteCache
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DeleteCacheRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/google.protobuf.Empty'
+ /bytebase.v1.ActuatorService/GetActuatorInfo:
+ post:
+ tags:
+ - bytebase.v1.ActuatorService
+ summary: 'Gets system information and health status of the Bytebase instance. Permissions required: None'
+ description: |-
+ Gets system information and health status of the Bytebase instance.
+ Permissions required: None
+ operationId: bytebase.v1.ActuatorService.GetActuatorInfo
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetActuatorInfoRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ActuatorInfo'
+ /bytebase.v1.ActuatorService/GetResourcePackage:
+ post:
+ tags:
+ - bytebase.v1.ActuatorService
+ summary: 'Gets custom branding resources such as logos. Permissions required: None'
+ description: |-
+ Gets custom branding resources such as logos.
+ Permissions required: None
+ operationId: bytebase.v1.ActuatorService.GetResourcePackage
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetResourcePackageRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ResourcePackage'
+ /bytebase.v1.ActuatorService/SetupSample:
+ post:
+ tags:
+ - bytebase.v1.ActuatorService
+ summary: 'Sets up sample data for demonstration and testing purposes. Permissions required: bb.projects.create'
+ description: |-
+ Sets up sample data for demonstration and testing purposes.
+ Permissions required: bb.projects.create
+ operationId: bytebase.v1.ActuatorService.SetupSample
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.SetupSampleRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/google.protobuf.Empty'
+ /bytebase.v1.ActuatorService/UpdateActuatorInfo:
+ post:
+ tags:
+ - bytebase.v1.ActuatorService
+ summary: 'Updates system configuration settings for the Bytebase instance. Permissions required: bb.settings.set'
+ description: |-
+ Updates system configuration settings for the Bytebase instance.
+ Permissions required: bb.settings.set
+ operationId: bytebase.v1.ActuatorService.UpdateActuatorInfo
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UpdateActuatorInfoRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ActuatorInfo'
+ /bytebase.v1.AuditLogService/ExportAuditLogs:
+ post:
+ tags:
+ - bytebase.v1.AuditLogService
+ summary: 'Exports audit logs in a specified format for external analysis. Permissions required: bb.auditLogs.export'
+ description: |-
+ Exports audit logs in a specified format for external analysis.
+ Permissions required: bb.auditLogs.export
+ operationId: bytebase.v1.AuditLogService.ExportAuditLogs
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ExportAuditLogsRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ExportAuditLogsResponse'
+ /bytebase.v1.AuditLogService/SearchAuditLogs:
+ post:
+ tags:
+ - bytebase.v1.AuditLogService
+ summary: 'Searches audit logs with optional filtering and pagination. Permissions required: bb.auditLogs.search'
+ description: |-
+ Searches audit logs with optional filtering and pagination.
+ Permissions required: bb.auditLogs.search
+ operationId: bytebase.v1.AuditLogService.SearchAuditLogs
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.SearchAuditLogsRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.SearchAuditLogsResponse'
+ /bytebase.v1.AuthService/ExchangeToken:
+ post:
+ tags:
+ - bytebase.v1.AuthService
+ summary: 'Exchanges an external OIDC token for a Bytebase access token. Used by CI/CD pipelines with Workload Identity Federation. Permissions required: None (validates via OIDC token)'
+ description: |-
+ Exchanges an external OIDC token for a Bytebase access token.
+ Used by CI/CD pipelines with Workload Identity Federation.
+ Permissions required: None (validates via OIDC token)
+ operationId: bytebase.v1.AuthService.ExchangeToken
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ExchangeTokenRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ExchangeTokenResponse'
+ /bytebase.v1.AuthService/Login:
+ post:
+ tags:
+ - bytebase.v1.AuthService
+ summary: 'Authenticates a user and returns access tokens. Permissions required: None'
+ description: |-
+ Authenticates a user and returns access tokens.
+ Permissions required: None
+ operationId: bytebase.v1.AuthService.Login
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.LoginRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.LoginResponse'
+ /bytebase.v1.AuthService/Logout:
+ post:
+ tags:
+ - bytebase.v1.AuthService
+ summary: 'Logs out the current user session. Permissions required: None'
+ description: |-
+ Logs out the current user session.
+ Permissions required: None
+ operationId: bytebase.v1.AuthService.Logout
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.LogoutRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/google.protobuf.Empty'
+ /bytebase.v1.CelService/BatchDeparse:
+ post:
+ tags:
+ - bytebase.v1.CelService
+ summary: 'Converts multiple CEL AST representations back into expression strings. Permissions required: None'
+ description: |-
+ Converts multiple CEL AST representations back into expression strings.
+ Permissions required: None
+ operationId: bytebase.v1.CelService.BatchDeparse
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchDeparseRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchDeparseResponse'
+ /bytebase.v1.CelService/BatchParse:
+ post:
+ tags:
+ - bytebase.v1.CelService
+ summary: 'Parses multiple CEL expression strings into AST representations. Permissions required: None'
+ description: |-
+ Parses multiple CEL expression strings into AST representations.
+ Permissions required: None
+ operationId: bytebase.v1.CelService.BatchParse
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchParseRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchParseResponse'
+ /bytebase.v1.DatabaseCatalogService/GetDatabaseCatalog:
+ post:
+ tags:
+ - bytebase.v1.DatabaseCatalogService
+ summary: 'Gets the catalog metadata for a database. Permissions required: bb.databaseCatalogs.get'
+ description: |-
+ Gets the catalog metadata for a database.
+ Permissions required: bb.databaseCatalogs.get
+ operationId: bytebase.v1.DatabaseCatalogService.GetDatabaseCatalog
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetDatabaseCatalogRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DatabaseCatalog'
+ /bytebase.v1.DatabaseCatalogService/UpdateDatabaseCatalog:
+ post:
+ tags:
+ - bytebase.v1.DatabaseCatalogService
+ summary: 'Updates catalog metadata such as classifications and labels. Permissions required: bb.databaseCatalogs.update'
+ description: |-
+ Updates catalog metadata such as classifications and labels.
+ Permissions required: bb.databaseCatalogs.update
+ operationId: bytebase.v1.DatabaseCatalogService.UpdateDatabaseCatalog
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UpdateDatabaseCatalogRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DatabaseCatalog'
+ /bytebase.v1.DatabaseGroupService/CreateDatabaseGroup:
+ post:
+ tags:
+ - bytebase.v1.DatabaseGroupService
+ summary: 'Creates a new database group. Permissions required: bb.databaseGroups.create'
+ description: |-
+ Creates a new database group.
+ Permissions required: bb.databaseGroups.create
+ operationId: bytebase.v1.DatabaseGroupService.CreateDatabaseGroup
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.CreateDatabaseGroupRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DatabaseGroup'
+ /bytebase.v1.DatabaseGroupService/DeleteDatabaseGroup:
+ post:
+ tags:
+ - bytebase.v1.DatabaseGroupService
+ summary: 'Deletes a database group. Permissions required: bb.databaseGroups.delete'
+ description: |-
+ Deletes a database group.
+ Permissions required: bb.databaseGroups.delete
+ operationId: bytebase.v1.DatabaseGroupService.DeleteDatabaseGroup
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DeleteDatabaseGroupRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/google.protobuf.Empty'
+ /bytebase.v1.DatabaseGroupService/GetDatabaseGroup:
+ post:
+ tags:
+ - bytebase.v1.DatabaseGroupService
+ summary: 'Gets a database group by name. Permissions required: bb.databaseGroups.get'
+ description: |-
+ Gets a database group by name.
+ Permissions required: bb.databaseGroups.get
+ operationId: bytebase.v1.DatabaseGroupService.GetDatabaseGroup
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetDatabaseGroupRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DatabaseGroup'
+ /bytebase.v1.DatabaseGroupService/ListDatabaseGroups:
+ post:
+ tags:
+ - bytebase.v1.DatabaseGroupService
+ summary: 'Lists database groups in a project. Permissions required: bb.databaseGroups.list'
+ description: |-
+ Lists database groups in a project.
+ Permissions required: bb.databaseGroups.list
+ operationId: bytebase.v1.DatabaseGroupService.ListDatabaseGroups
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListDatabaseGroupsRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListDatabaseGroupsResponse'
+ /bytebase.v1.DatabaseGroupService/UpdateDatabaseGroup:
+ post:
+ tags:
+ - bytebase.v1.DatabaseGroupService
+ summary: 'Updates a database group. Permissions required: bb.databaseGroups.update When allow_missing=true, also requires: bb.databaseGroups.create'
+ description: |-
+ Updates a database group.
+ Permissions required: bb.databaseGroups.update
+ When allow_missing=true, also requires: bb.databaseGroups.create
+ operationId: bytebase.v1.DatabaseGroupService.UpdateDatabaseGroup
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UpdateDatabaseGroupRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DatabaseGroup'
+ /bytebase.v1.DatabaseService/BatchGetDatabases:
+ post:
+ tags:
+ - bytebase.v1.DatabaseService
+ summary: 'Retrieves multiple databases by their names. Permissions required: bb.databases.get'
+ description: |-
+ Retrieves multiple databases by their names.
+ Permissions required: bb.databases.get
+ operationId: bytebase.v1.DatabaseService.BatchGetDatabases
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchGetDatabasesRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchGetDatabasesResponse'
+ /bytebase.v1.DatabaseService/BatchSyncDatabases:
+ post:
+ tags:
+ - bytebase.v1.DatabaseService
+ summary: 'Synchronizes multiple databases in a single batch operation. Permissions required: bb.databases.sync'
+ description: |-
+ Synchronizes multiple databases in a single batch operation.
+ Permissions required: bb.databases.sync
+ operationId: bytebase.v1.DatabaseService.BatchSyncDatabases
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchSyncDatabasesRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchSyncDatabasesResponse'
+ /bytebase.v1.DatabaseService/BatchUpdateDatabases:
+ post:
+ tags:
+ - bytebase.v1.DatabaseService
+ summary: 'Updates multiple databases in a single batch operation. Permissions required: bb.databases.update'
+ description: |-
+ Updates multiple databases in a single batch operation.
+ Permissions required: bb.databases.update
+ operationId: bytebase.v1.DatabaseService.BatchUpdateDatabases
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchUpdateDatabasesRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchUpdateDatabasesResponse'
+ /bytebase.v1.DatabaseService/DiffSchema:
+ post:
+ tags:
+ - bytebase.v1.DatabaseService
+ summary: 'Compares and generates migration statements between two schemas. Permissions required: bb.databases.get'
+ description: |-
+ Compares and generates migration statements between two schemas.
+ Permissions required: bb.databases.get
+ operationId: bytebase.v1.DatabaseService.DiffSchema
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DiffSchemaRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DiffSchemaResponse'
+ /bytebase.v1.DatabaseService/GetChangelog:
+ post:
+ tags:
+ - bytebase.v1.DatabaseService
+ summary: 'Retrieves a specific changelog entry. Permissions required: bb.changelogs.get'
+ description: |-
+ Retrieves a specific changelog entry.
+ Permissions required: bb.changelogs.get
+ operationId: bytebase.v1.DatabaseService.GetChangelog
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetChangelogRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Changelog'
+ /bytebase.v1.DatabaseService/GetDatabase:
+ post:
+ tags:
+ - bytebase.v1.DatabaseService
+ summary: 'Retrieves a database by name. Permissions required: bb.databases.get'
+ description: |-
+ Retrieves a database by name.
+ Permissions required: bb.databases.get
+ operationId: bytebase.v1.DatabaseService.GetDatabase
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetDatabaseRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Database'
+ /bytebase.v1.DatabaseService/GetDatabaseMetadata:
+ post:
+ tags:
+ - bytebase.v1.DatabaseService
+ summary: 'Retrieves database metadata including tables, columns, and indexes. Permissions required: bb.databases.getSchema'
+ description: |-
+ Retrieves database metadata including tables, columns, and indexes.
+ Permissions required: bb.databases.getSchema
+ operationId: bytebase.v1.DatabaseService.GetDatabaseMetadata
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetDatabaseMetadataRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DatabaseMetadata'
+ /bytebase.v1.DatabaseService/GetDatabaseSDLSchema:
+ post:
+ tags:
+ - bytebase.v1.DatabaseService
+ summary: 'Retrieves database schema in SDL (Schema Definition Language) format. Permissions required: bb.databases.getSchema'
+ description: |-
+ Retrieves database schema in SDL (Schema Definition Language) format.
+ Permissions required: bb.databases.getSchema
+ operationId: bytebase.v1.DatabaseService.GetDatabaseSDLSchema
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetDatabaseSDLSchemaRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DatabaseSDLSchema'
+ /bytebase.v1.DatabaseService/GetDatabaseSchema:
+ post:
+ tags:
+ - bytebase.v1.DatabaseService
+ summary: 'Retrieves database schema as DDL statements. Permissions required: bb.databases.getSchema'
+ description: |-
+ Retrieves database schema as DDL statements.
+ Permissions required: bb.databases.getSchema
+ operationId: bytebase.v1.DatabaseService.GetDatabaseSchema
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetDatabaseSchemaRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DatabaseSchema'
+ /bytebase.v1.DatabaseService/GetSchemaString:
+ post:
+ tags:
+ - bytebase.v1.DatabaseService
+ summary: 'Generates schema DDL for a database object. Permissions required: bb.databases.getSchema'
+ description: |-
+ Generates schema DDL for a database object.
+ Permissions required: bb.databases.getSchema
+ operationId: bytebase.v1.DatabaseService.GetSchemaString
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetSchemaStringRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetSchemaStringResponse'
+ /bytebase.v1.DatabaseService/ListChangelogs:
+ post:
+ tags:
+ - bytebase.v1.DatabaseService
+ summary: 'Lists migration history for a database. Permissions required: bb.changelogs.list'
+ description: |-
+ Lists migration history for a database.
+ Permissions required: bb.changelogs.list
+ operationId: bytebase.v1.DatabaseService.ListChangelogs
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListChangelogsRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListChangelogsResponse'
+ /bytebase.v1.DatabaseService/ListDatabases:
+ post:
+ tags:
+ - bytebase.v1.DatabaseService
+ summary: 'Lists databases in a project, instance, or workspace. Permissions required: bb.projects.get (for project parent), bb.databases.list (for workspace parent), or bb.instances.get (for instance parent)'
+ description: |-
+ Lists databases in a project, instance, or workspace.
+ Permissions required: bb.projects.get (for project parent), bb.databases.list (for workspace parent), or bb.instances.get (for instance parent)
+ operationId: bytebase.v1.DatabaseService.ListDatabases
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListDatabasesRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListDatabasesResponse'
+ /bytebase.v1.DatabaseService/SyncDatabase:
+ post:
+ tags:
+ - bytebase.v1.DatabaseService
+ summary: 'Synchronizes database schema from the instance. Permissions required: bb.databases.sync'
+ description: |-
+ Synchronizes database schema from the instance.
+ Permissions required: bb.databases.sync
+ operationId: bytebase.v1.DatabaseService.SyncDatabase
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.SyncDatabaseRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.SyncDatabaseResponse'
+ /bytebase.v1.DatabaseService/UpdateDatabase:
+ post:
+ tags:
+ - bytebase.v1.DatabaseService
+ summary: 'Updates database properties such as labels and project assignment. Permissions required: bb.databases.update'
+ description: |-
+ Updates database properties such as labels and project assignment.
+ Permissions required: bb.databases.update
+ operationId: bytebase.v1.DatabaseService.UpdateDatabase
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UpdateDatabaseRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Database'
+ /bytebase.v1.GroupService/BatchGetGroups:
+ post:
+ tags:
+ - bytebase.v1.GroupService
+ summary: 'Gets multiple groups in a single request. Permissions required: bb.groups.get'
+ description: |-
+ Gets multiple groups in a single request.
+ Permissions required: bb.groups.get
+ operationId: bytebase.v1.GroupService.BatchGetGroups
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchGetGroupsRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchGetGroupsResponse'
+ /bytebase.v1.GroupService/CreateGroup:
+ post:
+ tags:
+ - bytebase.v1.GroupService
+ summary: 'Creates a new group. Permissions required: bb.groups.create'
+ description: |-
+ Creates a new group.
+ Permissions required: bb.groups.create
+ operationId: bytebase.v1.GroupService.CreateGroup
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.CreateGroupRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Group'
+ /bytebase.v1.GroupService/DeleteGroup:
+ post:
+ tags:
+ - bytebase.v1.GroupService
+ summary: 'Deletes a group. Group owners or users with bb.groups.delete permission can delete. Permissions required: bb.groups.delete OR caller is group owner'
+ description: |-
+ Deletes a group. Group owners or users with bb.groups.delete permission can delete.
+ Permissions required: bb.groups.delete OR caller is group owner
+ operationId: bytebase.v1.GroupService.DeleteGroup
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DeleteGroupRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/google.protobuf.Empty'
+ /bytebase.v1.GroupService/GetGroup:
+ post:
+ tags:
+ - bytebase.v1.GroupService
+ summary: 'Gets a group by name. Permissions required: bb.groups.get'
+ description: |-
+ Gets a group by name.
+ Permissions required: bb.groups.get
+ operationId: bytebase.v1.GroupService.GetGroup
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetGroupRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Group'
+ /bytebase.v1.GroupService/ListGroups:
+ post:
+ tags:
+ - bytebase.v1.GroupService
+ summary: 'Lists all groups in the workspace. Permissions required: bb.groups.list'
+ description: |-
+ Lists all groups in the workspace.
+ Permissions required: bb.groups.list
+ operationId: bytebase.v1.GroupService.ListGroups
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListGroupsRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListGroupsResponse'
+ /bytebase.v1.GroupService/UpdateGroup:
+ post:
+ tags:
+ - bytebase.v1.GroupService
+ summary: 'Updates a group. Group owners or users with bb.groups.update permission can update. Permissions required: bb.groups.update OR caller is group owner When allow_missing=true, also requires: bb.groups.create'
+ description: |-
+ Updates a group. Group owners or users with bb.groups.update permission can update.
+ Permissions required: bb.groups.update OR caller is group owner
+ When allow_missing=true, also requires: bb.groups.create
+ operationId: bytebase.v1.GroupService.UpdateGroup
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UpdateGroupRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Group'
+ /bytebase.v1.IdentityProviderService/CreateIdentityProvider:
+ post:
+ tags:
+ - bytebase.v1.IdentityProviderService
+ summary: 'Creates a new identity provider. Permissions required: bb.identityProviders.create'
+ description: |-
+ Creates a new identity provider.
+ Permissions required: bb.identityProviders.create
+ operationId: bytebase.v1.IdentityProviderService.CreateIdentityProvider
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.CreateIdentityProviderRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.IdentityProvider'
+ /bytebase.v1.IdentityProviderService/DeleteIdentityProvider:
+ post:
+ tags:
+ - bytebase.v1.IdentityProviderService
+ summary: 'Deletes an identity provider. Permissions required: bb.identityProviders.delete'
+ description: |-
+ Deletes an identity provider.
+ Permissions required: bb.identityProviders.delete
+ operationId: bytebase.v1.IdentityProviderService.DeleteIdentityProvider
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DeleteIdentityProviderRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/google.protobuf.Empty'
+ /bytebase.v1.IdentityProviderService/GetIdentityProvider:
+ post:
+ tags:
+ - bytebase.v1.IdentityProviderService
+ summary: 'Gets an identity provider by name. Permissions required: bb.identityProviders.get'
+ description: |-
+ Gets an identity provider by name.
+ Permissions required: bb.identityProviders.get
+ operationId: bytebase.v1.IdentityProviderService.GetIdentityProvider
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetIdentityProviderRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.IdentityProvider'
+ /bytebase.v1.IdentityProviderService/ListIdentityProviders:
+ post:
+ tags:
+ - bytebase.v1.IdentityProviderService
+ summary: 'Lists all configured identity providers (public endpoint for login page). Permissions required: None'
+ description: |-
+ Lists all configured identity providers (public endpoint for login page).
+ Permissions required: None
+ operationId: bytebase.v1.IdentityProviderService.ListIdentityProviders
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListIdentityProvidersRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListIdentityProvidersResponse'
+ /bytebase.v1.IdentityProviderService/TestIdentityProvider:
+ post:
+ tags:
+ - bytebase.v1.IdentityProviderService
+ summary: 'Tests the connection and configuration of an identity provider. Permissions required: bb.identityProviders.update'
+ description: |-
+ Tests the connection and configuration of an identity provider.
+ Permissions required: bb.identityProviders.update
+ operationId: bytebase.v1.IdentityProviderService.TestIdentityProvider
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.TestIdentityProviderRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.TestIdentityProviderResponse'
+ /bytebase.v1.IdentityProviderService/UpdateIdentityProvider:
+ post:
+ tags:
+ - bytebase.v1.IdentityProviderService
+ summary: 'Updates an identity provider. Permissions required: bb.identityProviders.update When allow_missing=true, also requires: bb.identityProviders.create'
+ description: |-
+ Updates an identity provider.
+ Permissions required: bb.identityProviders.update
+ When allow_missing=true, also requires: bb.identityProviders.create
+ operationId: bytebase.v1.IdentityProviderService.UpdateIdentityProvider
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UpdateIdentityProviderRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.IdentityProvider'
+ /bytebase.v1.InstanceRoleService/GetInstanceRole:
+ post:
+ tags:
+ - bytebase.v1.InstanceRoleService
+ summary: 'Gets a database role from an instance. Permissions required: bb.instanceRoles.get'
+ description: |-
+ Gets a database role from an instance.
+ Permissions required: bb.instanceRoles.get
+ operationId: bytebase.v1.InstanceRoleService.GetInstanceRole
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetInstanceRoleRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.InstanceRole'
+ /bytebase.v1.InstanceRoleService/ListInstanceRoles:
+ post:
+ tags:
+ - bytebase.v1.InstanceRoleService
+ summary: 'Lists all database roles in an instance. Permissions required: bb.instanceRoles.list'
+ description: |-
+ Lists all database roles in an instance.
+ Permissions required: bb.instanceRoles.list
+ operationId: bytebase.v1.InstanceRoleService.ListInstanceRoles
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListInstanceRolesRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListInstanceRolesResponse'
+ /bytebase.v1.InstanceService/AddDataSource:
+ post:
+ tags:
+ - bytebase.v1.InstanceService
+ summary: 'Adds a read-only data source to an instance. Permissions required: bb.instances.update'
+ description: |-
+ Adds a read-only data source to an instance.
+ Permissions required: bb.instances.update
+ operationId: bytebase.v1.InstanceService.AddDataSource
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.AddDataSourceRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Instance'
+ /bytebase.v1.InstanceService/BatchSyncInstances:
+ post:
+ tags:
+ - bytebase.v1.InstanceService
+ summary: 'Syncs multiple instances in a single request. Permissions required: bb.instances.sync'
+ description: |-
+ Syncs multiple instances in a single request.
+ Permissions required: bb.instances.sync
+ operationId: bytebase.v1.InstanceService.BatchSyncInstances
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchSyncInstancesRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchSyncInstancesResponse'
+ /bytebase.v1.InstanceService/BatchUpdateInstances:
+ post:
+ tags:
+ - bytebase.v1.InstanceService
+ summary: 'Updates multiple instances in a single request. Permissions required: bb.instances.update'
+ description: |-
+ Updates multiple instances in a single request.
+ Permissions required: bb.instances.update
+ operationId: bytebase.v1.InstanceService.BatchUpdateInstances
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchUpdateInstancesRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchUpdateInstancesResponse'
+ /bytebase.v1.InstanceService/CreateInstance:
+ post:
+ tags:
+ - bytebase.v1.InstanceService
+ summary: 'Creates a new database instance. Permissions required: bb.instances.create'
+ description: |-
+ Creates a new database instance.
+ Permissions required: bb.instances.create
+ operationId: bytebase.v1.InstanceService.CreateInstance
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.CreateInstanceRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Instance'
+ /bytebase.v1.InstanceService/DeleteInstance:
+ post:
+ tags:
+ - bytebase.v1.InstanceService
+ summary: 'Deletes or soft-deletes a database instance. Permissions required: bb.instances.delete'
+ description: |-
+ Deletes or soft-deletes a database instance.
+ Permissions required: bb.instances.delete
+ operationId: bytebase.v1.InstanceService.DeleteInstance
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DeleteInstanceRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/google.protobuf.Empty'
+ /bytebase.v1.InstanceService/GetInstance:
+ post:
+ tags:
+ - bytebase.v1.InstanceService
+ summary: 'Gets a database instance by name. Permissions required: bb.instances.get'
+ description: |-
+ Gets a database instance by name.
+ Permissions required: bb.instances.get
+ operationId: bytebase.v1.InstanceService.GetInstance
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetInstanceRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Instance'
+ /bytebase.v1.InstanceService/ListInstanceDatabase:
+ post:
+ tags:
+ - bytebase.v1.InstanceService
+ summary: 'Lists all databases within an instance without creating them. Permissions required: bb.instances.get'
+ description: |-
+ Lists all databases within an instance without creating them.
+ Permissions required: bb.instances.get
+ operationId: bytebase.v1.InstanceService.ListInstanceDatabase
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListInstanceDatabaseRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListInstanceDatabaseResponse'
+ /bytebase.v1.InstanceService/ListInstances:
+ post:
+ tags:
+ - bytebase.v1.InstanceService
+ summary: 'Lists all database instances. Permissions required: bb.instances.list'
+ description: |-
+ Lists all database instances.
+ Permissions required: bb.instances.list
+ operationId: bytebase.v1.InstanceService.ListInstances
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListInstancesRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListInstancesResponse'
+ /bytebase.v1.InstanceService/RemoveDataSource:
+ post:
+ tags:
+ - bytebase.v1.InstanceService
+ summary: 'Removes a read-only data source from an instance. Permissions required: bb.instances.update'
+ description: |-
+ Removes a read-only data source from an instance.
+ Permissions required: bb.instances.update
+ operationId: bytebase.v1.InstanceService.RemoveDataSource
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.RemoveDataSourceRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Instance'
+ /bytebase.v1.InstanceService/SyncInstance:
+ post:
+ tags:
+ - bytebase.v1.InstanceService
+ summary: 'Syncs database schemas and metadata from an instance. Permissions required: bb.instances.sync'
+ description: |-
+ Syncs database schemas and metadata from an instance.
+ Permissions required: bb.instances.sync
+ operationId: bytebase.v1.InstanceService.SyncInstance
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.SyncInstanceRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.SyncInstanceResponse'
+ /bytebase.v1.InstanceService/UndeleteInstance:
+ post:
+ tags:
+ - bytebase.v1.InstanceService
+ summary: 'Restores a soft-deleted database instance. Permissions required: bb.instances.undelete'
+ description: |-
+ Restores a soft-deleted database instance.
+ Permissions required: bb.instances.undelete
+ operationId: bytebase.v1.InstanceService.UndeleteInstance
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UndeleteInstanceRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Instance'
+ /bytebase.v1.InstanceService/UpdateDataSource:
+ post:
+ tags:
+ - bytebase.v1.InstanceService
+ summary: 'Updates a data source configuration. Permissions required: bb.instances.update'
+ description: |-
+ Updates a data source configuration.
+ Permissions required: bb.instances.update
+ operationId: bytebase.v1.InstanceService.UpdateDataSource
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UpdateDataSourceRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Instance'
+ /bytebase.v1.InstanceService/UpdateInstance:
+ post:
+ tags:
+ - bytebase.v1.InstanceService
+ summary: 'Updates a database instance. Permissions required: bb.instances.update'
+ description: |-
+ Updates a database instance.
+ Permissions required: bb.instances.update
+ operationId: bytebase.v1.InstanceService.UpdateInstance
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UpdateInstanceRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Instance'
+ /bytebase.v1.IssueService/ApproveIssue:
+ post:
+ tags:
+ - bytebase.v1.IssueService
+ summary: 'Approves an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step. Permissions required: None (determined by approval flow)'
+ description: |-
+ Approves an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step.
+ Permissions required: None (determined by approval flow)
+ operationId: bytebase.v1.IssueService.ApproveIssue
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ApproveIssueRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Issue'
+ /bytebase.v1.IssueService/BatchUpdateIssuesStatus:
+ post:
+ tags:
+ - bytebase.v1.IssueService
+ summary: 'Updates the status of multiple issues in a single operation. Permissions required: bb.issues.update'
+ description: |-
+ Updates the status of multiple issues in a single operation.
+ Permissions required: bb.issues.update
+ operationId: bytebase.v1.IssueService.BatchUpdateIssuesStatus
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchUpdateIssuesStatusRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchUpdateIssuesStatusResponse'
+ /bytebase.v1.IssueService/CreateIssue:
+ post:
+ tags:
+ - bytebase.v1.IssueService
+ summary: 'Creates a new issue for database changes or tasks. Permissions required: bb.issues.create'
+ description: |-
+ Creates a new issue for database changes or tasks.
+ Permissions required: bb.issues.create
+ operationId: bytebase.v1.IssueService.CreateIssue
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.CreateIssueRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Issue'
+ /bytebase.v1.IssueService/CreateIssueComment:
+ post:
+ tags:
+ - bytebase.v1.IssueService
+ summary: 'Adds a comment to an issue. Permissions required: bb.issueComments.create'
+ description: |-
+ Adds a comment to an issue.
+ Permissions required: bb.issueComments.create
+ operationId: bytebase.v1.IssueService.CreateIssueComment
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.CreateIssueCommentRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.IssueComment'
+ /bytebase.v1.IssueService/GetIssue:
+ post:
+ tags:
+ - bytebase.v1.IssueService
+ summary: 'Retrieves an issue by name. Permissions required: bb.issues.get'
+ description: |-
+ Retrieves an issue by name.
+ Permissions required: bb.issues.get
+ operationId: bytebase.v1.IssueService.GetIssue
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetIssueRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Issue'
+ /bytebase.v1.IssueService/ListIssueComments:
+ post:
+ tags:
+ - bytebase.v1.IssueService
+ summary: 'Lists comments on an issue. Permissions required: bb.issueComments.list'
+ description: |-
+ Lists comments on an issue.
+ Permissions required: bb.issueComments.list
+ operationId: bytebase.v1.IssueService.ListIssueComments
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListIssueCommentsRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListIssueCommentsResponse'
+ /bytebase.v1.IssueService/ListIssues:
+ post:
+ tags:
+ - bytebase.v1.IssueService
+ summary: 'Lists issues in a project. Permissions required: bb.issues.list'
+ description: |-
+ Lists issues in a project.
+ Permissions required: bb.issues.list
+ operationId: bytebase.v1.IssueService.ListIssues
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListIssuesRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListIssuesResponse'
+ /bytebase.v1.IssueService/RejectIssue:
+ post:
+ tags:
+ - bytebase.v1.IssueService
+ summary: 'Rejects an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step. Permissions required: None (determined by approval flow)'
+ description: |-
+ Rejects an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step.
+ Permissions required: None (determined by approval flow)
+ operationId: bytebase.v1.IssueService.RejectIssue
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.RejectIssueRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Issue'
+ /bytebase.v1.IssueService/RequestIssue:
+ post:
+ tags:
+ - bytebase.v1.IssueService
+ summary: 'Requests changes on an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step. Permissions required: None (determined by approval flow)'
+ description: |-
+ Requests changes on an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step.
+ Permissions required: None (determined by approval flow)
+ operationId: bytebase.v1.IssueService.RequestIssue
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.RequestIssueRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Issue'
+ /bytebase.v1.IssueService/SearchIssues:
+ post:
+ tags:
+ - bytebase.v1.IssueService
+ summary: 'Search for issues that the caller has the bb.issues.get permission on and also satisfy the specified filter & query. Permissions required: bb.issues.get'
+ description: |-
+ Search for issues that the caller has the bb.issues.get permission on and also satisfy the specified filter & query.
+ Permissions required: bb.issues.get
+ operationId: bytebase.v1.IssueService.SearchIssues
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.SearchIssuesRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.SearchIssuesResponse'
+ /bytebase.v1.IssueService/UpdateIssue:
+ post:
+ tags:
+ - bytebase.v1.IssueService
+ summary: 'Updates an issue''s properties such as title, description, or labels. Permissions required: bb.issues.update'
+ description: |-
+ Updates an issue's properties such as title, description, or labels.
+ Permissions required: bb.issues.update
+ operationId: bytebase.v1.IssueService.UpdateIssue
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UpdateIssueRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Issue'
+ /bytebase.v1.IssueService/UpdateIssueComment:
+ post:
+ tags:
+ - bytebase.v1.IssueService
+ summary: 'Updates an existing issue comment. Permissions required: bb.issueComments.update'
+ description: |-
+ Updates an existing issue comment.
+ Permissions required: bb.issueComments.update
+ operationId: bytebase.v1.IssueService.UpdateIssueComment
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UpdateIssueCommentRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.IssueComment'
+ /bytebase.v1.OrgPolicyService/CreatePolicy:
+ post:
+ tags:
+ - bytebase.v1.OrgPolicyService
+ summary: 'Creates a new organizational policy. Permissions required: bb.policies.create'
+ description: |-
+ Creates a new organizational policy.
+ Permissions required: bb.policies.create
+ operationId: bytebase.v1.OrgPolicyService.CreatePolicy
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.CreatePolicyRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Policy'
+ /bytebase.v1.OrgPolicyService/DeletePolicy:
+ post:
+ tags:
+ - bytebase.v1.OrgPolicyService
+ summary: 'Deletes an organizational policy. Permissions required: bb.policies.delete'
+ description: |-
+ Deletes an organizational policy.
+ Permissions required: bb.policies.delete
+ operationId: bytebase.v1.OrgPolicyService.DeletePolicy
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DeletePolicyRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/google.protobuf.Empty'
+ /bytebase.v1.OrgPolicyService/GetPolicy:
+ post:
+ tags:
+ - bytebase.v1.OrgPolicyService
+ summary: 'Retrieves a policy by name. Permissions required: bb.policies.get'
+ description: |-
+ Retrieves a policy by name.
+ Permissions required: bb.policies.get
+ operationId: bytebase.v1.OrgPolicyService.GetPolicy
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetPolicyRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Policy'
+ /bytebase.v1.OrgPolicyService/ListPolicies:
+ post:
+ tags:
+ - bytebase.v1.OrgPolicyService
+ summary: 'Lists policies at a specified resource level. Permissions required: bb.policies.list'
+ description: |-
+ Lists policies at a specified resource level.
+ Permissions required: bb.policies.list
+ operationId: bytebase.v1.OrgPolicyService.ListPolicies
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListPoliciesRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListPoliciesResponse'
+ /bytebase.v1.OrgPolicyService/UpdatePolicy:
+ post:
+ tags:
+ - bytebase.v1.OrgPolicyService
+ summary: 'Updates an existing organizational policy. Permissions required: bb.policies.update'
+ description: |-
+ Updates an existing organizational policy.
+ Permissions required: bb.policies.update
+ operationId: bytebase.v1.OrgPolicyService.UpdatePolicy
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UpdatePolicyRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Policy'
+ /bytebase.v1.PlanService/BatchCancelPlanCheckRuns:
+ post:
+ tags:
+ - bytebase.v1.PlanService
+ summary: 'Cancels multiple plan check runs. Permissions required: bb.planCheckRuns.run'
+ description: |-
+ Cancels multiple plan check runs.
+ Permissions required: bb.planCheckRuns.run
+ operationId: bytebase.v1.PlanService.BatchCancelPlanCheckRuns
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchCancelPlanCheckRunsRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchCancelPlanCheckRunsResponse'
+ /bytebase.v1.PlanService/CreatePlan:
+ post:
+ tags:
+ - bytebase.v1.PlanService
+ summary: 'Creates a new deployment plan. Permissions required: bb.plans.create'
+ description: |-
+ Creates a new deployment plan.
+ Permissions required: bb.plans.create
+ operationId: bytebase.v1.PlanService.CreatePlan
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.CreatePlanRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Plan'
+ /bytebase.v1.PlanService/GetPlan:
+ post:
+ tags:
+ - bytebase.v1.PlanService
+ summary: 'Retrieves a deployment plan by name. Permissions required: bb.plans.get'
+ description: |-
+ Retrieves a deployment plan by name.
+ Permissions required: bb.plans.get
+ operationId: bytebase.v1.PlanService.GetPlan
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetPlanRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Plan'
+ /bytebase.v1.PlanService/ListPlanCheckRuns:
+ post:
+ tags:
+ - bytebase.v1.PlanService
+ summary: 'Lists plan check runs for a deployment plan. Permissions required: bb.planCheckRuns.list'
+ description: |-
+ Lists plan check runs for a deployment plan.
+ Permissions required: bb.planCheckRuns.list
+ operationId: bytebase.v1.PlanService.ListPlanCheckRuns
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListPlanCheckRunsRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListPlanCheckRunsResponse'
+ /bytebase.v1.PlanService/ListPlans:
+ post:
+ tags:
+ - bytebase.v1.PlanService
+ summary: 'Lists deployment plans in a project. Permissions required: bb.plans.list'
+ description: |-
+ Lists deployment plans in a project.
+ Permissions required: bb.plans.list
+ operationId: bytebase.v1.PlanService.ListPlans
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListPlansRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListPlansResponse'
+ /bytebase.v1.PlanService/RunPlanChecks:
+ post:
+ tags:
+ - bytebase.v1.PlanService
+ summary: 'Executes validation checks on a deployment plan. Permissions required: bb.planCheckRuns.run'
+ description: |-
+ Executes validation checks on a deployment plan.
+ Permissions required: bb.planCheckRuns.run
+ operationId: bytebase.v1.PlanService.RunPlanChecks
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.RunPlanChecksRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.RunPlanChecksResponse'
+ /bytebase.v1.PlanService/SearchPlans:
+ post:
+ tags:
+ - bytebase.v1.PlanService
+ summary: 'Search for plans that the caller has the bb.plans.get permission on and also satisfy the specified filter & query. Permissions required: bb.plans.get'
+ description: |-
+ Search for plans that the caller has the bb.plans.get permission on and also satisfy the specified filter & query.
+ Permissions required: bb.plans.get
+ operationId: bytebase.v1.PlanService.SearchPlans
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.SearchPlansRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.SearchPlansResponse'
+ /bytebase.v1.PlanService/UpdatePlan:
+ post:
+ tags:
+ - bytebase.v1.PlanService
+ summary: 'UpdatePlan updates the plan. The plan creator and the user with bb.plans.update permission on the project can update the plan. Permissions required: bb.plans.update (or creator)'
+ description: |-
+ UpdatePlan updates the plan.
+ The plan creator and the user with bb.plans.update permission on the project can update the plan.
+ Permissions required: bb.plans.update (or creator)
+ operationId: bytebase.v1.PlanService.UpdatePlan
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UpdatePlanRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Plan'
+ /bytebase.v1.ProjectService/AddWebhook:
+ post:
+ tags:
+ - bytebase.v1.ProjectService
+ summary: 'Adds a webhook to a project for notifications. Permissions required: bb.projects.update'
+ description: |-
+ Adds a webhook to a project for notifications.
+ Permissions required: bb.projects.update
+ operationId: bytebase.v1.ProjectService.AddWebhook
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.AddWebhookRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Project'
+ /bytebase.v1.ProjectService/BatchDeleteProjects:
+ post:
+ tags:
+ - bytebase.v1.ProjectService
+ summary: 'Deletes multiple projects in a single operation. Permissions required: bb.projects.delete'
+ description: |-
+ Deletes multiple projects in a single operation.
+ Permissions required: bb.projects.delete
+ operationId: bytebase.v1.ProjectService.BatchDeleteProjects
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchDeleteProjectsRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/google.protobuf.Empty'
+ /bytebase.v1.ProjectService/BatchGetIamPolicy:
+ post:
+ tags:
+ - bytebase.v1.ProjectService
+ summary: 'Deprecated. No permission check implemented. Permissions required: None'
+ description: |-
+ Deprecated. No permission check implemented.
+ Permissions required: None
+ operationId: bytebase.v1.ProjectService.BatchGetIamPolicy
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchGetIamPolicyRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchGetIamPolicyResponse'
+ /bytebase.v1.ProjectService/CreateProject:
+ post:
+ tags:
+ - bytebase.v1.ProjectService
+ summary: 'Creates a new project in the workspace. Permissions required: bb.projects.create'
+ description: |-
+ Creates a new project in the workspace.
+ Permissions required: bb.projects.create
+ operationId: bytebase.v1.ProjectService.CreateProject
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.CreateProjectRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Project'
+ /bytebase.v1.ProjectService/DeleteProject:
+ post:
+ tags:
+ - bytebase.v1.ProjectService
+ summary: 'Deletes (soft-delete or purge) a project. Permissions required: bb.projects.delete'
+ description: |-
+ Deletes (soft-delete or purge) a project.
+ Permissions required: bb.projects.delete
+ operationId: bytebase.v1.ProjectService.DeleteProject
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DeleteProjectRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/google.protobuf.Empty'
+ /bytebase.v1.ProjectService/GetIamPolicy:
+ post:
+ tags:
+ - bytebase.v1.ProjectService
+ summary: 'Retrieves the IAM policy for a project. Permissions required: bb.projects.getIamPolicy'
+ description: |-
+ Retrieves the IAM policy for a project.
+ Permissions required: bb.projects.getIamPolicy
+ operationId: bytebase.v1.ProjectService.GetIamPolicy
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetIamPolicyRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.IamPolicy'
+ /bytebase.v1.ProjectService/GetProject:
+ post:
+ tags:
+ - bytebase.v1.ProjectService
+ summary: 'GetProject retrieves a project by name. Users with "bb.projects.get" permission on the workspace or the project owner can access this method. Permissions required: bb.projects.get'
+ description: |-
+ GetProject retrieves a project by name.
+ Users with "bb.projects.get" permission on the workspace or the project owner can access this method.
+ Permissions required: bb.projects.get
+ operationId: bytebase.v1.ProjectService.GetProject
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetProjectRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Project'
+ /bytebase.v1.ProjectService/ListProjects:
+ post:
+ tags:
+ - bytebase.v1.ProjectService
+ summary: 'Lists all projects in the workspace with optional filtering. Permissions required: bb.projects.list'
+ description: |-
+ Lists all projects in the workspace with optional filtering.
+ Permissions required: bb.projects.list
+ operationId: bytebase.v1.ProjectService.ListProjects
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListProjectsRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListProjectsResponse'
+ /bytebase.v1.ProjectService/RemoveWebhook:
+ post:
+ tags:
+ - bytebase.v1.ProjectService
+ summary: 'Removes a webhook from a project. Permissions required: bb.projects.update'
+ description: |-
+ Removes a webhook from a project.
+ Permissions required: bb.projects.update
+ operationId: bytebase.v1.ProjectService.RemoveWebhook
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.RemoveWebhookRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Project'
+ /bytebase.v1.ProjectService/SearchProjects:
+ post:
+ tags:
+ - bytebase.v1.ProjectService
+ summary: 'Searches for projects with advanced filtering capabilities. Permissions required: bb.projects.get (or project-level bb.projects.get for specific projects)'
+ description: |-
+ Searches for projects with advanced filtering capabilities.
+ Permissions required: bb.projects.get (or project-level bb.projects.get for specific projects)
+ operationId: bytebase.v1.ProjectService.SearchProjects
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.SearchProjectsRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.SearchProjectsResponse'
+ /bytebase.v1.ProjectService/SetIamPolicy:
+ post:
+ tags:
+ - bytebase.v1.ProjectService
+ summary: 'Sets the IAM policy for a project. Permissions required: bb.projects.setIamPolicy'
+ description: |-
+ Sets the IAM policy for a project.
+ Permissions required: bb.projects.setIamPolicy
+ operationId: bytebase.v1.ProjectService.SetIamPolicy
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.SetIamPolicyRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.IamPolicy'
+ /bytebase.v1.ProjectService/TestWebhook:
+ post:
+ tags:
+ - bytebase.v1.ProjectService
+ summary: 'Tests a webhook by sending a test notification. Permissions required: bb.projects.update'
+ description: |-
+ Tests a webhook by sending a test notification.
+ Permissions required: bb.projects.update
+ operationId: bytebase.v1.ProjectService.TestWebhook
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.TestWebhookRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.TestWebhookResponse'
+ /bytebase.v1.ProjectService/UndeleteProject:
+ post:
+ tags:
+ - bytebase.v1.ProjectService
+ summary: 'Restores a soft-deleted project. Permissions required: bb.projects.undelete'
+ description: |-
+ Restores a soft-deleted project.
+ Permissions required: bb.projects.undelete
+ operationId: bytebase.v1.ProjectService.UndeleteProject
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UndeleteProjectRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Project'
+ /bytebase.v1.ProjectService/UpdateProject:
+ post:
+ tags:
+ - bytebase.v1.ProjectService
+ summary: 'Updates an existing project''s properties. Permissions required: bb.projects.update'
+ description: |-
+ Updates an existing project's properties.
+ Permissions required: bb.projects.update
+ operationId: bytebase.v1.ProjectService.UpdateProject
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UpdateProjectRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Project'
+ /bytebase.v1.ProjectService/UpdateWebhook:
+ post:
+ tags:
+ - bytebase.v1.ProjectService
+ summary: 'Updates an existing webhook configuration. Permissions required: bb.projects.update'
+ description: |-
+ Updates an existing webhook configuration.
+ Permissions required: bb.projects.update
+ operationId: bytebase.v1.ProjectService.UpdateWebhook
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UpdateWebhookRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Project'
+ /bytebase.v1.ReleaseService/CheckRelease:
+ post:
+ tags:
+ - bytebase.v1.ReleaseService
+ summary: 'Validates a release by dry-running checks on target databases. Permissions required: bb.releases.check'
+ description: |-
+ Validates a release by dry-running checks on target databases.
+ Permissions required: bb.releases.check
+ operationId: bytebase.v1.ReleaseService.CheckRelease
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.CheckReleaseRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.CheckReleaseResponse'
+ /bytebase.v1.ReleaseService/CreateRelease:
+ post:
+ tags:
+ - bytebase.v1.ReleaseService
+ summary: 'Creates a new release with SQL files. Permissions required: bb.releases.create'
+ description: |-
+ Creates a new release with SQL files.
+ Permissions required: bb.releases.create
+ operationId: bytebase.v1.ReleaseService.CreateRelease
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.CreateReleaseRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Release'
+ /bytebase.v1.ReleaseService/DeleteRelease:
+ post:
+ tags:
+ - bytebase.v1.ReleaseService
+ summary: 'Deletes a release. Permissions required: bb.releases.delete'
+ description: |-
+ Deletes a release.
+ Permissions required: bb.releases.delete
+ operationId: bytebase.v1.ReleaseService.DeleteRelease
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DeleteReleaseRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/google.protobuf.Empty'
+ /bytebase.v1.ReleaseService/GetRelease:
+ post:
+ tags:
+ - bytebase.v1.ReleaseService
+ summary: 'Retrieves a release by name. Permissions required: bb.releases.get'
+ description: |-
+ Retrieves a release by name.
+ Permissions required: bb.releases.get
+ operationId: bytebase.v1.ReleaseService.GetRelease
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetReleaseRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Release'
+ /bytebase.v1.ReleaseService/ListReleases:
+ post:
+ tags:
+ - bytebase.v1.ReleaseService
+ summary: 'Lists releases in a project. Permissions required: bb.releases.list'
+ description: |-
+ Lists releases in a project.
+ Permissions required: bb.releases.list
+ operationId: bytebase.v1.ReleaseService.ListReleases
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListReleasesRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListReleasesResponse'
+ /bytebase.v1.ReleaseService/SearchReleases:
+ post:
+ tags:
+ - bytebase.v1.ReleaseService
+ summary: 'Searches releases by digest or other criteria. Permissions required: bb.releases.get'
+ description: |-
+ Searches releases by digest or other criteria.
+ Permissions required: bb.releases.get
+ operationId: bytebase.v1.ReleaseService.SearchReleases
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.SearchReleasesRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.SearchReleasesResponse'
+ /bytebase.v1.ReleaseService/UndeleteRelease:
+ post:
+ tags:
+ - bytebase.v1.ReleaseService
+ summary: 'Restores a deleted release. Permissions required: bb.releases.undelete'
+ description: |-
+ Restores a deleted release.
+ Permissions required: bb.releases.undelete
+ operationId: bytebase.v1.ReleaseService.UndeleteRelease
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UndeleteReleaseRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Release'
+ /bytebase.v1.ReleaseService/UpdateRelease:
+ post:
+ tags:
+ - bytebase.v1.ReleaseService
+ summary: 'Updates an existing release. Permissions required: bb.releases.update When allow_missing=true, also requires: bb.releases.create'
+ description: |-
+ Updates an existing release.
+ Permissions required: bb.releases.update
+ When allow_missing=true, also requires: bb.releases.create
+ operationId: bytebase.v1.ReleaseService.UpdateRelease
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UpdateReleaseRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Release'
+ /bytebase.v1.ReviewConfigService/CreateReviewConfig:
+ post:
+ tags:
+ - bytebase.v1.ReviewConfigService
+ summary: 'Creates a new SQL review configuration. Permissions required: bb.reviewConfigs.create'
+ description: |-
+ Creates a new SQL review configuration.
+ Permissions required: bb.reviewConfigs.create
+ operationId: bytebase.v1.ReviewConfigService.CreateReviewConfig
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.CreateReviewConfigRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ReviewConfig'
+ /bytebase.v1.ReviewConfigService/DeleteReviewConfig:
+ post:
+ tags:
+ - bytebase.v1.ReviewConfigService
+ summary: 'Deletes a SQL review configuration. Permissions required: bb.reviewConfigs.delete'
+ description: |-
+ Deletes a SQL review configuration.
+ Permissions required: bb.reviewConfigs.delete
+ operationId: bytebase.v1.ReviewConfigService.DeleteReviewConfig
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DeleteReviewConfigRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/google.protobuf.Empty'
+ /bytebase.v1.ReviewConfigService/GetReviewConfig:
+ post:
+ tags:
+ - bytebase.v1.ReviewConfigService
+ summary: 'Retrieves a SQL review configuration by name. Permissions required: bb.reviewConfigs.get'
+ description: |-
+ Retrieves a SQL review configuration by name.
+ Permissions required: bb.reviewConfigs.get
+ operationId: bytebase.v1.ReviewConfigService.GetReviewConfig
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetReviewConfigRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ReviewConfig'
+ /bytebase.v1.ReviewConfigService/ListReviewConfigs:
+ post:
+ tags:
+ - bytebase.v1.ReviewConfigService
+ summary: 'Lists all SQL review configurations. Permissions required: bb.reviewConfigs.list'
+ description: |-
+ Lists all SQL review configurations.
+ Permissions required: bb.reviewConfigs.list
+ operationId: bytebase.v1.ReviewConfigService.ListReviewConfigs
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListReviewConfigsRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListReviewConfigsResponse'
+ /bytebase.v1.ReviewConfigService/UpdateReviewConfig:
+ post:
+ tags:
+ - bytebase.v1.ReviewConfigService
+ summary: 'Updates a SQL review configuration. Permissions required: bb.reviewConfigs.update When allow_missing=true, also requires: bb.reviewConfigs.create'
+ description: |-
+ Updates a SQL review configuration.
+ Permissions required: bb.reviewConfigs.update
+ When allow_missing=true, also requires: bb.reviewConfigs.create
+ operationId: bytebase.v1.ReviewConfigService.UpdateReviewConfig
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UpdateReviewConfigRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ReviewConfig'
+ /bytebase.v1.RevisionService/BatchCreateRevisions:
+ post:
+ tags:
+ - bytebase.v1.RevisionService
+ summary: 'Creates multiple schema revisions in a single operation. Permissions required: bb.revisions.create'
+ description: |-
+ Creates multiple schema revisions in a single operation.
+ Permissions required: bb.revisions.create
+ operationId: bytebase.v1.RevisionService.BatchCreateRevisions
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchCreateRevisionsRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchCreateRevisionsResponse'
+ /bytebase.v1.RevisionService/CreateRevision:
+ post:
+ tags:
+ - bytebase.v1.RevisionService
+ summary: 'Creates a new schema revision. Permissions required: bb.revisions.create'
+ description: |-
+ Creates a new schema revision.
+ Permissions required: bb.revisions.create
+ operationId: bytebase.v1.RevisionService.CreateRevision
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.CreateRevisionRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Revision'
+ /bytebase.v1.RevisionService/DeleteRevision:
+ post:
+ tags:
+ - bytebase.v1.RevisionService
+ summary: 'Deletes a schema revision. Permissions required: bb.revisions.delete'
+ description: |-
+ Deletes a schema revision.
+ Permissions required: bb.revisions.delete
+ operationId: bytebase.v1.RevisionService.DeleteRevision
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DeleteRevisionRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/google.protobuf.Empty'
+ /bytebase.v1.RevisionService/GetRevision:
+ post:
+ tags:
+ - bytebase.v1.RevisionService
+ summary: 'Retrieves a schema revision by name. Permissions required: bb.revisions.get'
+ description: |-
+ Retrieves a schema revision by name.
+ Permissions required: bb.revisions.get
+ operationId: bytebase.v1.RevisionService.GetRevision
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetRevisionRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Revision'
+ /bytebase.v1.RevisionService/ListRevisions:
+ post:
+ tags:
+ - bytebase.v1.RevisionService
+ summary: 'Lists schema revisions for a database. Permissions required: bb.revisions.list'
+ description: |-
+ Lists schema revisions for a database.
+ Permissions required: bb.revisions.list
+ operationId: bytebase.v1.RevisionService.ListRevisions
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListRevisionsRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListRevisionsResponse'
+ /bytebase.v1.RoleService/CreateRole:
+ post:
+ tags:
+ - bytebase.v1.RoleService
+ summary: 'Creates a new custom role. Permissions required: bb.roles.create'
+ description: |-
+ Creates a new custom role.
+ Permissions required: bb.roles.create
+ operationId: bytebase.v1.RoleService.CreateRole
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.CreateRoleRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Role'
+ /bytebase.v1.RoleService/DeleteRole:
+ post:
+ tags:
+ - bytebase.v1.RoleService
+ summary: 'Deletes a custom role. Permissions required: bb.roles.delete'
+ description: |-
+ Deletes a custom role.
+ Permissions required: bb.roles.delete
+ operationId: bytebase.v1.RoleService.DeleteRole
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DeleteRoleRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/google.protobuf.Empty'
+ /bytebase.v1.RoleService/GetRole:
+ post:
+ tags:
+ - bytebase.v1.RoleService
+ summary: 'Retrieves a role by name. Permissions required: bb.roles.get'
+ description: |-
+ Retrieves a role by name.
+ Permissions required: bb.roles.get
+ operationId: bytebase.v1.RoleService.GetRole
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetRoleRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Role'
+ /bytebase.v1.RoleService/ListRoles:
+ post:
+ tags:
+ - bytebase.v1.RoleService
+ summary: 'Lists roles in the workspace. Permissions required: bb.roles.list'
+ description: |-
+ Lists roles in the workspace.
+ Permissions required: bb.roles.list
+ operationId: bytebase.v1.RoleService.ListRoles
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListRolesRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListRolesResponse'
+ /bytebase.v1.RoleService/UpdateRole:
+ post:
+ tags:
+ - bytebase.v1.RoleService
+ summary: 'Updates a role''s properties. Permissions required: bb.roles.update When allow_missing=true, also requires: bb.roles.create'
+ description: |-
+ Updates a role's properties.
+ Permissions required: bb.roles.update
+ When allow_missing=true, also requires: bb.roles.create
+ operationId: bytebase.v1.RoleService.UpdateRole
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UpdateRoleRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Role'
+ /bytebase.v1.RolloutService/BatchCancelTaskRuns:
+ post:
+ tags:
+ - bytebase.v1.RolloutService
+ summary: 'Cancels multiple running task executions. Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment)'
+ description: |-
+ Cancels multiple running task executions.
+ Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment)
+ operationId: bytebase.v1.RolloutService.BatchCancelTaskRuns
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchCancelTaskRunsRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchCancelTaskRunsResponse'
+ /bytebase.v1.RolloutService/BatchRunTasks:
+ post:
+ tags:
+ - bytebase.v1.RolloutService
+ summary: 'Executes multiple tasks in a rollout stage. Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment)'
+ description: |-
+ Executes multiple tasks in a rollout stage.
+ Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment)
+ operationId: bytebase.v1.RolloutService.BatchRunTasks
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchRunTasksRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchRunTasksResponse'
+ /bytebase.v1.RolloutService/BatchSkipTasks:
+ post:
+ tags:
+ - bytebase.v1.RolloutService
+ summary: 'Skips multiple tasks in a rollout stage. Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment)'
+ description: |-
+ Skips multiple tasks in a rollout stage.
+ Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment)
+ operationId: bytebase.v1.RolloutService.BatchSkipTasks
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchSkipTasksRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchSkipTasksResponse'
+ /bytebase.v1.RolloutService/CreateRollout:
+ post:
+ tags:
+ - bytebase.v1.RolloutService
+ summary: 'Creates a new rollout from a plan. Permissions required: bb.rollouts.create'
+ description: |-
+ Creates a new rollout from a plan.
+ Permissions required: bb.rollouts.create
+ operationId: bytebase.v1.RolloutService.CreateRollout
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.CreateRolloutRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Rollout'
+ /bytebase.v1.RolloutService/GetRollout:
+ post:
+ tags:
+ - bytebase.v1.RolloutService
+ summary: 'Retrieves a rollout by name. Permissions required: bb.rollouts.get'
+ description: |-
+ Retrieves a rollout by name.
+ Permissions required: bb.rollouts.get
+ operationId: bytebase.v1.RolloutService.GetRollout
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetRolloutRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Rollout'
+ /bytebase.v1.RolloutService/GetTaskRun:
+ post:
+ tags:
+ - bytebase.v1.RolloutService
+ summary: 'Retrieves a task run by name. Permissions required: bb.taskRuns.list'
+ description: |-
+ Retrieves a task run by name.
+ Permissions required: bb.taskRuns.list
+ operationId: bytebase.v1.RolloutService.GetTaskRun
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetTaskRunRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.TaskRun'
+ /bytebase.v1.RolloutService/GetTaskRunLog:
+ post:
+ tags:
+ - bytebase.v1.RolloutService
+ summary: 'Retrieves execution logs for a task run. Permissions required: bb.taskRuns.list'
+ description: |-
+ Retrieves execution logs for a task run.
+ Permissions required: bb.taskRuns.list
+ operationId: bytebase.v1.RolloutService.GetTaskRunLog
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetTaskRunLogRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.TaskRunLog'
+ /bytebase.v1.RolloutService/GetTaskRunSession:
+ post:
+ tags:
+ - bytebase.v1.RolloutService
+ summary: 'Retrieves database session information for a running task. Permissions required: bb.taskRuns.list'
+ description: |-
+ Retrieves database session information for a running task.
+ Permissions required: bb.taskRuns.list
+ operationId: bytebase.v1.RolloutService.GetTaskRunSession
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetTaskRunSessionRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.TaskRunSession'
+ /bytebase.v1.RolloutService/ListRollouts:
+ post:
+ tags:
+ - bytebase.v1.RolloutService
+ summary: 'Lists rollouts in a project. Permissions required: bb.rollouts.list'
+ description: |-
+ Lists rollouts in a project.
+ Permissions required: bb.rollouts.list
+ operationId: bytebase.v1.RolloutService.ListRollouts
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListRolloutsRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListRolloutsResponse'
+ /bytebase.v1.RolloutService/ListTaskRuns:
+ post:
+ tags:
+ - bytebase.v1.RolloutService
+ summary: 'Lists task run executions for a task. Permissions required: bb.taskRuns.list'
+ description: |-
+ Lists task run executions for a task.
+ Permissions required: bb.taskRuns.list
+ operationId: bytebase.v1.RolloutService.ListTaskRuns
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListTaskRunsRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListTaskRunsResponse'
+ /bytebase.v1.RolloutService/PreviewRollout:
+ post:
+ tags:
+ - bytebase.v1.RolloutService
+ summary: 'Previews the rollout that would be created from a plan. Permissions required: bb.rollouts.preview'
+ description: |-
+ Previews the rollout that would be created from a plan.
+ Permissions required: bb.rollouts.preview
+ operationId: bytebase.v1.RolloutService.PreviewRollout
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.PreviewRolloutRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Rollout'
+ /bytebase.v1.RolloutService/PreviewTaskRunRollback:
+ post:
+ tags:
+ - bytebase.v1.RolloutService
+ summary: 'Generates rollback SQL for a completed task run. Permissions required: bb.taskRuns.list'
+ description: |-
+ Generates rollback SQL for a completed task run.
+ Permissions required: bb.taskRuns.list
+ operationId: bytebase.v1.RolloutService.PreviewTaskRunRollback
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.PreviewTaskRunRollbackRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.PreviewTaskRunRollbackResponse'
+ /bytebase.v1.SQLService/AICompletion:
+ post:
+ tags:
+ - bytebase.v1.SQLService
+ summary: 'Provides AI-powered SQL completion and generation. Permissions required: None (authenticated users only, requires AI to be enabled)'
+ description: |-
+ Provides AI-powered SQL completion and generation.
+ Permissions required: None (authenticated users only, requires AI to be enabled)
+ operationId: bytebase.v1.SQLService.AICompletion
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.AICompletionRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.AICompletionResponse'
+ /bytebase.v1.SQLService/AdminExecute: {}
+ /bytebase.v1.SQLService/DiffMetadata:
+ post:
+ tags:
+ - bytebase.v1.SQLService
+ summary: 'Computes schema differences between two database metadata. Permissions required: None'
+ description: |-
+ Computes schema differences between two database metadata.
+ Permissions required: None
+ operationId: bytebase.v1.SQLService.DiffMetadata
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DiffMetadataRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DiffMetadataResponse'
+ /bytebase.v1.SQLService/Export:
+ post:
+ tags:
+ - bytebase.v1.SQLService
+ summary: 'Exports query results to a file format. Permissions required: bb.databases.get'
+ description: |-
+ Exports query results to a file format.
+ Permissions required: bb.databases.get
+ operationId: bytebase.v1.SQLService.Export
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ExportRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ExportResponse'
+ /bytebase.v1.SQLService/Query:
+ post:
+ tags:
+ - bytebase.v1.SQLService
+ summary: 'Executes a read-only SQL query against a database. Permissions required: bb.databases.get'
+ description: |-
+ Executes a read-only SQL query against a database.
+ Permissions required: bb.databases.get
+ operationId: bytebase.v1.SQLService.Query
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.QueryRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.QueryResponse'
+ /bytebase.v1.SQLService/SearchQueryHistories:
+ post:
+ tags:
+ - bytebase.v1.SQLService
+ summary: 'SearchQueryHistories searches query histories for the caller. Permissions required: None (only returns caller''s own query histories)'
+ description: |-
+ SearchQueryHistories searches query histories for the caller.
+ Permissions required: None (only returns caller's own query histories)
+ operationId: bytebase.v1.SQLService.SearchQueryHistories
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.SearchQueryHistoriesRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.SearchQueryHistoriesResponse'
+ /bytebase.v1.SettingService/GetSetting:
+ post:
+ tags:
+ - bytebase.v1.SettingService
+ summary: 'Retrieves a workspace setting by name. Permissions required: bb.settings.get'
+ description: |-
+ Retrieves a workspace setting by name.
+ Permissions required: bb.settings.get
+ operationId: bytebase.v1.SettingService.GetSetting
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetSettingRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Setting'
+ /bytebase.v1.SettingService/ListSettings:
+ post:
+ tags:
+ - bytebase.v1.SettingService
+ summary: 'Lists all workspace settings. Permissions required: bb.settings.list'
+ description: |-
+ Lists all workspace settings.
+ Permissions required: bb.settings.list
+ operationId: bytebase.v1.SettingService.ListSettings
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListSettingsRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListSettingsResponse'
+ /bytebase.v1.SettingService/UpdateSetting:
+ post:
+ tags:
+ - bytebase.v1.SettingService
+ summary: 'Updates a workspace setting. Permissions required: bb.settings.set'
+ description: |-
+ Updates a workspace setting.
+ Permissions required: bb.settings.set
+ operationId: bytebase.v1.SettingService.UpdateSetting
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UpdateSettingRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Setting'
+ /bytebase.v1.SheetService/BatchCreateSheets:
+ post:
+ tags:
+ - bytebase.v1.SheetService
+ summary: 'Creates multiple SQL sheets in a single operation. Permissions required: bb.sheets.create'
+ description: |-
+ Creates multiple SQL sheets in a single operation.
+ Permissions required: bb.sheets.create
+ operationId: bytebase.v1.SheetService.BatchCreateSheets
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchCreateSheetsRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchCreateSheetsResponse'
+ /bytebase.v1.SheetService/CreateSheet:
+ post:
+ tags:
+ - bytebase.v1.SheetService
+ summary: 'Creates a new SQL sheet. Permissions required: bb.sheets.create'
+ description: |-
+ Creates a new SQL sheet.
+ Permissions required: bb.sheets.create
+ operationId: bytebase.v1.SheetService.CreateSheet
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.CreateSheetRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Sheet'
+ /bytebase.v1.SheetService/GetSheet:
+ post:
+ tags:
+ - bytebase.v1.SheetService
+ summary: 'Retrieves a SQL sheet by name. Permissions required: bb.sheets.get'
+ description: |-
+ Retrieves a SQL sheet by name.
+ Permissions required: bb.sheets.get
+ operationId: bytebase.v1.SheetService.GetSheet
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetSheetRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Sheet'
+ /bytebase.v1.SheetService/UpdateSheet:
+ post:
+ tags:
+ - bytebase.v1.SheetService
+ summary: 'Updates a SQL sheet''s title or content. Permissions required: bb.sheets.update'
+ description: |-
+ Updates a SQL sheet's title or content.
+ Permissions required: bb.sheets.update
+ operationId: bytebase.v1.SheetService.UpdateSheet
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UpdateSheetRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Sheet'
+ /bytebase.v1.SubscriptionService/GetSubscription:
+ post:
+ tags:
+ - bytebase.v1.SubscriptionService
+ summary: 'GetSubscription returns the current subscription. If there is no license, we will return a free plan subscription without expiration time. If there is expired license, we will return a free plan subscription with the expiration time of the expired license. Permissions required: None'
+ description: |-
+ GetSubscription returns the current subscription.
+ If there is no license, we will return a free plan subscription without expiration time.
+ If there is expired license, we will return a free plan subscription with the expiration time of the expired license.
+ Permissions required: None
+ operationId: bytebase.v1.SubscriptionService.GetSubscription
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetSubscriptionRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Subscription'
+ /bytebase.v1.SubscriptionService/UpdateSubscription:
+ post:
+ tags:
+ - bytebase.v1.SubscriptionService
+ summary: 'Updates the enterprise license subscription. Permissions required: bb.settings.set'
+ description: |-
+ Updates the enterprise license subscription.
+ Permissions required: bb.settings.set
+ operationId: bytebase.v1.SubscriptionService.UpdateSubscription
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UpdateSubscriptionRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Subscription'
+ /bytebase.v1.UserService/BatchGetUsers:
+ post:
+ tags:
+ - bytebase.v1.UserService
+ summary: 'Get the users in batch. Any authenticated user can batch get users. Permissions required: bb.users.get'
+ description: |-
+ Get the users in batch.
+ Any authenticated user can batch get users.
+ Permissions required: bb.users.get
+ operationId: bytebase.v1.UserService.BatchGetUsers
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchGetUsersRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchGetUsersResponse'
+ /bytebase.v1.UserService/CreateUser:
+ post:
+ tags:
+ - bytebase.v1.UserService
+ summary: 'Creates a user. When Disallow Signup is enabled, requires bb.users.create permission; otherwise any user can sign up. Permissions required: bb.users.create (only when Disallow Signup is enabled)'
+ description: |-
+ Creates a user. When Disallow Signup is enabled, requires bb.users.create permission; otherwise any user can sign up.
+ Permissions required: bb.users.create (only when Disallow Signup is enabled)
+ operationId: bytebase.v1.UserService.CreateUser
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.CreateUserRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.User'
+ /bytebase.v1.UserService/DeleteUser:
+ post:
+ tags:
+ - bytebase.v1.UserService
+ summary: 'Deletes a user. Requires bb.users.delete permission with additional validation: the last remaining workspace admin cannot be deleted. Permissions required: bb.users.delete'
+ description: |-
+ Deletes a user. Requires bb.users.delete permission with additional validation: the last remaining workspace admin cannot be deleted.
+ Permissions required: bb.users.delete
+ operationId: bytebase.v1.UserService.DeleteUser
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DeleteUserRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/google.protobuf.Empty'
+ /bytebase.v1.UserService/GetCurrentUser:
+ post:
+ tags:
+ - bytebase.v1.UserService
+ summary: 'Get the current authenticated user. Permissions required: None'
+ description: |-
+ Get the current authenticated user.
+ Permissions required: None
+ operationId: bytebase.v1.UserService.GetCurrentUser
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/google.protobuf.Empty'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.User'
+ /bytebase.v1.UserService/GetUser:
+ post:
+ tags:
+ - bytebase.v1.UserService
+ summary: 'Get the user. Any authenticated user can get the user. Permissions required: bb.users.get'
+ description: |-
+ Get the user.
+ Any authenticated user can get the user.
+ Permissions required: bb.users.get
+ operationId: bytebase.v1.UserService.GetUser
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetUserRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.User'
+ /bytebase.v1.UserService/ListUsers:
+ post:
+ tags:
+ - bytebase.v1.UserService
+ summary: 'List all users. Any authenticated user can list users. Permissions required: bb.users.list'
+ description: |-
+ List all users.
+ Any authenticated user can list users.
+ Permissions required: bb.users.list
+ operationId: bytebase.v1.UserService.ListUsers
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListUsersRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListUsersResponse'
+ /bytebase.v1.UserService/UndeleteUser:
+ post:
+ tags:
+ - bytebase.v1.UserService
+ summary: 'Restores a deleted user. Permissions required: bb.users.undelete'
+ description: |-
+ Restores a deleted user.
+ Permissions required: bb.users.undelete
+ operationId: bytebase.v1.UserService.UndeleteUser
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UndeleteUserRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.User'
+ /bytebase.v1.UserService/UpdateEmail:
+ post:
+ tags:
+ - bytebase.v1.UserService
+ summary: 'Updates a user''s email address. Permissions required: bb.users.updateEmail'
+ description: |-
+ Updates a user's email address.
+ Permissions required: bb.users.updateEmail
+ operationId: bytebase.v1.UserService.UpdateEmail
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UpdateEmailRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.User'
+ /bytebase.v1.UserService/UpdateUser:
+ post:
+ tags:
+ - bytebase.v1.UserService
+ summary: 'Updates a user. Users can update their own profile, or users with bb.users.update permission can update any user. Note: Email updates are not supported through this API. Use UpdateEmail instead. Permissions required: bb.users.update (or self)'
+ description: |-
+ Updates a user. Users can update their own profile, or users with bb.users.update permission can update any user.
+ Note: Email updates are not supported through this API. Use UpdateEmail instead.
+ Permissions required: bb.users.update (or self)
+ operationId: bytebase.v1.UserService.UpdateUser
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UpdateUserRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.User'
+ /bytebase.v1.WorksheetService/BatchUpdateWorksheetOrganizer:
+ post:
+ tags:
+ - bytebase.v1.WorksheetService
+ summary: 'Batch update the organizers of worksheets. The access is the same as UpdateWorksheet method. Permissions required: bb.worksheets.get (or creator, or project member for shared worksheets)'
+ description: |-
+ Batch update the organizers of worksheets.
+ The access is the same as UpdateWorksheet method.
+ Permissions required: bb.worksheets.get (or creator, or project member for shared worksheets)
+ operationId: bytebase.v1.WorksheetService.BatchUpdateWorksheetOrganizer
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchUpdateWorksheetOrganizerRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.BatchUpdateWorksheetOrganizerResponse'
+ /bytebase.v1.WorksheetService/CreateWorksheet:
+ post:
+ tags:
+ - bytebase.v1.WorksheetService
+ summary: 'Creates a personal worksheet used in SQL Editor. Any authenticated user can create their own worksheets. Permissions required: None (authenticated users only)'
+ description: |-
+ Creates a personal worksheet used in SQL Editor. Any authenticated user can create their own worksheets.
+ Permissions required: None (authenticated users only)
+ operationId: bytebase.v1.WorksheetService.CreateWorksheet
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.CreateWorksheetRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Worksheet'
+ /bytebase.v1.WorksheetService/DeleteWorksheet:
+ post:
+ tags:
+ - bytebase.v1.WorksheetService
+ summary: 'Delete a worksheet. The access is the same as UpdateWorksheet method. Permissions required: bb.worksheets.manage (or creator, or project member for PROJECT_WRITE worksheets)'
+ description: |-
+ Delete a worksheet.
+ The access is the same as UpdateWorksheet method.
+ Permissions required: bb.worksheets.manage (or creator, or project member for PROJECT_WRITE worksheets)
+ operationId: bytebase.v1.WorksheetService.DeleteWorksheet
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DeleteWorksheetRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/google.protobuf.Empty'
+ /bytebase.v1.WorksheetService/GetWorksheet:
+ post:
+ tags:
+ - bytebase.v1.WorksheetService
+ summary: 'Get a worksheet by name. The users can access this method if, - they are the creator of the worksheet; - they have bb.worksheets.get permission on the workspace; - the sheet is shared with them with PROJECT_READ and PROJECT_WRITE visibility, and they have bb.projects.get permission on the project. Permissions required: bb.worksheets.get (or creator, or project member for shared worksheets)'
+ description: |-
+ Get a worksheet by name.
+ The users can access this method if,
+ - they are the creator of the worksheet;
+ - they have bb.worksheets.get permission on the workspace;
+ - the sheet is shared with them with PROJECT_READ and PROJECT_WRITE visibility, and they have bb.projects.get permission on the project.
+ Permissions required: bb.worksheets.get (or creator, or project member for shared worksheets)
+ operationId: bytebase.v1.WorksheetService.GetWorksheet
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetWorksheetRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Worksheet'
+ /bytebase.v1.WorksheetService/SearchWorksheets:
+ post:
+ tags:
+ - bytebase.v1.WorksheetService
+ summary: 'Search for worksheets. This is used for finding my worksheets or worksheets shared by other people. The sheet accessibility is the same as GetWorksheet(). Permissions required: bb.worksheets.get (or creator, or project member for shared worksheets)'
+ description: |-
+ Search for worksheets.
+ This is used for finding my worksheets or worksheets shared by other people.
+ The sheet accessibility is the same as GetWorksheet().
+ Permissions required: bb.worksheets.get (or creator, or project member for shared worksheets)
+ operationId: bytebase.v1.WorksheetService.SearchWorksheets
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.SearchWorksheetsRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.SearchWorksheetsResponse'
+ /bytebase.v1.WorksheetService/UpdateWorksheet:
+ post:
+ tags:
+ - bytebase.v1.WorksheetService
+ summary: 'Update a worksheet. The users can access this method if, - they are the creator of the worksheet; - they have bb.worksheets.manage permission on the workspace; - the sheet is shared with them with PROJECT_WRITE visibility, and they have bb.projects.get permission on the project. Permissions required: bb.worksheets.manage (or creator, or project member for PROJECT_WRITE worksheets)'
+ description: |-
+ Update a worksheet.
+ The users can access this method if,
+ - they are the creator of the worksheet;
+ - they have bb.worksheets.manage permission on the workspace;
+ - the sheet is shared with them with PROJECT_WRITE visibility, and they have bb.projects.get permission on the project.
+ Permissions required: bb.worksheets.manage (or creator, or project member for PROJECT_WRITE worksheets)
+ operationId: bytebase.v1.WorksheetService.UpdateWorksheet
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UpdateWorksheetRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Worksheet'
+ /bytebase.v1.WorksheetService/UpdateWorksheetOrganizer:
+ post:
+ tags:
+ - bytebase.v1.WorksheetService
+ summary: 'Update the organizer of a worksheet. The access is the same as UpdateWorksheet method. Permissions required: bb.worksheets.get (or creator, or project member for shared worksheets)'
+ description: |-
+ Update the organizer of a worksheet.
+ The access is the same as UpdateWorksheet method.
+ Permissions required: bb.worksheets.get (or creator, or project member for shared worksheets)
+ operationId: bytebase.v1.WorksheetService.UpdateWorksheetOrganizer
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.UpdateWorksheetOrganizerRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.WorksheetOrganizer'
+ /bytebase.v1.WorkspaceService/GetIamPolicy:
+ post:
+ tags:
+ - bytebase.v1.WorkspaceService
+ summary: 'Retrieves IAM policy for the workspace. Permissions required: bb.workspaces.getIamPolicy'
+ description: |-
+ Retrieves IAM policy for the workspace.
+ Permissions required: bb.workspaces.getIamPolicy
+ operationId: bytebase.v1.WorkspaceService.GetIamPolicy
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetIamPolicyRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.IamPolicy'
+ /bytebase.v1.WorkspaceService/SetIamPolicy:
+ post:
+ tags:
+ - bytebase.v1.WorkspaceService
+ summary: 'Sets IAM policy for the workspace. Permissions required: bb.workspaces.setIamPolicy'
+ description: |-
+ Sets IAM policy for the workspace.
+ Permissions required: bb.workspaces.setIamPolicy
+ operationId: bytebase.v1.WorkspaceService.SetIamPolicy
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.SetIamPolicyRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.IamPolicy'
+components:
+ schemas:
+ bytebase.v1.AICompletionRequest:
+ type: object
+ properties:
+ messages:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.AICompletionRequest.Message'
+ title: messages
+ title: AICompletionRequest
+ additionalProperties: false
+ bytebase.v1.AICompletionRequest.Message:
+ type: object
+ properties:
+ role:
+ type: string
+ title: role
+ content:
+ type: string
+ title: content
+ title: Message
+ additionalProperties: false
+ bytebase.v1.AICompletionResponse:
+ type: object
+ properties:
+ candidates:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.AICompletionResponse.Candidate'
+ title: candidates
+ description: |-
+ candidates is used for results with multiple choices and candidates. Used
+ for OpenAI and Gemini.
+ title: AICompletionResponse
+ additionalProperties: false
+ bytebase.v1.AICompletionResponse.Candidate:
+ type: object
+ properties:
+ content:
+ title: content
+ $ref: '#/components/schemas/bytebase.v1.AICompletionResponse.Candidate.Content'
+ title: Candidate
+ additionalProperties: false
+ bytebase.v1.AICompletionResponse.Candidate.Content:
+ type: object
+ properties:
+ parts:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.AICompletionResponse.Candidate.Content.Part'
+ title: parts
+ description: parts is used for a result content with multiple parts.
+ title: Content
+ additionalProperties: false
+ bytebase.v1.AICompletionResponse.Candidate.Content.Part:
+ type: object
+ properties:
+ text:
+ type: string
+ title: text
+ title: Part
+ additionalProperties: false
+ bytebase.v1.AISetting:
+ type: object
+ properties:
+ enabled:
+ type: boolean
+ title: enabled
+ provider:
+ title: provider
+ $ref: '#/components/schemas/bytebase.v1.AISetting.Provider'
+ endpoint:
+ type: string
+ title: endpoint
+ apiKey:
+ type: string
+ title: api_key
+ model:
+ type: string
+ title: model
+ version:
+ type: string
+ title: version
+ title: AISetting
+ additionalProperties: false
+ bytebase.v1.AISetting.Provider:
+ type: string
+ title: Provider
+ enum:
+ - PROVIDER_UNSPECIFIED
+ - OPEN_AI
+ - CLAUDE
+ - GEMINI
+ - AZURE_OPENAI
+ bytebase.v1.Activity:
+ type: object
+ title: Activity
+ additionalProperties: false
+ description: Activity types for webhook notifications.
+ bytebase.v1.Activity.Type:
+ type: string
+ title: Type
+ enum:
+ - TYPE_UNSPECIFIED
+ - NOTIFY_ISSUE_APPROVED
+ - NOTIFY_PIPELINE_ROLLOUT
+ - ISSUE_CREATE
+ - ISSUE_COMMENT_CREATE
+ - ISSUE_FIELD_UPDATE
+ - ISSUE_STATUS_UPDATE
+ - ISSUE_APPROVAL_NOTIFY
+ - ISSUE_PIPELINE_STAGE_STATUS_UPDATE
+ - ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE
+ description: Activity type enumeration.
+ bytebase.v1.ActuatorInfo:
+ type: object
+ properties:
+ version:
+ type: string
+ title: version
+ description: The Bytebase server version.
+ gitCommit:
+ type: string
+ title: git_commit
+ description: The git commit hash of the build.
+ readonly:
+ type: boolean
+ title: readonly
+ description: Whether the Bytebase instance is running in read-only mode.
+ saas:
+ type: boolean
+ title: saas
+ description: Whether the Bytebase instance is running in SaaS mode where some features cannot be edited by users.
+ demo:
+ type: boolean
+ title: demo
+ description: Whether the Bytebase instance is running in demo mode.
+ host:
+ type: string
+ title: host
+ description: The host address of the Bytebase instance.
+ port:
+ type: string
+ title: port
+ description: The port number of the Bytebase instance.
+ externalUrl:
+ type: string
+ title: external_url
+ description: The external URL where users or webhook callbacks access Bytebase.
+ needAdminSetup:
+ type: boolean
+ title: need_admin_setup
+ description: Whether the Bytebase instance requires initial admin setup.
+ disallowSignup:
+ type: boolean
+ title: disallow_signup
+ description: Whether self-service user signup is disabled.
+ lastActiveTime:
+ title: last_active_time
+ description: The last time any API call was made, refreshed on each request.
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ require2fa:
+ type: boolean
+ title: require_2fa
+ description: Whether two-factor authentication is required for all users.
+ workspaceId:
+ type: string
+ title: workspace_id
+ description: The unique identifier for the workspace.
+ debug:
+ type: boolean
+ title: debug
+ description: Whether debug mode is enabled.
+ unlicensedFeatures:
+ type: array
+ items:
+ type: string
+ title: unlicensed_features
+ description: List of features that are not licensed.
+ disallowPasswordSignin:
+ type: boolean
+ title: disallow_password_signin
+ description: Whether password-based signin is disabled (except for workspace admins).
+ passwordRestriction:
+ title: password_restriction
+ description: Password complexity and restriction requirements.
+ $ref: '#/components/schemas/bytebase.v1.WorkspaceProfileSetting.PasswordRestriction'
+ docker:
+ type: boolean
+ title: docker
+ description: Whether the Bytebase instance is running in Docker.
+ userStats:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.ActuatorInfo.StatUser'
+ title: user_stats
+ description: Statistics about users in the system.
+ activatedInstanceCount:
+ type: integer
+ title: activated_instance_count
+ format: int32
+ description: The number of activated database instances.
+ totalInstanceCount:
+ type: integer
+ title: total_instance_count
+ format: int32
+ description: The total number of database instances.
+ enableSample:
+ type: boolean
+ title: enable_sample
+ description: Whether sample data setup is enabled.
+ externalUrlFromFlag:
+ type: boolean
+ title: external_url_from_flag
+ description: Whether the external URL is set via command-line flag (and thus cannot be changed via UI).
+ title: ActuatorInfo
+ additionalProperties: false
+ description: |-
+ System information and configuration for the Bytebase instance.
+ Actuator concept is similar to the Spring Boot Actuator.
+ bytebase.v1.ActuatorInfo.StatUser:
+ type: object
+ properties:
+ userType:
+ title: user_type
+ description: The type of user.
+ $ref: '#/components/schemas/bytebase.v1.UserType'
+ state:
+ title: state
+ description: The state of the user.
+ $ref: '#/components/schemas/bytebase.v1.State'
+ count:
+ type: integer
+ title: count
+ format: int32
+ description: The count of users matching this type and state.
+ title: StatUser
+ additionalProperties: false
+ description: User statistics by type and state.
+ bytebase.v1.AddDataSourceRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the instance to add a data source to.
+ Format: instances/{instance}
+ dataSource:
+ title: data_source
+ description: |-
+ Identified by data source ID.
+ Only READ_ONLY data source can be added.
+ $ref: '#/components/schemas/bytebase.v1.DataSource'
+ validateOnly:
+ type: boolean
+ title: validate_only
+ description: Validate only also tests the data source connection.
+ title: AddDataSourceRequest
+ additionalProperties: false
+ bytebase.v1.AddWebhookRequest:
+ type: object
+ properties:
+ project:
+ type: string
+ title: project
+ description: |-
+ The name of the project to add the webhook to.
+ Format: projects/{project}
+ webhook:
+ title: webhook
+ description: The webhook to add.
+ $ref: '#/components/schemas/bytebase.v1.Webhook'
+ title: AddWebhookRequest
+ additionalProperties: false
+ bytebase.v1.AdminExecuteRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name is the instance name to execute the query against.
+ Format: instances/{instance}/databases/{databaseName}
+ statement:
+ type: string
+ title: statement
+ description: The SQL statement to execute.
+ limit:
+ type: integer
+ title: limit
+ format: int32
+ description: The maximum number of rows to return.
+ schema:
+ type: string
+ title: schema
+ description: |-
+ The default schema to execute the statement. Equals to the current schema
+ in Oracle and search path in Postgres.
+ nullable: true
+ container:
+ type: string
+ title: container
+ description: |-
+ Container is the container name to execute the query against, used for
+ CosmosDB only.
+ nullable: true
+ title: AdminExecuteRequest
+ additionalProperties: false
+ bytebase.v1.AdminExecuteResponse:
+ type: object
+ properties:
+ results:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.QueryResult'
+ title: results
+ description: The query results.
+ title: AdminExecuteResponse
+ additionalProperties: false
+ bytebase.v1.Advice:
+ type: object
+ properties:
+ status:
+ title: status
+ description: The advice level.
+ $ref: '#/components/schemas/bytebase.v1.Advice.Level'
+ code:
+ type: integer
+ title: code
+ format: int32
+ description: The advice code.
+ title:
+ type: string
+ title: title
+ description: The advice title.
+ content:
+ type: string
+ title: content
+ description: The advice content.
+ startPosition:
+ title: start_position
+ description: |-
+ The start_position is inclusive and the end_position is exclusive.
+ TODO: use range instead
+ $ref: '#/components/schemas/bytebase.v1.Position'
+ endPosition:
+ title: end_position
+ $ref: '#/components/schemas/bytebase.v1.Position'
+ ruleType:
+ title: rule_type
+ description: The type of linting rule that generated this advice.
+ $ref: '#/components/schemas/bytebase.v1.Advice.RuleType'
+ title: Advice
+ additionalProperties: false
+ bytebase.v1.Advice.Level:
+ type: string
+ title: Level
+ enum:
+ - ADVICE_LEVEL_UNSPECIFIED
+ - SUCCESS
+ - WARNING
+ - ERROR
+ description: Level represents the severity level of the advice.
+ bytebase.v1.Advice.RuleType:
+ type: string
+ title: RuleType
+ enum:
+ - RULE_TYPE_UNSPECIFIED
+ - PARSER_BASED
+ - AI_POWERED
+ description: RuleType indicates the source of the linting rule.
+ bytebase.v1.Algorithm:
+ type: object
+ oneOf:
+ - properties:
+ fullMask:
+ title: full_mask
+ $ref: '#/components/schemas/bytebase.v1.Algorithm.FullMask'
+ title: full_mask
+ required:
+ - fullMask
+ - properties:
+ innerOuterMask:
+ title: inner_outer_mask
+ $ref: '#/components/schemas/bytebase.v1.Algorithm.InnerOuterMask'
+ title: inner_outer_mask
+ required:
+ - innerOuterMask
+ - properties:
+ md5Mask:
+ title: md5_mask
+ $ref: '#/components/schemas/bytebase.v1.Algorithm.MD5Mask'
+ title: md5_mask
+ required:
+ - md5Mask
+ - properties:
+ rangeMask:
+ title: range_mask
+ $ref: '#/components/schemas/bytebase.v1.Algorithm.RangeMask'
+ title: range_mask
+ required:
+ - rangeMask
+ title: Algorithm
+ additionalProperties: false
+ bytebase.v1.Algorithm.FullMask:
+ type: object
+ properties:
+ substitution:
+ type: string
+ title: substitution
+ description: |-
+ substitution is the string used to replace the original value, the
+ max length of the string is 16 bytes.
+ title: FullMask
+ additionalProperties: false
+ bytebase.v1.Algorithm.InnerOuterMask:
+ type: object
+ properties:
+ prefixLen:
+ type: integer
+ title: prefix_len
+ format: int32
+ suffixLen:
+ type: integer
+ title: suffix_len
+ format: int32
+ type:
+ title: type
+ $ref: '#/components/schemas/bytebase.v1.Algorithm.InnerOuterMask.MaskType'
+ substitution:
+ type: string
+ title: substitution
+ title: InnerOuterMask
+ additionalProperties: false
+ bytebase.v1.Algorithm.InnerOuterMask.MaskType:
+ type: string
+ title: MaskType
+ enum:
+ - MASK_TYPE_UNSPECIFIED
+ - INNER
+ - OUTER
+ bytebase.v1.Algorithm.MD5Mask:
+ type: object
+ properties:
+ salt:
+ type: string
+ title: salt
+ description: salt is the salt value to generate a different hash that with the word alone.
+ title: MD5Mask
+ additionalProperties: false
+ bytebase.v1.Algorithm.RangeMask:
+ type: object
+ properties:
+ slices:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Algorithm.RangeMask.Slice'
+ title: slices
+ description: |-
+ We store it as a repeated field to face the fact that the original value may have multiple parts should be masked.
+ But frontend can be started with a single rule easily.
+ title: RangeMask
+ additionalProperties: false
+ bytebase.v1.Algorithm.RangeMask.Slice:
+ type: object
+ properties:
+ start:
+ type: integer
+ title: start
+ format: int32
+ description: start is the start index of the original value, start from 0 and should be less than stop.
+ end:
+ type: integer
+ title: end
+ format: int32
+ description: stop is the stop index of the original value, should be less than the length of the original value.
+ substitution:
+ type: string
+ title: substitution
+ description: substitution is the string used to replace the OriginalValue[start:end).
+ title: Slice
+ additionalProperties: false
+ bytebase.v1.Announcement:
+ type: object
+ properties:
+ level:
+ title: level
+ description: The alert level of announcement
+ $ref: '#/components/schemas/bytebase.v1.Announcement.AlertLevel'
+ text:
+ type: string
+ title: text
+ description: The text of announcement
+ link:
+ type: string
+ title: link
+ description: The optional link, user can follow the link to check extra details
+ title: Announcement
+ additionalProperties: false
+ bytebase.v1.Announcement.AlertLevel:
+ type: string
+ title: AlertLevel
+ enum:
+ - ALERT_LEVEL_UNSPECIFIED
+ - INFO
+ - WARNING
+ - CRITICAL
+ description: 'We support three levels of AlertLevel: INFO, WARNING, and ERROR.'
+ bytebase.v1.AppIMSetting:
+ type: object
+ properties:
+ settings:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.AppIMSetting.IMSetting'
+ title: settings
+ title: AppIMSetting
+ additionalProperties: false
+ bytebase.v1.AppIMSetting.DingTalk:
+ type: object
+ properties:
+ clientId:
+ type: string
+ title: client_id
+ clientSecret:
+ type: string
+ title: client_secret
+ robotCode:
+ type: string
+ title: robot_code
+ title: DingTalk
+ additionalProperties: false
+ bytebase.v1.AppIMSetting.Feishu:
+ type: object
+ properties:
+ appId:
+ type: string
+ title: app_id
+ appSecret:
+ type: string
+ title: app_secret
+ title: Feishu
+ additionalProperties: false
+ bytebase.v1.AppIMSetting.IMSetting:
+ type: object
+ allOf:
+ - properties:
+ type:
+ title: type
+ $ref: '#/components/schemas/bytebase.v1.WebhookType'
+ - oneOf:
+ - properties:
+ dingtalk:
+ title: dingtalk
+ $ref: '#/components/schemas/bytebase.v1.AppIMSetting.DingTalk'
+ title: dingtalk
+ required:
+ - dingtalk
+ - properties:
+ feishu:
+ title: feishu
+ $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Feishu'
+ title: feishu
+ required:
+ - feishu
+ - properties:
+ lark:
+ title: lark
+ $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Lark'
+ title: lark
+ required:
+ - lark
+ - properties:
+ slack:
+ title: slack
+ $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Slack'
+ title: slack
+ required:
+ - slack
+ - properties:
+ teams:
+ title: teams
+ $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Teams'
+ title: teams
+ required:
+ - teams
+ - properties:
+ wecom:
+ title: wecom
+ $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Wecom'
+ title: wecom
+ required:
+ - wecom
+ title: IMSetting
+ additionalProperties: false
+ bytebase.v1.AppIMSetting.Lark:
+ type: object
+ properties:
+ appId:
+ type: string
+ title: app_id
+ appSecret:
+ type: string
+ title: app_secret
+ title: Lark
+ additionalProperties: false
+ bytebase.v1.AppIMSetting.Slack:
+ type: object
+ properties:
+ token:
+ type: string
+ title: token
+ title: Slack
+ additionalProperties: false
+ bytebase.v1.AppIMSetting.Teams:
+ type: object
+ properties:
+ tenantId:
+ type: string
+ title: tenant_id
+ description: Azure AD tenant ID (Directory ID).
+ clientId:
+ type: string
+ title: client_id
+ description: Azure AD application (client) ID.
+ clientSecret:
+ type: string
+ title: client_secret
+ description: Azure AD client secret.
+ title: Teams
+ additionalProperties: false
+ bytebase.v1.AppIMSetting.Wecom:
+ type: object
+ properties:
+ corpId:
+ type: string
+ title: corp_id
+ agentId:
+ type: string
+ title: agent_id
+ secret:
+ type: string
+ title: secret
+ title: Wecom
+ additionalProperties: false
+ bytebase.v1.ApprovalFlow:
+ type: object
+ properties:
+ roles:
+ type: array
+ items:
+ type: string
+ title: roles
+ description: The roles required for approval in order.
+ title: ApprovalFlow
+ additionalProperties: false
+ bytebase.v1.ApprovalTemplate:
+ type: object
+ properties:
+ flow:
+ title: flow
+ description: The approval flow definition.
+ $ref: '#/components/schemas/bytebase.v1.ApprovalFlow'
+ title:
+ type: string
+ title: title
+ description: The title of the approval template.
+ description:
+ type: string
+ title: description
+ description: The description of the approval template.
+ title: ApprovalTemplate
+ additionalProperties: false
+ bytebase.v1.ApproveIssueRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the issue to add an approver.
+ Format: projects/{project}/issues/{issue}
+ comment:
+ type: string
+ title: comment
+ description: The comment explaining the approval decision.
+ title: ApproveIssueRequest
+ additionalProperties: false
+ bytebase.v1.AuditData:
+ type: object
+ properties:
+ policyDelta:
+ title: policy_delta
+ description: Changes to IAM policies.
+ $ref: '#/components/schemas/bytebase.v1.PolicyDelta'
+ title: AuditData
+ additionalProperties: false
+ description: Additional audit data specific to certain operations.
+ bytebase.v1.AuditLog:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the log.
+ Formats:
+ - projects/{project}/auditLogs/{uid}
+ - workspaces/{workspace}/auditLogs/{uid}
+ createTime:
+ title: create_time
+ description: The timestamp when the audit log was created.
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ user:
+ type: string
+ title: user
+ description: |-
+ The user who performed the action.
+ Format: users/{email}
+ method:
+ type: string
+ title: method
+ description: |-
+ The method or action being audited.
+ For example: /bytebase.v1.SQLService/Query or bb.project.repository.push
+ severity:
+ title: severity
+ description: The severity level of this audit log entry.
+ $ref: '#/components/schemas/bytebase.v1.AuditLog.Severity'
+ resource:
+ type: string
+ title: resource
+ description: The resource associated with this audit log.
+ request:
+ type: string
+ title: request
+ description: The request payload in JSON format.
+ response:
+ type: string
+ title: response
+ description: |-
+ The response payload in JSON format.
+ Some fields may be omitted if they are too large or contain sensitive information.
+ status:
+ title: status
+ description: The status of the operation.
+ $ref: '#/components/schemas/google.rpc.Status'
+ latency:
+ title: latency
+ description: The duration of the operation.
+ $ref: '#/components/schemas/google.protobuf.Duration'
+ serviceData:
+ title: service_data
+ description: Service-specific metadata about the request, response, and activities.
+ $ref: '#/components/schemas/google.protobuf.Any'
+ requestMetadata:
+ title: request_metadata
+ description: Metadata about the request context.
+ $ref: '#/components/schemas/bytebase.v1.RequestMetadata'
+ title: AuditLog
+ additionalProperties: false
+ description: Audit log entry recording system activity or API call.
+ bytebase.v1.AuditLog.Severity:
+ type: string
+ title: Severity
+ enum:
+ - SEVERITY_UNSPECIFIED
+ - DEBUG
+ - INFO
+ - NOTICE
+ - WARNING
+ - ERROR
+ - CRITICAL
+ - ALERT
+ - EMERGENCY
+ description: Severity level for audit log entries.
+ bytebase.v1.AuthMethod:
+ type: string
+ title: AuthMethod
+ enum:
+ - AUTH_METHOD_UNSPECIFIED
+ - IAM
+ - CUSTOM
+ description: Authorization method for RPC calls.
+ bytebase.v1.BatchCancelPlanCheckRunsRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The name of the parent of the planChecks.
+ Format: projects/{project}/plans/{plan}
+ planCheckRuns:
+ type: array
+ items:
+ type: string
+ title: plan_check_runs
+ description: |-
+ TODO(d): update this API.
+ The planCheckRuns to cancel.
+ Format: projects/{project}/plans/{plan}/planCheckRuns/{planCheckRun}
+ title: BatchCancelPlanCheckRunsRequest
+ additionalProperties: false
+ bytebase.v1.BatchCancelPlanCheckRunsResponse:
+ type: object
+ title: BatchCancelPlanCheckRunsResponse
+ additionalProperties: false
+ bytebase.v1.BatchCancelTaskRunsRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The name of the parent of the taskRuns.
+ Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}
+ Use `projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/-` to cancel task runs under the same stage.
+ taskRuns:
+ type: array
+ items:
+ type: string
+ title: task_runs
+ description: |-
+ The taskRuns to cancel.
+ Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun}
+ title: BatchCancelTaskRunsRequest
+ additionalProperties: false
+ bytebase.v1.BatchCancelTaskRunsResponse:
+ type: object
+ title: BatchCancelTaskRunsResponse
+ additionalProperties: false
+ bytebase.v1.BatchCreateRevisionsRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The parent resource shared by all revisions being created.
+ Format: instances/{instance}/databases/{database}
+ requests:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.CreateRevisionRequest'
+ title: requests
+ description: |-
+ The request message specifying the revisions to create.
+ A maximum of 100 revisions can be created in a batch.
+ title: BatchCreateRevisionsRequest
+ additionalProperties: false
+ bytebase.v1.BatchCreateRevisionsResponse:
+ type: object
+ properties:
+ revisions:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Revision'
+ title: revisions
+ description: The created revisions.
+ title: BatchCreateRevisionsResponse
+ additionalProperties: false
+ bytebase.v1.BatchCreateSheetsRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The parent resource where all sheets will be created.
+ Format: projects/{project}
+ requests:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.CreateSheetRequest'
+ title: requests
+ title: BatchCreateSheetsRequest
+ additionalProperties: false
+ bytebase.v1.BatchCreateSheetsResponse:
+ type: object
+ properties:
+ sheets:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Sheet'
+ title: sheets
+ title: BatchCreateSheetsResponse
+ additionalProperties: false
+ bytebase.v1.BatchDeleteProjectsRequest:
+ type: object
+ properties:
+ names:
+ type: array
+ items:
+ type: string
+ title: names
+ description: |-
+ The names of the projects to delete.
+ Format: projects/{project}
+ force:
+ type: boolean
+ title: force
+ description: |-
+ If set to true, any databases from this project will be moved to default project.
+ Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project.
+ Open issues will remain open but associated with the deleted project.
+ If set to false, the operation will fail if the project has databases or open issues.
+ title: BatchDeleteProjectsRequest
+ additionalProperties: false
+ bytebase.v1.BatchDeparseRequest:
+ type: object
+ properties:
+ expressions:
+ type: array
+ items:
+ $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'
+ title: expressions
+ description: The CEL expression ASTs to deparse.
+ title: BatchDeparseRequest
+ additionalProperties: false
+ description: Request message for batch deparsing CEL expressions.
+ bytebase.v1.BatchDeparseResponse:
+ type: object
+ properties:
+ expressions:
+ type: array
+ items:
+ type: string
+ title: expressions
+ description: The deparsed CEL expressions as strings.
+ title: BatchDeparseResponse
+ additionalProperties: false
+ description: Response message for batch deparsing CEL expressions.
+ bytebase.v1.BatchGetDatabasesRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The parent resource shared by all databases being retrieved.
+ - projects/{project}: batch get databases in a project;
+ - instances/{instances}: batch get databases in a instance;
+ Use "-" as wildcard to batch get databases across parent.
+ names:
+ type: array
+ items:
+ type: string
+ title: names
+ description: The list of database names to retrieve.
+ title: BatchGetDatabasesRequest
+ additionalProperties: false
+ bytebase.v1.BatchGetDatabasesResponse:
+ type: object
+ properties:
+ databases:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Database'
+ title: databases
+ description: The databases from the specified request.
+ title: BatchGetDatabasesResponse
+ additionalProperties: false
+ bytebase.v1.BatchGetGroupsRequest:
+ type: object
+ properties:
+ names:
+ type: array
+ items:
+ type: string
+ title: names
+ description: |-
+ The group names to retrieve.
+ Format: groups/{email}
+ title: BatchGetGroupsRequest
+ additionalProperties: false
+ description: Request message for batch getting groups.
+ bytebase.v1.BatchGetGroupsResponse:
+ type: object
+ properties:
+ groups:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Group'
+ title: groups
+ description: The groups from the specified request.
+ title: BatchGetGroupsResponse
+ additionalProperties: false
+ description: Response message for batch getting groups.
+ bytebase.v1.BatchGetIamPolicyRequest:
+ type: object
+ properties:
+ scope:
+ type: string
+ title: scope
+ description: The scope of the batch get. Typically it's "projects/-".
+ names:
+ type: array
+ items:
+ type: string
+ title: names
+ title: BatchGetIamPolicyRequest
+ additionalProperties: false
+ bytebase.v1.BatchGetIamPolicyResponse:
+ type: object
+ properties:
+ policyResults:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.BatchGetIamPolicyResponse.PolicyResult'
+ title: policy_results
+ description: The policy results for each requested project.
+ title: BatchGetIamPolicyResponse
+ additionalProperties: false
+ bytebase.v1.BatchGetIamPolicyResponse.PolicyResult:
+ type: object
+ properties:
+ project:
+ type: string
+ title: project
+ description: The project resource name.
+ policy:
+ title: policy
+ description: The IAM policy for the project.
+ $ref: '#/components/schemas/bytebase.v1.IamPolicy'
+ title: PolicyResult
+ additionalProperties: false
+ description: Result for a single project's IAM policy.
+ bytebase.v1.BatchGetUsersRequest:
+ type: object
+ properties:
+ names:
+ type: array
+ items:
+ type: string
+ title: names
+ description: |-
+ The user names to retrieve.
+ Format: users/{email}
+ title: BatchGetUsersRequest
+ additionalProperties: false
+ bytebase.v1.BatchGetUsersResponse:
+ type: object
+ properties:
+ users:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.User'
+ title: users
+ description: The users from the specified request.
+ title: BatchGetUsersResponse
+ additionalProperties: false
+ bytebase.v1.BatchParseRequest:
+ type: object
+ properties:
+ expressions:
+ type: array
+ items:
+ type: string
+ title: expressions
+ description: The CEL expression strings to parse.
+ title: BatchParseRequest
+ additionalProperties: false
+ description: Request message for batch parsing CEL expressions.
+ bytebase.v1.BatchParseResponse:
+ type: object
+ properties:
+ expressions:
+ type: array
+ items:
+ $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'
+ title: expressions
+ description: The parsed CEL expressions as AST.
+ title: BatchParseResponse
+ additionalProperties: false
+ description: Response message for batch parsing CEL expressions.
+ bytebase.v1.BatchRunTasksRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The name of the parent of the tasks.
+ Format: projects/{project}/rollouts/{rollout}/stages/{stage}
+ tasks:
+ type: array
+ items:
+ type: string
+ title: tasks
+ description: |-
+ The tasks to run.
+ Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}
+ runTime:
+ title: run_time
+ description: The task run should run after run_time.
+ nullable: true
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ title: BatchRunTasksRequest
+ additionalProperties: false
+ bytebase.v1.BatchRunTasksResponse:
+ type: object
+ title: BatchRunTasksResponse
+ additionalProperties: false
+ bytebase.v1.BatchSkipTasksRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The name of the parent of the tasks.
+ Format: projects/{project}/rollouts/{rollout}/stages/{stage}
+ tasks:
+ type: array
+ items:
+ type: string
+ title: tasks
+ description: |-
+ The tasks to skip.
+ Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}
+ reason:
+ type: string
+ title: reason
+ maxLength: 1000
+ description: The reason for skipping the tasks.
+ title: BatchSkipTasksRequest
+ additionalProperties: false
+ bytebase.v1.BatchSkipTasksResponse:
+ type: object
+ title: BatchSkipTasksResponse
+ additionalProperties: false
+ bytebase.v1.BatchSyncDatabasesRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The parent resource shared by all databases being updated.
+ Format: instances/{instance}
+ If the operation spans parents, a dash (-) may be accepted as a wildcard.
+ names:
+ type: array
+ items:
+ type: string
+ title: names
+ description: The list of database names to sync.
+ title: BatchSyncDatabasesRequest
+ additionalProperties: false
+ bytebase.v1.BatchSyncDatabasesResponse:
+ type: object
+ title: BatchSyncDatabasesResponse
+ additionalProperties: false
+ bytebase.v1.BatchSyncInstancesRequest:
+ type: object
+ properties:
+ requests:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.SyncInstanceRequest'
+ title: requests
+ description: |-
+ The request message specifying the instances to sync.
+ A maximum of 1000 instances can be synced in a batch.
+ title: BatchSyncInstancesRequest
+ additionalProperties: false
+ bytebase.v1.BatchSyncInstancesResponse:
+ type: object
+ title: BatchSyncInstancesResponse
+ additionalProperties: false
+ bytebase.v1.BatchUpdateDatabasesRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The parent resource shared by all databases being updated.
+ Format: instances/{instance}
+ If the operation spans parents, a dash (-) may be accepted as a wildcard.
+ We only support updating the project of databases for now.
+ requests:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.UpdateDatabaseRequest'
+ title: requests
+ description: |-
+ The request message specifying the resources to update.
+ A maximum of 1000 databases can be modified in a batch.
+ title: BatchUpdateDatabasesRequest
+ additionalProperties: false
+ bytebase.v1.BatchUpdateDatabasesResponse:
+ type: object
+ properties:
+ databases:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Database'
+ title: databases
+ description: Databases updated.
+ title: BatchUpdateDatabasesResponse
+ additionalProperties: false
+ bytebase.v1.BatchUpdateInstancesRequest:
+ type: object
+ properties:
+ requests:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.UpdateInstanceRequest'
+ title: requests
+ description: The request message specifying the resources to update.
+ title: BatchUpdateInstancesRequest
+ additionalProperties: false
+ bytebase.v1.BatchUpdateInstancesResponse:
+ type: object
+ properties:
+ instances:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Instance'
+ title: instances
+ title: BatchUpdateInstancesResponse
+ additionalProperties: false
+ bytebase.v1.BatchUpdateIssuesStatusRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The parent resource shared by all issues being updated.
+ Format: projects/{project}
+ If the operation spans parents, a dash (-) may be accepted as a wildcard.
+ We only support updating the status of databases for now.
+ issues:
+ type: array
+ items:
+ type: string
+ title: issues
+ description: |-
+ The list of issues to update.
+ Format: projects/{project}/issues/{issue}
+ status:
+ title: status
+ description: The new status.
+ $ref: '#/components/schemas/bytebase.v1.IssueStatus'
+ reason:
+ type: string
+ title: reason
+ description: The reason for the status change.
+ title: BatchUpdateIssuesStatusRequest
+ additionalProperties: false
+ bytebase.v1.BatchUpdateIssuesStatusResponse:
+ type: object
+ title: BatchUpdateIssuesStatusResponse
+ additionalProperties: false
+ bytebase.v1.BatchUpdateWorksheetOrganizerRequest:
+ type: object
+ properties:
+ requests:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.UpdateWorksheetOrganizerRequest'
+ title: requests
+ title: BatchUpdateWorksheetOrganizerRequest
+ additionalProperties: false
+ bytebase.v1.BatchUpdateWorksheetOrganizerResponse:
+ type: object
+ properties:
+ worksheetOrganizers:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.WorksheetOrganizer'
+ title: worksheet_organizers
+ title: BatchUpdateWorksheetOrganizerResponse
+ additionalProperties: false
+ bytebase.v1.Binding:
+ type: object
+ properties:
+ role:
+ type: string
+ title: role
+ description: |-
+ The role that is assigned to the members.
+ Format: roles/{role}
+ members:
+ type: array
+ items:
+ type: string
+ title: members
+ description: |-
+ Specifies the principals requesting access for a Bytebase resource.
+ For users, the member should be: user:{email}
+ For groups, the member should be: group:{email}
+ condition:
+ title: condition
+ description: |-
+ The condition that is associated with this binding, only used in the project IAM policy.
+ If the condition evaluates to true, then this binding applies to the current request.
+ If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding.
+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+ Support variables:
+ resource.database: the database full name in "instances/{instance}/databases/{database}" format, used by the "roles/sqlEditorUser" role, support "==" operator.
+ resource.schema_name: the schema name, used by the "roles/sqlEditorUser" role, support "==" operator.
+ resource.table_name: the table name, used by the "roles/sqlEditorUser" role, support "==" operator.
+ request.time: the expiration. Only support "<" operation in `request.time < timestamp("{ISO datetime string format}")`.
+
+ For example:
+ resource.database == "instances/local-pg/databases/postgres" && resource.schema_name in ["public","another_schema"]
+ resource.database == "instances/local-pg/databases/bytebase" && resource.schema_name == "public" && resource.table_name in ["audit_log"]
+ request.time < timestamp("2025-04-26T11:24:48.655Z")
+ $ref: '#/components/schemas/google.type.Expr'
+ parsedExpr:
+ title: parsed_expr
+ description: The parsed expression of the condition.
+ $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'
+ title: Binding
+ additionalProperties: false
+ description: Binding associates members with a role and optional conditions.
+ bytebase.v1.BindingDelta:
+ type: object
+ properties:
+ action:
+ title: action
+ description: The action that was performed on a Binding.
+ $ref: '#/components/schemas/bytebase.v1.BindingDelta.Action'
+ role:
+ type: string
+ title: role
+ description: |-
+ Role that is assigned to `members`.
+ For example, `roles/projectOwner`.
+ member:
+ type: string
+ title: member
+ description: Follows the same format of Binding.members.
+ condition:
+ title: condition
+ description: The condition that is associated with this binding.
+ $ref: '#/components/schemas/google.type.Expr'
+ title: BindingDelta
+ additionalProperties: false
+ description: A single change to a binding.
+ bytebase.v1.BindingDelta.Action:
+ type: string
+ title: Action
+ enum:
+ - ACTION_UNSPECIFIED
+ - ADD
+ - REMOVE
+ description: Type of action performed on a binding.
+ bytebase.v1.BoundingBox:
+ type: object
+ properties:
+ xmin:
+ type: number
+ title: xmin
+ format: double
+ description: Minimum X coordinate
+ ymin:
+ type: number
+ title: ymin
+ format: double
+ description: Minimum Y coordinate
+ xmax:
+ type: number
+ title: xmax
+ format: double
+ description: Maximum X coordinate
+ ymax:
+ type: number
+ title: ymax
+ format: double
+ description: Maximum Y coordinate
+ title: BoundingBox
+ additionalProperties: false
+ description: BoundingBox defines the spatial bounds for GEOMETRY spatial indexes.
+ bytebase.v1.ChangedResourceDatabase:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ schemas:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.ChangedResourceSchema'
+ title: schemas
+ title: ChangedResourceDatabase
+ additionalProperties: false
+ bytebase.v1.ChangedResourceFunction:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ ranges:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Range'
+ title: ranges
+ description: The ranges of sub-strings correspond to the statements on the sheet.
+ title: ChangedResourceFunction
+ additionalProperties: false
+ bytebase.v1.ChangedResourceProcedure:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ ranges:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Range'
+ title: ranges
+ description: The ranges of sub-strings correspond to the statements on the sheet.
+ title: ChangedResourceProcedure
+ additionalProperties: false
+ bytebase.v1.ChangedResourceSchema:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ tables:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.ChangedResourceTable'
+ title: tables
+ views:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.ChangedResourceView'
+ title: views
+ functions:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.ChangedResourceFunction'
+ title: functions
+ procedures:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.ChangedResourceProcedure'
+ title: procedures
+ title: ChangedResourceSchema
+ additionalProperties: false
+ bytebase.v1.ChangedResourceTable:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ ranges:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Range'
+ title: ranges
+ description: The ranges of sub-strings correspond to the statements on the sheet.
+ title: ChangedResourceTable
+ additionalProperties: false
+ bytebase.v1.ChangedResourceView:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ ranges:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Range'
+ title: ranges
+ description: The ranges of sub-strings correspond to the statements on the sheet.
+ title: ChangedResourceView
+ additionalProperties: false
+ bytebase.v1.ChangedResources:
+ type: object
+ properties:
+ databases:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.ChangedResourceDatabase'
+ title: databases
+ title: ChangedResources
+ additionalProperties: false
+ bytebase.v1.Changelog:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: 'Format: instances/{instance}/databases/{database}/changelogs/{changelog}'
+ createTime:
+ title: create_time
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ status:
+ title: status
+ $ref: '#/components/schemas/bytebase.v1.Changelog.Status'
+ statement:
+ type: string
+ title: statement
+ description: The statement is used for preview purpose.
+ statementSize:
+ type:
+ - integer
+ - string
+ title: statement_size
+ format: int64
+ statementSheet:
+ type: string
+ title: statement_sheet
+ description: |-
+ The name of the sheet resource.
+ Format: projects/{project}/sheets/{sheet}
+ schema:
+ type: string
+ title: schema
+ schemaSize:
+ type:
+ - integer
+ - string
+ title: schema_size
+ format: int64
+ prevSchema:
+ type: string
+ title: prev_schema
+ prevSchemaSize:
+ type:
+ - integer
+ - string
+ title: prev_schema_size
+ format: int64
+ issue:
+ type: string
+ title: issue
+ description: 'Format: projects/{project}/issues/{issue}'
+ taskRun:
+ type: string
+ title: task_run
+ description: 'Format: projects/{projects}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun}'
+ version:
+ type: string
+ title: version
+ description: Could be empty
+ revision:
+ type: string
+ title: revision
+ description: |-
+ Could be empty
+ Or present but not found if deleted
+ changedResources:
+ title: changed_resources
+ $ref: '#/components/schemas/bytebase.v1.ChangedResources'
+ type:
+ title: type
+ $ref: '#/components/schemas/bytebase.v1.Changelog.Type'
+ title: Changelog
+ additionalProperties: false
+ bytebase.v1.Changelog.Status:
+ type: string
+ title: Status
+ enum:
+ - STATUS_UNSPECIFIED
+ - PENDING
+ - DONE
+ - FAILED
+ bytebase.v1.Changelog.Type:
+ type: string
+ title: Type
+ enum:
+ - TYPE_UNSPECIFIED
+ - BASELINE
+ - MIGRATE
+ - SDL
+ bytebase.v1.ChangelogView:
+ type: string
+ title: ChangelogView
+ enum:
+ - CHANGELOG_VIEW_UNSPECIFIED
+ - CHANGELOG_VIEW_BASIC
+ - CHANGELOG_VIEW_FULL
+ bytebase.v1.CheckConstraintMetadata:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: The name is the name of a check constraint.
+ expression:
+ type: string
+ title: expression
+ description: The expression is the expression of a check constraint.
+ title: CheckConstraintMetadata
+ additionalProperties: false
+ description: CheckConstraintMetadata is the metadata for check constraints.
+ bytebase.v1.CheckReleaseRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: 'Format: projects/{project}'
+ release:
+ title: release
+ description: The release to check.
+ $ref: '#/components/schemas/bytebase.v1.Release'
+ targets:
+ type: array
+ items:
+ type: string
+ title: targets
+ description: |-
+ The targets to dry-run the release.
+ Can be database or databaseGroup.
+ Format:
+ projects/{project}/databaseGroups/{databaseGroup}
+ instances/{instance}/databases/{database}
+ customRules:
+ type: string
+ title: custom_rules
+ description: |-
+ Custom linting rules in natural language for AI-powered validation.
+ Each rule should be a clear statement describing the desired schema constraint.
+ Example: "All tables must have a primary key"
+ Example: "VARCHAR columns should specify a maximum length"
+ title: CheckReleaseRequest
+ additionalProperties: false
+ bytebase.v1.CheckReleaseResponse:
+ type: object
+ properties:
+ results:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.CheckReleaseResponse.CheckResult'
+ title: results
+ description: The check results for each file and target combination.
+ affectedRows:
+ type:
+ - integer
+ - string
+ title: affected_rows
+ format: int64
+ description: The total affected rows across all checks.
+ riskLevel:
+ title: risk_level
+ description: The aggregated risk level of the check.
+ $ref: '#/components/schemas/bytebase.v1.RiskLevel'
+ title: CheckReleaseResponse
+ additionalProperties: false
+ bytebase.v1.CheckReleaseResponse.CheckResult:
+ type: object
+ properties:
+ file:
+ type: string
+ title: file
+ description: The file path that is being checked.
+ target:
+ type: string
+ title: target
+ description: |-
+ The target that the check is performed on.
+ Should be a database. Format: instances/{instance}/databases/{database}
+ advices:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Advice'
+ title: advices
+ description: The list of advice for the file and the target.
+ affectedRows:
+ type:
+ - integer
+ - string
+ title: affected_rows
+ format: int64
+ description: The count of affected rows of the statement on the target.
+ riskLevel:
+ title: risk_level
+ description: The risk level of the statement on the target.
+ $ref: '#/components/schemas/bytebase.v1.RiskLevel'
+ title: CheckResult
+ additionalProperties: false
+ description: Check result for a single release file on a target database.
+ bytebase.v1.ColumnCatalog:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: The column name.
+ semanticType:
+ type: string
+ title: semantic_type
+ description: The semantic type describing the data purpose.
+ labels:
+ type: object
+ title: labels
+ additionalProperties:
+ type: string
+ title: value
+ description: User-defined labels for this column.
+ classification:
+ type: string
+ title: classification
+ description: The data classification level for this column.
+ objectSchema:
+ title: object_schema
+ description: Object schema for complex column types like JSON.
+ nullable: true
+ $ref: '#/components/schemas/bytebase.v1.ObjectSchema'
+ title: ColumnCatalog
+ additionalProperties: false
+ description: Column metadata within a table.
+ bytebase.v1.ColumnCatalog.LabelsEntry:
+ type: object
+ properties:
+ key:
+ type: string
+ title: key
+ value:
+ type: string
+ title: value
+ title: LabelsEntry
+ additionalProperties: false
+ bytebase.v1.ColumnMetadata:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: The name is the name of a column.
+ position:
+ type: integer
+ title: position
+ format: int32
+ description: The position is the position in columns.
+ hasDefault:
+ type: boolean
+ title: has_default
+ default:
+ type: string
+ title: default
+ description: The default value of column.
+ defaultOnNull:
+ type: boolean
+ title: default_on_null
+ description: |-
+ Oracle specific metadata.
+ The default_on_null is the default on null of a column.
+ onUpdate:
+ type: string
+ title: on_update
+ description: |-
+ The on_update is the on update action of a column.
+ For MySQL like databases, it's only supported for TIMESTAMP columns with
+ CURRENT_TIMESTAMP as on update value.
+ nullable:
+ type: boolean
+ title: nullable
+ description: The nullable is the nullable of a column.
+ type:
+ type: string
+ title: type
+ description: The type is the type of a column.
+ characterSet:
+ type: string
+ title: character_set
+ description: The character_set is the character_set of a column.
+ collation:
+ type: string
+ title: collation
+ description: The collation is the collation of a column.
+ comment:
+ type: string
+ title: comment
+ description: The comment is the comment of a column.
+ generation:
+ title: generation
+ description: The generation is the generation of a column.
+ $ref: '#/components/schemas/bytebase.v1.GenerationMetadata'
+ isIdentity:
+ type: boolean
+ title: is_identity
+ identityGeneration:
+ title: identity_generation
+ description: The identity_generation is for identity columns, PG only.
+ $ref: '#/components/schemas/bytebase.v1.ColumnMetadata.IdentityGeneration'
+ identitySeed:
+ type:
+ - integer
+ - string
+ title: identity_seed
+ format: int64
+ description: The identity_seed is for identity columns, MSSQL only.
+ identityIncrement:
+ type:
+ - integer
+ - string
+ title: identity_increment
+ format: int64
+ description: The identity_increment is for identity columns, MSSQL only.
+ defaultConstraintName:
+ type: string
+ title: default_constraint_name
+ description: |-
+ The default_constraint_name is the name of the default constraint, MSSQL only.
+ In MSSQL, default values are implemented as named constraints. When modifying or
+ dropping a column's default value, you must reference the constraint by name.
+ This field stores the actual constraint name from the database.
+
+ Example: A column definition like:
+ CREATE TABLE employees (
+ status NVARCHAR(20) DEFAULT 'active'
+ )
+
+ Will create a constraint with an auto-generated name like 'DF__employees__statu__3B75D760'
+ or a user-defined name if specified:
+ ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT 'active' FOR status
+
+ To modify the default, you must first drop the existing constraint by name:
+ ALTER TABLE employees DROP CONSTRAINT DF__employees__statu__3B75D760
+ ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT 'inactive' FOR status
+
+ This field is populated when syncing from the database. When empty (e.g., when parsing
+ from SQL files), the system cannot automatically drop the constraint.
+ title: ColumnMetadata
+ additionalProperties: false
+ description: ColumnMetadata is the metadata for columns.
+ bytebase.v1.ColumnMetadata.IdentityGeneration:
+ type: string
+ title: IdentityGeneration
+ enum:
+ - IDENTITY_GENERATION_UNSPECIFIED
+ - ALWAYS
+ - BY_DEFAULT
+ bytebase.v1.CreateDatabaseGroupRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The parent resource where this database group will be created.
+ Format: projects/{project}
+ databaseGroup:
+ title: database_group
+ description: The database group to create.
+ $ref: '#/components/schemas/bytebase.v1.DatabaseGroup'
+ databaseGroupId:
+ type: string
+ title: database_group_id
+ description: |-
+ The ID to use for the database group, which will become the final component of
+ the database group's resource name.
+
+ This value should be 4-63 characters, and valid characters
+ are /[a-z][0-9]-/.
+ validateOnly:
+ type: boolean
+ title: validate_only
+ description: If set, validate the create request and preview the full database group response, but do not actually create it.
+ title: CreateDatabaseGroupRequest
+ additionalProperties: false
+ description: Request message for creating a database group.
+ bytebase.v1.CreateGroupRequest:
+ type: object
+ properties:
+ group:
+ title: group
+ description: The group to create.
+ $ref: '#/components/schemas/bytebase.v1.Group'
+ groupEmail:
+ type: string
+ title: group_email
+ description: |-
+ The email to use for the group, which will become the final component
+ of the group's resource name.
+ title: CreateGroupRequest
+ additionalProperties: false
+ description: Request message for creating a group.
+ bytebase.v1.CreateIdentityProviderRequest:
+ type: object
+ properties:
+ identityProvider:
+ title: identity_provider
+ description: The identity provider to create.
+ $ref: '#/components/schemas/bytebase.v1.IdentityProvider'
+ identityProviderId:
+ type: string
+ title: identity_provider_id
+ description: |-
+ The ID to use for the identity provider, which will become the final component of
+ the identity provider's resource name.
+
+ This value should be 4-63 characters, and valid characters
+ are /[a-z][0-9]-/.
+ validateOnly:
+ type: boolean
+ title: validate_only
+ description: If set to true, the request will be validated without actually creating the identity provider.
+ title: CreateIdentityProviderRequest
+ additionalProperties: false
+ bytebase.v1.CreateInstanceRequest:
+ type: object
+ properties:
+ instance:
+ title: instance
+ description: The instance to create.
+ $ref: '#/components/schemas/bytebase.v1.Instance'
+ instanceId:
+ type: string
+ title: instance_id
+ description: |-
+ The ID to use for the instance, which will become the final component of
+ the instance's resource name.
+
+ This value should be 4-63 characters, and valid characters
+ are /[a-z][0-9]-/.
+ validateOnly:
+ type: boolean
+ title: validate_only
+ description: Validate only also tests the data source connection.
+ title: CreateInstanceRequest
+ additionalProperties: false
+ bytebase.v1.CreateIssueCommentRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The issue name
+ Format: projects/{project}/issues/{issue}
+ issueComment:
+ title: issue_comment
+ description: The comment to create.
+ $ref: '#/components/schemas/bytebase.v1.IssueComment'
+ title: CreateIssueCommentRequest
+ additionalProperties: false
+ bytebase.v1.CreateIssueRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The parent, which owns this collection of issues.
+ Format: projects/{project}
+ issue:
+ title: issue
+ description: The issue to create.
+ $ref: '#/components/schemas/bytebase.v1.Issue'
+ title: CreateIssueRequest
+ additionalProperties: false
+ bytebase.v1.CreatePlanRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The parent project where this plan will be created.
+ Format: projects/{project}
+ plan:
+ title: plan
+ description: The plan to create.
+ $ref: '#/components/schemas/bytebase.v1.Plan'
+ title: CreatePlanRequest
+ additionalProperties: false
+ bytebase.v1.CreatePolicyRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The parent resource where this instance will be created.
+ Workspace resource name: "".
+ Environment resource name: environments/environment-id.
+ Instance resource name: instances/instance-id.
+ Database resource name: instances/instance-id/databases/database-name.
+ policy:
+ title: policy
+ description: The policy to create.
+ $ref: '#/components/schemas/bytebase.v1.Policy'
+ type:
+ title: type
+ description: The type of policy to create.
+ $ref: '#/components/schemas/bytebase.v1.PolicyType'
+ title: CreatePolicyRequest
+ additionalProperties: false
+ bytebase.v1.CreateProjectRequest:
+ type: object
+ properties:
+ project:
+ title: project
+ description: The project to create.
+ $ref: '#/components/schemas/bytebase.v1.Project'
+ projectId:
+ type: string
+ title: project_id
+ description: |-
+ The ID to use for the project, which will become the final component of
+ the project's resource name.
+
+ This value should be 4-63 characters, and valid characters
+ are /[a-z][0-9]-/.
+ title: CreateProjectRequest
+ additionalProperties: false
+ bytebase.v1.CreateReleaseRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: 'Format: projects/{project}'
+ release:
+ title: release
+ description: The release to create.
+ $ref: '#/components/schemas/bytebase.v1.Release'
+ title: CreateReleaseRequest
+ additionalProperties: false
+ bytebase.v1.CreateReviewConfigRequest:
+ type: object
+ properties:
+ reviewConfig:
+ title: review_config
+ description: The SQL review config to create.
+ $ref: '#/components/schemas/bytebase.v1.ReviewConfig'
+ title: CreateReviewConfigRequest
+ additionalProperties: false
+ bytebase.v1.CreateRevisionRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: 'Format: instances/{instance}/databases/{database}'
+ revision:
+ title: revision
+ description: The revision to create.
+ $ref: '#/components/schemas/bytebase.v1.Revision'
+ title: CreateRevisionRequest
+ additionalProperties: false
+ bytebase.v1.CreateRoleRequest:
+ type: object
+ properties:
+ role:
+ title: role
+ description: The role to create.
+ $ref: '#/components/schemas/bytebase.v1.Role'
+ roleId:
+ type: string
+ title: role_id
+ description: |-
+ The ID to use for the role, which will become the final component
+ of the role's resource name.
+
+ This value should be 4-63 characters, and valid characters
+ are /[a-z][A-Z][0-9]/.
+ title: CreateRoleRequest
+ additionalProperties: false
+ bytebase.v1.CreateRolloutRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The parent project where this rollout will be created.
+ Format: projects/{project}
+ rollout:
+ title: rollout
+ description: The rollout to create.
+ $ref: '#/components/schemas/bytebase.v1.Rollout'
+ target:
+ type: string
+ title: target
+ description: |-
+ Create the rollout and the stages up to the target stage.
+ Format: environments/{environment}
+ If unspecified, all stages are created.
+ If set to "", no stages are created.
+ nullable: true
+ validateOnly:
+ type: boolean
+ title: validate_only
+ description: |-
+ If set, validate the request and preview the rollout, but
+ do not actually create it.
+ title: CreateRolloutRequest
+ additionalProperties: false
+ bytebase.v1.CreateSheetRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The parent resource where this sheet will be created.
+ Format: projects/{project}
+ sheet:
+ title: sheet
+ description: The sheet to create.
+ $ref: '#/components/schemas/bytebase.v1.Sheet'
+ title: CreateSheetRequest
+ additionalProperties: false
+ bytebase.v1.CreateUserRequest:
+ type: object
+ properties:
+ user:
+ title: user
+ description: The user to create.
+ $ref: '#/components/schemas/bytebase.v1.User'
+ title: CreateUserRequest
+ additionalProperties: false
+ bytebase.v1.CreateWorksheetRequest:
+ type: object
+ properties:
+ worksheet:
+ title: worksheet
+ description: The worksheet to create.
+ $ref: '#/components/schemas/bytebase.v1.Worksheet'
+ title: CreateWorksheetRequest
+ additionalProperties: false
+ bytebase.v1.DataClassificationSetting:
+ type: object
+ properties:
+ configs:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.DataClassificationSetting.DataClassificationConfig'
+ title: configs
+ title: DataClassificationSetting
+ additionalProperties: false
+ bytebase.v1.DataClassificationSetting.DataClassificationConfig:
+ type: object
+ properties:
+ id:
+ type: string
+ title: id
+ description: id is the uuid for classification. Each project can chose one classification config.
+ title:
+ type: string
+ title: title
+ levels:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level'
+ title: levels
+ description: |-
+ levels is user defined level list for classification.
+ The order for the level decides its priority.
+ classification:
+ type: object
+ title: classification
+ additionalProperties:
+ title: value
+ $ref: '#/components/schemas/bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification'
+ description: |-
+ classification is the id - DataClassification map.
+ The id should in [0-9]+-[0-9]+-[0-9]+ format.
+ title: DataClassificationConfig
+ additionalProperties: false
+ bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry:
+ type: object
+ properties:
+ key:
+ type: string
+ title: key
+ value:
+ title: value
+ $ref: '#/components/schemas/bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification'
+ title: ClassificationEntry
+ additionalProperties: false
+ bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification:
+ type: object
+ properties:
+ id:
+ type: string
+ title: id
+ description: id is the classification id in [0-9]+-[0-9]+-[0-9]+ format.
+ title:
+ type: string
+ title: title
+ description:
+ type: string
+ title: description
+ levelId:
+ type: string
+ title: level_id
+ nullable: true
+ title: DataClassification
+ additionalProperties: false
+ bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level:
+ type: object
+ properties:
+ id:
+ type: string
+ title: id
+ title:
+ type: string
+ title: title
+ description:
+ type: string
+ title: description
+ title: Level
+ additionalProperties: false
+ bytebase.v1.DataSource:
+ type: object
+ allOf:
+ - properties:
+ id:
+ type: string
+ title: id
+ description: The unique identifier for this data source.
+ type:
+ title: type
+ description: The type of data source (ADMIN or READ_ONLY).
+ $ref: '#/components/schemas/bytebase.v1.DataSourceType'
+ username:
+ type: string
+ title: username
+ description: The username for database authentication.
+ password:
+ type: string
+ title: password
+ description: The password for database authentication.
+ useSsl:
+ type: boolean
+ title: use_ssl
+ description: Use SSL to connect to the data source. By default, we use system default SSL configuration.
+ sslCa:
+ type: string
+ title: ssl_ca
+ description: The SSL certificate authority certificate.
+ sslCert:
+ type: string
+ title: ssl_cert
+ description: The SSL client certificate.
+ sslKey:
+ type: string
+ title: ssl_key
+ description: The SSL client private key.
+ verifyTlsCertificate:
+ type: boolean
+ title: verify_tls_certificate
+ description: |-
+ verify_tls_certificate enables TLS certificate verification for SSL connections.
+ Default is false (no verification) for backward compatibility.
+ Set to true for secure connections (recommended for production).
+ Only set to false for development or when certificates cannot be properly
+ validated (e.g., self-signed certs, VPN environments).
+ host:
+ type: string
+ title: host
+ description: The hostname or IP address of the database server.
+ port:
+ type: string
+ title: port
+ description: The port number of the database server.
+ database:
+ type: string
+ title: database
+ description: The name of the database to connect to.
+ srv:
+ type: boolean
+ title: srv
+ description: |-
+ srv, authentication_database and replica_set are used for MongoDB.
+ srv is a boolean flag that indicates whether the host is a DNS SRV record.
+ authenticationDatabase:
+ type: string
+ title: authentication_database
+ description: authentication_database is the database name to authenticate against, which stores the user credentials.
+ replicaSet:
+ type: string
+ title: replica_set
+ description: replica_set is used for MongoDB replica set.
+ sid:
+ type: string
+ title: sid
+ description: sid and service_name are used for Oracle.
+ serviceName:
+ type: string
+ title: service_name
+ sshHost:
+ type: string
+ title: ssh_host
+ description: |-
+ Connection over SSH.
+ The hostname of the SSH server agent.
+ Required.
+ sshPort:
+ type: string
+ title: ssh_port
+ description: |-
+ The port of the SSH server agent. It's 22 typically.
+ Required.
+ sshUser:
+ type: string
+ title: ssh_user
+ description: |-
+ The user to login the server.
+ Required.
+ sshPassword:
+ type: string
+ title: ssh_password
+ description: The password to login the server. If it's empty string, no password is required.
+ sshPrivateKey:
+ type: string
+ title: ssh_private_key
+ description: The private key to login the server. If it's empty string, we will use the system default private key from os.Getenv("SSH_AUTH_SOCK").
+ authenticationPrivateKey:
+ type: string
+ title: authentication_private_key
+ description: |-
+ PKCS#8 private key in PEM format. If it's empty string, no private key is required.
+ Used for authentication when connecting to the data source.
+ authenticationPrivateKeyPassphrase:
+ type: string
+ title: authentication_private_key_passphrase
+ description: Passphrase for the encrypted PKCS#8 private key. Only used when the private key is encrypted.
+ externalSecret:
+ title: external_secret
+ $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret'
+ authenticationType:
+ title: authentication_type
+ $ref: '#/components/schemas/bytebase.v1.DataSource.AuthenticationType'
+ saslConfig:
+ title: sasl_config
+ $ref: '#/components/schemas/bytebase.v1.SASLConfig'
+ additionalAddresses:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.DataSource.Address'
+ title: additional_addresses
+ description: additional_addresses is used for MongoDB replica set.
+ directConnection:
+ type: boolean
+ title: direct_connection
+ description: direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string.
+ region:
+ type: string
+ title: region
+ description: region is the location of where the DB is, works for AWS RDS. For example, us-east-1.
+ warehouseId:
+ type: string
+ title: warehouse_id
+ description: warehouse_id is used by Databricks.
+ masterName:
+ type: string
+ title: master_name
+ description: master_name is the master name used by connecting redis-master via redis sentinel.
+ masterUsername:
+ type: string
+ title: master_username
+ description: master_username and master_password are master credentials used by redis sentinel mode.
+ masterPassword:
+ type: string
+ title: master_password
+ redisType:
+ title: redis_type
+ $ref: '#/components/schemas/bytebase.v1.DataSource.RedisType'
+ cluster:
+ type: string
+ title: cluster
+ description: Cluster is the cluster name for the data source. Used by CockroachDB.
+ extraConnectionParameters:
+ type: object
+ title: extra_connection_parameters
+ additionalProperties:
+ type: string
+ title: value
+ description: |-
+ Extra connection parameters for the database connection.
+ For PostgreSQL HA, this can be used to set target_session_attrs=read-write
+ - oneOf:
+ - properties:
+ awsCredential:
+ title: aws_credential
+ $ref: '#/components/schemas/bytebase.v1.DataSource.AWSCredential'
+ title: aws_credential
+ required:
+ - awsCredential
+ - properties:
+ azureCredential:
+ title: azure_credential
+ $ref: '#/components/schemas/bytebase.v1.DataSource.AzureCredential'
+ title: azure_credential
+ required:
+ - azureCredential
+ - properties:
+ gcpCredential:
+ title: gcp_credential
+ $ref: '#/components/schemas/bytebase.v1.DataSource.GCPCredential'
+ title: gcp_credential
+ required:
+ - gcpCredential
+ title: DataSource
+ additionalProperties: false
+ bytebase.v1.DataSource.AWSCredential:
+ type: object
+ properties:
+ accessKeyId:
+ type: string
+ title: access_key_id
+ secretAccessKey:
+ type: string
+ title: secret_access_key
+ sessionToken:
+ type: string
+ title: session_token
+ roleArn:
+ type: string
+ title: role_arn
+ description: |-
+ ARN of IAM role to assume for cross-account access.
+ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
+ externalId:
+ type: string
+ title: external_id
+ description: |-
+ Optional external ID for additional security when assuming role.
+ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html
+ title: AWSCredential
+ additionalProperties: false
+ bytebase.v1.DataSource.Address:
+ type: object
+ properties:
+ host:
+ type: string
+ title: host
+ port:
+ type: string
+ title: port
+ title: Address
+ additionalProperties: false
+ bytebase.v1.DataSource.AuthenticationType:
+ type: string
+ title: AuthenticationType
+ enum:
+ - AUTHENTICATION_UNSPECIFIED
+ - PASSWORD
+ - GOOGLE_CLOUD_SQL_IAM
+ - AWS_RDS_IAM
+ - AZURE_IAM
+ bytebase.v1.DataSource.AzureCredential:
+ type: object
+ properties:
+ tenantId:
+ type: string
+ title: tenant_id
+ clientId:
+ type: string
+ title: client_id
+ clientSecret:
+ type: string
+ title: client_secret
+ title: AzureCredential
+ additionalProperties: false
+ bytebase.v1.DataSource.ExtraConnectionParametersEntry:
+ type: object
+ properties:
+ key:
+ type: string
+ title: key
+ value:
+ type: string
+ title: value
+ title: ExtraConnectionParametersEntry
+ additionalProperties: false
+ bytebase.v1.DataSource.GCPCredential:
+ type: object
+ properties:
+ content:
+ type: string
+ title: content
+ title: GCPCredential
+ additionalProperties: false
+ bytebase.v1.DataSource.RedisType:
+ type: string
+ title: RedisType
+ enum:
+ - REDIS_TYPE_UNSPECIFIED
+ - STANDALONE
+ - SENTINEL
+ - CLUSTER
+ bytebase.v1.DataSourceExternalSecret:
+ type: object
+ allOf:
+ - properties:
+ secretType:
+ title: secret_type
+ description: The type of external secret store.
+ $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.SecretType'
+ url:
+ type: string
+ title: url
+ description: The URL of the external secret store.
+ authType:
+ title: auth_type
+ description: The authentication method for accessing the secret store.
+ $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.AuthType'
+ engineName:
+ type: string
+ title: engine_name
+ description: engine name is the name for secret engine.
+ secretName:
+ type: string
+ title: secret_name
+ description: the secret name in the engine to store the password.
+ passwordKeyName:
+ type: string
+ title: password_key_name
+ description: the key name for the password.
+ skipVaultTlsVerification:
+ type: boolean
+ title: skip_vault_tls_verification
+ description: |-
+ TLS configuration for connecting to Vault server.
+ These fields are separate from the database TLS configuration in DataSource.
+ skip_vault_tls_verification disables TLS certificate verification for Vault connections.
+ Default is false (verification enabled) for security.
+ Only set to true for development or when certificates cannot be properly validated.
+ vaultSslCa:
+ type: string
+ title: vault_ssl_ca
+ description: CA certificate for Vault server verification.
+ vaultSslCert:
+ type: string
+ title: vault_ssl_cert
+ description: Client certificate for mutual TLS authentication with Vault.
+ vaultSslKey:
+ type: string
+ title: vault_ssl_key
+ description: Client private key for mutual TLS authentication with Vault.
+ - oneOf:
+ - properties:
+ appRole:
+ title: app_role
+ description: AppRole authentication configuration.
+ $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption'
+ title: app_role
+ required:
+ - appRole
+ - properties:
+ token:
+ type: string
+ title: token
+ description: Token for direct authentication.
+ title: token
+ required:
+ - token
+ title: DataSourceExternalSecret
+ additionalProperties: false
+ bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption:
+ type: object
+ properties:
+ roleId:
+ type: string
+ title: role_id
+ description: The role ID for Vault AppRole authentication.
+ secretId:
+ type: string
+ title: secret_id
+ description: the secret id for the role without ttl.
+ type:
+ title: type
+ description: The type of secret for AppRole authentication.
+ $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType'
+ mountPath:
+ type: string
+ title: mount_path
+ description: The path where the approle auth method is mounted.
+ title: AppRoleAuthOption
+ additionalProperties: false
+ bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType:
+ type: string
+ title: SecretType
+ enum:
+ - SECRET_TYPE_UNSPECIFIED
+ - PLAIN
+ - ENVIRONMENT
+ bytebase.v1.DataSourceExternalSecret.AuthType:
+ type: string
+ title: AuthType
+ enum:
+ - AUTH_TYPE_UNSPECIFIED
+ - TOKEN
+ - VAULT_APP_ROLE
+ bytebase.v1.DataSourceExternalSecret.SecretType:
+ type: string
+ title: SecretType
+ enum:
+ - SECRET_TYPE_UNSPECIFIED
+ - VAULT_KV_V2
+ - AWS_SECRETS_MANAGER
+ - GCP_SECRET_MANAGER
+ bytebase.v1.DataSourceQueryPolicy:
+ type: object
+ properties:
+ adminDataSourceRestriction:
+ title: admin_data_source_restriction
+ description: Restriction for admin data source queries.
+ $ref: '#/components/schemas/bytebase.v1.DataSourceQueryPolicy.Restriction'
+ disallowDdl:
+ type: boolean
+ title: disallow_ddl
+ description: Disallow running DDL statements in the SQL editor.
+ disallowDml:
+ type: boolean
+ title: disallow_dml
+ description: Disallow running DML statements in the SQL editor.
+ title: DataSourceQueryPolicy
+ additionalProperties: false
+ description: Policy for controlling which data sources can be queried in the SQL editor.
+ bytebase.v1.DataSourceQueryPolicy.Restriction:
+ type: string
+ title: Restriction
+ enum:
+ - RESTRICTION_UNSPECIFIED
+ - FALLBACK
+ - DISALLOW
+ description: Restriction level for admin data source access.
+ bytebase.v1.DataSourceType:
+ type: string
+ title: DataSourceType
+ enum:
+ - DATA_SOURCE_UNSPECIFIED
+ - ADMIN
+ - READ_ONLY
+ bytebase.v1.Database:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the database.
+ Format: instances/{instance}/databases/{database}
+ {database} is the database name in the instance.
+ state:
+ title: state
+ description: The existence of a database.
+ $ref: '#/components/schemas/bytebase.v1.State'
+ successfulSyncTime:
+ title: successful_sync_time
+ description: The latest synchronization time.
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ project:
+ type: string
+ title: project
+ description: |-
+ The project for a database.
+ Format: projects/{project}
+ schemaVersion:
+ type: string
+ title: schema_version
+ description: The version of database schema.
+ environment:
+ type: string
+ title: environment
+ description: |-
+ The environment resource.
+ Format: environments/prod where prod is the environment resource ID.
+ nullable: true
+ effectiveEnvironment:
+ type: string
+ title: effective_environment
+ description: |-
+ The effective environment based on environment tag above and environment
+ tag on the instance. Inheritance follows
+ https://cloud.google.com/resource-manager/docs/tags/tags-overview.
+ nullable: true
+ labels:
+ type: object
+ title: labels
+ additionalProperties:
+ type: string
+ title: value
+ description: Labels will be used for deployment and policy control.
+ instanceResource:
+ title: instance_resource
+ description: The instance resource.
+ $ref: '#/components/schemas/bytebase.v1.InstanceResource'
+ backupAvailable:
+ type: boolean
+ title: backup_available
+ description: The database is available for DML prior backup.
+ drifted:
+ type: boolean
+ title: drifted
+ description: The schema is drifted from the source of truth.
+ title: Database
+ additionalProperties: false
+ bytebase.v1.Database.LabelsEntry:
+ type: object
+ properties:
+ key:
+ type: string
+ title: key
+ value:
+ type: string
+ title: value
+ title: LabelsEntry
+ additionalProperties: false
+ bytebase.v1.DatabaseCatalog:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the database catalog.
+ Format: instances/{instance}/databases/{database}/catalog
+ schemas:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.SchemaCatalog'
+ title: schemas
+ description: The schemas in the database.
+ title: DatabaseCatalog
+ additionalProperties: false
+ description: Catalog metadata for a database including schemas, tables, and columns.
+ bytebase.v1.DatabaseChangeMode:
+ type: string
+ title: DatabaseChangeMode
+ enum:
+ - DATABASE_CHANGE_MODE_UNSPECIFIED
+ - PIPELINE
+ - EDITOR
+ bytebase.v1.DatabaseChangeType:
+ type: string
+ title: DatabaseChangeType
+ enum:
+ - DATABASE_CHANGE_TYPE_UNSPECIFIED
+ - MIGRATE
+ - SDL
+ description: DatabaseChangeType is the database change type.
+ bytebase.v1.DatabaseGroup:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the database group.
+ Format: projects/{project}/databaseGroups/{databaseGroup}
+ title:
+ type: string
+ title: title
+ maxLength: 200
+ description: The short name used in actual databases specified by users.
+ databaseExpr:
+ title: database_expr
+ description: |-
+ The condition that is associated with this database group.
+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+ Support variables:
+ resource.environment_id: the environment resource id. Support "==", "!=", "in [XX]", "!(in [xx])" operations.
+ resource.instance_id: the instance resource id. Support "==", "!=", "in [XX]", "!(in [xx])", "contains", "matches", "startsWith", "endsWith" operations.
+ resource.database_name: the database name. Support "==", "!=", "in [XX]", "!(in [xx])", "contains", "matches", "startsWith", "endsWith" operations.
+ resource.database_labels: the database labels. Support map access operations.
+ All variables should join with "&&" condition.
+
+ For example:
+ resource.environment_id == "test" && resource.database_name.startsWith("sample_")
+ resource.database_labels["tenant"] == "tenant1"
+ $ref: '#/components/schemas/google.type.Expr'
+ matchedDatabases:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.DatabaseGroup.Database'
+ title: matched_databases
+ description: The list of databases that match the database group condition.
+ title: DatabaseGroup
+ additionalProperties: false
+ description: A group of databases matched by expressions.
+ bytebase.v1.DatabaseGroup.Database:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The resource name of the database.
+ Format: instances/{instance}/databases/{database}
+ title: Database
+ additionalProperties: false
+ description: A database within a database group.
+ bytebase.v1.DatabaseGroupView:
+ type: string
+ title: DatabaseGroupView
+ enum:
+ - DATABASE_GROUP_VIEW_UNSPECIFIED
+ - DATABASE_GROUP_VIEW_BASIC
+ - DATABASE_GROUP_VIEW_FULL
+ description: View options for database group responses.
+ bytebase.v1.DatabaseMetadata:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The database metadata name.
+
+ Format: instances/{instance}/databases/{database}/metadata
+ schemas:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.SchemaMetadata'
+ title: schemas
+ description: The schemas is the list of schemas in a database.
+ characterSet:
+ type: string
+ title: character_set
+ description: The character_set is the character set of a database.
+ collation:
+ type: string
+ title: collation
+ description: The collation is the collation of a database.
+ extensions:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.ExtensionMetadata'
+ title: extensions
+ description: The extensions is the list of extensions in a database.
+ owner:
+ type: string
+ title: owner
+ description: The owner of the database.
+ searchPath:
+ type: string
+ title: search_path
+ description: The search_path is the search path of a PostgreSQL database.
+ title: DatabaseMetadata
+ additionalProperties: false
+ description: DatabaseMetadata is the metadata for databases.
+ bytebase.v1.DatabaseSDLSchema:
+ type: object
+ properties:
+ schema:
+ type: string
+ title: schema
+ format: byte
+ description: |-
+ The SDL schema content.
+ - For SINGLE_FILE format: contains the complete SDL schema as a text string.
+ - For MULTI_FILE format: contains the ZIP archive as binary data.
+ contentType:
+ type: string
+ title: content_type
+ description: |-
+ The MIME type of the schema content.
+ Indicates how the client should interpret the schema field.
+ Examples:
+ - "text/plain; charset=utf-8" for SINGLE_FILE format
+ - "application/zip" for MULTI_FILE format
+ title: DatabaseSDLSchema
+ additionalProperties: false
+ description: DatabaseSDLSchema contains the schema in SDL format.
+ bytebase.v1.DatabaseSchema:
+ type: object
+ properties:
+ schema:
+ type: string
+ title: schema
+ description: The schema dump from database.
+ title: DatabaseSchema
+ additionalProperties: false
+ description: DatabaseSchema is the metadata for databases.
+ bytebase.v1.DeleteCacheRequest:
+ type: object
+ title: DeleteCacheRequest
+ additionalProperties: false
+ description: Request message for deleting cache.
+ bytebase.v1.DeleteDatabaseGroupRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the database group to delete.
+ Format: projects/{project}/databaseGroups/{databaseGroup}
+ title: DeleteDatabaseGroupRequest
+ additionalProperties: false
+ description: Request message for deleting a database group.
+ bytebase.v1.DeleteGroupRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the group to delete.
+ Format: groups/{email}
+ title: DeleteGroupRequest
+ additionalProperties: false
+ description: Request message for deleting a group.
+ bytebase.v1.DeleteIdentityProviderRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the identity provider to delete.
+ Format: idps/{identity_provider}
+ title: DeleteIdentityProviderRequest
+ additionalProperties: false
+ bytebase.v1.DeleteInstanceRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the instance to delete.
+ Format: instances/{instance}
+ force:
+ type: boolean
+ title: force
+ description: If set to true, any databases and sheets from this project will also be moved to default project, and all open issues will be closed.
+ purge:
+ type: boolean
+ title: purge
+ description: |-
+ If set to true, permanently purge the soft-deleted instance and all related resources.
+ This operation is irreversible. Following AIP-165, this should only be used for
+ administrative cleanup of old soft-deleted instances.
+ The instance must already be soft-deleted for this to work.
+ title: DeleteInstanceRequest
+ additionalProperties: false
+ bytebase.v1.DeletePolicyRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The policy's `name` field is used to identify the instance to update.
+ Format: {resource name}/policies/{policy type}
+ Workspace resource name: "".
+ Environment resource name: environments/environment-id.
+ Instance resource name: instances/instance-id.
+ Database resource name: instances/instance-id/databases/database-name.
+ title: DeletePolicyRequest
+ additionalProperties: false
+ bytebase.v1.DeleteProjectRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the project to delete.
+ Format: projects/{project}
+ force:
+ type: boolean
+ title: force
+ description: |-
+ If set to true, any databases from this project will be moved to default project.
+ Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project.
+ Open issues will remain open but associated with the deleted project.
+ If set to false, the operation will fail if the project has databases or open issues.
+ purge:
+ type: boolean
+ title: purge
+ description: |-
+ If set to true, permanently purge the soft-deleted project and all related resources.
+ This operation is irreversible. Following AIP-165, this should only be used for
+ administrative cleanup of old soft-deleted projects.
+ The project must already be soft-deleted for this to work.
+ title: DeleteProjectRequest
+ additionalProperties: false
+ bytebase.v1.DeleteReleaseRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the release to delete.
+ Format: projects/{project}/releases/{release}
+ title: DeleteReleaseRequest
+ additionalProperties: false
+ bytebase.v1.DeleteReviewConfigRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the SQL review config to delete.
+ Format: reviewConfigs/{reviewConfig}
+ title: DeleteReviewConfigRequest
+ additionalProperties: false
+ bytebase.v1.DeleteRevisionRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the revision to delete.
+ Format: instances/{instance}/databases/{database}/revisions/{revision}
+ title: DeleteRevisionRequest
+ additionalProperties: false
+ bytebase.v1.DeleteRoleRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the role to delete.
+ Format: roles/{role}
+ title: DeleteRoleRequest
+ additionalProperties: false
+ bytebase.v1.DeleteUserRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the user to delete.
+ Format: users/{email}
+ title: DeleteUserRequest
+ additionalProperties: false
+ bytebase.v1.DeleteWorksheetRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the worksheet to delete.
+ Format: worksheets/{worksheet}
+ title: DeleteWorksheetRequest
+ additionalProperties: false
+ bytebase.v1.DependencyColumn:
+ type: object
+ properties:
+ schema:
+ type: string
+ title: schema
+ description: The schema is the schema of a reference column.
+ table:
+ type: string
+ title: table
+ description: The table is the table of a reference column.
+ column:
+ type: string
+ title: column
+ description: The column is the name of a reference column.
+ title: DependencyColumn
+ additionalProperties: false
+ description: DependencyColumn is the metadata for dependency columns.
+ bytebase.v1.DependencyTable:
+ type: object
+ properties:
+ schema:
+ type: string
+ title: schema
+ description: The schema is the schema of a reference table.
+ table:
+ type: string
+ title: table
+ description: The table is the name of a reference table.
+ title: DependencyTable
+ additionalProperties: false
+ bytebase.v1.DiffMetadataRequest:
+ type: object
+ properties:
+ sourceMetadata:
+ title: source_metadata
+ description: The metadata of the source schema.
+ $ref: '#/components/schemas/bytebase.v1.DatabaseMetadata'
+ targetMetadata:
+ title: target_metadata
+ description: The metadata of the target schema.
+ $ref: '#/components/schemas/bytebase.v1.DatabaseMetadata'
+ sourceCatalog:
+ title: source_catalog
+ $ref: '#/components/schemas/bytebase.v1.DatabaseCatalog'
+ targetCatalog:
+ title: target_catalog
+ $ref: '#/components/schemas/bytebase.v1.DatabaseCatalog'
+ engine:
+ title: engine
+ description: The database engine of the schema.
+ $ref: '#/components/schemas/bytebase.v1.Engine'
+ title: DiffMetadataRequest
+ additionalProperties: false
+ bytebase.v1.DiffMetadataResponse:
+ type: object
+ properties:
+ diff:
+ type: string
+ title: diff
+ description: The diff of the metadata.
+ title: DiffMetadataResponse
+ additionalProperties: false
+ bytebase.v1.DiffSchemaRequest:
+ type: object
+ allOf:
+ - properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the database or changelog.
+ Format:
+ database: instances/{instance}/databases/{database}
+ changelog: instances/{instance}/databases/{database}/changelogs/{changelog}
+ - oneOf:
+ - properties:
+ changelog:
+ type: string
+ title: changelog
+ description: |-
+ The resource name of the changelog
+ Format:
+ instances/{instance}/databases/{database}/changelogs/{changelog}
+ title: changelog
+ required:
+ - changelog
+ - properties:
+ schema:
+ type: string
+ title: schema
+ description: The target schema.
+ title: schema
+ required:
+ - schema
+ title: DiffSchemaRequest
+ additionalProperties: false
+ bytebase.v1.DiffSchemaResponse:
+ type: object
+ properties:
+ diff:
+ type: string
+ title: diff
+ title: DiffSchemaResponse
+ additionalProperties: false
+ bytebase.v1.DimensionConstraint:
+ type: object
+ properties:
+ dimension:
+ type: string
+ title: dimension
+ description: Dimension name/type (X, Y, Z, M, etc.)
+ minValue:
+ type: number
+ title: min_value
+ format: double
+ description: Minimum value for this dimension
+ maxValue:
+ type: number
+ title: max_value
+ format: double
+ description: Maximum value for this dimension
+ tolerance:
+ type: number
+ title: tolerance
+ format: double
+ description: Tolerance for this dimension
+ title: DimensionConstraint
+ additionalProperties: false
+ description: DimensionConstraint defines constraints for a spatial dimension.
+ bytebase.v1.DimensionalConfig:
+ type: object
+ properties:
+ dimensions:
+ type: integer
+ title: dimensions
+ format: int32
+ description: Number of dimensions (2-4, default 2)
+ dataType:
+ type: string
+ title: data_type
+ description: Spatial data type (GEOMETRY, GEOGRAPHY, POINT, POLYGON, etc.)
+ srid:
+ type: integer
+ title: srid
+ format: int32
+ description: Spatial reference system identifier (SRID)
+ constraints:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.DimensionConstraint'
+ title: constraints
+ description: Coordinate system constraints
+ title: DimensionalConfig
+ additionalProperties: false
+ description: DimensionalConfig defines dimensional and constraint parameters for spatial indexes.
+ bytebase.v1.Engine:
+ type: string
+ title: Engine
+ enum:
+ - ENGINE_UNSPECIFIED
+ - CLICKHOUSE
+ - MYSQL
+ - POSTGRES
+ - SNOWFLAKE
+ - SQLITE
+ - TIDB
+ - MONGODB
+ - REDIS
+ - ORACLE
+ - SPANNER
+ - MSSQL
+ - REDSHIFT
+ - MARIADB
+ - OCEANBASE
+ - STARROCKS
+ - DORIS
+ - HIVE
+ - ELASTICSEARCH
+ - BIGQUERY
+ - DYNAMODB
+ - DATABRICKS
+ - COCKROACHDB
+ - COSMOSDB
+ - TRINO
+ - CASSANDRA
+ description: Database engine type.
+ bytebase.v1.EnumTypeMetadata:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: The name of a type.
+ values:
+ type: array
+ items:
+ type: string
+ title: values
+ description: The enum values of a type.
+ comment:
+ type: string
+ title: comment
+ description: The comment describing the enum type.
+ skipDump:
+ type: boolean
+ title: skip_dump
+ description: Whether to skip this enum type during schema dump operations.
+ title: EnumTypeMetadata
+ additionalProperties: false
+ bytebase.v1.EnvironmentSetting:
+ type: object
+ properties:
+ environments:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.EnvironmentSetting.Environment'
+ title: environments
+ title: EnvironmentSetting
+ additionalProperties: false
+ bytebase.v1.EnvironmentSetting.Environment:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The resource name of the environment.
+ Format: environments/{environment}.
+ Output only.
+ id:
+ type: string
+ title: id
+ description: |-
+ The resource id of the environment.
+ This value should be 4-63 characters, and valid characters
+ are /[a-z][0-9]-/.
+ title:
+ type: string
+ title: title
+ description: The display name of the environment.
+ tags:
+ type: object
+ title: tags
+ additionalProperties:
+ type: string
+ title: value
+ color:
+ type: string
+ title: color
+ title: Environment
+ additionalProperties: false
+ bytebase.v1.EnvironmentSetting.Environment.TagsEntry:
+ type: object
+ properties:
+ key:
+ type: string
+ title: key
+ value:
+ type: string
+ title: value
+ title: TagsEntry
+ additionalProperties: false
+ bytebase.v1.EventMetadata:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: The name of the event.
+ definition:
+ type: string
+ title: definition
+ description: The schedule of the event.
+ timeZone:
+ type: string
+ title: time_zone
+ description: The time zone of the event.
+ sqlMode:
+ type: string
+ title: sql_mode
+ description: The SQL mode setting for the event.
+ characterSetClient:
+ type: string
+ title: character_set_client
+ description: The character set used by the client creating the event.
+ collationConnection:
+ type: string
+ title: collation_connection
+ description: The collation used for the connection when creating the event.
+ comment:
+ type: string
+ title: comment
+ description: The comment is the comment of an event.
+ title: EventMetadata
+ additionalProperties: false
+ bytebase.v1.ExchangeTokenRequest:
+ type: object
+ properties:
+ token:
+ type: string
+ title: token
+ description: External OIDC token (JWT) from CI/CD platform.
+ email:
+ type: string
+ title: email
+ description: |-
+ Workload Identity email for identifying which identity to authenticate as.
+ Format: {name}@workload.bytebase.com
+ title: ExchangeTokenRequest
+ additionalProperties: false
+ bytebase.v1.ExchangeTokenResponse:
+ type: object
+ properties:
+ accessToken:
+ type: string
+ title: access_token
+ description: Bytebase access token.
+ title: ExchangeTokenResponse
+ additionalProperties: false
+ bytebase.v1.ExportAuditLogsRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ filter:
+ type: string
+ title: filter
+ description: |-
+ The filter of the log. It should be a valid CEL expression.
+ Check the filter field in the SearchAuditLogsRequest message.
+ orderBy:
+ type: string
+ title: order_by
+ description: |-
+ The order by of the log.
+ Only support order by create_time.
+ For example:
+ - order_by = "create_time asc"
+ - order_by = "create_time desc"
+ format:
+ title: format
+ description: The export format.
+ $ref: '#/components/schemas/bytebase.v1.ExportFormat'
+ pageSize:
+ type: integer
+ title: page_size
+ format: int32
+ description: |-
+ The maximum number of logs to return.
+ The service may return fewer than this value.
+ If unspecified, at most 10 log entries will be returned.
+ The maximum value is 5000; values above 5000 will be coerced to 5000.
+ pageToken:
+ type: string
+ title: page_token
+ description: |-
+ A page token, received from a previous `ExportAuditLogs` call.
+ Provide this to retrieve the subsequent page.
+ title: ExportAuditLogsRequest
+ additionalProperties: false
+ description: Request message for exporting audit logs.
+ bytebase.v1.ExportAuditLogsResponse:
+ type: object
+ properties:
+ content:
+ type: string
+ title: content
+ format: byte
+ description: The exported audit log content in the requested format.
+ nextPageToken:
+ type: string
+ title: next_page_token
+ description: |-
+ A token to retrieve next page of log entities.
+ Pass this value in the page_token field in the subsequent call
+ to retrieve the next page of log entities.
+ title: ExportAuditLogsResponse
+ additionalProperties: false
+ description: Response message for exporting audit logs.
+ bytebase.v1.ExportFormat:
+ type: string
+ title: ExportFormat
+ enum:
+ - FORMAT_UNSPECIFIED
+ - CSV
+ - JSON
+ - SQL
+ - XLSX
+ description: Data export format.
+ bytebase.v1.ExportRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name is the resource name to execute the export against.
+ Format: instances/{instance}/databases/{database}
+ Format: instances/{instance}
+ Format: projects/{project}/rollouts/{rollout}
+ Format: projects/{project}/rollouts/{rollout}/stages/{stage}
+ statement:
+ type: string
+ title: statement
+ description: The SQL statement to execute.
+ limit:
+ type: integer
+ title: limit
+ format: int32
+ description: The maximum number of rows to return.
+ format:
+ title: format
+ description: The export format.
+ $ref: '#/components/schemas/bytebase.v1.ExportFormat'
+ admin:
+ type: boolean
+ title: admin
+ description: |-
+ The admin is used for workspace owner and DBA for exporting data from SQL
+ Editor Admin mode. The exported data is not masked.
+ password:
+ type: string
+ title: password
+ description: The zip password provide by users.
+ dataSourceId:
+ type: string
+ title: data_source_id
+ description: |-
+ The id of data source.
+ It is used for querying admin data source even if the instance has
+ read-only data sources. Or it can be used to query a specific read-only
+ data source.
+ schema:
+ type: string
+ title: schema
+ description: |-
+ The default schema to search objects. Equals to the current schema in
+ Oracle and search path in Postgres.
+ nullable: true
+ title: ExportRequest
+ additionalProperties: false
+ bytebase.v1.ExportResponse:
+ type: object
+ properties:
+ content:
+ type: string
+ title: content
+ format: byte
+ description: The export file content.
+ title: ExportResponse
+ additionalProperties: false
+ bytebase.v1.ExtensionMetadata:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: The name is the name of an extension.
+ schema:
+ type: string
+ title: schema
+ description: |-
+ The schema is the extension that is installed to. But the extension usage
+ is not limited to the schema.
+ version:
+ type: string
+ title: version
+ description: The version is the version of an extension.
+ description:
+ type: string
+ title: description
+ description: The description is the description of an extension.
+ title: ExtensionMetadata
+ additionalProperties: false
+ description: ExtensionMetadata is the metadata for extensions.
+ bytebase.v1.ExternalTableMetadata:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: The name is the name of a external table.
+ externalServerName:
+ type: string
+ title: external_server_name
+ description: The external_server_name is the name of the external server.
+ externalDatabaseName:
+ type: string
+ title: external_database_name
+ description: The external_database_name is the name of the external database.
+ columns:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.ColumnMetadata'
+ title: columns
+ description: The columns is the ordered list of columns in a foreign table.
+ title: ExternalTableMetadata
+ additionalProperties: false
+ bytebase.v1.FieldMapping:
+ type: object
+ properties:
+ identifier:
+ type: string
+ title: identifier
+ description: Identifier is the field name of the unique identifier in 3rd-party idp user info. Required.
+ displayName:
+ type: string
+ title: display_name
+ description: DisplayName is the field name of display name in 3rd-party idp user info. Optional.
+ phone:
+ type: string
+ title: phone
+ description: Phone is the field name of primary phone in 3rd-party idp user info. Optional.
+ groups:
+ type: string
+ title: groups
+ description: |-
+ Groups is the field name of groups in 3rd-party idp user info. Optional.
+ Mainly used for OIDC: https://developer.okta.com/docs/guides/customize-tokens-groups-claim/main/
+ title: FieldMapping
+ additionalProperties: false
+ description: |-
+ FieldMapping saves the field names from user info API of identity provider.
+ As we save all raw json string of user info response data into `principal.idp_user_info`,
+ we can extract the relevant data based with `FieldMapping`.
+ bytebase.v1.ForeignKeyMetadata:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: The name is the name of a foreign key.
+ columns:
+ type: array
+ items:
+ type: string
+ title: columns
+ description: The columns are the ordered referencing columns of a foreign key.
+ referencedSchema:
+ type: string
+ title: referenced_schema
+ description: |-
+ The referenced_schema is the referenced schema name of a foreign key.
+ It is an empty string for databases without such concept such as MySQL.
+ referencedTable:
+ type: string
+ title: referenced_table
+ description: The referenced_table is the referenced table name of a foreign key.
+ referencedColumns:
+ type: array
+ items:
+ type: string
+ title: referenced_columns
+ description: The referenced_columns are the ordered referenced columns of a foreign key.
+ onDelete:
+ type: string
+ title: on_delete
+ description: The on_delete is the on delete action of a foreign key.
+ onUpdate:
+ type: string
+ title: on_update
+ description: The on_update is the on update action of a foreign key.
+ matchType:
+ type: string
+ title: match_type
+ description: |-
+ The match_type is the match type of a foreign key.
+ The match_type is the PostgreSQL specific field.
+ It's empty string for other databases.
+ title: ForeignKeyMetadata
+ additionalProperties: false
+ description: ForeignKeyMetadata is the metadata for foreign keys.
+ bytebase.v1.FunctionMetadata:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: The name is the name of a function.
+ definition:
+ type: string
+ title: definition
+ description: The definition is the definition of a function.
+ signature:
+ type: string
+ title: signature
+ description: |-
+ The signature is the name with the number and type of input arguments the
+ function takes.
+ characterSetClient:
+ type: string
+ title: character_set_client
+ description: MySQL specific metadata.
+ collationConnection:
+ type: string
+ title: collation_connection
+ databaseCollation:
+ type: string
+ title: database_collation
+ sqlMode:
+ type: string
+ title: sql_mode
+ comment:
+ type: string
+ title: comment
+ dependencyTables:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.DependencyTable'
+ title: dependency_tables
+ description: |-
+ The dependency_tables is the list of dependency tables of a function.
+ For PostgreSQL, it's the list of tables that the function depends on the return type definition.
+ skipDump:
+ type: boolean
+ title: skip_dump
+ title: FunctionMetadata
+ additionalProperties: false
+ description: FunctionMetadata is the metadata for functions.
+ bytebase.v1.GenerationMetadata:
+ type: object
+ properties:
+ type:
+ title: type
+ $ref: '#/components/schemas/bytebase.v1.GenerationMetadata.Type'
+ expression:
+ type: string
+ title: expression
+ title: GenerationMetadata
+ additionalProperties: false
+ bytebase.v1.GenerationMetadata.Type:
+ type: string
+ title: Type
+ enum:
+ - TYPE_UNSPECIFIED
+ - VIRTUAL
+ - STORED
+ bytebase.v1.GetActuatorInfoRequest:
+ type: object
+ title: GetActuatorInfoRequest
+ additionalProperties: false
+ description: Request message for getting actuator information.
+ bytebase.v1.GetChangelogRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the changelog to retrieve.
+ Format: instances/{instance}/databases/{database}/changelogs/{changelog}
+ view:
+ title: view
+ $ref: '#/components/schemas/bytebase.v1.ChangelogView'
+ title: GetChangelogRequest
+ additionalProperties: false
+ bytebase.v1.GetDatabaseCatalogRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the database catalog to retrieve.
+ Format: instances/{instance}/databases/{database}/catalog
+ title: GetDatabaseCatalogRequest
+ additionalProperties: false
+ description: Request message for getting a database catalog.
+ bytebase.v1.GetDatabaseGroupRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the database group to retrieve.
+ Format: projects/{project}/databaseGroups/{databaseGroup}
+ view:
+ title: view
+ description: The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC.
+ $ref: '#/components/schemas/bytebase.v1.DatabaseGroupView'
+ title: GetDatabaseGroupRequest
+ additionalProperties: false
+ description: Request message for getting a database group.
+ bytebase.v1.GetDatabaseMetadataRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the database to retrieve metadata.
+ Format: instances/{instance}/databases/{database}/metadata
+ filter:
+ type: string
+ title: filter
+ description: |-
+ Filter is used to filter databases returned in the list.
+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+ Supported filter:
+ - schema: the schema name, support "==" operator.
+ - table: the table name, support "==" and ".matches()" operator.
+
+ For example:
+ schema == "schema-a"
+ table == "table-a"
+ table.matches("table-a")
+ schema == "schema-a" && table.matches("sample")
+ The filter used to search table with wildcard "sample" in the schema "schemas/schema-a".
+ The column masking level will only be returned when a table filter is used.
+ limit:
+ type: integer
+ title: limit
+ format: int32
+ description: |-
+ Limit the response size of returned table metadata per schema.
+ For example, if the database has 3 schemas, and each schema has 100 tables,
+ if limit is 20, then only 20 tables will be returned for each schema, total 60 tables.
+ Default 0, means no limit.
+ title: GetDatabaseMetadataRequest
+ additionalProperties: false
+ bytebase.v1.GetDatabaseRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the database to retrieve.
+ Format: instances/{instance}/databases/{database}
+ title: GetDatabaseRequest
+ additionalProperties: false
+ bytebase.v1.GetDatabaseSDLSchemaRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the database to retrieve SDL schema.
+ Format: instances/{instance}/databases/{database}/sdlSchema
+ format:
+ title: format
+ description: The format of the SDL schema output.
+ $ref: '#/components/schemas/bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat'
+ title: GetDatabaseSDLSchemaRequest
+ additionalProperties: false
+ bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat:
+ type: string
+ title: SDLFormat
+ enum:
+ - SDL_FORMAT_UNSPECIFIED
+ - SINGLE_FILE
+ - MULTI_FILE
+ description: SDLFormat specifies the output format for SDL schema.
+ bytebase.v1.GetDatabaseSchemaRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the database to retrieve schema.
+ Format: instances/{instance}/databases/{database}/schema
+ title: GetDatabaseSchemaRequest
+ additionalProperties: false
+ bytebase.v1.GetGroupRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the group to retrieve.
+ Format: groups/{email}
+ title: GetGroupRequest
+ additionalProperties: false
+ description: Request message for getting a group.
+ bytebase.v1.GetIamPolicyRequest:
+ type: object
+ properties:
+ resource:
+ type: string
+ title: resource
+ description: |-
+ The name of the resource to get the IAM policy.
+ Format: projects/{project}
+ Format: workspaces/{workspace}
+ title: GetIamPolicyRequest
+ additionalProperties: false
+ description: Request message for getting an IAM policy.
+ bytebase.v1.GetIdentityProviderRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the identity provider to retrieve.
+ Format: idps/{idp}
+ title: GetIdentityProviderRequest
+ additionalProperties: false
+ bytebase.v1.GetInstanceRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the instance to retrieve.
+ Format: instances/{instance}
+ title: GetInstanceRequest
+ additionalProperties: false
+ bytebase.v1.GetInstanceRoleRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the role to retrieve.
+ Format: instances/{instance}/roles/{role name}
+ The role name is the unique name for the role.
+ title: GetInstanceRoleRequest
+ additionalProperties: false
+ bytebase.v1.GetIssueRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the issue to retrieve.
+ Format: projects/{project}/issues/{issue}
+ force:
+ type: boolean
+ title: force
+ description: If set to true, bypass cache and fetch the latest data.
+ title: GetIssueRequest
+ additionalProperties: false
+ bytebase.v1.GetPlanRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the plan to retrieve.
+ Format: projects/{project}/plans/{plan}
+ title: GetPlanRequest
+ additionalProperties: false
+ bytebase.v1.GetPolicyRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the policy to retrieve.
+ Format: {resource type}/{resource id}/policies/{policy type}
+ title: GetPolicyRequest
+ additionalProperties: false
+ bytebase.v1.GetProjectRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the project to retrieve.
+ Format: projects/{project}
+ title: GetProjectRequest
+ additionalProperties: false
+ bytebase.v1.GetReleaseRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: 'Format: projects/{project}/releases/{release}'
+ title: GetReleaseRequest
+ additionalProperties: false
+ bytebase.v1.GetResourcePackageRequest:
+ type: object
+ title: GetResourcePackageRequest
+ additionalProperties: false
+ description: Request message for getting branding resources.
+ bytebase.v1.GetReviewConfigRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the SQL review config to retrieve.
+ Format: reviewConfigs/{reviewConfig}
+ title: GetReviewConfigRequest
+ additionalProperties: false
+ bytebase.v1.GetRevisionRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the revision.
+ Format: instances/{instance}/databases/{database}/revisions/{revision}
+ title: GetRevisionRequest
+ additionalProperties: false
+ bytebase.v1.GetRoleRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the role to retrieve.
+ Format: roles/{role}
+ title: GetRoleRequest
+ additionalProperties: false
+ bytebase.v1.GetRolloutRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the rollout to retrieve.
+ Format: projects/{project}/rollouts/{rollout}
+ title: GetRolloutRequest
+ additionalProperties: false
+ bytebase.v1.GetSchemaStringRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the database.
+ Format: instances/{instance}/databases/{database}
+ type:
+ title: type
+ $ref: '#/components/schemas/bytebase.v1.GetSchemaStringRequest.ObjectType'
+ schema:
+ type: string
+ title: schema
+ description: It's empty for DATABASE.
+ object:
+ type: string
+ title: object
+ description: It's empty for DATABASE and SCHEMA.
+ metadata:
+ title: metadata
+ description: |-
+ If use the metadata to generate the schema string, the type is OBJECT_TYPE_UNSPECIFIED.
+ Also the schema and object are empty.
+ $ref: '#/components/schemas/bytebase.v1.DatabaseMetadata'
+ title: GetSchemaStringRequest
+ additionalProperties: false
+ bytebase.v1.GetSchemaStringRequest.ObjectType:
+ type: string
+ title: ObjectType
+ enum:
+ - OBJECT_TYPE_UNSPECIFIED
+ - DATABASE
+ - SCHEMA
+ - TABLE
+ - VIEW
+ - MATERIALIZED_VIEW
+ - FUNCTION
+ - PROCEDURE
+ - SEQUENCE
+ bytebase.v1.GetSchemaStringResponse:
+ type: object
+ properties:
+ schemaString:
+ type: string
+ title: schema_string
+ title: GetSchemaStringResponse
+ additionalProperties: false
+ bytebase.v1.GetSettingRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: The resource name of the setting.
+ title: GetSettingRequest
+ additionalProperties: false
+ description: The request message for getting a setting.
+ bytebase.v1.GetSettingResponse:
+ type: object
+ properties:
+ setting:
+ title: setting
+ $ref: '#/components/schemas/bytebase.v1.Setting'
+ title: GetSettingResponse
+ additionalProperties: false
+ description: The response message for getting a setting.
+ bytebase.v1.GetSheetRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the sheet to retrieve.
+ Format: projects/{project}/sheets/{sheet}
+ raw:
+ type: boolean
+ title: raw
+ description: By default, the content of the sheet is cut off, set the `raw` to true to retrieve the full content.
+ title: GetSheetRequest
+ additionalProperties: false
+ bytebase.v1.GetSubscriptionRequest:
+ type: object
+ title: GetSubscriptionRequest
+ additionalProperties: false
+ bytebase.v1.GetTaskRunLogRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun}
+ TODO(d): check the resource_reference.
+ title: GetTaskRunLogRequest
+ additionalProperties: false
+ bytebase.v1.GetTaskRunRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: 'Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun}'
+ title: GetTaskRunRequest
+ additionalProperties: false
+ bytebase.v1.GetTaskRunSessionRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: 'Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun}'
+ title: GetTaskRunSessionRequest
+ additionalProperties: false
+ bytebase.v1.GetUserRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the user to retrieve.
+ Format: users/{email}
+ title: GetUserRequest
+ additionalProperties: false
+ bytebase.v1.GetWorksheetRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the worksheet to retrieve.
+ Format: worksheets/{worksheet}
+ title: GetWorksheetRequest
+ additionalProperties: false
+ bytebase.v1.GrantRequest:
+ type: object
+ properties:
+ role:
+ type: string
+ title: role
+ description: |-
+ The requested role.
+ Format: roles/EXPORTER.
+ user:
+ type: string
+ title: user
+ description: |-
+ The user to be granted.
+ Format: users/{email}.
+ condition:
+ title: condition
+ description: The condition for the role. Same as the condition in IAM Binding message.
+ $ref: '#/components/schemas/google.type.Expr'
+ expiration:
+ title: expiration
+ description: The duration for which the grant is valid.
+ $ref: '#/components/schemas/google.protobuf.Duration'
+ title: GrantRequest
+ additionalProperties: false
+ bytebase.v1.GridLevel:
+ type: object
+ properties:
+ level:
+ type: integer
+ title: level
+ format: int32
+ description: Grid level number (1-4 for SQL Server)
+ density:
+ type: string
+ title: density
+ description: Grid density (LOW, MEDIUM, HIGH)
+ title: GridLevel
+ additionalProperties: false
+ description: GridLevel defines a tessellation grid level with its density.
+ bytebase.v1.Group:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the group to retrieve.
+ Format: groups/{group}, the group should be email or uuid.
+ title:
+ type: string
+ title: title
+ maxLength: 200
+ description: The display title of the group.
+ description:
+ type: string
+ title: description
+ maxLength: 1000
+ description: The description of the group.
+ members:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.GroupMember'
+ title: members
+ description: The members of the group.
+ source:
+ type: string
+ title: source
+ description: The source system where the group originated (e.g., Entra ID for SCIM sync).
+ email:
+ type: string
+ title: email
+ description: The unique email for the group.
+ title: Group
+ additionalProperties: false
+ description: A group of users within the workspace.
+ bytebase.v1.GroupMember:
+ type: object
+ properties:
+ member:
+ type: string
+ title: member
+ description: |-
+ Member is the principal who belong to this group.
+
+ Format: users/[email protected]
+ role:
+ title: role
+ description: The member's role in the group.
+ $ref: '#/components/schemas/bytebase.v1.GroupMember.Role'
+ title: GroupMember
+ additionalProperties: false
+ description: A member of a group with a role.
+ bytebase.v1.GroupMember.Role:
+ type: string
+ title: Role
+ enum:
+ - ROLE_UNSPECIFIED
+ - OWNER
+ - MEMBER
+ description: The role of a group member.
+ bytebase.v1.IamPolicy:
+ type: object
+ properties:
+ bindings:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Binding'
+ title: bindings
+ description: |-
+ Collection of binding.
+ A binding binds one or more project members to a single project role.
+ etag:
+ type: string
+ title: etag
+ description: |-
+ The current etag of the policy.
+ If an etag is provided and does not match the current etag of the policy,
+ the call will be blocked and an ABORTED error will be returned.
+ title: IamPolicy
+ additionalProperties: false
+ description: IAM policy that binds members to roles.
+ bytebase.v1.IdentityProvider:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the identity provider.
+ Format: idps/{idp}
+ title:
+ type: string
+ title: title
+ maxLength: 200
+ description: The display title of the identity provider.
+ domain:
+ type: string
+ title: domain
+ description: The domain for email matching when using this identity provider.
+ type:
+ title: type
+ description: The type of identity provider protocol.
+ $ref: '#/components/schemas/bytebase.v1.IdentityProviderType'
+ config:
+ title: config
+ description: The configuration details for the identity provider.
+ $ref: '#/components/schemas/bytebase.v1.IdentityProviderConfig'
+ title: IdentityProvider
+ additionalProperties: false
+ bytebase.v1.IdentityProviderConfig:
+ type: object
+ oneOf:
+ - properties:
+ ldapConfig:
+ title: ldap_config
+ description: LDAP protocol configuration.
+ $ref: '#/components/schemas/bytebase.v1.LDAPIdentityProviderConfig'
+ title: ldap_config
+ required:
+ - ldapConfig
+ - properties:
+ oauth2Config:
+ title: oauth2_config
+ description: OAuth2 protocol configuration.
+ $ref: '#/components/schemas/bytebase.v1.OAuth2IdentityProviderConfig'
+ title: oauth2_config
+ required:
+ - oauth2Config
+ - properties:
+ oidcConfig:
+ title: oidc_config
+ description: OIDC protocol configuration.
+ $ref: '#/components/schemas/bytebase.v1.OIDCIdentityProviderConfig'
+ title: oidc_config
+ required:
+ - oidcConfig
+ title: IdentityProviderConfig
+ additionalProperties: false
+ bytebase.v1.IdentityProviderContext:
+ type: object
+ oneOf:
+ - properties:
+ oauth2Context:
+ title: oauth2_context
+ description: OAuth2 authentication context.
+ $ref: '#/components/schemas/bytebase.v1.OAuth2IdentityProviderContext'
+ title: oauth2_context
+ required:
+ - oauth2Context
+ - properties:
+ oidcContext:
+ title: oidc_context
+ description: OpenID Connect authentication context.
+ $ref: '#/components/schemas/bytebase.v1.OIDCIdentityProviderContext'
+ title: oidc_context
+ required:
+ - oidcContext
+ title: IdentityProviderContext
+ additionalProperties: false
+ description: Context for identity provider authentication.
+ bytebase.v1.IdentityProviderType:
+ type: string
+ title: IdentityProviderType
+ enum:
+ - IDENTITY_PROVIDER_TYPE_UNSPECIFIED
+ - OAUTH2
+ - OIDC
+ - LDAP
+ bytebase.v1.IndexMetadata:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: The name is the name of an index.
+ expressions:
+ type: array
+ items:
+ type: string
+ title: expressions
+ description: |-
+ The expressions are the ordered columns or expressions of an index.
+ This could refer to a column or an expression.
+ keyLength:
+ type: array
+ items:
+ type:
+ - integer
+ - string
+ format: int64
+ title: key_length
+ description: |-
+ The key_lengths are the ordered key lengths of an index.
+ If the key length is not specified, it's -1.
+ descending:
+ type: array
+ items:
+ type: boolean
+ title: descending
+ description: The descending is the ordered descending of an index.
+ type:
+ type: string
+ title: type
+ description: The type is the type of an index.
+ unique:
+ type: boolean
+ title: unique
+ description: The unique is whether the index is unique.
+ primary:
+ type: boolean
+ title: primary
+ description: The primary is whether the index is a primary key index.
+ visible:
+ type: boolean
+ title: visible
+ description: The visible is whether the index is visible.
+ comment:
+ type: string
+ title: comment
+ description: The comment is the comment of an index.
+ definition:
+ type: string
+ title: definition
+ description: The definition of an index.
+ parentIndexSchema:
+ type: string
+ title: parent_index_schema
+ description: The schema name of the parent index.
+ parentIndexName:
+ type: string
+ title: parent_index_name
+ description: The index name of the parent index.
+ granularity:
+ type:
+ - integer
+ - string
+ title: granularity
+ format: int64
+ description: The number of granules in the block. It's a ClickHouse specific field.
+ isConstraint:
+ type: boolean
+ title: is_constraint
+ description: |-
+ It's a PostgreSQL specific field.
+ The unique constraint and unique index are not the same thing in PostgreSQL.
+ spatialConfig:
+ title: spatial_config
+ description: Spatial index configuration for spatial databases like SQL Server, PostgreSQL with PostGIS, etc.
+ $ref: '#/components/schemas/bytebase.v1.SpatialIndexConfig'
+ opclassNames:
+ type: array
+ items:
+ type: string
+ title: opclass_names
+ description: |-
+ https://www.postgresql.org/docs/current/catalog-pg-opclass.html
+ Name of the operator class for each column. (PostgreSQL specific).
+ opclassDefaults:
+ type: array
+ items:
+ type: boolean
+ title: opclass_defaults
+ description: True if the operator class is the default. (PostgreSQL specific).
+ title: IndexMetadata
+ additionalProperties: false
+ description: IndexMetadata is the metadata for indexes.
+ bytebase.v1.Instance:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the instance.
+ Format: instances/{instance}
+ state:
+ title: state
+ description: The lifecycle state of the instance.
+ $ref: '#/components/schemas/bytebase.v1.State'
+ title:
+ type: string
+ title: title
+ maxLength: 200
+ description: The display title of the instance.
+ engine:
+ title: engine
+ description: The database engine type.
+ $ref: '#/components/schemas/bytebase.v1.Engine'
+ engineVersion:
+ type: string
+ title: engine_version
+ description: The version of the database engine.
+ externalLink:
+ type: string
+ title: external_link
+ description: External URL to the database instance console.
+ dataSources:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.DataSource'
+ title: data_sources
+ description: Data source configurations for connecting to the instance.
+ environment:
+ type: string
+ title: environment
+ description: |-
+ The environment resource.
+ Format: environments/prod where prod is the environment resource ID.
+ nullable: true
+ activation:
+ type: boolean
+ title: activation
+ description: Whether the instance is activated for use.
+ roles:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.InstanceRole'
+ title: roles
+ description: Database roles available in this instance.
+ syncInterval:
+ title: sync_interval
+ description: How often the instance is synced.
+ $ref: '#/components/schemas/google.protobuf.Duration'
+ maximumConnections:
+ type: integer
+ title: maximum_connections
+ format: int32
+ description: |-
+ The maximum number of connections.
+ The default is 10 if the value is unset or zero.
+ syncDatabases:
+ type: array
+ items:
+ type: string
+ title: sync_databases
+ description: |-
+ Enable sync for following databases.
+ Default empty, means sync all schemas & databases.
+ lastSyncTime:
+ title: last_sync_time
+ description: The last time the instance was synced.
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ labels:
+ type: object
+ title: labels
+ additionalProperties:
+ type: string
+ title: value
+ description: |-
+ Labels are key-value pairs that can be attached to the instance.
+ For example, { "org_group": "infrastructure", "environment": "production" }
+ title: Instance
+ additionalProperties: false
+ bytebase.v1.Instance.LabelsEntry:
+ type: object
+ properties:
+ key:
+ type: string
+ title: key
+ value:
+ type: string
+ title: value
+ title: LabelsEntry
+ additionalProperties: false
+ bytebase.v1.InstanceResource:
+ type: object
+ properties:
+ title:
+ type: string
+ title: title
+ description: The display title of the instance.
+ engine:
+ title: engine
+ description: The database engine type.
+ $ref: '#/components/schemas/bytebase.v1.Engine'
+ engineVersion:
+ type: string
+ title: engine_version
+ description: The version of the database engine.
+ dataSources:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.DataSource'
+ title: data_sources
+ description: Data source configurations for the instance.
+ activation:
+ type: boolean
+ title: activation
+ description: Whether the instance is activated.
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the instance.
+ Format: instances/{instance}
+ environment:
+ type: string
+ title: environment
+ description: |-
+ The environment resource.
+ Format: environments/prod where prod is the environment resource ID.
+ nullable: true
+ title: InstanceResource
+ additionalProperties: false
+ bytebase.v1.InstanceRole:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the role.
+ Format: instances/{instance}/roles/{role}
+ The role name is the unique name for the role.
+ roleName:
+ type: string
+ title: role_name
+ description: The role name. It's unique within the instance.
+ password:
+ type: string
+ title: password
+ description: The role password.
+ nullable: true
+ connectionLimit:
+ type: integer
+ title: connection_limit
+ format: int32
+ description: The connection count limit for this role.
+ nullable: true
+ validUntil:
+ type: string
+ title: valid_until
+ description: The expiration for the role's password.
+ nullable: true
+ attribute:
+ type: string
+ title: attribute
+ description: |-
+ The role attribute.
+ For PostgreSQL, it contains super_user, no_inherit, create_role, create_db, can_login, replication, and bypass_rls. Docs: https://www.postgresql.org/docs/current/role-attributes.html
+ For MySQL, it's the global privileges as GRANT statements, which means it only contains "GRANT ... ON *.* TO ...". Docs: https://dev.mysql.com/doc/refman/8.0/en/grant.html
+ nullable: true
+ title: InstanceRole
+ additionalProperties: false
+ description: InstanceRole is the API message for instance role.
+ bytebase.v1.Issue:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the issue.
+ Format: projects/{project}/issues/{issue}
+ title:
+ type: string
+ title: title
+ maxLength: 200
+ description: The title of the issue.
+ description:
+ type: string
+ title: description
+ maxLength: 10000
+ description: The description of the issue.
+ type:
+ title: type
+ $ref: '#/components/schemas/bytebase.v1.Issue.Type'
+ status:
+ title: status
+ description: The status of the issue.
+ $ref: '#/components/schemas/bytebase.v1.IssueStatus'
+ approvers:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Issue.Approver'
+ title: approvers
+ approvalTemplate:
+ title: approval_template
+ description: The approval template for the issue.
+ $ref: '#/components/schemas/bytebase.v1.ApprovalTemplate'
+ creator:
+ type: string
+ title: creator
+ description: 'Format: users/[email protected]'
+ createTime:
+ title: create_time
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ updateTime:
+ title: update_time
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ plan:
+ type: string
+ title: plan
+ description: |-
+ The plan associated with the issue.
+ Can be empty.
+ Format: projects/{project}/plans/{plan}
+ rollout:
+ type: string
+ title: rollout
+ description: |-
+ The rollout associated with the issue.
+ Can be empty.
+ Format: projects/{project}/rollouts/{rollout}
+ grantRequest:
+ title: grant_request
+ description: Used if the issue type is GRANT_REQUEST.
+ $ref: '#/components/schemas/bytebase.v1.GrantRequest'
+ releasers:
+ type: array
+ items:
+ type: string
+ title: releasers
+ description: |-
+ The releasers of the pending stage of the issue rollout, judging
+ from the rollout policy.
+ Format:
+ - roles/workspaceOwner
+ - roles/workspaceDBA
+ - roles/projectOwner
+ - roles/projectReleaser
+ riskLevel:
+ title: risk_level
+ description: The risk level of the issue.
+ $ref: '#/components/schemas/bytebase.v1.RiskLevel'
+ taskStatusCount:
+ type: object
+ title: task_status_count
+ additionalProperties:
+ type: integer
+ title: value
+ format: int32
+ description: |-
+ The status count of the issue.
+ Keys are the following:
+ - NOT_STARTED
+ - SKIPPED
+ - PENDING
+ - RUNNING
+ - DONE
+ - FAILED
+ - CANCELED
+ labels:
+ type: array
+ items:
+ type: string
+ title: labels
+ description: Labels attached to the issue for categorization and filtering.
+ approvalStatus:
+ title: approval_status
+ $ref: '#/components/schemas/bytebase.v1.Issue.ApprovalStatus'
+ approvalStatusError:
+ type: string
+ title: approval_status_error
+ description: Only populated when approval_status == ERROR
+ title: Issue
+ additionalProperties: false
+ bytebase.v1.Issue.ApprovalStatus:
+ type: string
+ title: ApprovalStatus
+ enum:
+ - APPROVAL_STATUS_UNSPECIFIED
+ - CHECKING
+ - PENDING
+ - APPROVED
+ - REJECTED
+ - SKIPPED
+ - ERROR
+ description: The overall approval status for the issue.
+ bytebase.v1.Issue.Approver:
+ type: object
+ properties:
+ status:
+ title: status
+ description: The new status.
+ $ref: '#/components/schemas/bytebase.v1.Issue.Approver.Status'
+ principal:
+ type: string
+ title: principal
+ description: 'Format: users/[email protected]'
+ title: Approver
+ additionalProperties: false
+ description: Approvers and their approval status for the issue.
+ bytebase.v1.Issue.Approver.Status:
+ type: string
+ title: Status
+ enum:
+ - STATUS_UNSPECIFIED
+ - PENDING
+ - APPROVED
+ - REJECTED
+ description: The approval status of an approver.
+ bytebase.v1.Issue.TaskStatusCountEntry:
+ type: object
+ properties:
+ key:
+ type: string
+ title: key
+ value:
+ type: integer
+ title: value
+ format: int32
+ title: TaskStatusCountEntry
+ additionalProperties: false
+ bytebase.v1.Issue.Type:
+ type: string
+ title: Type
+ enum:
+ - TYPE_UNSPECIFIED
+ - DATABASE_CHANGE
+ - GRANT_REQUEST
+ - DATABASE_EXPORT
+ description: The type of issue.
+ bytebase.v1.IssueComment:
+ type: object
+ allOf:
+ - properties:
+ name:
+ type: string
+ title: name
+ description: 'Format: projects/{project}/issues/{issue}/issueComments/{issueComment-uid}'
+ comment:
+ type: string
+ title: comment
+ maxLength: 65536
+ description: The text content of the comment.
+ payload:
+ type: string
+ title: payload
+ description: 'TODO: use struct message instead.'
+ createTime:
+ title: create_time
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ updateTime:
+ title: update_time
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ creator:
+ type: string
+ title: creator
+ description: 'Format: users/{email}'
+ - oneOf:
+ - properties:
+ approval:
+ title: approval
+ description: Approval event.
+ $ref: '#/components/schemas/bytebase.v1.IssueComment.Approval'
+ title: approval
+ required:
+ - approval
+ - properties:
+ issueUpdate:
+ title: issue_update
+ description: Issue update event.
+ $ref: '#/components/schemas/bytebase.v1.IssueComment.IssueUpdate'
+ title: issue_update
+ required:
+ - issueUpdate
+ - properties:
+ stageEnd:
+ title: stage_end
+ description: Stage end event.
+ $ref: '#/components/schemas/bytebase.v1.IssueComment.StageEnd'
+ title: stage_end
+ required:
+ - stageEnd
+ - properties:
+ taskPriorBackup:
+ title: task_prior_backup
+ description: Task prior backup event.
+ $ref: '#/components/schemas/bytebase.v1.IssueComment.TaskPriorBackup'
+ title: task_prior_backup
+ required:
+ - taskPriorBackup
+ - properties:
+ taskUpdate:
+ title: task_update
+ description: Task update event.
+ $ref: '#/components/schemas/bytebase.v1.IssueComment.TaskUpdate'
+ title: task_update
+ required:
+ - taskUpdate
+ title: IssueComment
+ additionalProperties: false
+ description: A comment on an issue.
+ bytebase.v1.IssueComment.Approval:
+ type: object
+ properties:
+ status:
+ title: status
+ description: The approval status.
+ $ref: '#/components/schemas/bytebase.v1.IssueComment.Approval.Status'
+ title: Approval
+ additionalProperties: false
+ description: Approval event information.
+ bytebase.v1.IssueComment.Approval.Status:
+ type: string
+ title: Status
+ enum:
+ - STATUS_UNSPECIFIED
+ - PENDING
+ - APPROVED
+ - REJECTED
+ description: Approval status values.
+ bytebase.v1.IssueComment.IssueUpdate:
+ type: object
+ properties:
+ fromTitle:
+ type: string
+ title: from_title
+ nullable: true
+ toTitle:
+ type: string
+ title: to_title
+ nullable: true
+ fromDescription:
+ type: string
+ title: from_description
+ nullable: true
+ toDescription:
+ type: string
+ title: to_description
+ nullable: true
+ fromStatus:
+ title: from_status
+ nullable: true
+ $ref: '#/components/schemas/bytebase.v1.IssueStatus'
+ toStatus:
+ title: to_status
+ nullable: true
+ $ref: '#/components/schemas/bytebase.v1.IssueStatus'
+ fromLabels:
+ type: array
+ items:
+ type: string
+ title: from_labels
+ toLabels:
+ type: array
+ items:
+ type: string
+ title: to_labels
+ title: IssueUpdate
+ additionalProperties: false
+ description: Issue update event information.
+ bytebase.v1.IssueComment.StageEnd:
+ type: object
+ properties:
+ stage:
+ type: string
+ title: stage
+ description: The stage that ended.
+ title: StageEnd
+ additionalProperties: false
+ description: Stage end event information.
+ bytebase.v1.IssueComment.TaskPriorBackup:
+ type: object
+ properties:
+ task:
+ type: string
+ title: task
+ description: The task for which backup was performed.
+ tables:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.IssueComment.TaskPriorBackup.Table'
+ title: tables
+ description: The tables that were backed up.
+ originalLine:
+ type: integer
+ title: original_line
+ format: int32
+ description: The original line number in the statement.
+ nullable: true
+ database:
+ type: string
+ title: database
+ description: The database that was backed up.
+ error:
+ type: string
+ title: error
+ description: Error message if backup failed.
+ title: TaskPriorBackup
+ additionalProperties: false
+ description: Task prior backup event information.
+ bytebase.v1.IssueComment.TaskPriorBackup.Table:
+ type: object
+ properties:
+ schema:
+ type: string
+ title: schema
+ description: The schema name.
+ table:
+ type: string
+ title: table
+ description: The table name.
+ title: Table
+ additionalProperties: false
+ description: Table identification.
+ bytebase.v1.IssueComment.TaskUpdate:
+ type: object
+ properties:
+ tasks:
+ type: array
+ items:
+ type: string
+ title: tasks
+ description: The tasks that were updated.
+ fromSheet:
+ type: string
+ title: from_sheet
+ description: 'Format: projects/{project}/sheets/{sheet}'
+ nullable: true
+ toSheet:
+ type: string
+ title: to_sheet
+ description: 'Format: projects/{project}/sheets/{sheet}'
+ nullable: true
+ toStatus:
+ title: to_status
+ nullable: true
+ $ref: '#/components/schemas/bytebase.v1.IssueComment.TaskUpdate.Status'
+ title: TaskUpdate
+ additionalProperties: false
+ description: Task update event information.
+ bytebase.v1.IssueComment.TaskUpdate.Status:
+ type: string
+ title: Status
+ enum:
+ - STATUS_UNSPECIFIED
+ - PENDING
+ - RUNNING
+ - DONE
+ - FAILED
+ - SKIPPED
+ - CANCELED
+ description: Task status values.
+ bytebase.v1.IssueStatus:
+ type: string
+ title: IssueStatus
+ enum:
+ - ISSUE_STATUS_UNSPECIFIED
+ - OPEN
+ - DONE
+ - CANCELED
+ description: The status of an issue.
+ bytebase.v1.KerberosConfig:
+ type: object
+ properties:
+ primary:
+ type: string
+ title: primary
+ description: The primary component of the Kerberos principal.
+ instance:
+ type: string
+ title: instance
+ description: The instance component of the Kerberos principal.
+ realm:
+ type: string
+ title: realm
+ description: The Kerberos realm.
+ keytab:
+ type: string
+ title: keytab
+ format: byte
+ description: The keytab file contents for authentication.
+ kdcHost:
+ type: string
+ title: kdc_host
+ description: The hostname of the Key Distribution Center (KDC).
+ kdcPort:
+ type: string
+ title: kdc_port
+ description: The port of the Key Distribution Center (KDC).
+ kdcTransportProtocol:
+ type: string
+ title: kdc_transport_protocol
+ description: The transport protocol for KDC communication (tcp or udp).
+ title: KerberosConfig
+ additionalProperties: false
+ bytebase.v1.LDAPIdentityProviderConfig:
+ type: object
+ properties:
+ host:
+ type: string
+ title: host
+ description: |-
+ Host is the hostname or IP address of the LDAP server, e.g.,
+ "ldap.example.com".
+ port:
+ type: integer
+ title: port
+ format: int32
+ description: |-
+ Port is the port number of the LDAP server, e.g., 389. When not set, the
+ default port of the corresponding security protocol will be used, i.e. 389
+ for StartTLS and 636 for LDAPS.
+ skipTlsVerify:
+ type: boolean
+ title: skip_tls_verify
+ description: SkipTLSVerify controls whether to skip TLS certificate verification.
+ bindDn:
+ type: string
+ title: bind_dn
+ description: |-
+ BindDN is the DN of the user to bind as a service account to perform
+ search requests.
+ bindPassword:
+ type: string
+ title: bind_password
+ description: BindPassword is the password of the user to bind as a service account.
+ baseDn:
+ type: string
+ title: base_dn
+ description: BaseDN is the base DN to search for users, e.g., "ou=users,dc=example,dc=com".
+ userFilter:
+ type: string
+ title: user_filter
+ description: UserFilter is the filter to search for users, e.g., "(uid=%s)".
+ securityProtocol:
+ title: security_protocol
+ description: |-
+ SecurityProtocol is the security protocol to be used for establishing
+ connections with the LDAP server.
+ $ref: '#/components/schemas/bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol'
+ fieldMapping:
+ title: field_mapping
+ description: |-
+ FieldMapping is the mapping of the user attributes returned by the LDAP
+ server.
+ $ref: '#/components/schemas/bytebase.v1.FieldMapping'
+ title: LDAPIdentityProviderConfig
+ additionalProperties: false
+ description: LDAPIdentityProviderConfig is the structure for LDAP identity provider config.
+ bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol:
+ type: string
+ title: SecurityProtocol
+ enum:
+ - SECURITY_PROTOCOL_UNSPECIFIED
+ - START_TLS
+ - LDAPS
+ bytebase.v1.Label:
+ type: object
+ properties:
+ value:
+ type: string
+ title: value
+ description: The label value/name.
+ color:
+ type: string
+ title: color
+ description: The color code for the label (e.g., hex color).
+ group:
+ type: string
+ title: group
+ description: The group this label belongs to.
+ title: Label
+ additionalProperties: false
+ description: A label for categorizing and organizing issues.
+ bytebase.v1.ListChangelogsRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The parent of the changelogs.
+ Format: instances/{instance}/databases/{database}
+ pageSize:
+ type: integer
+ title: page_size
+ format: int32
+ description: |-
+ The maximum number of changelogs to return. The service may return fewer
+ than this value. If unspecified, at most 10 changelogs will be returned.
+ The maximum value is 1000; values above 1000 will be coerced to 1000.
+ pageToken:
+ type: string
+ title: page_token
+ description: |-
+ A page token, received from the previous call.
+ Provide this to retrieve the subsequent page.
+
+ When paginating, all other parameters provided must match
+ the call that provided the page token.
+ view:
+ title: view
+ $ref: '#/components/schemas/bytebase.v1.ChangelogView'
+ title: ListChangelogsRequest
+ additionalProperties: false
+ bytebase.v1.ListChangelogsResponse:
+ type: object
+ properties:
+ changelogs:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Changelog'
+ title: changelogs
+ description: The list of changelogs.
+ nextPageToken:
+ type: string
+ title: next_page_token
+ description: |-
+ A token, which can be sent as `page_token` to retrieve the next page.
+ If this field is omitted, there are no subsequent pages.
+ title: ListChangelogsResponse
+ additionalProperties: false
+ bytebase.v1.ListDatabaseGroupsRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The parent resource whose database groups are to be listed.
+ Format: projects/{project}
+ view:
+ title: view
+ description: The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC.
+ $ref: '#/components/schemas/bytebase.v1.DatabaseGroupView'
+ title: ListDatabaseGroupsRequest
+ additionalProperties: false
+ description: Request message for listing database groups.
+ bytebase.v1.ListDatabaseGroupsResponse:
+ type: object
+ properties:
+ databaseGroups:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.DatabaseGroup'
+ title: database_groups
+ description: The database groups from the specified request.
+ title: ListDatabaseGroupsResponse
+ additionalProperties: false
+ description: Response message for listing database groups.
+ bytebase.v1.ListDatabasesRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ - projects/{project}: list databases in a project, require "bb.projects.get" permission.
+ - workspaces/-: list databases in the workspace, require "bb.databases.list" permission.
+ - instances/{instances}: list databases in a instance, require "bb.instances.get" permission
+ pageSize:
+ type: integer
+ title: page_size
+ format: int32
+ description: |-
+ The maximum number of databases to return. The service may return fewer
+ than this value.
+ If unspecified, at most 10 databases will be returned.
+ The maximum value is 1000; values above 1000 will be coerced to 1000.
+ pageToken:
+ type: string
+ title: page_token
+ description: |-
+ A page token, received from a previous `ListDatabases` call.
+ Provide this to retrieve the subsequent page.
+
+ When paginating, all other parameters provided to `ListDatabases` must
+ match the call that provided the page token.
+ filter:
+ type: string
+ title: filter
+ description: |-
+ Filter is used to filter databases returned in the list.
+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+ Supported filter:
+ - environment: the environment full name in "environments/{id}" format, support "==" operator.
+ - name: the database name, support ".matches()" operator.
+ - project: the project full name in "projects/{id}" format, support "==" operator.
+ - instance: the instance full name in "instances/{id}" format, support "==" operator.
+ - engine: the database engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.
+ - exclude_unassigned: should be "true" or "false", will not show unassigned databases if it's true, support "==" operator.
+ - drifted: should be "true" or "false", show drifted databases if it's true, support "==" operator.
+ - table: filter by the database table, support "==" and ".matches()" operator.
+ - labels.{key}: the database label, support "==" and "in" operators.
+
+ For example:
+ environment == "environments/{environment resource id}"
+ environment == "" (find databases which environment is not set)
+ project == "projects/{project resource id}"
+ instance == "instances/{instance resource id}"
+ name.matches("database name")
+ engine == "MYSQL"
+ engine in ["MYSQL", "POSTGRES"]
+ !(engine in ["MYSQL", "POSTGRES"])
+ exclude_unassigned == true
+ drifted == true
+ table == "sample"
+ table.matches("sam")
+ labels.environment == "production"
+ labels.region == "asia"
+ labels.region in ["asia", "europe"]
+
+ You can combine filter conditions like:
+ environment == "environments/prod" && name.matches("employee")
+ showDeleted:
+ type: boolean
+ title: show_deleted
+ description: Show deleted database if specified.
+ title: ListDatabasesRequest
+ additionalProperties: false
+ bytebase.v1.ListDatabasesResponse:
+ type: object
+ properties:
+ databases:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Database'
+ title: databases
+ description: The databases from the specified request.
+ nextPageToken:
+ type: string
+ title: next_page_token
+ description: |-
+ A token, which can be sent as `page_token` to retrieve the next page.
+ If this field is omitted, there are no subsequent pages.
+ title: ListDatabasesResponse
+ additionalProperties: false
+ bytebase.v1.ListGroupsRequest:
+ type: object
+ properties:
+ pageSize:
+ type: integer
+ title: page_size
+ format: int32
+ description: |-
+ The maximum number of groups to return. The service may return fewer than
+ this value.
+ If unspecified, at most 10 groups will be returned.
+ The maximum value is 1000; values above 1000 will be coerced to 1000.
+ pageToken:
+ type: string
+ title: page_token
+ description: |-
+ A page token, received from a previous `ListGroups` call.
+ Provide this to retrieve the subsequent page.
+
+ When paginating, all other parameters provided to `ListGroups` must match
+ the call that provided the page token.
+ filter:
+ type: string
+ title: filter
+ description: |-
+ Filter is used to filter groups returned in the list.
+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+ Supported filter:
+ - title: the group title, support "==" and ".matches()" operator.
+ - email: the group email, support "==" and ".matches()" operator.
+ - project: the project full name in "projects/{id}" format, support "==" operator.
+
+ For example:
+ title == "dba"
+ email == "[email protected]"
+ title.matches("dba")
+ email.matches("dba")
+ project == "projects/sample-project"
+ You can combine filter conditions like:
+ title.matches("dba") || email.matches("dba")
+ title: ListGroupsRequest
+ additionalProperties: false
+ description: Request message for listing groups.
+ bytebase.v1.ListGroupsResponse:
+ type: object
+ properties:
+ groups:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Group'
+ title: groups
+ description: The groups from the specified request.
+ nextPageToken:
+ type: string
+ title: next_page_token
+ description: |-
+ A token, which can be sent as `page_token` to retrieve the next page.
+ If this field is omitted, there are no subsequent pages.
+ title: ListGroupsResponse
+ additionalProperties: false
+ description: Response message for listing groups.
+ bytebase.v1.ListIdentityProvidersRequest:
+ type: object
+ title: ListIdentityProvidersRequest
+ additionalProperties: false
+ bytebase.v1.ListIdentityProvidersResponse:
+ type: object
+ properties:
+ identityProviders:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.IdentityProvider'
+ title: identity_providers
+ description: The identity providers from the specified request.
+ title: ListIdentityProvidersResponse
+ additionalProperties: false
+ bytebase.v1.ListInstanceDatabaseRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the instance.
+ Format: instances/{instance}
+ instance:
+ title: instance
+ description: The target instance. We need to set this field if the target instance is not created yet.
+ nullable: true
+ $ref: '#/components/schemas/bytebase.v1.Instance'
+ title: ListInstanceDatabaseRequest
+ additionalProperties: false
+ bytebase.v1.ListInstanceDatabaseResponse:
+ type: object
+ properties:
+ databases:
+ type: array
+ items:
+ type: string
+ title: databases
+ description: All database name list in the instance.
+ title: ListInstanceDatabaseResponse
+ additionalProperties: false
+ bytebase.v1.ListInstanceRolesRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The parent, which owns this collection of roles.
+ Format: instances/{instance}
+ pageSize:
+ type: integer
+ title: page_size
+ format: int32
+ description: |-
+ Not used.
+ The maximum number of roles to return. The service may return fewer than
+ this value.
+ If unspecified, at most 10 roles will be returned.
+ The maximum value is 1000; values above 1000 will be coerced to 1000.
+ pageToken:
+ type: string
+ title: page_token
+ description: |-
+ Not used.
+ A page token, received from a previous `ListInstanceRoles` call.
+ Provide this to retrieve the subsequent page.
+
+ When paginating, all other parameters provided to `ListInstanceRoles` must match
+ the call that provided the page token.
+ refresh:
+ type: boolean
+ title: refresh
+ description: Refresh will refresh and return the latest data.
+ title: ListInstanceRolesRequest
+ additionalProperties: false
+ bytebase.v1.ListInstanceRolesResponse:
+ type: object
+ properties:
+ roles:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.InstanceRole'
+ title: roles
+ description: The roles from the specified request.
+ nextPageToken:
+ type: string
+ title: next_page_token
+ description: |-
+ A token, which can be sent as `page_token` to retrieve the next page.
+ If this field is omitted, there are no subsequent pages.
+ title: ListInstanceRolesResponse
+ additionalProperties: false
+ bytebase.v1.ListInstancesRequest:
+ type: object
+ properties:
+ pageSize:
+ type: integer
+ title: page_size
+ format: int32
+ description: |-
+ The maximum number of instances to return. The service may return fewer than
+ this value.
+ If unspecified, at most 10 instances will be returned.
+ The maximum value is 1000; values above 1000 will be coerced to 1000.
+ pageToken:
+ type: string
+ title: page_token
+ description: |-
+ A page token, received from a previous `ListInstances` call.
+ Provide this to retrieve the subsequent page.
+
+ When paginating, all other parameters provided to `ListInstances` must match
+ the call that provided the page token.
+ showDeleted:
+ type: boolean
+ title: show_deleted
+ description: Show deleted instances if specified.
+ filter:
+ type: string
+ title: filter
+ description: |-
+ Filter the instance.
+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+ Supported filters:
+ - name: the instance name, support "==" and ".matches()" operator.
+ - resource_id: the instance id, support "==" and ".matches()" operator.
+ - environment: the environment full name in "environments/{id}" format, support "==" operator.
+ - state: the instance state, check State enum for values, support "==" operator.
+ - engine: the instance engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.
+ - host: the instance host, support "==" and ".matches()" operator.
+ - port: the instance port, support "==" and ".matches()" operator.
+ - project: the project full name in "projects/{id}" format, support "==" operator.
+ - labels.{key}: the instance label, support "==" and "in" operators.
+
+ For example:
+ name == "sample instance"
+ name.matches("sample")
+ resource_id == "sample-instance"
+ resource_id.matches("sample")
+ state == "DELETED"
+ environment == "environments/test"
+ environment == "" (find instances which environment is not set)
+ engine == "MYSQL"
+ engine in ["MYSQL", "POSTGRES"]
+ !(engine in ["MYSQL", "POSTGRES"])
+ host == "127.0.0.1"
+ host.matches("127.0")
+ port == "54321"
+ port.matches("543")
+ labels.org_group == "infrastructure"
+ labels.environment in ["prod", "production"]
+ project == "projects/sample-project"
+ You can combine filter conditions like:
+ name.matches("sample") && environment == "environments/test"
+ host == "127.0.0.1" && port == "54321"
+ title: ListInstancesRequest
+ additionalProperties: false
+ bytebase.v1.ListInstancesResponse:
+ type: object
+ properties:
+ instances:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Instance'
+ title: instances
+ description: The instances from the specified request.
+ nextPageToken:
+ type: string
+ title: next_page_token
+ description: |-
+ A token, which can be sent as `page_token` to retrieve the next page.
+ If this field is omitted, there are no subsequent pages.
+ title: ListInstancesResponse
+ additionalProperties: false
+ bytebase.v1.ListIssueCommentsRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: 'Format: projects/{projects}/issues/{issue}'
+ pageSize:
+ type: integer
+ title: page_size
+ format: int32
+ description: |-
+ The maximum number of issue comments to return. The service may return fewer than
+ this value.
+ If unspecified, at most 10 issue comments will be returned.
+ The maximum value is 1000; values above 1000 will be coerced to 1000.
+ pageToken:
+ type: string
+ title: page_token
+ description: |-
+ A page token, received from a previous `ListIssueComments` call.
+ Provide this to retrieve the subsequent page.
+
+ When paginating, all other parameters provided to `ListIssueComments` must match
+ the call that provided the page token.
+ title: ListIssueCommentsRequest
+ additionalProperties: false
+ bytebase.v1.ListIssueCommentsResponse:
+ type: object
+ properties:
+ issueComments:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.IssueComment'
+ title: issue_comments
+ description: The issue comments from the specified request.
+ nextPageToken:
+ type: string
+ title: next_page_token
+ description: |-
+ A token, which can be sent as `page_token` to retrieve the next page.
+ If this field is omitted, there are no subsequent pages.
+ title: ListIssueCommentsResponse
+ additionalProperties: false
+ bytebase.v1.ListIssuesRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The parent, which owns this collection of issues.
+ Format: projects/{project}
+ pageSize:
+ type: integer
+ title: page_size
+ format: int32
+ description: |-
+ The maximum number of issues to return. The service may return fewer than
+ this value.
+ If unspecified, at most 10 issues will be returned.
+ The maximum value is 1000; values above 1000 will be coerced to 1000.
+ pageToken:
+ type: string
+ title: page_token
+ description: |-
+ A page token, received from a previous `ListIssues` call.
+ Provide this to retrieve the subsequent page.
+
+ When paginating, all other parameters provided to `ListIssues` must match
+ the call that provided the page token.
+ filter:
+ type: string
+ title: filter
+ description: |-
+ Filter is used to filter issues returned in the list.
+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+ Supported filters:
+ - creator: issue creator full name in "users/{email or id}" format, support "==" operator.
+ - status: the issue status, support "==" and "in" operator, check the IssueStatus enum for the values.
+ - create_time: issue create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.
+ - type: the issue type, support "==" and "in" operator, check the Type enum in the Issue message for the values.
+ - task_type: support "==" operator, the value can be "DDL", "DML" or "DATA_EXPORT"
+ - instance: the instance full name in the "instances/{id}" format, support "==" operator.
+ - database: the database full name in the "instances/{id}/databases/{name}" format, support "==" operator.
+ - environment: the database full name in the "environments/{name}" format, support "==" operator.
+ - labels: the issue labels, support "==" and "in" operator.
+ - approval_status: issue approval status, support "==" operator.
+ - current_approver: the issue approver, should in "users/{email} format", support "==" operator.
+
+ For example:
+ creator == "users/[email protected]" && status in ["OPEN", "DONE"]
+ status == "CANCELED" && type == "DATABASE_CHANGE"
+ instance == "instances/sample" && labels in ["label1", "label2"]
+ create_time >= "2025-01-02T15:04:05Z07:00"
+ environment == "environments/test"
+ query:
+ type: string
+ title: query
+ description: Query is the query statement.
+ title: ListIssuesRequest
+ additionalProperties: false
+ bytebase.v1.ListIssuesResponse:
+ type: object
+ properties:
+ issues:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Issue'
+ title: issues
+ description: The issues from the specified request.
+ nextPageToken:
+ type: string
+ title: next_page_token
+ description: |-
+ A token, which can be sent as `page_token` to retrieve the next page.
+ If this field is omitted, there are no subsequent pages.
+ title: ListIssuesResponse
+ additionalProperties: false
+ bytebase.v1.ListPlanCheckRunsRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The parent, which owns this collection of plan check runs.
+ Format: projects/{project}/plans/{plan}
+ latestOnly:
+ type: boolean
+ title: latest_only
+ description: If set to true, only the latest plan check run will be returned.
+ filter:
+ type: string
+ title: filter
+ description: |-
+ Filter is used to filter plan check runs returned in the list.
+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+ Supported filters:
+ - status: the plan check run status, support "==" and "in" operator, check the Status enum in the PlanCheckRun message for the values.
+ - result_status: the plan check run result status, support "==" and "in" operator, check the Result.Status enum in the PlanCheckRun message for the values.
+
+ For example:
+ status in ["DONE", "FAILED"]
+ status == "RUNNING"
+ result_status in ["SUCCESS", "ERROR"]
+ result_status == "WARNING"
+ title: ListPlanCheckRunsRequest
+ additionalProperties: false
+ bytebase.v1.ListPlanCheckRunsResponse:
+ type: object
+ properties:
+ planCheckRuns:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.PlanCheckRun'
+ title: plan_check_runs
+ description: The plan check runs from the specified request.
+ title: ListPlanCheckRunsResponse
+ additionalProperties: false
+ bytebase.v1.ListPlansRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The parent, which owns this collection of plans.
+ Format: projects/{project}
+ Use "projects/-" to list all plans from all projects.
+ pageSize:
+ type: integer
+ title: page_size
+ format: int32
+ description: |-
+ The maximum number of plans to return. The service may return fewer than
+ this value.
+ If unspecified, at most 10 plans will be returned.
+ The maximum value is 1000; values above 1000 will be coerced to 1000.
+ pageToken:
+ type: string
+ title: page_token
+ description: |-
+ A page token, received from a previous `ListPlans` call.
+ Provide this to retrieve the subsequent page.
+
+ When paginating, all other parameters provided to `ListPlans` must match
+ the call that provided the page token.
+ title: ListPlansRequest
+ additionalProperties: false
+ bytebase.v1.ListPlansResponse:
+ type: object
+ properties:
+ plans:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Plan'
+ title: plans
+ description: The plans from the specified request.
+ nextPageToken:
+ type: string
+ title: next_page_token
+ description: |-
+ A token, which can be sent as `page_token` to retrieve the next page.
+ If this field is omitted, there are no subsequent pages.
+ title: ListPlansResponse
+ additionalProperties: false
+ bytebase.v1.ListPoliciesRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The parent, which owns this collection of policies.
+ Format: {resource type}/{resource id}
+ policyType:
+ title: policy_type
+ description: Filter by specific policy type.
+ nullable: true
+ $ref: '#/components/schemas/bytebase.v1.PolicyType'
+ showDeleted:
+ type: boolean
+ title: show_deleted
+ description: Show deleted policies if specified.
+ title: ListPoliciesRequest
+ additionalProperties: false
+ bytebase.v1.ListPoliciesResponse:
+ type: object
+ properties:
+ policies:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Policy'
+ title: policies
+ description: The policies from the specified request.
+ title: ListPoliciesResponse
+ additionalProperties: false
+ bytebase.v1.ListProjectsRequest:
+ type: object
+ properties:
+ pageSize:
+ type: integer
+ title: page_size
+ format: int32
+ description: |-
+ The maximum number of projects to return. The service may return fewer than
+ this value.
+ If unspecified, at most 10 projects will be returned.
+ The maximum value is 1000; values above 1000 will be coerced to 1000.
+ pageToken:
+ type: string
+ title: page_token
+ description: |-
+ A page token, received from a previous `ListProjects` call.
+ Provide this to retrieve the subsequent page.
+
+ When paginating, all other parameters provided to `ListProjects` must match
+ the call that provided the page token.
+ showDeleted:
+ type: boolean
+ title: show_deleted
+ description: Show deleted projects if specified.
+ filter:
+ type: string
+ title: filter
+ description: |-
+ Filter the project.
+ Check filter for SearchProjectsRequest for details.
+ Supports filtering by name, resource_id, state, and labels (e.g., labels.environment == "production").
+ title: ListProjectsRequest
+ additionalProperties: false
+ bytebase.v1.ListProjectsResponse:
+ type: object
+ properties:
+ projects:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Project'
+ title: projects
+ description: The projects from the specified request.
+ nextPageToken:
+ type: string
+ title: next_page_token
+ description: |-
+ A token, which can be sent as `page_token` to retrieve the next page.
+ If this field is omitted, there are no subsequent pages.
+ title: ListProjectsResponse
+ additionalProperties: false
+ bytebase.v1.ListReleasesRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: 'Format: projects/{project}'
+ pageSize:
+ type: integer
+ title: page_size
+ format: int32
+ description: |-
+ The maximum number of releases to return. The service may return fewer than this value.
+ If unspecified, at most 10 releases will be returned.
+ The maximum value is 1000; values above 1000 will be coerced to 1000.
+ pageToken:
+ type: string
+ title: page_token
+ description: |-
+ A page token, received from a previous `ListReleases` call.
+ Provide this to retrieve the subsequent page.
+
+ When paginating, all other parameters provided to `ListReleases` must match
+ the call that provided the page token.
+ showDeleted:
+ type: boolean
+ title: show_deleted
+ description: Show deleted releases if specified.
+ title: ListReleasesRequest
+ additionalProperties: false
+ bytebase.v1.ListReleasesResponse:
+ type: object
+ properties:
+ releases:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Release'
+ title: releases
+ description: The releases from the specified request.
+ nextPageToken:
+ type: string
+ title: next_page_token
+ description: |-
+ A token, which can be sent as `page_token` to retrieve the next page.
+ If this field is omitted, there are no subsequent pages.
+ title: ListReleasesResponse
+ additionalProperties: false
+ bytebase.v1.ListReviewConfigsRequest:
+ type: object
+ title: ListReviewConfigsRequest
+ additionalProperties: false
+ bytebase.v1.ListReviewConfigsResponse:
+ type: object
+ properties:
+ reviewConfigs:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.ReviewConfig'
+ title: review_configs
+ description: The SQL review configs from the specified request.
+ title: ListReviewConfigsResponse
+ additionalProperties: false
+ bytebase.v1.ListRevisionsRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The parent of the revisions.
+ Format: instances/{instance}/databases/{database}
+ pageSize:
+ type: integer
+ title: page_size
+ format: int32
+ description: |-
+ The maximum number of revisions to return. The service may return fewer
+ than this value. If unspecified, at most 10 revisions will be returned. The
+ maximum value is 1000; values above 1000 will be coerced to 1000.
+ pageToken:
+ type: string
+ title: page_token
+ description: |-
+ A page token, received from a previous `ListRevisions` call.
+ Provide this to retrieve the subsequent page.
+
+ When paginating, all other parameters provided to `ListRevisions` must
+ match the call that provided the page token.
+ showDeleted:
+ type: boolean
+ title: show_deleted
+ description: Whether to include deleted revisions in the results.
+ title: ListRevisionsRequest
+ additionalProperties: false
+ bytebase.v1.ListRevisionsResponse:
+ type: object
+ properties:
+ revisions:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Revision'
+ title: revisions
+ description: The revisions from the specified request.
+ nextPageToken:
+ type: string
+ title: next_page_token
+ description: |-
+ A token, which can be sent as `page_token` to retrieve the next page.
+ If this field is omitted, there are no subsequent pages.
+ title: ListRevisionsResponse
+ additionalProperties: false
+ bytebase.v1.ListRolesRequest:
+ type: object
+ title: ListRolesRequest
+ additionalProperties: false
+ bytebase.v1.ListRolesResponse:
+ type: object
+ properties:
+ roles:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Role'
+ title: roles
+ description: The roles from the specified request.
+ title: ListRolesResponse
+ additionalProperties: false
+ bytebase.v1.ListRolloutsRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The parent, which owns this collection of rollouts.
+ Format: projects/{project}
+ Use "projects/-" to list all rollouts from all projects.
+ pageSize:
+ type: integer
+ title: page_size
+ format: int32
+ description: |-
+ The maximum number of rollouts to return. The service may return fewer than
+ this value.
+ If unspecified, at most 10 rollouts will be returned.
+ The maximum value is 1000; values above 1000 will be coerced to 1000.
+ pageToken:
+ type: string
+ title: page_token
+ description: |-
+ A page token, received from a previous `ListRollouts` call.
+ Provide this to retrieve the subsequent page.
+
+ When paginating, all other parameters provided to `ListRollouts` must match
+ the call that provided the page token.
+ filter:
+ type: string
+ title: filter
+ description: |-
+ Filter is used to filter rollouts returned in the list.
+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+ Supported filters:
+ - creator: the rollout creator full name in "users/{email or id}" format, support "==" operator.
+ - update_time: rollout update time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.
+ - task_type: the task type, support "==" and "in" operators, check the Task.Type enum for the values.
+
+ For example:
+ creator == "users/[email protected]" && update_time >= "2025-01-02T15:04:05Z07:00"
+ task_type == "DATABASE_MIGRATE"
+ task_type in ["DATABASE_MIGRATE", "DATABASE_EXPORT"]
+ title: ListRolloutsRequest
+ additionalProperties: false
+ bytebase.v1.ListRolloutsResponse:
+ type: object
+ properties:
+ rollouts:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Rollout'
+ title: rollouts
+ description: The rollouts from the specified request.
+ nextPageToken:
+ type: string
+ title: next_page_token
+ description: |-
+ A token, which can be sent as `page_token` to retrieve the next page.
+ If this field is omitted, there are no subsequent pages.
+ title: ListRolloutsResponse
+ additionalProperties: false
+ bytebase.v1.ListSettingsRequest:
+ type: object
+ title: ListSettingsRequest
+ additionalProperties: false
+ bytebase.v1.ListSettingsResponse:
+ type: object
+ properties:
+ settings:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Setting'
+ title: settings
+ description: The settings from the specified request.
+ title: ListSettingsResponse
+ additionalProperties: false
+ bytebase.v1.ListTaskRunsRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The parent, which owns this collection of plans.
+ Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}
+ Use "projects/{project}/rollouts/{rollout}/stages/-/tasks/-" to list all taskRuns from a rollout.
+ title: ListTaskRunsRequest
+ additionalProperties: false
+ bytebase.v1.ListTaskRunsResponse:
+ type: object
+ properties:
+ taskRuns:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.TaskRun'
+ title: task_runs
+ description: The taskRuns from the specified request.
+ title: ListTaskRunsResponse
+ additionalProperties: false
+ bytebase.v1.ListUsersRequest:
+ type: object
+ properties:
+ pageSize:
+ type: integer
+ title: page_size
+ format: int32
+ description: |-
+ The maximum number of users to return. The service may return fewer than
+ this value.
+ If unspecified, at most 10 users will be returned.
+ The maximum value is 1000; values above 1000 will be coerced to 1000.
+ pageToken:
+ type: string
+ title: page_token
+ description: |-
+ A page token, received from a previous `ListUsers` call.
+ Provide this to retrieve the subsequent page.
+
+ When paginating, all other parameters provided to `ListUsers` must match
+ the call that provided the page token.
+ showDeleted:
+ type: boolean
+ title: show_deleted
+ description: Show deleted users if specified.
+ filter:
+ type: string
+ title: filter
+ description: |-
+ Filter is used to filter users returned in the list.
+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+ Supported filter:
+ - name: the user name, support "==" and ".matches()" operator.
+ - email: the user email, support "==" and ".matches()" operator.
+ - user_type: the type, check UserType enum for values, support "==", "in [xx]", "!(in [xx])" operator.
+ - state: check State enum for values, support "==" operator.
+ - project: the project full name in "projects/{id}" format, support "==" operator.
+
+ For example:
+ name == "ed"
+ name.matches("ed")
+ email == "[email protected]"
+ email.matches("ed")
+ user_type == "SERVICE_ACCOUNT"
+ user_type in ["SERVICE_ACCOUNT", "USER"]
+ !(user_type in ["SERVICE_ACCOUNT", "USER"])
+ state == "DELETED"
+ project == "projects/sample-project"
+ You can combine filter conditions like:
+ name.matches("ed") && project == "projects/sample-project"
+ (name == "ed" || email == "[email protected]") && project == "projects/sample-project"
+ title: ListUsersRequest
+ additionalProperties: false
+ bytebase.v1.ListUsersResponse:
+ type: object
+ properties:
+ users:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.User'
+ title: users
+ description: The users from the specified request.
+ nextPageToken:
+ type: string
+ title: next_page_token
+ description: |-
+ A token, which can be sent as `page_token` to retrieve the next page.
+ If this field is omitted, there are no subsequent pages.
+ title: ListUsersResponse
+ additionalProperties: false
+ bytebase.v1.LoginRequest:
+ type: object
+ properties:
+ email:
+ type: string
+ title: email
+ description: User's email address.
+ password:
+ type: string
+ title: password
+ description: User's password for authentication.
+ web:
+ type: boolean
+ title: web
+ description: If web is set, we will set access token, refresh token, and user to the cookie.
+ idpName:
+ type: string
+ title: idp_name
+ description: |-
+ The name of the identity provider.
+ Format: idps/{idp}
+ idpContext:
+ title: idp_context
+ description: The idp_context is using to get the user information from identity provider.
+ $ref: '#/components/schemas/bytebase.v1.IdentityProviderContext'
+ otpCode:
+ type: string
+ title: otp_code
+ description: The otp_code is used to verify the user's identity by MFA.
+ nullable: true
+ recoveryCode:
+ type: string
+ title: recovery_code
+ description: The recovery_code is used to recovery the user's identity with MFA.
+ nullable: true
+ mfaTempToken:
+ type: string
+ title: mfa_temp_token
+ description: The mfa_temp_token is used to verify the user's identity by MFA.
+ nullable: true
+ title: LoginRequest
+ additionalProperties: false
+ bytebase.v1.LoginResponse:
+ type: object
+ properties:
+ token:
+ type: string
+ title: token
+ description: Access token for authenticated requests.
+ mfaTempToken:
+ type: string
+ title: mfa_temp_token
+ description: Temporary token for MFA verification.
+ nullable: true
+ requireResetPassword:
+ type: boolean
+ title: require_reset_password
+ description: Whether user must reset password before continuing.
+ user:
+ title: user
+ description: The user from the successful login.
+ $ref: '#/components/schemas/bytebase.v1.User'
+ title: LoginResponse
+ additionalProperties: false
+ bytebase.v1.LogoutRequest:
+ type: object
+ title: LogoutRequest
+ additionalProperties: false
+ description: Request to logout current user session.
+ bytebase.v1.MaskingExceptionPolicy:
+ type: object
+ properties:
+ maskingExceptions:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.MaskingExceptionPolicy.MaskingException'
+ title: masking_exceptions
+ description: The list of masking exceptions.
+ title: MaskingExceptionPolicy
+ additionalProperties: false
+ description: MaskingExceptionPolicy is the allowlist of users who can access sensitive data.
+ bytebase.v1.MaskingExceptionPolicy.MaskingException:
+ type: object
+ properties:
+ action:
+ title: action
+ description: The action that the user can perform on sensitive data.
+ $ref: '#/components/schemas/bytebase.v1.MaskingExceptionPolicy.MaskingException.Action'
+ member:
+ type: string
+ title: member
+ description: |-
+ Member is the principal who bind to this exception policy instance.
+
+ - `user:{email}`: An email address that represents a specific Bytebase account. For example, `[email protected]`.
+ - `group:{email}`: An email address for group.
+ condition:
+ title: condition
+ description: |-
+ The condition that is associated with this exception policy instance.
+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+ If the condition is empty, means the user can access all databases without expiration.
+
+ Support variables:
+ resource.instance_id: the instance resource id. Only support "==" operation.
+ resource.database_name: the database name. Only support "==" operation.
+ resource.schema_name: the schema name. Only support "==" operation.
+ resource.table_name: the table name. Only support "==" operation.
+ resource.column_name: the column name. Only support "==" operation.
+ request.time: the expiration. Only support "<" operation in `request.time < timestamp("{ISO datetime string format}")`
+ All variables should join with "&&" condition.
+
+ For example:
+ resource.instance_id == "local" && resource.database_name == "employee" && request.time < timestamp("2025-04-30T11:10:39.000Z")
+ resource.instance_id == "local" && resource.database_name == "employee"
+ $ref: '#/components/schemas/google.type.Expr'
+ title: MaskingException
+ additionalProperties: false
+ description: An exception allowing specific users to access masked data.
+ bytebase.v1.MaskingExceptionPolicy.MaskingException.Action:
+ type: string
+ title: Action
+ enum:
+ - ACTION_UNSPECIFIED
+ - QUERY
+ - EXPORT
+ description: The action that the exception permits.
+ bytebase.v1.MaskingReason:
+ type: object
+ properties:
+ semanticTypeId:
+ type: string
+ title: semantic_type_id
+ description: The semantic type that triggered masking (e.g., "SSN", "email", "phone").
+ semanticTypeTitle:
+ type: string
+ title: semantic_type_title
+ description: Human-readable semantic type title.
+ maskingRuleId:
+ type: string
+ title: masking_rule_id
+ description: The masking rule ID that matched (if applicable).
+ algorithm:
+ type: string
+ title: algorithm
+ description: The masking algorithm used.
+ context:
+ type: string
+ title: context
+ description: 'Additional context (e.g., "Matched global rule: PII Protection").'
+ classificationLevel:
+ type: string
+ title: classification_level
+ description: Whether masking was due to classification level.
+ semanticTypeIcon:
+ type: string
+ title: semantic_type_icon
+ description: Icon associated with the semantic type (if any).
+ title: MaskingReason
+ additionalProperties: false
+ bytebase.v1.MaskingRulePolicy:
+ type: object
+ properties:
+ rules:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.MaskingRulePolicy.MaskingRule'
+ title: rules
+ description: The list of masking rules.
+ title: MaskingRulePolicy
+ additionalProperties: false
+ description: Policy for configuring data masking rules.
+ bytebase.v1.MaskingRulePolicy.MaskingRule:
+ type: object
+ properties:
+ id:
+ type: string
+ title: id
+ description: A unique identifier for the rule in UUID format.
+ condition:
+ title: condition
+ description: |-
+ The condition for the masking rule.
+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+ Support variables:
+ resource.environment_id: the environment resource id.
+ resource.project_id: the project resource id.
+ resource.instance_id: the instance resource id.
+ resource.database_name: the database name.
+ resource.table_name: the table name.
+ resource.column_name: the column name.
+ resource.classification_level: the classification level.
+
+ Each variable support following operations:
+ ==: the value equals the target.
+ !=: the value not equals the target.
+ in: the value matches one of the targets.
+ !(in): the value not matches any of the targets.
+
+ For example:
+ resource.environment_id == "test" && resource.project_id == "sample-project"
+ resource.instance_id == "sample-instance" && resource.database_name == "employee" && resource.table_name in ["table1", "table2"]
+ resource.environment_id != "test" || !(resource.project_id in ["poject1", "prject2"])
+ resource.instance_id == "sample-instance" && (resource.database_name == "db1" || resource.database_name == "db2")
+ $ref: '#/components/schemas/google.type.Expr'
+ semanticType:
+ type: string
+ title: semantic_type
+ description: The semantic type of data to mask (e.g., "SSN", "EMAIL").
+ title: MaskingRule
+ additionalProperties: false
+ description: A rule that defines when and how to mask data.
+ bytebase.v1.MaterializedViewMetadata:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: The name is the name of a materialized view.
+ definition:
+ type: string
+ title: definition
+ description: The definition is the definition of a materialized view.
+ comment:
+ type: string
+ title: comment
+ description: The comment is the comment of a materialized view.
+ dependencyColumns:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.DependencyColumn'
+ title: dependency_columns
+ description: |-
+ The dependency_columns is the list of dependency columns of a materialized
+ view.
+ triggers:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.TriggerMetadata'
+ title: triggers
+ description: The columns is the ordered list of columns in a table.
+ indexes:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.IndexMetadata'
+ title: indexes
+ description: The indexes is the list of indexes in a table.
+ skipDump:
+ type: boolean
+ title: skip_dump
+ title: MaterializedViewMetadata
+ additionalProperties: false
+ description: MaterializedViewMetadata is the metadata for materialized views.
+ bytebase.v1.OAuth2AuthStyle:
+ type: string
+ title: OAuth2AuthStyle
+ enum:
+ - OAUTH2_AUTH_STYLE_UNSPECIFIED
+ - IN_PARAMS
+ - IN_HEADER
+ bytebase.v1.OAuth2IdentityProviderConfig:
+ type: object
+ properties:
+ authUrl:
+ type: string
+ title: auth_url
+ description: The authorization endpoint URL for OAuth2 flow.
+ tokenUrl:
+ type: string
+ title: token_url
+ description: The token endpoint URL for exchanging authorization code.
+ userInfoUrl:
+ type: string
+ title: user_info_url
+ description: The user information endpoint URL.
+ clientId:
+ type: string
+ title: client_id
+ description: The OAuth2 client identifier.
+ clientSecret:
+ type: string
+ title: client_secret
+ description: The OAuth2 client secret for authentication.
+ scopes:
+ type: array
+ items:
+ type: string
+ title: scopes
+ description: The list of OAuth2 scopes to request.
+ fieldMapping:
+ title: field_mapping
+ description: Mapping configuration for user attributes from OAuth2 response.
+ $ref: '#/components/schemas/bytebase.v1.FieldMapping'
+ skipTlsVerify:
+ type: boolean
+ title: skip_tls_verify
+ description: Whether to skip TLS certificate verification.
+ authStyle:
+ title: auth_style
+ description: The authentication style for client credentials.
+ $ref: '#/components/schemas/bytebase.v1.OAuth2AuthStyle'
+ title: OAuth2IdentityProviderConfig
+ additionalProperties: false
+ description: OAuth2IdentityProviderConfig is the structure for OAuth2 identity provider config.
+ bytebase.v1.OAuth2IdentityProviderContext:
+ type: object
+ properties:
+ code:
+ type: string
+ title: code
+ description: Authorization code from OAuth2 provider.
+ title: OAuth2IdentityProviderContext
+ additionalProperties: false
+ description: OAuth2 authentication context.
+ bytebase.v1.OAuth2IdentityProviderTestRequestContext:
+ type: object
+ properties:
+ code:
+ type: string
+ title: code
+ description: Authorize code from website.
+ title: OAuth2IdentityProviderTestRequestContext
+ additionalProperties: false
+ bytebase.v1.OIDCIdentityProviderConfig:
+ type: object
+ properties:
+ issuer:
+ type: string
+ title: issuer
+ description: The OIDC issuer URL for the identity provider.
+ clientId:
+ type: string
+ title: client_id
+ description: The OIDC client identifier.
+ clientSecret:
+ type: string
+ title: client_secret
+ description: The OIDC client secret for authentication.
+ scopes:
+ type: array
+ items:
+ type: string
+ title: scopes
+ description: |-
+ The scopes that the OIDC provider supports.
+ Should be fetched from the well-known configuration file of the OIDC provider.
+ fieldMapping:
+ title: field_mapping
+ description: Mapping configuration for user attributes from OIDC claims.
+ $ref: '#/components/schemas/bytebase.v1.FieldMapping'
+ skipTlsVerify:
+ type: boolean
+ title: skip_tls_verify
+ description: Whether to skip TLS certificate verification.
+ authStyle:
+ title: auth_style
+ description: The authentication style for client credentials.
+ $ref: '#/components/schemas/bytebase.v1.OAuth2AuthStyle'
+ authEndpoint:
+ type: string
+ title: auth_endpoint
+ description: |-
+ The authorization endpoint of the OIDC provider.
+ Should be fetched from the well-known configuration file of the OIDC provider.
+ title: OIDCIdentityProviderConfig
+ additionalProperties: false
+ description: OIDCIdentityProviderConfig is the structure for OIDC identity provider config.
+ bytebase.v1.OIDCIdentityProviderContext:
+ type: object
+ properties:
+ code:
+ type: string
+ title: code
+ description: Authorization code from OIDC provider.
+ title: OIDCIdentityProviderContext
+ additionalProperties: false
+ description: OpenID Connect authentication context.
+ bytebase.v1.OIDCIdentityProviderTestRequestContext:
+ type: object
+ properties:
+ code:
+ type: string
+ title: code
+ description: Authorize code from OIDC provider.
+ title: OIDCIdentityProviderTestRequestContext
+ additionalProperties: false
+ bytebase.v1.ObjectSchema:
+ type: object
+ allOf:
+ - properties:
+ type:
+ title: type
+ description: The data type of this object.
+ $ref: '#/components/schemas/bytebase.v1.ObjectSchema.Type'
+ semanticType:
+ type: string
+ title: semantic_type
+ description: The semantic type of this object.
+ - oneOf:
+ - properties:
+ arrayKind:
+ title: array_kind
+ description: Array schema.
+ $ref: '#/components/schemas/bytebase.v1.ObjectSchema.ArrayKind'
+ title: array_kind
+ required:
+ - arrayKind
+ - properties:
+ structKind:
+ title: struct_kind
+ description: Struct schema.
+ $ref: '#/components/schemas/bytebase.v1.ObjectSchema.StructKind'
+ title: struct_kind
+ required:
+ - structKind
+ title: ObjectSchema
+ additionalProperties: false
+ description: Schema definition for object-type columns.
+ bytebase.v1.ObjectSchema.ArrayKind:
+ type: object
+ properties:
+ kind:
+ title: kind
+ description: The schema of array elements.
+ $ref: '#/components/schemas/bytebase.v1.ObjectSchema'
+ title: ArrayKind
+ additionalProperties: false
+ description: Array type with element schema.
+ bytebase.v1.ObjectSchema.StructKind:
+ type: object
+ properties:
+ properties:
+ type: object
+ title: properties
+ additionalProperties:
+ title: value
+ $ref: '#/components/schemas/bytebase.v1.ObjectSchema'
+ description: Properties of the struct.
+ title: StructKind
+ additionalProperties: false
+ description: Structure type with named properties.
+ bytebase.v1.ObjectSchema.StructKind.PropertiesEntry:
+ type: object
+ properties:
+ key:
+ type: string
+ title: key
+ value:
+ title: value
+ $ref: '#/components/schemas/bytebase.v1.ObjectSchema'
+ title: PropertiesEntry
+ additionalProperties: false
+ bytebase.v1.ObjectSchema.Type:
+ type: string
+ title: Type
+ enum:
+ - TYPE_UNSPECIFIED
+ - STRING
+ - NUMBER
+ - BOOLEAN
+ - OBJECT
+ - ARRAY
+ description: Object schema data types.
+ bytebase.v1.PackageMetadata:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: The name is the name of a package.
+ definition:
+ type: string
+ title: definition
+ description: The definition is the definition of a package.
+ title: PackageMetadata
+ additionalProperties: false
+ description: PackageMetadata is the metadata for packages.
+ bytebase.v1.Plan:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the plan.
+ `plan` is a system generated ID.
+ Format: projects/{project}/plans/{plan}
+ state:
+ title: state
+ description: The state of the plan.
+ $ref: '#/components/schemas/bytebase.v1.State'
+ issue:
+ type: string
+ title: issue
+ description: |-
+ The issue associated with the plan.
+ Can be empty.
+ Format: projects/{project}/issues/{issue}
+ rollout:
+ type: string
+ title: rollout
+ description: |-
+ The rollout associated with the plan.
+ Can be empty.
+ Format: projects/{project}/rollouts/{rollout}
+ title:
+ type: string
+ title: title
+ maxLength: 200
+ description: The title of the plan.
+ description:
+ type: string
+ title: description
+ maxLength: 10000
+ description: The description of the plan.
+ specs:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Plan.Spec'
+ title: specs
+ description: The deployment specs for the plan.
+ creator:
+ type: string
+ title: creator
+ description: 'Format: users/[email protected]'
+ createTime:
+ title: create_time
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ updateTime:
+ title: update_time
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ planCheckRunStatusCount:
+ type: object
+ title: plan_check_run_status_count
+ additionalProperties:
+ type: integer
+ title: value
+ format: int32
+ description: |-
+ The status count of the latest plan check runs.
+ Keys are:
+ - SUCCESS
+ - WARNING
+ - ERROR
+ - RUNNING
+ deployment:
+ title: deployment
+ $ref: '#/components/schemas/bytebase.v1.Plan.Deployment'
+ title: Plan
+ additionalProperties: false
+ bytebase.v1.Plan.ChangeDatabaseConfig:
+ type: object
+ properties:
+ targets:
+ type: array
+ items:
+ type: string
+ title: targets
+ description: |-
+ The list of targets.
+ Multi-database format: [instances/{instance-id}/databases/{database-name}].
+ Single database group format: [projects/{project}/databaseGroups/{databaseGroup}].
+ sheet:
+ type: string
+ title: sheet
+ description: |-
+ The resource name of the sheet.
+ Format: projects/{project}/sheets/{sheet}
+ release:
+ type: string
+ title: release
+ description: |-
+ The resource name of the release.
+ Format: projects/{project}/releases/{release}
+ type:
+ title: type
+ description: Type is the database change type.
+ $ref: '#/components/schemas/bytebase.v1.DatabaseChangeType'
+ ghostFlags:
+ type: object
+ title: ghost_flags
+ additionalProperties:
+ type: string
+ title: value
+ enablePriorBackup:
+ type: boolean
+ title: enable_prior_backup
+ description: If set, a backup of the modified data will be created automatically before any changes are applied.
+ enableGhost:
+ type: boolean
+ title: enable_ghost
+ description: Whether to use gh-ost for online schema migration.
+ title: ChangeDatabaseConfig
+ additionalProperties: false
+ bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntry:
+ type: object
+ properties:
+ key:
+ type: string
+ title: key
+ value:
+ type: string
+ title: value
+ title: GhostFlagsEntry
+ additionalProperties: false
+ bytebase.v1.Plan.CreateDatabaseConfig:
+ type: object
+ properties:
+ target:
+ type: string
+ title: target
+ description: |-
+ The resource name of the instance on which the database is created.
+ Format: instances/{instance}
+ database:
+ type: string
+ title: database
+ description: The name of the database to create.
+ table:
+ type: string
+ title: table
+ description: |-
+ table is the name of the table, if it is not empty, Bytebase should create a table after creating the database.
+ For example, in MongoDB, it only creates the database when we first store data in that database.
+ characterSet:
+ type: string
+ title: character_set
+ description: character_set is the character set of the database.
+ collation:
+ type: string
+ title: collation
+ description: collation is the collation of the database.
+ cluster:
+ type: string
+ title: cluster
+ description: cluster is the cluster of the database. This is only applicable to ClickHouse for "ON CLUSTER <<cluster>>".
+ owner:
+ type: string
+ title: owner
+ description: owner is the owner of the database. This is only applicable to Postgres for "WITH OWNER <<owner>>".
+ environment:
+ type: string
+ title: environment
+ description: |-
+ The environment resource.
+ Format: environments/prod where prod is the environment resource ID.
+ title: CreateDatabaseConfig
+ additionalProperties: false
+ bytebase.v1.Plan.Deployment:
+ type: object
+ properties:
+ environments:
+ type: array
+ items:
+ type: string
+ title: environments
+ description: The environments deploy order.
+ databaseGroupMappings:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Plan.Deployment.DatabaseGroupMapping'
+ title: database_group_mappings
+ description: The database group mapping.
+ title: Deployment
+ additionalProperties: false
+ bytebase.v1.Plan.Deployment.DatabaseGroupMapping:
+ type: object
+ properties:
+ databaseGroup:
+ type: string
+ title: database_group
+ description: 'Format: projects/{project}/databaseGroups/{databaseGroup}.'
+ databases:
+ type: array
+ items:
+ type: string
+ title: databases
+ description: 'Format: instances/{instance-id}/databases/{database-name}.'
+ title: DatabaseGroupMapping
+ additionalProperties: false
+ bytebase.v1.Plan.ExportDataConfig:
+ type: object
+ properties:
+ targets:
+ type: array
+ items:
+ type: string
+ title: targets
+ description: |-
+ The list of targets.
+ Multi-database format: [instances/{instance-id}/databases/{database-name}].
+ Single database group format: [projects/{project}/databaseGroups/{databaseGroup}].
+ sheet:
+ type: string
+ title: sheet
+ description: |-
+ The resource name of the sheet.
+ Format: projects/{project}/sheets/{sheet}
+ format:
+ title: format
+ description: The format of the exported file.
+ $ref: '#/components/schemas/bytebase.v1.ExportFormat'
+ password:
+ type: string
+ title: password
+ description: |-
+ The zip password provide by users.
+ Leave it empty if no needs to encrypt the zip file.
+ nullable: true
+ title: ExportDataConfig
+ additionalProperties: false
+ bytebase.v1.Plan.PlanCheckRunStatusCountEntry:
+ type: object
+ properties:
+ key:
+ type: string
+ title: key
+ value:
+ type: integer
+ title: value
+ format: int32
+ title: PlanCheckRunStatusCountEntry
+ additionalProperties: false
+ bytebase.v1.Plan.Spec:
+ type: object
+ allOf:
+ - properties:
+ id:
+ type: string
+ title: id
+ description: A UUID4 string that uniquely identifies the Spec.
+ - oneOf:
+ - properties:
+ changeDatabaseConfig:
+ title: change_database_config
+ $ref: '#/components/schemas/bytebase.v1.Plan.ChangeDatabaseConfig'
+ title: change_database_config
+ required:
+ - changeDatabaseConfig
+ - properties:
+ createDatabaseConfig:
+ title: create_database_config
+ $ref: '#/components/schemas/bytebase.v1.Plan.CreateDatabaseConfig'
+ title: create_database_config
+ required:
+ - createDatabaseConfig
+ - properties:
+ exportDataConfig:
+ title: export_data_config
+ $ref: '#/components/schemas/bytebase.v1.Plan.ExportDataConfig'
+ title: export_data_config
+ required:
+ - exportDataConfig
+ title: Spec
+ additionalProperties: false
+ bytebase.v1.PlanCheckRun:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: 'Format: projects/{project}/plans/{plan}/planCheckRuns/{planCheckRun}'
+ type:
+ title: type
+ $ref: '#/components/schemas/bytebase.v1.PlanCheckRun.Type'
+ status:
+ title: status
+ $ref: '#/components/schemas/bytebase.v1.PlanCheckRun.Status'
+ target:
+ type: string
+ title: target
+ description: 'Format: instances/{instance}/databases/{database}'
+ sheet:
+ type: string
+ title: sheet
+ description: 'Format: project/{project}/sheets/{sheet}'
+ results:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.PlanCheckRun.Result'
+ title: results
+ error:
+ type: string
+ title: error
+ description: error is set if the Status is FAILED.
+ createTime:
+ title: create_time
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ title: PlanCheckRun
+ additionalProperties: false
+ bytebase.v1.PlanCheckRun.Result:
+ type: object
+ allOf:
+ - properties:
+ status:
+ title: status
+ $ref: '#/components/schemas/bytebase.v1.Advice.Level'
+ title:
+ type: string
+ title: title
+ content:
+ type: string
+ title: content
+ code:
+ type: integer
+ title: code
+ format: int32
+ - oneOf:
+ - properties:
+ sqlReviewReport:
+ title: sql_review_report
+ $ref: '#/components/schemas/bytebase.v1.PlanCheckRun.Result.SqlReviewReport'
+ title: sql_review_report
+ required:
+ - sqlReviewReport
+ - properties:
+ sqlSummaryReport:
+ title: sql_summary_report
+ $ref: '#/components/schemas/bytebase.v1.PlanCheckRun.Result.SqlSummaryReport'
+ title: sql_summary_report
+ required:
+ - sqlSummaryReport
+ title: Result
+ additionalProperties: false
+ bytebase.v1.PlanCheckRun.Result.SqlReviewReport:
+ type: object
+ properties:
+ startPosition:
+ title: start_position
+ description: Position of the SQL statement.
+ $ref: '#/components/schemas/bytebase.v1.Position'
+ endPosition:
+ title: end_position
+ $ref: '#/components/schemas/bytebase.v1.Position'
+ title: SqlReviewReport
+ additionalProperties: false
+ bytebase.v1.PlanCheckRun.Result.SqlSummaryReport:
+ type: object
+ properties:
+ statementTypes:
+ type: array
+ items:
+ type: string
+ title: statement_types
+ description: statement_types are the types of statements that are found in the sql.
+ affectedRows:
+ type:
+ - integer
+ - string
+ title: affected_rows
+ format: int64
+ changedResources:
+ title: changed_resources
+ $ref: '#/components/schemas/bytebase.v1.ChangedResources'
+ title: SqlSummaryReport
+ additionalProperties: false
+ bytebase.v1.PlanCheckRun.Status:
+ type: string
+ title: Status
+ enum:
+ - STATUS_UNSPECIFIED
+ - RUNNING
+ - DONE
+ - FAILED
+ - CANCELED
+ bytebase.v1.PlanCheckRun.Type:
+ type: string
+ title: Type
+ enum:
+ - TYPE_UNSPECIFIED
+ - DATABASE_STATEMENT_FAKE_ADVISE
+ - DATABASE_STATEMENT_ADVISE
+ - DATABASE_STATEMENT_SUMMARY_REPORT
+ - DATABASE_CONNECT
+ - DATABASE_GHOST_SYNC
+ bytebase.v1.PlanConfig:
+ type: object
+ properties:
+ plans:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.PlanLimitConfig'
+ title: plans
+ instanceFeatures:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.PlanFeature'
+ title: instance_features
+ title: PlanConfig
+ additionalProperties: false
+ description: PlanConfig represents the configuration for all plans loaded from plan.yaml
+ bytebase.v1.PlanFeature:
+ type: string
+ title: PlanFeature
+ enum:
+ - FEATURE_UNSPECIFIED
+ - FEATURE_DATABASE_CHANGE
+ - FEATURE_GIT_BASED_SCHEMA_VERSION_CONTROL
+ - FEATURE_DECLARATIVE_SCHEMA_MIGRATION
+ - FEATURE_COMPARE_AND_SYNC_SCHEMA
+ - FEATURE_ONLINE_SCHEMA_CHANGE
+ - FEATURE_PRE_DEPLOYMENT_SQL_REVIEW
+ - FEATURE_AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES
+ - FEATURE_ONE_CLICK_DATA_ROLLBACK
+ - FEATURE_MULTI_DATABASE_BATCH_CHANGES
+ - FEATURE_PROGRESSIVE_ENVIRONMENT_DEPLOYMENT
+ - FEATURE_SCHEDULED_ROLLOUT_TIME
+ - FEATURE_DATABASE_CHANGELOG
+ - FEATURE_SCHEMA_DRIFT_DETECTION
+ - FEATURE_SCHEMA_TEMPLATE
+ - FEATURE_ROLLOUT_POLICY
+ - FEATURE_WEB_BASED_SQL_EDITOR
+ - FEATURE_SQL_EDITOR_ADMIN_MODE
+ - FEATURE_NATURAL_LANGUAGE_TO_SQL
+ - FEATURE_AI_QUERY_EXPLANATION
+ - FEATURE_AI_QUERY_SUGGESTIONS
+ - FEATURE_AUTO_COMPLETE
+ - FEATURE_SCHEMA_DIAGRAM
+ - FEATURE_SCHEMA_EDITOR
+ - FEATURE_DATA_EXPORT
+ - FEATURE_DATA_OFFLINE_EXPORT
+ - FEATURE_QUERY_HISTORY
+ - FEATURE_SAVED_AND_SHARED_SQL_SCRIPTS
+ - FEATURE_BATCH_QUERY
+ - FEATURE_INSTANCE_READ_ONLY_CONNECTION
+ - FEATURE_QUERY_POLICY
+ - FEATURE_RESTRICT_COPYING_DATA
+ - FEATURE_IAM
+ - FEATURE_INSTANCE_SSL_CONNECTION
+ - FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL
+ - FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION
+ - FEATURE_GOOGLE_AND_GITHUB_SSO
+ - FEATURE_USER_GROUPS
+ - FEATURE_DISALLOW_SELF_SERVICE_SIGNUP
+ - FEATURE_CUSTOM_INSTANCE_SYNC_TIME
+ - FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT
+ - FEATURE_RISK_ASSESSMENT
+ - FEATURE_APPROVAL_WORKFLOW
+ - FEATURE_AUDIT_LOG
+ - FEATURE_ENTERPRISE_SSO
+ - FEATURE_TWO_FA
+ - FEATURE_PASSWORD_RESTRICTIONS
+ - FEATURE_DISALLOW_PASSWORD_SIGNIN
+ - FEATURE_CUSTOM_ROLES
+ - FEATURE_REQUEST_ROLE_WORKFLOW
+ - FEATURE_DATA_MASKING
+ - FEATURE_DATA_CLASSIFICATION
+ - FEATURE_SCIM
+ - FEATURE_DIRECTORY_SYNC
+ - FEATURE_SIGN_IN_FREQUENCY_CONTROL
+ - FEATURE_EXTERNAL_SECRET_MANAGER
+ - FEATURE_USER_EMAIL_DOMAIN_RESTRICTION
+ - FEATURE_PROJECT_MANAGEMENT
+ - FEATURE_ENVIRONMENT_MANAGEMENT
+ - FEATURE_IM_NOTIFICATIONS
+ - FEATURE_TERRAFORM_PROVIDER
+ - FEATURE_DATABASE_GROUPS
+ - FEATURE_ENVIRONMENT_TIERS
+ - FEATURE_DASHBOARD_ANNOUNCEMENT
+ - FEATURE_API_INTEGRATION_GUIDANCE
+ - FEATURE_CUSTOM_LOGO
+ - FEATURE_WATERMARK
+ - FEATURE_ROADMAP_PRIORITIZATION
+ - FEATURE_CUSTOM_MSA
+ - FEATURE_COMMUNITY_SUPPORT
+ - FEATURE_EMAIL_SUPPORT
+ - FEATURE_DEDICATED_SUPPORT_WITH_SLA
+ description: PlanFeature represents the available features in Bytebase
+ bytebase.v1.PlanLimitConfig:
+ type: object
+ properties:
+ type:
+ title: type
+ $ref: '#/components/schemas/bytebase.v1.PlanType'
+ maximumInstanceCount:
+ type: integer
+ title: maximum_instance_count
+ format: int32
+ maximumSeatCount:
+ type: integer
+ title: maximum_seat_count
+ format: int32
+ features:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.PlanFeature'
+ title: features
+ title: PlanLimitConfig
+ additionalProperties: false
+ description: PlanLimitConfig represents a single plan's configuration
+ bytebase.v1.PlanType:
+ type: string
+ title: PlanType
+ enum:
+ - PLAN_TYPE_UNSPECIFIED
+ - FREE
+ - TEAM
+ - ENTERPRISE
+ bytebase.v1.Policy:
+ type: object
+ allOf:
+ - properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the policy.
+ Format: {resource name}/policies/{policy type}
+ Workspace resource name: "".
+ Environment resource name: environments/environment-id.
+ Instance resource name: instances/instance-id.
+ Database resource name: instances/instance-id/databases/database-name.
+ inheritFromParent:
+ type: boolean
+ title: inherit_from_parent
+ description: Whether this policy inherits from its parent resource.
+ type:
+ title: type
+ description: The type of policy.
+ $ref: '#/components/schemas/bytebase.v1.PolicyType'
+ enforce:
+ type: boolean
+ title: enforce
+ description: Whether the policy is enforced.
+ resourceType:
+ title: resource_type
+ description: The resource type for the policy.
+ $ref: '#/components/schemas/bytebase.v1.PolicyResourceType'
+ - oneOf:
+ - properties:
+ dataSourceQueryPolicy:
+ title: data_source_query_policy
+ $ref: '#/components/schemas/bytebase.v1.DataSourceQueryPolicy'
+ title: data_source_query_policy
+ required:
+ - dataSourceQueryPolicy
+ - properties:
+ maskingExceptionPolicy:
+ title: masking_exception_policy
+ $ref: '#/components/schemas/bytebase.v1.MaskingExceptionPolicy'
+ title: masking_exception_policy
+ required:
+ - maskingExceptionPolicy
+ - properties:
+ maskingRulePolicy:
+ title: masking_rule_policy
+ $ref: '#/components/schemas/bytebase.v1.MaskingRulePolicy'
+ title: masking_rule_policy
+ required:
+ - maskingRulePolicy
+ - properties:
+ queryDataPolicy:
+ title: query_data_policy
+ $ref: '#/components/schemas/bytebase.v1.QueryDataPolicy'
+ title: query_data_policy
+ required:
+ - queryDataPolicy
+ - properties:
+ rolloutPolicy:
+ title: rollout_policy
+ $ref: '#/components/schemas/bytebase.v1.RolloutPolicy'
+ title: rollout_policy
+ required:
+ - rolloutPolicy
+ - properties:
+ tagPolicy:
+ title: tag_policy
+ $ref: '#/components/schemas/bytebase.v1.TagPolicy'
+ title: tag_policy
+ required:
+ - tagPolicy
+ title: Policy
+ additionalProperties: false
+ bytebase.v1.PolicyDelta:
+ type: object
+ properties:
+ bindingDeltas:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.BindingDelta'
+ title: binding_deltas
+ description: The delta for Bindings between two policies.
+ title: PolicyDelta
+ additionalProperties: false
+ description: Describes changes between two IAM policies.
+ bytebase.v1.PolicyResourceType:
+ type: string
+ title: PolicyResourceType
+ enum:
+ - RESOURCE_TYPE_UNSPECIFIED
+ - WORKSPACE
+ - ENVIRONMENT
+ - PROJECT
+ description: The resource type that a policy can be attached to.
+ bytebase.v1.PolicyType:
+ type: string
+ title: PolicyType
+ enum:
+ - POLICY_TYPE_UNSPECIFIED
+ - ROLLOUT_POLICY
+ - MASKING_RULE
+ - MASKING_EXCEPTION
+ - TAG
+ - DATA_SOURCE_QUERY
+ - DATA_QUERY
+ description: The type of organizational policy.
+ bytebase.v1.Position:
+ type: object
+ properties:
+ line:
+ type: integer
+ title: line
+ format: int32
+ description: |-
+ Line position in a text (one-based).
+ First line of the text is line 1.
+ A value of 0 indicates the line information is unknown.
+ column:
+ type: integer
+ title: column
+ format: int32
+ description: "Column position in a text (one-based).\n Column is measured in Unicode code points (characters/runes), not bytes or grapheme clusters.\n First character of the line is column 1.\n A value of 0 indicates the column information is unknown.\n\n Examples:\n - \"SELECT * FROM t\" - column 8 is '*'\n - \"SELECT 你好 FROM t\" - column 8 is '你' (even though it's at byte offset 7)\n - \"SELECT \U0001F600 FROM t\" - column 8 is '\U0001F600' (even though it's 4 bytes in UTF-8)"
+ title: Position
+ additionalProperties: false
+ description: |-
+ Position in a text expressed as one-based line and one-based column.
+ We use 1-based numbering to match the majority of industry standards:
+ - Monaco Editor uses 1-based (https://microsoft.github.io/monaco-editor/typedoc/interfaces/IPosition.html)
+ - GitHub Actions uses 1-based (https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-error-message)
+ - Most text editors display 1-based positions to users
+ Note: LSP uses 0-based (https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position),
+ but we follow the canonical user-facing standards.
+
+ Handling unknown positions:
+ - If the entire position is unknown, leave this field as nil/undefined
+ - If only line is known, set line and leave column as 0 (e.g., line=5, column=0)
+ - If only column is known (rare), set column and leave line as 0
+ Frontends should check for nil/undefined/zero values and handle them appropriately.
+ bytebase.v1.PreviewRolloutRequest:
+ type: object
+ properties:
+ project:
+ type: string
+ title: project
+ description: |-
+ The name of the project.
+ Format: projects/{project}
+ plan:
+ title: plan
+ description: The plan used to preview rollout.
+ $ref: '#/components/schemas/bytebase.v1.Plan'
+ title: PreviewRolloutRequest
+ additionalProperties: false
+ bytebase.v1.PreviewTaskRunRollbackRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: 'Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun}'
+ title: PreviewTaskRunRollbackRequest
+ additionalProperties: false
+ bytebase.v1.PreviewTaskRunRollbackResponse:
+ type: object
+ properties:
+ statement:
+ type: string
+ title: statement
+ description: The rollback SQL statement that would undo the task run.
+ title: PreviewTaskRunRollbackResponse
+ additionalProperties: false
+ bytebase.v1.ProcedureMetadata:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: The name is the name of a procedure.
+ definition:
+ type: string
+ title: definition
+ description: The definition is the definition of a procedure.
+ signature:
+ type: string
+ title: signature
+ description: |-
+ The signature is the name with the number and type of input arguments the
+ procedure takes.
+ characterSetClient:
+ type: string
+ title: character_set_client
+ description: MySQL specific metadata.
+ collationConnection:
+ type: string
+ title: collation_connection
+ databaseCollation:
+ type: string
+ title: database_collation
+ sqlMode:
+ type: string
+ title: sql_mode
+ comment:
+ type: string
+ title: comment
+ description: The comment is the comment of a procedure.
+ skipDump:
+ type: boolean
+ title: skip_dump
+ title: ProcedureMetadata
+ additionalProperties: false
+ description: ProcedureMetadata is the metadata for procedures.
+ bytebase.v1.Project:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the project.
+ Format: projects/{project}
+ state:
+ title: state
+ description: The lifecycle state of the project.
+ $ref: '#/components/schemas/bytebase.v1.State'
+ title:
+ type: string
+ title: title
+ maxLength: 200
+ description: The title or name of a project. It's not unique within the workspace.
+ webhooks:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Webhook'
+ title: webhooks
+ description: The list of webhooks configured for the project.
+ dataClassificationConfigId:
+ type: string
+ title: data_classification_config_id
+ description: The data classification configuration ID for the project.
+ issueLabels:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Label'
+ title: issue_labels
+ description: Labels available for tagging issues in this project.
+ forceIssueLabels:
+ type: boolean
+ title: force_issue_labels
+ description: Force issue labels to be used when creating an issue.
+ allowModifyStatement:
+ type: boolean
+ title: allow_modify_statement
+ description: Allow modifying SQL statements after issue is created.
+ autoResolveIssue:
+ type: boolean
+ title: auto_resolve_issue
+ description: Enable automatic issue resolution when tasks complete.
+ enforceIssueTitle:
+ type: boolean
+ title: enforce_issue_title
+ description: Enforce issue title to be created by user instead of generated by Bytebase.
+ autoEnableBackup:
+ type: boolean
+ title: auto_enable_backup
+ description: Whether to automatically enable backup for database changes.
+ skipBackupErrors:
+ type: boolean
+ title: skip_backup_errors
+ description: Whether to skip backup errors and continue with data migration.
+ postgresDatabaseTenantMode:
+ type: boolean
+ title: postgres_database_tenant_mode
+ description: |-
+ Whether to enable database tenant mode for PostgreSQL.
+ If enabled, issues will include "set role <db_owner>" statement.
+ allowSelfApproval:
+ type: boolean
+ title: allow_self_approval
+ description: Whether to allow issue creators to self-approve their own issues.
+ executionRetryPolicy:
+ title: execution_retry_policy
+ description: Execution retry policy for task runs.
+ $ref: '#/components/schemas/bytebase.v1.Project.ExecutionRetryPolicy'
+ ciSamplingSize:
+ type: integer
+ title: ci_sampling_size
+ format: int32
+ description: |-
+ The maximum number of database rows to sample during CI data validation.
+ Without specification, sampling is disabled, resulting in full validation.
+ parallelTasksPerRollout:
+ type: integer
+ title: parallel_tasks_per_rollout
+ format: int32
+ description: The maximum number of parallel tasks allowed during rollout execution.
+ labels:
+ type: object
+ title: labels
+ additionalProperties:
+ type: string
+ title: value
+ description: |-
+ Labels are key-value pairs that can be attached to the project.
+ For example, { "environment": "production", "team": "backend" }
+ enforceSqlReview:
+ type: boolean
+ title: enforce_sql_review
+ description: |-
+ Whether to enforce SQL review checks to pass before issue creation.
+ If enabled, issues cannot be created when SQL review finds errors.
+ title: Project
+ additionalProperties: false
+ bytebase.v1.Project.ExecutionRetryPolicy:
+ type: object
+ properties:
+ maximumRetries:
+ type: integer
+ title: maximum_retries
+ format: int32
+ description: The maximum number of retries for lock timeout errors.
+ title: ExecutionRetryPolicy
+ additionalProperties: false
+ description: Execution retry policy configuration.
+ bytebase.v1.Project.LabelsEntry:
+ type: object
+ properties:
+ key:
+ type: string
+ title: key
+ value:
+ type: string
+ title: value
+ title: LabelsEntry
+ additionalProperties: false
+ bytebase.v1.QueryDataPolicy:
+ type: object
+ properties:
+ timeout:
+ title: timeout
+ description: The query timeout duration.
+ $ref: '#/components/schemas/google.protobuf.Duration'
+ disableExport:
+ type: boolean
+ title: disable_export
+ description: Disable data export in the SQL editor.
+ maximumResultSize:
+ type:
+ - integer
+ - string
+ title: maximum_result_size
+ format: int64
+ description: |-
+ The maximum result size limit in bytes.
+ The default value is 100MB, we will use the default value if the setting not exists, or the limit <= 0.
+ maximumResultRows:
+ type: integer
+ title: maximum_result_rows
+ format: int32
+ description: |-
+ The maximum number of rows to return.
+ The default value is -1, means no limit.
+ disableCopyData:
+ type: boolean
+ title: disable_copy_data
+ description: Disable copying query results.
+ title: QueryDataPolicy
+ additionalProperties: false
+ description: QueryDataPolicy is the policy configuration for querying data.
+ bytebase.v1.QueryHistory:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name for the query history.
+ Format: queryHistories/{uid}
+ database:
+ type: string
+ title: database
+ description: |-
+ The database name to execute the query.
+ Format: instances/{instance}/databases/{databaseName}
+ creator:
+ type: string
+ title: creator
+ createTime:
+ title: create_time
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ statement:
+ type: string
+ title: statement
+ error:
+ type: string
+ title: error
+ nullable: true
+ duration:
+ title: duration
+ $ref: '#/components/schemas/google.protobuf.Duration'
+ type:
+ title: type
+ $ref: '#/components/schemas/bytebase.v1.QueryHistory.Type'
+ title: QueryHistory
+ additionalProperties: false
+ bytebase.v1.QueryHistory.Type:
+ type: string
+ title: Type
+ enum:
+ - TYPE_UNSPECIFIED
+ - QUERY
+ - EXPORT
+ bytebase.v1.QueryOption:
+ type: object
+ properties:
+ redisRunCommandsOn:
+ title: redis_run_commands_on
+ $ref: '#/components/schemas/bytebase.v1.QueryOption.RedisRunCommandsOn'
+ mssqlExplainFormat:
+ title: mssql_explain_format
+ $ref: '#/components/schemas/bytebase.v1.QueryOption.MSSQLExplainFormat'
+ title: QueryOption
+ additionalProperties: false
+ bytebase.v1.QueryOption.MSSQLExplainFormat:
+ type: string
+ title: MSSQLExplainFormat
+ enum:
+ - MSSQL_EXPLAIN_FORMAT_UNSPECIFIED
+ - MSSQL_EXPLAIN_FORMAT_ALL
+ - MSSQL_EXPLAIN_FORMAT_XML
+ bytebase.v1.QueryOption.RedisRunCommandsOn:
+ type: string
+ title: RedisRunCommandsOn
+ enum:
+ - REDIS_RUN_COMMANDS_ON_UNSPECIFIED
+ - SINGLE_NODE
+ - ALL_NODES
+ bytebase.v1.QueryRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name is the instance name to execute the query against.
+ Format: instances/{instance}/databases/{databaseName}
+ statement:
+ type: string
+ title: statement
+ description: The SQL statement to execute.
+ limit:
+ type: integer
+ title: limit
+ format: int32
+ description: The maximum number of rows to return.
+ dataSourceId:
+ type: string
+ title: data_source_id
+ description: |-
+ The id of data source.
+ It is used for querying admin data source even if the instance has
+ read-only data sources. Or it can be used to query a specific read-only
+ data source.
+ explain:
+ type: boolean
+ title: explain
+ description: Explain the statement.
+ schema:
+ type: string
+ title: schema
+ description: |-
+ The default schema to search objects. Equals to the current schema in
+ Oracle and search path in Postgres.
+ nullable: true
+ queryOption:
+ title: query_option
+ $ref: '#/components/schemas/bytebase.v1.QueryOption'
+ container:
+ type: string
+ title: container
+ description: |-
+ Container is the container name to execute the query against, used for
+ CosmosDB only.
+ nullable: true
+ title: QueryRequest
+ additionalProperties: false
+ bytebase.v1.QueryResponse:
+ type: object
+ properties:
+ results:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.QueryResult'
+ title: results
+ description: The query results.
+ title: QueryResponse
+ additionalProperties: false
+ bytebase.v1.QueryResult:
+ type: object
+ allOf:
+ - properties:
+ columnNames:
+ type: array
+ items:
+ type: string
+ title: column_names
+ description: Column names of the query result.
+ columnTypeNames:
+ type: array
+ items:
+ type: string
+ title: column_type_names
+ description: |-
+ Column types of the query result.
+ The types come from the Golang SQL driver.
+ rows:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.QueryRow'
+ title: rows
+ description: Rows of the query result.
+ rowsCount:
+ type:
+ - integer
+ - string
+ title: rows_count
+ format: int64
+ error:
+ type: string
+ title: error
+ description: The error message if the query failed.
+ latency:
+ title: latency
+ description: The time it takes to execute the query.
+ $ref: '#/components/schemas/google.protobuf.Duration'
+ statement:
+ type: string
+ title: statement
+ description: The query statement for the result.
+ messages:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.QueryResult.Message'
+ title: messages
+ description: |-
+ Informational or debug messages returned by the database engine during query execution.
+ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle's DBMS_OUTPUT.PUT_LINE.
+ masked:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.MaskingReason'
+ title: masked
+ description: Masking reasons for each column (empty for non-masked columns).
+ - oneOf:
+ - properties:
+ permissionDenied:
+ title: permission_denied
+ $ref: '#/components/schemas/bytebase.v1.QueryResult.PermissionDenied'
+ title: permission_denied
+ required:
+ - permissionDenied
+ - properties:
+ postgresError:
+ title: postgres_error
+ $ref: '#/components/schemas/bytebase.v1.QueryResult.PostgresError'
+ title: postgres_error
+ required:
+ - postgresError
+ - properties:
+ syntaxError:
+ title: syntax_error
+ $ref: '#/components/schemas/bytebase.v1.QueryResult.SyntaxError'
+ title: syntax_error
+ required:
+ - syntaxError
+ title: QueryResult
+ additionalProperties: false
+ bytebase.v1.QueryResult.Message:
+ type: object
+ properties:
+ level:
+ title: level
+ $ref: '#/components/schemas/bytebase.v1.QueryResult.Message.Level'
+ content:
+ type: string
+ title: content
+ title: Message
+ additionalProperties: false
+ bytebase.v1.QueryResult.Message.Level:
+ type: string
+ title: Level
+ enum:
+ - LEVEL_UNSPECIFIED
+ - INFO
+ - WARNING
+ - DEBUG
+ - LOG
+ - NOTICE
+ - EXCEPTION
+ bytebase.v1.QueryResult.PermissionDenied:
+ type: object
+ properties:
+ resources:
+ type: array
+ items:
+ type: string
+ title: resources
+ description: |-
+ Denied to access the resources.
+ Format:
+ instances/{instance}/databases/{database}
+ instances/{instance}/databases/{database}/schemas/{schema}
+ instances/{instance}/databases/{database}/tables/{table}
+ instances/{instance}/databases/{database}/schemas/{schema}/tables/{table}
+ commandType:
+ title: command_type
+ description: Disallowed command_type.
+ $ref: '#/components/schemas/bytebase.v1.QueryResult.PermissionDenied.CommandType'
+ title: PermissionDenied
+ additionalProperties: false
+ description: |-
+ Permission denied with resource information or disallowed command_type.
+ Either resources or command_type is available.
+ bytebase.v1.QueryResult.PermissionDenied.CommandType:
+ type: string
+ title: CommandType
+ enum:
+ - COMMAND_TYPE_UNSPECIFIED
+ - DDL
+ - DML
+ - NON_READ_ONLY
+ bytebase.v1.QueryResult.PostgresError:
+ type: object
+ properties:
+ severity:
+ type: string
+ title: severity
+ code:
+ type: string
+ title: code
+ message:
+ type: string
+ title: message
+ detail:
+ type: string
+ title: detail
+ hint:
+ type: string
+ title: hint
+ position:
+ type: integer
+ title: position
+ format: int32
+ internalPosition:
+ type: integer
+ title: internal_position
+ format: int32
+ internalQuery:
+ type: string
+ title: internal_query
+ where:
+ type: string
+ title: where
+ schemaName:
+ type: string
+ title: schema_name
+ tableName:
+ type: string
+ title: table_name
+ columnName:
+ type: string
+ title: column_name
+ dataTypeName:
+ type: string
+ title: data_type_name
+ constraintName:
+ type: string
+ title: constraint_name
+ file:
+ type: string
+ title: file
+ line:
+ type: integer
+ title: line
+ format: int32
+ routine:
+ type: string
+ title: routine
+ title: PostgresError
+ additionalProperties: false
+ description: |-
+ refer https://www.postgresql.org/docs/11/protocol-error-fields.html
+ for field description.
+ bytebase.v1.QueryResult.SyntaxError:
+ type: object
+ properties:
+ startPosition:
+ title: start_position
+ description: Position information for highlighting in editor
+ $ref: '#/components/schemas/bytebase.v1.Position'
+ title: SyntaxError
+ additionalProperties: false
+ description: Syntax error with position information for editor highlighting
+ bytebase.v1.QueryRow:
+ type: object
+ properties:
+ values:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.RowValue'
+ title: values
+ description: Row values of the query result.
+ title: QueryRow
+ additionalProperties: false
+ bytebase.v1.Range:
+ type: object
+ properties:
+ start:
+ type: integer
+ title: start
+ format: int32
+ description: Start position (inclusive).
+ end:
+ type: integer
+ title: end
+ format: int32
+ description: End position (exclusive).
+ title: Range
+ additionalProperties: false
+ description: Range of positions in text or sequence.
+ bytebase.v1.RejectIssueRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the issue to add a rejection.
+ Format: projects/{project}/issues/{issue}
+ comment:
+ type: string
+ title: comment
+ description: The comment explaining the rejection decision.
+ title: RejectIssueRequest
+ additionalProperties: false
+ bytebase.v1.Release:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: 'Format: projects/{project}/releases/{release}'
+ title:
+ type: string
+ title: title
+ maxLength: 200
+ description: The title of the release.
+ files:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Release.File'
+ title: files
+ description: The SQL files included in the release.
+ vcsSource:
+ title: vcs_source
+ description: The version control source of the release.
+ $ref: '#/components/schemas/bytebase.v1.Release.VCSSource'
+ creator:
+ type: string
+ title: creator
+ description: 'Format: users/[email protected]'
+ createTime:
+ title: create_time
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ state:
+ title: state
+ description: The lifecycle state of the release.
+ $ref: '#/components/schemas/bytebase.v1.State'
+ digest:
+ type: string
+ title: digest
+ description: |-
+ The digest of the release.
+ The user can provide the digest of the release. It can be used later to retrieve the release in GetRelease.
+ Whether to provide digest and how to generate it is up to the user.
+ If the digest is not empty, it must be unique in the project. Otherwise, an ALREADY_EXISTS error will be returned.
+ title: Release
+ additionalProperties: false
+ bytebase.v1.Release.File:
+ type: object
+ properties:
+ id:
+ type: string
+ title: id
+ description: The unique identifier for the file.
+ path:
+ type: string
+ title: path
+ description: The path of the file. e.g., `2.2/V0001_create_table.sql`.
+ type:
+ title: type
+ description: The type of the file.
+ $ref: '#/components/schemas/bytebase.v1.Release.File.Type'
+ version:
+ type: string
+ title: version
+ description: The version identifier for the file.
+ enableGhost:
+ type: boolean
+ title: enable_ghost
+ description: Whether to use gh-ost for online schema migration.
+ sheet:
+ type: string
+ title: sheet
+ description: |-
+ For inputs, we must either use `sheet` or `statement`.
+ For outputs, we always use `sheet`. `statement` is the preview of the sheet content.
+
+ The sheet that holds the content.
+ Format: projects/{project}/sheets/{sheet}
+ statement:
+ type: string
+ title: statement
+ format: byte
+ description: The raw SQL statement content.
+ sheetSha256:
+ type: string
+ title: sheet_sha256
+ description: The SHA256 hash value of the sheet content or the statement.
+ statementSize:
+ type:
+ - integer
+ - string
+ title: statement_size
+ format: int64
+ description: The size of the statement in bytes.
+ title: File
+ additionalProperties: false
+ description: A SQL file in a release.
+ bytebase.v1.Release.File.Type:
+ type: string
+ title: Type
+ enum:
+ - TYPE_UNSPECIFIED
+ - VERSIONED
+ - DECLARATIVE
+ description: The type of migration file.
+ bytebase.v1.Release.VCSSource:
+ type: object
+ properties:
+ vcsType:
+ title: vcs_type
+ description: The type of VCS.
+ $ref: '#/components/schemas/bytebase.v1.VCSType'
+ url:
+ type: string
+ title: url
+ description: The url link to the e.g., GitHub commit or pull request.
+ title: VCSSource
+ additionalProperties: false
+ description: Version control system source information.
+ bytebase.v1.RemoveDataSourceRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the instance to remove a data source from.
+ Format: instances/{instance}
+ dataSource:
+ title: data_source
+ description: |-
+ Identified by data source ID.
+ Only READ_ONLY data source can be removed.
+ $ref: '#/components/schemas/bytebase.v1.DataSource'
+ title: RemoveDataSourceRequest
+ additionalProperties: false
+ bytebase.v1.RemoveWebhookRequest:
+ type: object
+ properties:
+ webhook:
+ title: webhook
+ description: The webhook to remove. Identified by its url.
+ $ref: '#/components/schemas/bytebase.v1.Webhook'
+ title: RemoveWebhookRequest
+ additionalProperties: false
+ bytebase.v1.RequestIssueRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the issue to request a issue.
+ Format: projects/{project}/issues/{issue}
+ comment:
+ type: string
+ title: comment
+ description: The comment explaining the request.
+ title: RequestIssueRequest
+ additionalProperties: false
+ bytebase.v1.RequestMetadata:
+ type: object
+ properties:
+ callerIp:
+ type: string
+ title: caller_ip
+ description: The IP address of the request originator.
+ callerSuppliedUserAgent:
+ type: string
+ title: caller_supplied_user_agent
+ description: |-
+ The user agent string provided by the caller.
+ This is supplied by the client and is not authenticated.
+ title: RequestMetadata
+ additionalProperties: false
+ description: Metadata about the incoming request.
+ bytebase.v1.ResourcePackage:
+ type: object
+ properties:
+ logo:
+ type: string
+ title: logo
+ format: byte
+ description: The branding logo.
+ title: ResourcePackage
+ additionalProperties: false
+ description: Custom branding resources for the Bytebase instance.
+ bytebase.v1.ReviewConfig:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the SQL review config.
+ Format: reviewConfigs/{reviewConfig}
+ title:
+ type: string
+ title: title
+ maxLength: 200
+ description: The title of the review configuration.
+ enabled:
+ type: boolean
+ title: enabled
+ description: Whether the review configuration is enabled.
+ rules:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.SQLReviewRule'
+ title: rules
+ description: The SQL review rules to enforce.
+ resources:
+ type: array
+ items:
+ type: string
+ title: resources
+ description: |-
+ Resources using the config.
+ Format: {resource}/{resource id}, e.g., environments/test.
+ title: ReviewConfig
+ additionalProperties: false
+ bytebase.v1.Revision:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: 'Format: instances/{instance}/databases/{database}/revisions/{revision}'
+ release:
+ type: string
+ title: release
+ description: |-
+ Format: projects/{project}/releases/{release}
+ Can be empty.
+ createTime:
+ title: create_time
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ deleter:
+ type: string
+ title: deleter
+ description: |-
+ Format: users/[email protected]
+ Can be empty.
+ deleteTime:
+ title: delete_time
+ description: Can be empty.
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ file:
+ type: string
+ title: file
+ description: |-
+ Format: projects/{project}/releases/{release}/files/{id}
+ Can be empty.
+ version:
+ type: string
+ title: version
+ description: The schema version string for this revision.
+ sheet:
+ type: string
+ title: sheet
+ description: |-
+ The sheet that holds the content.
+ Format: projects/{project}/sheets/{sheet}
+ sheetSha256:
+ type: string
+ title: sheet_sha256
+ description: The SHA256 hash value of the sheet.
+ statement:
+ type: string
+ title: statement
+ description: The statement is used for preview purpose.
+ statementSize:
+ type:
+ - integer
+ - string
+ title: statement_size
+ format: int64
+ description: The size of the statement in bytes.
+ issue:
+ type: string
+ title: issue
+ description: |-
+ The issue associated with the revision.
+ Can be empty.
+ Format: projects/{project}/issues/{issue}
+ taskRun:
+ type: string
+ title: task_run
+ description: |-
+ The task run associated with the revision.
+ Can be empty.
+ Format:
+ projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun}
+ type:
+ title: type
+ description: The type of the revision.
+ $ref: '#/components/schemas/bytebase.v1.Revision.Type'
+ title: Revision
+ additionalProperties: false
+ bytebase.v1.Revision.Type:
+ type: string
+ title: Type
+ enum:
+ - TYPE_UNSPECIFIED
+ - VERSIONED
+ - DECLARATIVE
+ description: The type of schema revision.
+ bytebase.v1.RiskLevel:
+ type: string
+ title: RiskLevel
+ enum:
+ - RISK_LEVEL_UNSPECIFIED
+ - LOW
+ - MODERATE
+ - HIGH
+ description: RiskLevel is the risk level.
+ bytebase.v1.Role:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: 'Resource name. Format: roles/{role}'
+ title:
+ type: string
+ title: title
+ maxLength: 200
+ description: Human-readable title.
+ description:
+ type: string
+ title: description
+ maxLength: 1000
+ description: Optional description of the role.
+ permissions:
+ type: array
+ items:
+ type: string
+ title: permissions
+ description: List of permission identifiers granted by this role.
+ type:
+ title: type
+ description: Role type indicating if it's built-in or custom.
+ $ref: '#/components/schemas/bytebase.v1.Role.Type'
+ title: Role
+ additionalProperties: false
+ description: Role defines a set of permissions that can be assigned to users.
+ bytebase.v1.Role.Type:
+ type: string
+ title: Type
+ enum:
+ - TYPE_UNSPECIFIED
+ - BUILT_IN
+ - CUSTOM
+ bytebase.v1.Rollout:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The resource name of the rollout.
+ Format: projects/{project}/rollouts/{rollout}
+ plan:
+ type: string
+ title: plan
+ description: |-
+ The plan that this rollout is based on.
+ Format: projects/{project}/plans/{plan}
+ title:
+ type: string
+ title: title
+ description: |-
+ The title of the rollout, inherited from the associated plan.
+ This field is output only and cannot be directly set.
+ stages:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Stage'
+ title: stages
+ description: Stages and thus tasks of the rollout.
+ creator:
+ type: string
+ title: creator
+ description: 'Format: users/[email protected]'
+ createTime:
+ title: create_time
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ updateTime:
+ title: update_time
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ issue:
+ type: string
+ title: issue
+ description: |-
+ The issue associated with the rollout. Could be empty.
+ Format: projects/{project}/issues/{issue}
+ title: Rollout
+ additionalProperties: false
+ bytebase.v1.RolloutPolicy:
+ type: object
+ properties:
+ automatic:
+ type: boolean
+ title: automatic
+ description: Whether rollout is automatic without manual approval.
+ roles:
+ type: array
+ items:
+ type: string
+ title: roles
+ description: The roles that can approve rollout execution.
+ checkers:
+ title: checkers
+ description: |-
+ Checkers that must pass before rollout execution.
+ These checks are performed in UI workflows only.
+ $ref: '#/components/schemas/bytebase.v1.RolloutPolicy.Checkers'
+ title: RolloutPolicy
+ additionalProperties: false
+ description: Rollout policy configuration.
+ bytebase.v1.RolloutPolicy.Checkers:
+ type: object
+ properties:
+ requiredIssueApproval:
+ type: boolean
+ title: required_issue_approval
+ description: Whether issue approval is required before proceeding with rollout.
+ requiredStatusChecks:
+ title: required_status_checks
+ description: Status checks that must pass before rollout can be executed.
+ $ref: '#/components/schemas/bytebase.v1.RolloutPolicy.Checkers.RequiredStatusChecks'
+ title: Checkers
+ additionalProperties: false
+ bytebase.v1.RolloutPolicy.Checkers.PlanCheckEnforcement:
+ type: string
+ title: PlanCheckEnforcement
+ enum:
+ - PLAN_CHECK_ENFORCEMENT_UNSPECIFIED
+ - ERROR_ONLY
+ - STRICT
+ bytebase.v1.RolloutPolicy.Checkers.RequiredStatusChecks:
+ type: object
+ properties:
+ planCheckEnforcement:
+ title: plan_check_enforcement
+ description: Enforcement level for plan check results during rollout validation.
+ $ref: '#/components/schemas/bytebase.v1.RolloutPolicy.Checkers.PlanCheckEnforcement'
+ title: RequiredStatusChecks
+ additionalProperties: false
+ bytebase.v1.RowValue:
+ type: object
+ oneOf:
+ - properties:
+ boolValue:
+ type: boolean
+ title: bool_value
+ title: bool_value
+ required:
+ - boolValue
+ - properties:
+ bytesValue:
+ type: string
+ title: bytes_value
+ format: byte
+ title: bytes_value
+ required:
+ - bytesValue
+ - properties:
+ doubleValue:
+ type: number
+ title: double_value
+ format: double
+ title: double_value
+ required:
+ - doubleValue
+ - properties:
+ floatValue:
+ type: number
+ title: float_value
+ format: float
+ title: float_value
+ required:
+ - floatValue
+ - properties:
+ int32Value:
+ type: integer
+ title: int32_value
+ format: int32
+ title: int32_value
+ required:
+ - int32Value
+ - properties:
+ int64Value:
+ type:
+ - integer
+ - string
+ title: int64_value
+ format: int64
+ title: int64_value
+ required:
+ - int64Value
+ - properties:
+ nullValue:
+ title: null_value
+ $ref: '#/components/schemas/google.protobuf.NullValue'
+ title: null_value
+ required:
+ - nullValue
+ - properties:
+ stringValue:
+ type: string
+ title: string_value
+ title: string_value
+ required:
+ - stringValue
+ - properties:
+ timestampTzValue:
+ title: timestamp_tz_value
+ description: |-
+ timestamp_tz_value is used for the timestamptz data type, which
+ accurately represents the timestamp with location information.
+ $ref: '#/components/schemas/bytebase.v1.RowValue.TimestampTZ'
+ title: timestamp_tz_value
+ required:
+ - timestampTzValue
+ - properties:
+ timestampValue:
+ title: timestamp_value
+ description: |-
+ timestamp_value is used for the timestamp without time zone data type,
+ meaning it only includes the timestamp without any time zone or location
+ info. Although it may be expressed as a UTC value, it should be seen as a
+ timestamp missing location context.
+ $ref: '#/components/schemas/bytebase.v1.RowValue.Timestamp'
+ title: timestamp_value
+ required:
+ - timestampValue
+ - properties:
+ uint32Value:
+ type: integer
+ title: uint32_value
+ title: uint32_value
+ required:
+ - uint32Value
+ - properties:
+ uint64Value:
+ type:
+ - integer
+ - string
+ title: uint64_value
+ format: int64
+ title: uint64_value
+ required:
+ - uint64Value
+ - properties:
+ valueValue:
+ title: value_value
+ description: value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only.
+ $ref: '#/components/schemas/google.protobuf.Value'
+ title: value_value
+ required:
+ - valueValue
+ title: RowValue
+ additionalProperties: false
+ bytebase.v1.RowValue.Timestamp:
+ type: object
+ properties:
+ googleTimestamp:
+ title: google_timestamp
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ accuracy:
+ type: integer
+ title: accuracy
+ format: int32
+ description: The accuracy is the number of digits after the decimal point.
+ title: Timestamp
+ additionalProperties: false
+ bytebase.v1.RowValue.TimestampTZ:
+ type: object
+ properties:
+ googleTimestamp:
+ title: google_timestamp
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ zone:
+ type: string
+ title: zone
+ description: |-
+ Zone is the time zone abbreviations in timezone database such as "PDT",
+ "PST". https://en.wikipedia.org/wiki/List_of_tz_database_time_zones We
+ retrieve the time zone information from the timestamptz field in the
+ database. A timestamp is in UTC or epoch time, and with zone info, we can
+ convert it to a local time string. Zone and offset are returned by
+ time.Time.Zone()
+ offset:
+ type: integer
+ title: offset
+ format: int32
+ description: The offset is in seconds east of UTC
+ accuracy:
+ type: integer
+ title: accuracy
+ format: int32
+ title: TimestampTZ
+ additionalProperties: false
+ bytebase.v1.RunPlanChecksRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The plan to run plan checks.
+ Format: projects/{project}/plans/{plan}
+ specId:
+ type: string
+ title: spec_id
+ description: |-
+ The UUID of the specific spec to run plan checks for.
+ This should match the spec.id field in Plan.Spec.
+ If not set, all specs in the plan will be used.
+ nullable: true
+ title: RunPlanChecksRequest
+ additionalProperties: false
+ bytebase.v1.RunPlanChecksResponse:
+ type: object
+ title: RunPlanChecksResponse
+ additionalProperties: false
+ bytebase.v1.SASLConfig:
+ type: object
+ oneOf:
+ - properties:
+ krbConfig:
+ title: krb_config
+ description: Kerberos authentication configuration.
+ $ref: '#/components/schemas/bytebase.v1.KerberosConfig'
+ title: krb_config
+ required:
+ - krbConfig
+ title: SASLConfig
+ additionalProperties: false
+ bytebase.v1.SQLReviewRule:
+ type: object
+ allOf:
+ - properties:
+ type:
+ title: type
+ description: The type of SQL review rule.
+ $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.Type'
+ level:
+ title: level
+ description: The severity level of the rule.
+ $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.Level'
+ engine:
+ title: engine
+ description: The database engine this rule applies to.
+ $ref: '#/components/schemas/bytebase.v1.Engine'
+ - oneOf:
+ - properties:
+ commentConventionPayload:
+ title: comment_convention_payload
+ $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.CommentConventionRulePayload'
+ title: comment_convention_payload
+ required:
+ - commentConventionPayload
+ - properties:
+ namingCasePayload:
+ title: naming_case_payload
+ $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.NamingCaseRulePayload'
+ title: naming_case_payload
+ required:
+ - namingCasePayload
+ - properties:
+ namingPayload:
+ title: naming_payload
+ $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.NamingRulePayload'
+ title: naming_payload
+ required:
+ - namingPayload
+ - properties:
+ numberPayload:
+ title: number_payload
+ $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.NumberRulePayload'
+ title: number_payload
+ required:
+ - numberPayload
+ - properties:
+ requiredColumnPayload:
+ title: required_column_payload
+ $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.RequiredColumnRulePayload'
+ title: required_column_payload
+ required:
+ - requiredColumnPayload
+ - properties:
+ stringArrayPayload:
+ title: string_array_payload
+ $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.StringArrayRulePayload'
+ title: string_array_payload
+ required:
+ - stringArrayPayload
+ - properties:
+ stringPayload:
+ title: string_payload
+ $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.StringRulePayload'
+ title: string_payload
+ required:
+ - stringPayload
+ title: SQLReviewRule
+ additionalProperties: false
+ description: SQL review rule configuration. Check the SQL_REVIEW_RULES_DOCUMENTATION.md for details.
+ bytebase.v1.SQLReviewRule.CommentConventionRulePayload:
+ type: object
+ properties:
+ required:
+ type: boolean
+ title: required
+ maxLength:
+ type: integer
+ title: max_length
+ format: int32
+ title: CommentConventionRulePayload
+ additionalProperties: false
+ bytebase.v1.SQLReviewRule.Level:
+ type: string
+ title: Level
+ enum:
+ - LEVEL_UNSPECIFIED
+ - ERROR
+ - WARNING
+ description: The severity level for SQL review rules.
+ bytebase.v1.SQLReviewRule.NamingCaseRulePayload:
+ type: object
+ properties:
+ upper:
+ type: boolean
+ title: upper
+ title: NamingCaseRulePayload
+ additionalProperties: false
+ bytebase.v1.SQLReviewRule.NamingRulePayload:
+ type: object
+ properties:
+ maxLength:
+ type: integer
+ title: max_length
+ format: int32
+ format:
+ type: string
+ title: format
+ title: NamingRulePayload
+ additionalProperties: false
+ description: Payload message types for SQL review rules
+ bytebase.v1.SQLReviewRule.NumberRulePayload:
+ type: object
+ properties:
+ number:
+ type: integer
+ title: number
+ format: int32
+ title: NumberRulePayload
+ additionalProperties: false
+ bytebase.v1.SQLReviewRule.RequiredColumnRulePayload:
+ type: object
+ properties:
+ columnList:
+ type: array
+ items:
+ type: string
+ title: column_list
+ title: RequiredColumnRulePayload
+ additionalProperties: false
+ bytebase.v1.SQLReviewRule.StringArrayRulePayload:
+ type: object
+ properties:
+ list:
+ type: array
+ items:
+ type: string
+ title: list
+ title: StringArrayRulePayload
+ additionalProperties: false
+ bytebase.v1.SQLReviewRule.StringRulePayload:
+ type: object
+ properties:
+ value:
+ type: string
+ title: value
+ title: StringRulePayload
+ additionalProperties: false
+ bytebase.v1.SQLReviewRule.Type:
+ type: string
+ title: Type
+ enum:
+ - TYPE_UNSPECIFIED
+ - ENGINE_MYSQL_USE_INNODB
+ - NAMING_FULLY_QUALIFIED
+ - NAMING_TABLE
+ - NAMING_COLUMN
+ - NAMING_INDEX_PK
+ - NAMING_INDEX_UK
+ - NAMING_INDEX_FK
+ - NAMING_INDEX_IDX
+ - NAMING_COLUMN_AUTO_INCREMENT
+ - NAMING_TABLE_NO_KEYWORD
+ - NAMING_IDENTIFIER_NO_KEYWORD
+ - NAMING_IDENTIFIER_CASE
+ - STATEMENT_SELECT_NO_SELECT_ALL
+ - STATEMENT_WHERE_REQUIRE_SELECT
+ - STATEMENT_WHERE_REQUIRE_UPDATE_DELETE
+ - STATEMENT_WHERE_NO_LEADING_WILDCARD_LIKE
+ - STATEMENT_DISALLOW_ON_DEL_CASCADE
+ - STATEMENT_DISALLOW_RM_TBL_CASCADE
+ - STATEMENT_DISALLOW_COMMIT
+ - STATEMENT_DISALLOW_LIMIT
+ - STATEMENT_DISALLOW_ORDER_BY
+ - STATEMENT_MERGE_ALTER_TABLE
+ - STATEMENT_INSERT_ROW_LIMIT
+ - STATEMENT_INSERT_MUST_SPECIFY_COLUMN
+ - STATEMENT_INSERT_DISALLOW_ORDER_BY_RAND
+ - STATEMENT_AFFECTED_ROW_LIMIT
+ - STATEMENT_DML_DRY_RUN
+ - STATEMENT_DISALLOW_ADD_COLUMN_WITH_DEFAULT
+ - STATEMENT_ADD_CHECK_NOT_VALID
+ - STATEMENT_ADD_FOREIGN_KEY_NOT_VALID
+ - STATEMENT_DISALLOW_ADD_NOT_NULL
+ - STATEMENT_SELECT_FULL_TABLE_SCAN
+ - STATEMENT_CREATE_SPECIFY_SCHEMA
+ - STATEMENT_CHECK_SET_ROLE_VARIABLE
+ - STATEMENT_DISALLOW_USING_FILESORT
+ - STATEMENT_DISALLOW_USING_TEMPORARY
+ - STATEMENT_WHERE_NO_EQUAL_NULL
+ - STATEMENT_WHERE_DISALLOW_FUNCTIONS_AND_CALCULATIONS
+ - STATEMENT_QUERY_MINIMUM_PLAN_LEVEL
+ - STATEMENT_WHERE_MAXIMUM_LOGICAL_OPERATOR_COUNT
+ - STATEMENT_MAXIMUM_LIMIT_VALUE
+ - STATEMENT_MAXIMUM_JOIN_TABLE_COUNT
+ - STATEMENT_MAXIMUM_STATEMENTS_IN_TRANSACTION
+ - STATEMENT_JOIN_STRICT_COLUMN_ATTRS
+ - STATEMENT_NON_TRANSACTIONAL
+ - STATEMENT_ADD_COLUMN_WITHOUT_POSITION
+ - STATEMENT_DISALLOW_OFFLINE_DDL
+ - STATEMENT_DISALLOW_CROSS_DB_QUERIES
+ - STATEMENT_MAX_EXECUTION_TIME
+ - STATEMENT_REQUIRE_ALGORITHM_OPTION
+ - STATEMENT_REQUIRE_LOCK_OPTION
+ - STATEMENT_OBJECT_OWNER_CHECK
+ - TABLE_REQUIRE_PK
+ - TABLE_NO_FOREIGN_KEY
+ - TABLE_DROP_NAMING_CONVENTION
+ - TABLE_COMMENT
+ - TABLE_DISALLOW_PARTITION
+ - TABLE_DISALLOW_TRIGGER
+ - TABLE_NO_DUPLICATE_INDEX
+ - TABLE_TEXT_FIELDS_TOTAL_LENGTH
+ - TABLE_DISALLOW_SET_CHARSET
+ - TABLE_DISALLOW_DDL
+ - TABLE_DISALLOW_DML
+ - TABLE_LIMIT_SIZE
+ - TABLE_REQUIRE_CHARSET
+ - TABLE_REQUIRE_COLLATION
+ - COLUMN_REQUIRED
+ - COLUMN_NO_NULL
+ - COLUMN_DISALLOW_CHANGE_TYPE
+ - COLUMN_SET_DEFAULT_FOR_NOT_NULL
+ - COLUMN_DISALLOW_CHANGE
+ - COLUMN_DISALLOW_CHANGING_ORDER
+ - COLUMN_DISALLOW_DROP
+ - COLUMN_DISALLOW_DROP_IN_INDEX
+ - COLUMN_COMMENT
+ - COLUMN_AUTO_INCREMENT_MUST_INTEGER
+ - COLUMN_TYPE_DISALLOW_LIST
+ - COLUMN_DISALLOW_SET_CHARSET
+ - COLUMN_MAXIMUM_CHARACTER_LENGTH
+ - COLUMN_MAXIMUM_VARCHAR_LENGTH
+ - COLUMN_AUTO_INCREMENT_INITIAL_VALUE
+ - COLUMN_AUTO_INCREMENT_MUST_UNSIGNED
+ - COLUMN_CURRENT_TIME_COUNT_LIMIT
+ - COLUMN_REQUIRE_DEFAULT
+ - COLUMN_DEFAULT_DISALLOW_VOLATILE
+ - COLUMN_ADD_NOT_NULL_REQUIRE_DEFAULT
+ - COLUMN_REQUIRE_CHARSET
+ - COLUMN_REQUIRE_COLLATION
+ - SCHEMA_BACKWARD_COMPATIBILITY
+ - DATABASE_DROP_EMPTY_DATABASE
+ - INDEX_NO_DUPLICATE_COLUMN
+ - INDEX_KEY_NUMBER_LIMIT
+ - INDEX_PK_TYPE_LIMIT
+ - INDEX_TYPE_NO_BLOB
+ - INDEX_TOTAL_NUMBER_LIMIT
+ - INDEX_PRIMARY_KEY_TYPE_ALLOWLIST
+ - INDEX_CREATE_CONCURRENTLY
+ - INDEX_TYPE_ALLOW_LIST
+ - INDEX_NOT_REDUNDANT
+ - SYSTEM_CHARSET_ALLOWLIST
+ - SYSTEM_COLLATION_ALLOWLIST
+ - SYSTEM_COMMENT_LENGTH
+ - SYSTEM_PROCEDURE_DISALLOW_CREATE
+ - SYSTEM_EVENT_DISALLOW_CREATE
+ - SYSTEM_VIEW_DISALLOW_CREATE
+ - SYSTEM_FUNCTION_DISALLOW_CREATE
+ - SYSTEM_FUNCTION_DISALLOWED_LIST
+ - ADVICE_ONLINE_MIGRATION
+ - BUILTIN_PRIOR_BACKUP_CHECK
+ bytebase.v1.SchemaCatalog:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: The schema name.
+ tables:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.TableCatalog'
+ title: tables
+ description: The tables in the schema.
+ title: SchemaCatalog
+ additionalProperties: false
+ description: Schema metadata within a database.
+ bytebase.v1.SchemaMetadata:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name is the schema name.
+ It is an empty string for databases without such concept such as MySQL.
+ tables:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.TableMetadata'
+ title: tables
+ description: The tables is the list of tables in a schema.
+ externalTables:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.ExternalTableMetadata'
+ title: external_tables
+ description: The external_tables is the list of external tables in a schema.
+ views:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.ViewMetadata'
+ title: views
+ description: The views is the list of views in a schema.
+ functions:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.FunctionMetadata'
+ title: functions
+ description: The functions is the list of functions in a schema.
+ procedures:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.ProcedureMetadata'
+ title: procedures
+ description: The procedures is the list of procedures in a schema.
+ streams:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.StreamMetadata'
+ title: streams
+ description: |-
+ The streams is the list of streams in a schema, currently, only used for
+ Snowflake.
+ tasks:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.TaskMetadata'
+ title: tasks
+ description: |-
+ The routines is the list of routines in a schema, currently, only used for
+ Snowflake.
+ materializedViews:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.MaterializedViewMetadata'
+ title: materialized_views
+ description: The materialized_views is the list of materialized views in a schema.
+ packages:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.PackageMetadata'
+ title: packages
+ description: The packages is the list of packages in a schema.
+ owner:
+ type: string
+ title: owner
+ description: The owner of the schema.
+ sequences:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.SequenceMetadata'
+ title: sequences
+ description: The sequences is the list of sequences in a schema, sorted by name.
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.EventMetadata'
+ title: events
+ description: The events is the list of scheduled events in a schema.
+ enumTypes:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.EnumTypeMetadata'
+ title: enum_types
+ description: The enum_types is the list of user-defined enum types in a schema.
+ skipDump:
+ type: boolean
+ title: skip_dump
+ description: Whether to skip this schema during schema dump operations.
+ comment:
+ type: string
+ title: comment
+ description: The comment is the comment of a schema.
+ title: SchemaMetadata
+ additionalProperties: false
+ description: |-
+ SchemaMetadata is the metadata for schemas.
+ This is the concept of schema in Postgres, but it's a no-op for MySQL.
+ bytebase.v1.SearchAuditLogsRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ filter:
+ type: string
+ title: filter
+ description: |-
+ The filter of the log. It should be a valid CEL expression.
+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+ Supported filter:
+ - method: the API name, can be found in the docs, should start with "/bytebase.v1." prefix. For example "/bytebase.v1.UserService/CreateUser". Support "==" operator.
+ - severity: support "==" operator, check Severity enum in AuditLog message for values.
+ - user: the actor, should in "users/{email}" format, support "==" operator.
+ - create_time: support ">=" and "<=" operator.
+
+ For example:
+ - filter = "method == '/bytebase.v1.SQLService/Query'"
+ - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR'"
+ - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && user == 'users/[email protected]'"
+ - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && create_time <= '2021-01-01T00:00:00Z' && create_time >= '2020-01-01T00:00:00Z'"
+ orderBy:
+ type: string
+ title: order_by
+ description: |-
+ The order by of the log.
+ Only support order by create_time.
+ For example:
+ - order_by = "create_time asc"
+ - order_by = "create_time desc"
+ pageSize:
+ type: integer
+ title: page_size
+ format: int32
+ description: |-
+ The maximum number of logs to return.
+ The service may return fewer than this value.
+ If unspecified, at most 10 log entries will be returned.
+ The maximum value is 5000; values above 5000 will be coerced to 5000.
+ pageToken:
+ type: string
+ title: page_token
+ description: |-
+ A page token, received from a previous `SearchLogs` call.
+ Provide this to retrieve the subsequent page.
+ title: SearchAuditLogsRequest
+ additionalProperties: false
+ description: Request message for searching audit logs.
+ bytebase.v1.SearchAuditLogsResponse:
+ type: object
+ properties:
+ auditLogs:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.AuditLog'
+ title: audit_logs
+ nextPageToken:
+ type: string
+ title: next_page_token
+ description: |-
+ A token to retrieve next page of log entities.
+ Pass this value in the page_token field in the subsequent call
+ to retrieve the next page of log entities.
+ title: SearchAuditLogsResponse
+ additionalProperties: false
+ description: Response message for searching audit logs.
+ bytebase.v1.SearchIssuesRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The parent, which owns this collection of issues.
+ Format: projects/{project}
+ Use "projects/-" to list all issues from all projects.
+ pageSize:
+ type: integer
+ title: page_size
+ format: int32
+ description: |-
+ The maximum number of issues to return. The service may return fewer than
+ this value.
+ If unspecified, at most 10 issues will be returned.
+ The maximum value is 1000; values above 1000 will be coerced to 1000.
+ pageToken:
+ type: string
+ title: page_token
+ description: |-
+ A page token, received from a previous `SearchIssues` call.
+ Provide this to retrieve the subsequent page.
+
+ When paginating, all other parameters provided to `SearchIssues` must match
+ the call that provided the page token.
+ filter:
+ type: string
+ title: filter
+ description: |-
+ Filter is used to filter issues returned in the list.
+ Check the filter field in the ListIssuesRequest message.
+ query:
+ type: string
+ title: query
+ description: Query is the query statement.
+ title: SearchIssuesRequest
+ additionalProperties: false
+ bytebase.v1.SearchIssuesResponse:
+ type: object
+ properties:
+ issues:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Issue'
+ title: issues
+ description: The issues from the specified request.
+ nextPageToken:
+ type: string
+ title: next_page_token
+ description: |-
+ A token, which can be sent as `page_token` to retrieve the next page.
+ If this field is omitted, there are no subsequent pages.
+ title: SearchIssuesResponse
+ additionalProperties: false
+ bytebase.v1.SearchPlansRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The parent, which owns this collection of plans.
+ Format: projects/{project}
+ Use "projects/-" to list all plans from all projects.
+ pageSize:
+ type: integer
+ title: page_size
+ format: int32
+ description: |-
+ The maximum number of plans to return. The service may return fewer than
+ this value.
+ If unspecified, at most 10 plans will be returned.
+ The maximum value is 1000; values above 1000 will be coerced to 1000.
+ pageToken:
+ type: string
+ title: page_token
+ description: |-
+ A page token, received from a previous `SearchPlans` call.
+ Provide this to retrieve the subsequent page.
+
+ When paginating, all other parameters provided to `SearchPlans` must match
+ the call that provided the page token.
+ filter:
+ type: string
+ title: filter
+ description: |-
+ Filter is used to filter plans returned in the list.
+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+ Supported filters:
+ - creator: the plan creator full name in "users/{email or id}" format, support "==" operator.
+ - create_time: the plan create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.
+ - has_pipeline: the plan has pipeline or not, support "==" operator, the value should be "true" or "false".
+ - has_issue: the plan has issue or not, support "==" operator, the value should be "true" or "false".
+ - title: the plan title, support "==" operator for exact match and ".matches()" operator for case-insensitive substring match.
+ - spec_type: the plan spec config type, support "==" operator, the value should be "create_database_config", "change_database_config", or "export_data_config".
+ - state: the plan state, support "==" operator, the value should be "ACTIVE" or "DELETED".
+
+ For example:
+ creator == "users/[email protected]" && create_time >= "2025-01-02T15:04:05Z07:00"
+ has_pipeline == false && has_issue == true
+ title == "My Plan"
+ title.matches("database migration")
+ spec_type == "change_database_config"
+ state == "ACTIVE"
+ title: SearchPlansRequest
+ additionalProperties: false
+ bytebase.v1.SearchPlansResponse:
+ type: object
+ properties:
+ plans:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Plan'
+ title: plans
+ description: The plans from the specified request.
+ nextPageToken:
+ type: string
+ title: next_page_token
+ description: |-
+ A token, which can be sent as `page_token` to retrieve the next page.
+ If this field is omitted, there are no subsequent pages.
+ title: SearchPlansResponse
+ additionalProperties: false
+ bytebase.v1.SearchProjectsRequest:
+ type: object
+ properties:
+ showDeleted:
+ type: boolean
+ title: show_deleted
+ description: Show deleted projects if specified.
+ filter:
+ type: string
+ title: filter
+ description: |-
+ Filter the project.
+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+ Supported filters:
+ - name: the project name, support "==" and ".matches()" operator.
+ - resource_id: the project id, support "==" and ".matches()" operator.
+ - exclude_default: if not include the default project, should be "true" or "false", support "==" operator.
+ - state: check the State enum for the values, support "==" operator.
+ - labels.{key}: the project label, support "==" and "in" operators.
+
+ For example:
+ name == "project name"
+ name.matches("project name")
+ resource_id == "project id"
+ resource_id.matches("project id")
+ exclude_default == true
+ state == "DELETED"
+ labels.environment == "production"
+ labels.tier == "critical"
+ labels.environment in ["staging", "prod"]
+ You can combine filter conditions like:
+ name == "project name" && resource_id.matches("project id")
+ name.matches("project name") || resource_id == "project id"
+ labels.environment == "production" && labels.tier == "critical"
+ pageSize:
+ type: integer
+ title: page_size
+ format: int32
+ description: |-
+ The maximum number of projects to return. The service may return fewer than
+ this value.
+ If unspecified, at most 10 projects will be returned.
+ The maximum value is 1000; values above 1000 will be coerced to 1000.
+ pageToken:
+ type: string
+ title: page_token
+ description: |-
+ A page token, received from a previous `SearchProjects` call.
+ Provide this to retrieve the subsequent page.
+
+ When paginating, all other parameters provided to `SearchProjects` must match
+ the call that provided the page token.
+ title: SearchProjectsRequest
+ additionalProperties: false
+ bytebase.v1.SearchProjectsResponse:
+ type: object
+ properties:
+ projects:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Project'
+ title: projects
+ description: The projects from the specified request.
+ nextPageToken:
+ type: string
+ title: next_page_token
+ description: |-
+ A token, which can be sent as `page_token` to retrieve the next page.
+ If this field is omitted, there are no subsequent pages.
+ title: SearchProjectsResponse
+ additionalProperties: false
+ bytebase.v1.SearchQueryHistoriesRequest:
+ type: object
+ properties:
+ pageSize:
+ type: integer
+ title: page_size
+ format: int32
+ description: |-
+ The maximum number of histories to return.
+ The service may return fewer than this value.
+ If unspecified, at most 10 history entries will be returned.
+ The maximum value is 1000; values above 1000 will be coerced to 1000.
+ pageToken:
+ type: string
+ title: page_token
+ description: |-
+ A page token, received from a previous `ListQueryHistory` call.
+ Provide this to retrieve the subsequent page.
+ filter:
+ type: string
+ title: filter
+ description: |-
+ Filter is the filter to apply on the search query history
+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+ Supported filter:
+ - project: the project full name in "projects/{id}" format, support "==" operator.
+ - database: the database full name in "instances/{id}/databases/{name}" format, support "==" operator.
+ - instance: the instance full name in "instances/{id}" format, support "==" operator.
+ - type: the type, should be "QUERY" or "EXPORT", support "==" operator.
+ - statement: the SQL statement, support ".matches()" operator.
+
+ For example:
+ project == "projects/{project}"
+ database == "instances/{instance}/databases/{database}"
+ instance == "instances/{instance}"
+ type == "QUERY"
+ type == "EXPORT"
+ statement.matches("select")
+ type == "QUERY" && statement.matches("select")
+ title: SearchQueryHistoriesRequest
+ additionalProperties: false
+ bytebase.v1.SearchQueryHistoriesResponse:
+ type: object
+ properties:
+ queryHistories:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.QueryHistory'
+ title: query_histories
+ description: The list of history.
+ nextPageToken:
+ type: string
+ title: next_page_token
+ description: |-
+ A token to retrieve next page of history.
+ Pass this value in the page_token field in the subsequent call to
+ `ListQueryHistory` method to retrieve the next page of history.
+ title: SearchQueryHistoriesResponse
+ additionalProperties: false
+ bytebase.v1.SearchReleasesRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: 'Format: projects/{project}'
+ pageSize:
+ type: integer
+ title: page_size
+ format: int32
+ description: |-
+ The maximum number of releases to return. The service may return fewer than this value.
+ If unspecified, at most 10 releases will be returned.
+ The maximum value is 1000; values above 1000 will be coerced to 1000.
+ pageToken:
+ type: string
+ title: page_token
+ description: |-
+ A page token, received from a previous `ListReleases` call.
+ Provide this to retrieve the subsequent page.
+
+ When paginating, all other parameters provided to `ListReleases` must match
+ the call that provided the page token.
+ digest:
+ type: string
+ title: digest
+ description: Search by the digest of the release.
+ nullable: true
+ title: SearchReleasesRequest
+ additionalProperties: false
+ bytebase.v1.SearchReleasesResponse:
+ type: object
+ properties:
+ releases:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Release'
+ title: releases
+ description: The releases matching the search criteria.
+ nextPageToken:
+ type: string
+ title: next_page_token
+ description: |-
+ A token, which can be sent as `page_token` to retrieve the next page.
+ If this field is omitted, there are no subsequent pages.
+ title: SearchReleasesResponse
+ additionalProperties: false
+ bytebase.v1.SearchWorksheetsRequest:
+ type: object
+ properties:
+ filter:
+ type: string
+ title: filter
+ description: |-
+ To filter the search result.
+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+ Supported filter:
+ - creator: the worksheet creator in "users/{email}" format, support "==" and "!=" operator.
+ - starred: should be "true" or "false", filter starred/unstarred sheets, support "==" operator.
+ - visibility: check Visibility enum in the Worksheet message for values, support "==" and "in [xx]" operator.
+ - project: the project full name in "projects/{id}" format, support "==" operator.
+
+ For example:
+ creator == "users/{email}"
+ creator != "users/{email}"
+ starred == true
+ starred == false
+ visibility in ["PRIVATE", "PROJECT_READ", "PROJECT_WRITE"]
+ visibility == "PRIVATE"
+ project == "projects/{project resource id}"
+ title: SearchWorksheetsRequest
+ additionalProperties: false
+ bytebase.v1.SearchWorksheetsResponse:
+ type: object
+ properties:
+ worksheets:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Worksheet'
+ title: worksheets
+ description: The worksheets that matched the search criteria.
+ title: SearchWorksheetsResponse
+ additionalProperties: false
+ bytebase.v1.SemanticTypeSetting:
+ type: object
+ properties:
+ types:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.SemanticTypeSetting.SemanticType'
+ title: types
+ title: SemanticTypeSetting
+ additionalProperties: false
+ bytebase.v1.SemanticTypeSetting.SemanticType:
+ type: object
+ properties:
+ id:
+ type: string
+ title: id
+ description: id is the uuid for semantic type.
+ title:
+ type: string
+ title: title
+ description: the title of the semantic type, it should not be empty.
+ description:
+ type: string
+ title: description
+ description: the description of the semantic type, it can be empty.
+ algorithm:
+ title: algorithm
+ $ref: '#/components/schemas/bytebase.v1.Algorithm'
+ icon:
+ type: string
+ title: icon
+ description: icon is the icon for semantic type, it can be emoji or base64 encoded image.
+ title: SemanticType
+ additionalProperties: false
+ bytebase.v1.SequenceMetadata:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: The name of a sequence.
+ dataType:
+ type: string
+ title: data_type
+ description: The data type of a sequence.
+ start:
+ type: string
+ title: start
+ description: The start value of a sequence.
+ minValue:
+ type: string
+ title: min_value
+ description: The minimum value of a sequence.
+ maxValue:
+ type: string
+ title: max_value
+ description: The maximum value of a sequence.
+ increment:
+ type: string
+ title: increment
+ description: Increment value of a sequence.
+ cycle:
+ type: boolean
+ title: cycle
+ description: Cycle is whether the sequence cycles.
+ cacheSize:
+ type: string
+ title: cache_size
+ description: Cache size of a sequence.
+ lastValue:
+ type: string
+ title: last_value
+ description: Last value of a sequence.
+ ownerTable:
+ type: string
+ title: owner_table
+ description: The owner table of the sequence.
+ ownerColumn:
+ type: string
+ title: owner_column
+ description: The owner column of the sequence.
+ comment:
+ type: string
+ title: comment
+ description: The comment describing the sequence.
+ skipDump:
+ type: boolean
+ title: skip_dump
+ description: Whether to skip this sequence during schema dump operations.
+ title: SequenceMetadata
+ additionalProperties: false
+ bytebase.v1.SetIamPolicyRequest:
+ type: object
+ properties:
+ resource:
+ type: string
+ title: resource
+ description: |-
+ The name of the resource to set the IAM policy.
+ Format: projects/{project}
+ Format: workspaces/{workspace}
+ policy:
+ title: policy
+ $ref: '#/components/schemas/bytebase.v1.IamPolicy'
+ etag:
+ type: string
+ title: etag
+ description: The current etag of the policy.
+ title: SetIamPolicyRequest
+ additionalProperties: false
+ description: Request message for setting an IAM policy.
+ bytebase.v1.Setting:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The resource name of the setting.
+ Format: settings/{setting}
+ Example: "settings/SEMANTIC_TYPES"
+ value:
+ title: value
+ description: The configuration value of the setting.
+ $ref: '#/components/schemas/bytebase.v1.SettingValue'
+ title: Setting
+ additionalProperties: false
+ description: The schema of setting.
+ bytebase.v1.Setting.SettingName:
+ type: string
+ title: SettingName
+ enum:
+ - SETTING_NAME_UNSPECIFIED
+ - WORKSPACE_PROFILE
+ - WORKSPACE_APPROVAL
+ - APP_IM
+ - AI
+ - DATA_CLASSIFICATION
+ - SEMANTIC_TYPES
+ - ENVIRONMENT
+ bytebase.v1.SettingValue:
+ type: object
+ oneOf:
+ - properties:
+ ai:
+ title: ai
+ $ref: '#/components/schemas/bytebase.v1.AISetting'
+ title: ai
+ required:
+ - ai
+ - properties:
+ appIm:
+ title: app_im
+ $ref: '#/components/schemas/bytebase.v1.AppIMSetting'
+ title: app_im
+ required:
+ - appIm
+ - properties:
+ dataClassification:
+ title: data_classification
+ $ref: '#/components/schemas/bytebase.v1.DataClassificationSetting'
+ title: data_classification
+ required:
+ - dataClassification
+ - properties:
+ environment:
+ title: environment
+ $ref: '#/components/schemas/bytebase.v1.EnvironmentSetting'
+ title: environment
+ required:
+ - environment
+ - properties:
+ semanticType:
+ title: semantic_type
+ $ref: '#/components/schemas/bytebase.v1.SemanticTypeSetting'
+ title: semantic_type
+ required:
+ - semanticType
+ - properties:
+ workspaceApproval:
+ title: workspace_approval
+ $ref: '#/components/schemas/bytebase.v1.WorkspaceApprovalSetting'
+ title: workspace_approval
+ required:
+ - workspaceApproval
+ - properties:
+ workspaceProfile:
+ title: workspace_profile
+ $ref: '#/components/schemas/bytebase.v1.WorkspaceProfileSetting'
+ title: workspace_profile
+ required:
+ - workspaceProfile
+ title: SettingValue
+ additionalProperties: false
+ description: The data in setting value.
+ bytebase.v1.SetupSampleRequest:
+ type: object
+ title: SetupSampleRequest
+ additionalProperties: false
+ description: Request message for setting up sample data.
+ bytebase.v1.Sheet:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the sheet resource.
+ Format: projects/{project}/sheets/{sheet}
+ The sheet ID is generated by the server on creation and cannot be changed.
+ title:
+ type: string
+ title: title
+ maxLength: 200
+ description: The title of the sheet.
+ creator:
+ type: string
+ title: creator
+ description: |-
+ The creator of the Sheet.
+ Format: users/{email}
+ createTime:
+ title: create_time
+ description: The create time of the sheet.
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ content:
+ type: string
+ title: content
+ format: byte
+ description: |-
+ The content of the sheet.
+ By default, it will be cut off, if it doesn't match the `content_size`, you can
+ set the `raw` to true in GetSheet request to retrieve the full content.
+ contentSize:
+ type:
+ - integer
+ - string
+ title: content_size
+ format: int64
+ description: content_size is the full size of the content, may not match the size of the `content` field.
+ payload:
+ title: payload
+ description: Additional metadata and configuration for the sheet.
+ $ref: '#/components/schemas/bytebase.v1.SheetPayload'
+ engine:
+ title: engine
+ description: The SQL dialect.
+ $ref: '#/components/schemas/bytebase.v1.Engine'
+ title: Sheet
+ additionalProperties: false
+ bytebase.v1.SheetCommand:
+ type: object
+ properties:
+ start:
+ type: integer
+ title: start
+ format: int32
+ end:
+ type: integer
+ title: end
+ format: int32
+ title: SheetCommand
+ additionalProperties: false
+ bytebase.v1.SheetPayload:
+ type: object
+ properties:
+ type:
+ title: type
+ $ref: '#/components/schemas/bytebase.v1.SheetPayload.Type'
+ commands:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.SheetCommand'
+ title: commands
+ description: The start and end position of each command in the sheet statement.
+ title: SheetPayload
+ additionalProperties: false
+ bytebase.v1.SheetPayload.Type:
+ type: string
+ title: Type
+ enum:
+ - TYPE_UNSPECIFIED
+ - SCHEMA_DESIGN
+ description: Type of the SheetPayload.
+ bytebase.v1.SpatialIndexConfig:
+ type: object
+ properties:
+ method:
+ type: string
+ title: method
+ description: Spatial indexing method (e.g., "SPATIAL", "R-TREE", "GIST")
+ tessellation:
+ title: tessellation
+ description: Tessellation configuration for grid-based spatial indexes
+ $ref: '#/components/schemas/bytebase.v1.TessellationConfig'
+ storage:
+ title: storage
+ description: Storage and performance configuration
+ $ref: '#/components/schemas/bytebase.v1.StorageConfig'
+ dimensional:
+ title: dimensional
+ description: Dimensional configuration
+ $ref: '#/components/schemas/bytebase.v1.DimensionalConfig'
+ title: SpatialIndexConfig
+ additionalProperties: false
+ description: SpatialIndexConfig defines the spatial index configuration for spatial databases.
+ bytebase.v1.Stage:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ Format: projects/{project}/rollouts/{rollout}/stages/{stage}
+ Use "-" for {stage} when the stage has no environment or deleted environment.
+ id:
+ type: string
+ title: id
+ description: |-
+ id is the environment id of the stage.
+ e.g., "prod".
+ Use "-" when the stage has no environment or deleted environment.
+ environment:
+ type: string
+ title: environment
+ description: |-
+ environment is the environment of the stage.
+ Format: environments/{environment} for valid environments, or "environments/-" for stages without environment or with deleted environments.
+ tasks:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Task'
+ title: tasks
+ description: The tasks within this stage.
+ title: Stage
+ additionalProperties: false
+ bytebase.v1.State:
+ type: string
+ title: State
+ enum:
+ - STATE_UNSPECIFIED
+ - ACTIVE
+ - DELETED
+ description: Resource lifecycle state.
+ bytebase.v1.StorageConfig:
+ type: object
+ properties:
+ fillfactor:
+ type: integer
+ title: fillfactor
+ format: int32
+ description: Fill factor percentage (1-100)
+ buffering:
+ type: string
+ title: buffering
+ description: Buffering mode for PostgreSQL (auto, on, off)
+ tablespace:
+ type: string
+ title: tablespace
+ description: Tablespace configuration for Oracle
+ workTablespace:
+ type: string
+ title: work_tablespace
+ sdoLevel:
+ type: integer
+ title: sdo_level
+ format: int32
+ commitInterval:
+ type: integer
+ title: commit_interval
+ format: int32
+ padIndex:
+ type: boolean
+ title: pad_index
+ description: SQL Server specific parameters
+ sortInTempdb:
+ type: string
+ title: sort_in_tempdb
+ description: ON, OFF
+ dropExisting:
+ type: boolean
+ title: drop_existing
+ online:
+ type: boolean
+ title: online
+ allowRowLocks:
+ type: boolean
+ title: allow_row_locks
+ allowPageLocks:
+ type: boolean
+ title: allow_page_locks
+ maxdop:
+ type: integer
+ title: maxdop
+ format: int32
+ dataCompression:
+ type: string
+ title: data_compression
+ description: NONE, ROW, PAGE
+ title: StorageConfig
+ additionalProperties: false
+ description: StorageConfig defines storage and performance parameters for spatial indexes.
+ bytebase.v1.StreamMetadata:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: The name is the name of a stream.
+ tableName:
+ type: string
+ title: table_name
+ description: The table_name is the name of the table/view that the stream is created on.
+ owner:
+ type: string
+ title: owner
+ description: The owner of the stream.
+ comment:
+ type: string
+ title: comment
+ description: The comment of the stream.
+ type:
+ title: type
+ description: The type of the stream.
+ $ref: '#/components/schemas/bytebase.v1.StreamMetadata.Type'
+ stale:
+ type: boolean
+ title: stale
+ description: Indicates whether the stream was last read before the `stale_after` time.
+ mode:
+ title: mode
+ description: The mode of the stream.
+ $ref: '#/components/schemas/bytebase.v1.StreamMetadata.Mode'
+ definition:
+ type: string
+ title: definition
+ description: The definition of the stream.
+ title: StreamMetadata
+ additionalProperties: false
+ bytebase.v1.StreamMetadata.Mode:
+ type: string
+ title: Mode
+ enum:
+ - MODE_UNSPECIFIED
+ - DEFAULT
+ - APPEND_ONLY
+ - INSERT_ONLY
+ bytebase.v1.StreamMetadata.Type:
+ type: string
+ title: Type
+ enum:
+ - TYPE_UNSPECIFIED
+ - DELTA
+ bytebase.v1.Subscription:
+ type: object
+ properties:
+ plan:
+ title: plan
+ $ref: '#/components/schemas/bytebase.v1.PlanType'
+ seats:
+ type: integer
+ title: seats
+ format: int32
+ instances:
+ type: integer
+ title: instances
+ format: int32
+ activeInstances:
+ type: integer
+ title: active_instances
+ format: int32
+ expiresTime:
+ title: expires_time
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ trialing:
+ type: boolean
+ title: trialing
+ orgName:
+ type: string
+ title: org_name
+ title: Subscription
+ additionalProperties: false
+ bytebase.v1.SyncDatabaseRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the database to sync.
+ Format: instances/{instance}/databases/{database}
+ title: SyncDatabaseRequest
+ additionalProperties: false
+ bytebase.v1.SyncDatabaseResponse:
+ type: object
+ title: SyncDatabaseResponse
+ additionalProperties: false
+ bytebase.v1.SyncInstanceRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of instance.
+ Format: instances/{instance}
+ enableFullSync:
+ type: boolean
+ title: enable_full_sync
+ description: |-
+ When full sync is enabled, all databases in the instance will be synchronized. Otherwise, only
+ the instance metadata (such as the database list) and any newly discovered databases will be synced.
+ title: SyncInstanceRequest
+ additionalProperties: false
+ bytebase.v1.SyncInstanceResponse:
+ type: object
+ properties:
+ databases:
+ type: array
+ items:
+ type: string
+ title: databases
+ description: All database name list in the instance.
+ title: SyncInstanceResponse
+ additionalProperties: false
+ bytebase.v1.TableCatalog:
+ type: object
+ allOf:
+ - properties:
+ name:
+ type: string
+ title: name
+ description: The table name.
+ classification:
+ type: string
+ title: classification
+ description: The data classification level for this table.
+ - oneOf:
+ - properties:
+ columns:
+ title: columns
+ description: Regular table columns.
+ $ref: '#/components/schemas/bytebase.v1.TableCatalog.Columns'
+ title: columns
+ required:
+ - columns
+ - properties:
+ objectSchema:
+ title: object_schema
+ description: Object schema for JSON/XML columns.
+ $ref: '#/components/schemas/bytebase.v1.ObjectSchema'
+ title: object_schema
+ required:
+ - objectSchema
+ title: TableCatalog
+ additionalProperties: false
+ description: Table metadata within a schema.
+ bytebase.v1.TableCatalog.Columns:
+ type: object
+ properties:
+ columns:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.ColumnCatalog'
+ title: columns
+ description: The columns in the table.
+ title: Columns
+ additionalProperties: false
+ description: Column list for regular tables.
+ bytebase.v1.TableMetadata:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: The name is the name of a table.
+ columns:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.ColumnMetadata'
+ title: columns
+ description: The columns is the ordered list of columns in a table.
+ indexes:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.IndexMetadata'
+ title: indexes
+ description: The indexes is the list of indexes in a table.
+ engine:
+ type: string
+ title: engine
+ description: The engine is the engine of a table.
+ collation:
+ type: string
+ title: collation
+ description: The collation is the collation of a table.
+ charset:
+ type: string
+ title: charset
+ description: The character set of table.
+ rowCount:
+ type:
+ - integer
+ - string
+ title: row_count
+ format: int64
+ description: The row_count is the estimated number of rows of a table.
+ dataSize:
+ type:
+ - integer
+ - string
+ title: data_size
+ format: int64
+ description: The data_size is the estimated data size of a table.
+ indexSize:
+ type:
+ - integer
+ - string
+ title: index_size
+ format: int64
+ description: The index_size is the estimated index size of a table.
+ dataFree:
+ type:
+ - integer
+ - string
+ title: data_free
+ format: int64
+ description: The data_free is the estimated free data size of a table.
+ createOptions:
+ type: string
+ title: create_options
+ description: The create_options is the create option of a table.
+ comment:
+ type: string
+ title: comment
+ description: The comment is the comment of a table.
+ foreignKeys:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.ForeignKeyMetadata'
+ title: foreign_keys
+ description: The foreign_keys is the list of foreign keys in a table.
+ partitions:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.TablePartitionMetadata'
+ title: partitions
+ description: The partitions is the list of partitions in a table.
+ checkConstraints:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.CheckConstraintMetadata'
+ title: check_constraints
+ description: The check_constraints is the list of check constraints in a table.
+ owner:
+ type: string
+ title: owner
+ description: The owner of the table.
+ sortingKeys:
+ type: array
+ items:
+ type: string
+ title: sorting_keys
+ description: |-
+ The sorting_keys is a tuple of column names or arbitrary expressions. ClickHouse specific field.
+ Reference: https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree#order_by
+ triggers:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.TriggerMetadata'
+ title: triggers
+ description: The triggers is the list of triggers associated with the table.
+ skipDump:
+ type: boolean
+ title: skip_dump
+ description: Whether to skip this table during schema dump operations.
+ shardingInfo:
+ type: string
+ title: sharding_info
+ description: https://docs.pingcap.com/tidb/stable/information-schema-tables/
+ primaryKeyType:
+ type: string
+ title: primary_key_type
+ description: |-
+ https://docs.pingcap.com/tidb/stable/clustered-indexes/#clustered-indexes
+ CLUSTERED or NONCLUSTERED.
+ title: TableMetadata
+ additionalProperties: false
+ description: TableMetadata is the metadata for tables.
+ bytebase.v1.TablePartitionMetadata:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: The name is the name of a table partition.
+ type:
+ title: type
+ description: The type of a table partition.
+ $ref: '#/components/schemas/bytebase.v1.TablePartitionMetadata.Type'
+ expression:
+ type: string
+ title: expression
+ description: |-
+ The expression is the expression of a table partition.
+ For PostgreSQL, the expression is the text of {FOR VALUES
+ partition_bound_spec}, see
+ https://www.postgresql.org/docs/current/sql-createtable.html. For MySQL,
+ the expression is the `expr` or `column_list` of the following syntax.
+ PARTITION BY
+ { [LINEAR] HASH(expr)
+ | [LINEAR] KEY [ALGORITHM={1 | 2}] (column_list)
+ | RANGE{(expr) | COLUMNS(column_list)}
+ | LIST{(expr) | COLUMNS(column_list)} }.
+ value:
+ type: string
+ title: value
+ description: |-
+ The value is the value of a table partition.
+ For MySQL, the value is for RANGE and LIST partition types,
+ - For a RANGE partition, it contains the value set in the partition's
+ VALUES LESS THAN clause, which can be either an integer or MAXVALUE.
+ - For a LIST partition, this column contains the values defined in the
+ partition's VALUES IN clause, which is a list of comma-separated integer
+ values.
+ - For others, it's an empty string.
+ useDefault:
+ type: string
+ title: use_default
+ description: |-
+ The use_default is whether the users use the default partition, it stores
+ the different value for different database engines. For MySQL, it's [INT]
+ type, 0 means not use default partition, otherwise, it's equals to number
+ in syntax [SUB]PARTITION {number}.
+ subpartitions:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.TablePartitionMetadata'
+ title: subpartitions
+ description: The subpartitions is the list of subpartitions in a table partition.
+ indexes:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.IndexMetadata'
+ title: indexes
+ checkConstraints:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.CheckConstraintMetadata'
+ title: check_constraints
+ title: TablePartitionMetadata
+ additionalProperties: false
+ description: TablePartitionMetadata is the metadata for table partitions.
+ bytebase.v1.TablePartitionMetadata.Type:
+ type: string
+ title: Type
+ enum:
+ - TYPE_UNSPECIFIED
+ - RANGE
+ - RANGE_COLUMNS
+ - LIST
+ - LIST_COLUMNS
+ - HASH
+ - LINEAR_HASH
+ - KEY
+ - LINEAR_KEY
+ description: |-
+ Type is the type of a table partition, some database engines may not
+ support all types. Only avilable for the following database engines now:
+ MySQL: RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, LINEAR HASH, KEY,
+ LINEAR_KEY
+ (https://dev.mysql.com/doc/refman/8.0/en/partitioning-types.html) TiDB:
+ RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, KEY PostgreSQL: RANGE,
+ LIST, HASH (https://www.postgresql.org/docs/current/ddl-partitioning.html)
+ bytebase.v1.TagPolicy:
+ type: object
+ properties:
+ tags:
+ type: object
+ title: tags
+ additionalProperties:
+ type: string
+ title: value
+ description: |-
+ tags is the key - value map for resources.
+ for example, the environment resource can have the sql review config tag, like "bb.tag.review_config": "reviewConfigs/{review config resource id}"
+ title: TagPolicy
+ additionalProperties: false
+ description: Policy for tagging resources with metadata.
+ bytebase.v1.TagPolicy.TagsEntry:
+ type: object
+ properties:
+ key:
+ type: string
+ title: key
+ value:
+ type: string
+ title: value
+ title: TagsEntry
+ additionalProperties: false
+ bytebase.v1.Task:
+ type: object
+ allOf:
+ - properties:
+ name:
+ type: string
+ title: name
+ description: 'Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}'
+ specId:
+ type: string
+ title: spec_id
+ description: |-
+ A UUID4 string that uniquely identifies the Spec.
+ Could be empty if the rollout of the task does not have an associating plan.
+ status:
+ title: status
+ description: Status is the status of the task.
+ $ref: '#/components/schemas/bytebase.v1.Task.Status'
+ skippedReason:
+ type: string
+ title: skipped_reason
+ description: The reason why the task was skipped.
+ type:
+ title: type
+ $ref: '#/components/schemas/bytebase.v1.Task.Type'
+ target:
+ type: string
+ title: target
+ description: |-
+ Format: instances/{instance} if the task is DatabaseCreate.
+ Format: instances/{instance}/databases/{database}
+ updateTime:
+ title: update_time
+ description: |-
+ The update_time is the update time of latest task run.
+ If there are no task runs, it will be empty.
+ nullable: true
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ runTime:
+ title: run_time
+ description: |-
+ The run_time is the scheduled run time of latest task run.
+ If there are no task runs or the task run is not scheduled, it will be empty.
+ nullable: true
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ - oneOf:
+ - properties:
+ databaseCreate:
+ title: database_create
+ $ref: '#/components/schemas/bytebase.v1.Task.DatabaseCreate'
+ title: database_create
+ required:
+ - databaseCreate
+ - properties:
+ databaseDataExport:
+ title: database_data_export
+ $ref: '#/components/schemas/bytebase.v1.Task.DatabaseDataExport'
+ title: database_data_export
+ required:
+ - databaseDataExport
+ - properties:
+ databaseUpdate:
+ title: database_update
+ $ref: '#/components/schemas/bytebase.v1.Task.DatabaseUpdate'
+ title: database_update
+ required:
+ - databaseUpdate
+ title: Task
+ additionalProperties: false
+ bytebase.v1.Task.DatabaseCreate:
+ type: object
+ properties:
+ project:
+ type: string
+ title: project
+ description: |-
+ The project owning the database.
+ Format: projects/{project}
+ database:
+ type: string
+ title: database
+ description: Database name.
+ table:
+ type: string
+ title: table
+ description: Table name.
+ sheet:
+ type: string
+ title: sheet
+ description: 'Format: projects/{project}/sheets/{sheet}'
+ characterSet:
+ type: string
+ title: character_set
+ description: The character set for the database.
+ collation:
+ type: string
+ title: collation
+ description: The collation for the database.
+ environment:
+ type: string
+ title: environment
+ description: The environment the database belongs to.
+ title: DatabaseCreate
+ additionalProperties: false
+ description: Payload for creating a new database.
+ bytebase.v1.Task.DatabaseDataExport:
+ type: object
+ properties:
+ target:
+ type: string
+ title: target
+ description: |-
+ The resource name of the target.
+ Format: instances/{instance-id}/databases/{database-name}
+ sheet:
+ type: string
+ title: sheet
+ description: |-
+ The resource name of the sheet.
+ Format: projects/{project}/sheets/{sheet}
+ format:
+ title: format
+ description: The format of the exported file.
+ $ref: '#/components/schemas/bytebase.v1.ExportFormat'
+ password:
+ type: string
+ title: password
+ description: |-
+ The zip password provided by users.
+ Leave it empty if no needs to encrypt the zip file.
+ nullable: true
+ title: DatabaseDataExport
+ additionalProperties: false
+ description: Payload for exporting database data.
+ bytebase.v1.Task.DatabaseUpdate:
+ type: object
+ properties:
+ sheet:
+ type: string
+ title: sheet
+ description: 'Format: projects/{project}/sheets/{sheet}'
+ schemaVersion:
+ type: string
+ title: schema_version
+ description: The target schema version after this update.
+ databaseChangeType:
+ title: database_change_type
+ description: The type of database change (MIGRATE or SDL).
+ $ref: '#/components/schemas/bytebase.v1.DatabaseChangeType'
+ title: DatabaseUpdate
+ additionalProperties: false
+ description: Payload for updating a database schema.
+ bytebase.v1.Task.Status:
+ type: string
+ title: Status
+ enum:
+ - STATUS_UNSPECIFIED
+ - NOT_STARTED
+ - PENDING
+ - RUNNING
+ - DONE
+ - FAILED
+ - CANCELED
+ - SKIPPED
+ bytebase.v1.Task.Type:
+ type: string
+ title: Type
+ enum:
+ - TYPE_UNSPECIFIED
+ - GENERAL
+ - DATABASE_CREATE
+ - DATABASE_MIGRATE
+ - DATABASE_SDL
+ - DATABASE_EXPORT
+ bytebase.v1.TaskMetadata:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: The name is the name of a task.
+ id:
+ type: string
+ title: id
+ description: |-
+ The id is the snowflake-generated id of a task.
+ Example: 01ad32a0-1bb6-5e93-0000-000000000001
+ owner:
+ type: string
+ title: owner
+ description: The owner of the task.
+ comment:
+ type: string
+ title: comment
+ description: The comment of the task.
+ warehouse:
+ type: string
+ title: warehouse
+ description: The warehouse of the task.
+ schedule:
+ type: string
+ title: schedule
+ description: The schedule interval of the task.
+ predecessors:
+ type: array
+ items:
+ type: string
+ title: predecessors
+ description: The predecessor tasks of the task.
+ state:
+ title: state
+ description: The state of the task.
+ $ref: '#/components/schemas/bytebase.v1.TaskMetadata.State'
+ condition:
+ type: string
+ title: condition
+ description: The condition of the task.
+ definition:
+ type: string
+ title: definition
+ description: The definition of the task.
+ title: TaskMetadata
+ additionalProperties: false
+ bytebase.v1.TaskMetadata.State:
+ type: string
+ title: State
+ enum:
+ - STATE_UNSPECIFIED
+ - STARTED
+ - SUSPENDED
+ bytebase.v1.TaskRun:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: 'Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun}'
+ creator:
+ type: string
+ title: creator
+ description: 'Format: users/[email protected]'
+ createTime:
+ title: create_time
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ updateTime:
+ title: update_time
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ status:
+ title: status
+ description: The current execution status of the task run.
+ $ref: '#/components/schemas/bytebase.v1.TaskRun.Status'
+ detail:
+ type: string
+ title: detail
+ description: |-
+ Below are the results of a task run.
+ Detailed information about the task run result.
+ changelog:
+ type: string
+ title: changelog
+ description: |-
+ The resource name of the changelog.
+ Format: instances/{instance}/databases/{database}/changelogs/{changelog}
+ schemaVersion:
+ type: string
+ title: schema_version
+ description: The schema version after this task run completes.
+ startTime:
+ title: start_time
+ description: The time when the task run started execution.
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ exportArchiveStatus:
+ title: export_archive_status
+ description: The export archive status for data export tasks.
+ $ref: '#/components/schemas/bytebase.v1.TaskRun.ExportArchiveStatus'
+ priorBackupDetail:
+ title: prior_backup_detail
+ description: The prior backup detail that will be used to rollback the task run.
+ $ref: '#/components/schemas/bytebase.v1.TaskRun.PriorBackupDetail'
+ schedulerInfo:
+ title: scheduler_info
+ description: Scheduling information about the task run.
+ $ref: '#/components/schemas/bytebase.v1.TaskRun.SchedulerInfo'
+ sheet:
+ type: string
+ title: sheet
+ description: 'Format: projects/{project}/sheets/{sheet}'
+ runTime:
+ title: run_time
+ description: |-
+ The task run should run after run_time.
+ This can only be set when creating the task run calling BatchRunTasks.
+ nullable: true
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ title: TaskRun
+ additionalProperties: false
+ bytebase.v1.TaskRun.ExportArchiveStatus:
+ type: string
+ title: ExportArchiveStatus
+ enum:
+ - EXPORT_ARCHIVE_STATUS_UNSPECIFIED
+ - READY
+ - EXPORTED
+ bytebase.v1.TaskRun.PriorBackupDetail:
+ type: object
+ properties:
+ items:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.TaskRun.PriorBackupDetail.Item'
+ title: items
+ description: The list of backed up tables.
+ title: PriorBackupDetail
+ additionalProperties: false
+ description: Prior backup detail for rollback purposes.
+ bytebase.v1.TaskRun.PriorBackupDetail.Item:
+ type: object
+ properties:
+ sourceTable:
+ title: source_table
+ description: The original table information.
+ $ref: '#/components/schemas/bytebase.v1.TaskRun.PriorBackupDetail.Item.Table'
+ targetTable:
+ title: target_table
+ description: The target backup table information.
+ $ref: '#/components/schemas/bytebase.v1.TaskRun.PriorBackupDetail.Item.Table'
+ startPosition:
+ title: start_position
+ description: The start position in the SQL statement.
+ $ref: '#/components/schemas/bytebase.v1.Position'
+ endPosition:
+ title: end_position
+ description: The end position in the SQL statement.
+ $ref: '#/components/schemas/bytebase.v1.Position'
+ title: Item
+ additionalProperties: false
+ description: A single backup table mapping.
+ bytebase.v1.TaskRun.PriorBackupDetail.Item.Table:
+ type: object
+ properties:
+ database:
+ type: string
+ title: database
+ description: |-
+ The database information.
+ Format: instances/{instance}/databases/{database}
+ schema:
+ type: string
+ title: schema
+ description: The schema name.
+ table:
+ type: string
+ title: table
+ description: The table name.
+ title: Table
+ additionalProperties: false
+ description: Table information.
+ bytebase.v1.TaskRun.SchedulerInfo:
+ type: object
+ properties:
+ reportTime:
+ title: report_time
+ description: The time when the scheduling info was reported.
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ waitingCause:
+ title: waiting_cause
+ description: The cause for the task run waiting.
+ $ref: '#/components/schemas/bytebase.v1.TaskRun.SchedulerInfo.WaitingCause'
+ title: SchedulerInfo
+ additionalProperties: false
+ description: Information about task run scheduling.
+ bytebase.v1.TaskRun.SchedulerInfo.WaitingCause:
+ type: object
+ oneOf:
+ - properties:
+ connectionLimit:
+ type: boolean
+ title: connection_limit
+ description: Waiting due to connection limit reached.
+ title: connection_limit
+ required:
+ - connectionLimit
+ - properties:
+ parallelTasksLimit:
+ type: boolean
+ title: parallel_tasks_limit
+ description: Waiting due to parallel tasks limit.
+ title: parallel_tasks_limit
+ required:
+ - parallelTasksLimit
+ - properties:
+ task:
+ title: task
+ description: Waiting for another task to complete.
+ $ref: '#/components/schemas/bytebase.v1.TaskRun.SchedulerInfo.WaitingCause.Task'
+ title: task
+ required:
+ - task
+ title: WaitingCause
+ additionalProperties: false
+ description: Information about why a task run is waiting.
+ bytebase.v1.TaskRun.SchedulerInfo.WaitingCause.Task:
+ type: object
+ properties:
+ task:
+ type: string
+ title: task
+ description: 'Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}'
+ issue:
+ type: string
+ title: issue
+ description: 'Format: projects/{project}/issues/{issue}'
+ title: Task
+ additionalProperties: false
+ description: Information about a blocking task.
+ bytebase.v1.TaskRun.Status:
+ type: string
+ title: Status
+ enum:
+ - STATUS_UNSPECIFIED
+ - PENDING
+ - RUNNING
+ - DONE
+ - FAILED
+ - CANCELED
+ bytebase.v1.TaskRunLog:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: 'Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/log'
+ entries:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry'
+ title: entries
+ description: The log entries for this task run.
+ title: TaskRunLog
+ additionalProperties: false
+ bytebase.v1.TaskRunLogEntry:
+ type: object
+ properties:
+ type:
+ title: type
+ description: The type of this log entry.
+ $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.Type'
+ logTime:
+ title: log_time
+ description: The time when the log was recorded.
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ deployId:
+ type: string
+ title: deploy_id
+ description: The deployment ID for this log entry.
+ schemaDump:
+ title: schema_dump
+ description: Schema dump details (if type is SCHEMA_DUMP).
+ $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.SchemaDump'
+ commandExecute:
+ title: command_execute
+ description: Command execution details (if type is COMMAND_EXECUTE).
+ $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.CommandExecute'
+ databaseSync:
+ title: database_sync
+ description: Database sync details (if type is DATABASE_SYNC).
+ $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.DatabaseSync'
+ taskRunStatusUpdate:
+ title: task_run_status_update
+ description: Task run status update details (if type is TASK_RUN_STATUS_UPDATE).
+ $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.TaskRunStatusUpdate'
+ transactionControl:
+ title: transaction_control
+ description: Transaction control details (if type is TRANSACTION_CONTROL).
+ $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.TransactionControl'
+ priorBackup:
+ title: prior_backup
+ description: Prior backup details (if type is PRIOR_BACKUP).
+ $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.PriorBackup'
+ retryInfo:
+ title: retry_info
+ description: Retry information details (if type is RETRY_INFO).
+ $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.RetryInfo'
+ computeDiff:
+ title: compute_diff
+ description: Compute diff details (if type is COMPUTE_DIFF).
+ $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.ComputeDiff'
+ title: TaskRunLogEntry
+ additionalProperties: false
+ bytebase.v1.TaskRunLogEntry.CommandExecute:
+ type: object
+ properties:
+ logTime:
+ title: log_time
+ description: When the command was logged.
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ commandIndexes:
+ type: array
+ items:
+ type: integer
+ format: int32
+ title: command_indexes
+ description: |-
+ Either `command_indexes` or `statement` is set.
+ The indexes of the executed commands.
+ statement:
+ type: string
+ title: statement
+ description: The executed statement.
+ response:
+ title: response
+ description: The response from executing the command.
+ $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse'
+ title: CommandExecute
+ additionalProperties: false
+ description: Command execution details.
+ bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse:
+ type: object
+ properties:
+ logTime:
+ title: log_time
+ description: When the response was logged.
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ error:
+ type: string
+ title: error
+ description: Error message if command execution failed.
+ affectedRows:
+ type:
+ - integer
+ - string
+ title: affected_rows
+ format: int64
+ description: Total affected rows.
+ allAffectedRows:
+ type: array
+ items:
+ type:
+ - integer
+ - string
+ format: int64
+ title: all_affected_rows
+ description: |-
+ `all_affected_rows` is the affected rows of each command.
+ `all_affected_rows` may be unavailable if the database driver doesn't support it. Caller should fallback to `affected_rows` in that case.
+ title: CommandResponse
+ additionalProperties: false
+ description: Command execution response.
+ bytebase.v1.TaskRunLogEntry.ComputeDiff:
+ type: object
+ properties:
+ startTime:
+ title: start_time
+ description: When diff computation started.
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ endTime:
+ title: end_time
+ description: When diff computation ended.
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ error:
+ type: string
+ title: error
+ description: Error message if computation failed.
+ title: ComputeDiff
+ additionalProperties: false
+ description: Schema diff computation details.
+ bytebase.v1.TaskRunLogEntry.DatabaseSync:
+ type: object
+ properties:
+ startTime:
+ title: start_time
+ description: When the database sync started.
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ endTime:
+ title: end_time
+ description: When the database sync ended.
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ error:
+ type: string
+ title: error
+ description: Error message if sync failed.
+ title: DatabaseSync
+ additionalProperties: false
+ description: Database synchronization details.
+ bytebase.v1.TaskRunLogEntry.PriorBackup:
+ type: object
+ properties:
+ startTime:
+ title: start_time
+ description: When the backup started.
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ endTime:
+ title: end_time
+ description: When the backup ended.
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ priorBackupDetail:
+ title: prior_backup_detail
+ description: The backup details.
+ $ref: '#/components/schemas/bytebase.v1.TaskRun.PriorBackupDetail'
+ error:
+ type: string
+ title: error
+ description: Error message if the backup failed.
+ title: PriorBackup
+ additionalProperties: false
+ description: Prior backup operation details.
+ bytebase.v1.TaskRunLogEntry.RetryInfo:
+ type: object
+ properties:
+ error:
+ type: string
+ title: error
+ description: The error that triggered the retry.
+ retryCount:
+ type: integer
+ title: retry_count
+ format: int32
+ description: Current retry attempt number.
+ maximumRetries:
+ type: integer
+ title: maximum_retries
+ format: int32
+ description: Maximum number of retries allowed.
+ title: RetryInfo
+ additionalProperties: false
+ description: Retry information for failed operations.
+ bytebase.v1.TaskRunLogEntry.SchemaDump:
+ type: object
+ properties:
+ startTime:
+ title: start_time
+ description: When the schema dump started.
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ endTime:
+ title: end_time
+ description: When the schema dump ended.
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ error:
+ type: string
+ title: error
+ description: Error message if the schema dump failed.
+ title: SchemaDump
+ additionalProperties: false
+ description: Schema dump operation details.
+ bytebase.v1.TaskRunLogEntry.TaskRunStatusUpdate:
+ type: object
+ properties:
+ status:
+ title: status
+ description: The new status.
+ $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.TaskRunStatusUpdate.Status'
+ title: TaskRunStatusUpdate
+ additionalProperties: false
+ description: Task run status update details.
+ bytebase.v1.TaskRunLogEntry.TaskRunStatusUpdate.Status:
+ type: string
+ title: Status
+ enum:
+ - STATUS_UNSPECIFIED
+ - RUNNING_WAITING
+ - RUNNING_RUNNING
+ description: Internal status for task run execution.
+ bytebase.v1.TaskRunLogEntry.TransactionControl:
+ type: object
+ properties:
+ type:
+ title: type
+ description: The type of transaction control.
+ $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.TransactionControl.Type'
+ error:
+ type: string
+ title: error
+ description: Error message if the operation failed.
+ title: TransactionControl
+ additionalProperties: false
+ description: Transaction control operation details.
+ bytebase.v1.TaskRunLogEntry.TransactionControl.Type:
+ type: string
+ title: Type
+ enum:
+ - TYPE_UNSPECIFIED
+ - BEGIN
+ - COMMIT
+ - ROLLBACK
+ description: Transaction control type.
+ bytebase.v1.TaskRunLogEntry.Type:
+ type: string
+ title: Type
+ enum:
+ - TYPE_UNSPECIFIED
+ - SCHEMA_DUMP
+ - COMMAND_EXECUTE
+ - DATABASE_SYNC
+ - TASK_RUN_STATUS_UPDATE
+ - TRANSACTION_CONTROL
+ - PRIOR_BACKUP
+ - RETRY_INFO
+ - COMPUTE_DIFF
+ description: The type of log entry.
+ bytebase.v1.TaskRunSession:
+ type: object
+ allOf:
+ - properties:
+ name:
+ type: string
+ title: name
+ description: 'Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/session'
+ - oneOf:
+ - properties:
+ postgres:
+ title: postgres
+ description: PostgreSQL session information.
+ $ref: '#/components/schemas/bytebase.v1.TaskRunSession.Postgres'
+ title: postgres
+ required:
+ - postgres
+ title: TaskRunSession
+ additionalProperties: false
+ bytebase.v1.TaskRunSession.Postgres:
+ type: object
+ properties:
+ session:
+ title: session
+ description: '`session` is the session of the task run executing commands.'
+ $ref: '#/components/schemas/bytebase.v1.TaskRunSession.Postgres.Session'
+ blockingSessions:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.TaskRunSession.Postgres.Session'
+ title: blocking_sessions
+ description: '`blocking_sessions` block `session`.'
+ blockedSessions:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.TaskRunSession.Postgres.Session'
+ title: blocked_sessions
+ description: '`blocked_sessions` are blocked by `session`.'
+ title: Postgres
+ additionalProperties: false
+ description: PostgreSQL session information.
+ bytebase.v1.TaskRunSession.Postgres.Session:
+ type: object
+ properties:
+ pid:
+ type: string
+ title: pid
+ description: Process ID of the session.
+ blockedByPids:
+ type: array
+ items:
+ type: string
+ title: blocked_by_pids
+ description: PIDs of sessions blocking this session.
+ query:
+ type: string
+ title: query
+ description: Current query being executed.
+ state:
+ type: string
+ title: state
+ description: Session state (active, idle, etc.).
+ nullable: true
+ waitEventType:
+ type: string
+ title: wait_event_type
+ description: Wait event type if session is waiting.
+ nullable: true
+ waitEvent:
+ type: string
+ title: wait_event
+ description: Specific wait event if session is waiting.
+ nullable: true
+ datname:
+ type: string
+ title: datname
+ description: Database name.
+ nullable: true
+ usename:
+ type: string
+ title: usename
+ description: User name.
+ nullable: true
+ applicationName:
+ type: string
+ title: application_name
+ description: Application name.
+ clientAddr:
+ type: string
+ title: client_addr
+ description: Client IP address.
+ nullable: true
+ clientPort:
+ type: string
+ title: client_port
+ description: Client port number.
+ nullable: true
+ backendStart:
+ title: backend_start
+ description: When the backend process started.
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ xactStart:
+ title: xact_start
+ description: When the current transaction started.
+ nullable: true
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ queryStart:
+ title: query_start
+ description: When the current query started.
+ nullable: true
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ title: Session
+ additionalProperties: false
+ description: PostgreSQL session information read from `pg_stat_activity`.
+ bytebase.v1.TessellationConfig:
+ type: object
+ properties:
+ scheme:
+ type: string
+ title: scheme
+ description: Tessellation scheme (e.g., "GEOMETRY_GRID", "GEOGRAPHY_GRID", "GEOMETRY_AUTO_GRID")
+ gridLevels:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.GridLevel'
+ title: grid_levels
+ description: Grid levels and densities for multi-level tessellation
+ cellsPerObject:
+ type: integer
+ title: cells_per_object
+ format: int32
+ description: Number of cells per object (1-8192 for SQL Server)
+ boundingBox:
+ title: bounding_box
+ description: Bounding box for GEOMETRY tessellation (not used for GEOGRAPHY)
+ $ref: '#/components/schemas/bytebase.v1.BoundingBox'
+ title: TessellationConfig
+ additionalProperties: false
+ description: TessellationConfig defines tessellation parameters for spatial indexes.
+ bytebase.v1.TestIdentityProviderRequest:
+ type: object
+ allOf:
+ - properties:
+ identityProvider:
+ title: identity_provider
+ description: The identity provider to test connection including uncreated.
+ $ref: '#/components/schemas/bytebase.v1.IdentityProvider'
+ - oneOf:
+ - properties:
+ oauth2Context:
+ title: oauth2_context
+ $ref: '#/components/schemas/bytebase.v1.OAuth2IdentityProviderTestRequestContext'
+ title: oauth2_context
+ required:
+ - oauth2Context
+ - properties:
+ oidcContext:
+ title: oidc_context
+ description: OIDC authentication context for test connection.
+ $ref: '#/components/schemas/bytebase.v1.OIDCIdentityProviderTestRequestContext'
+ title: oidc_context
+ required:
+ - oidcContext
+ title: TestIdentityProviderRequest
+ additionalProperties: false
+ bytebase.v1.TestIdentityProviderResponse:
+ type: object
+ properties:
+ claims:
+ type: object
+ title: claims
+ additionalProperties:
+ type: string
+ title: value
+ description: The map of claims returned by the identity provider.
+ userInfo:
+ type: object
+ title: user_info
+ additionalProperties:
+ type: string
+ title: value
+ description: The matched user info from the claims.
+ title: TestIdentityProviderResponse
+ additionalProperties: false
+ bytebase.v1.TestIdentityProviderResponse.ClaimsEntry:
+ type: object
+ properties:
+ key:
+ type: string
+ title: key
+ value:
+ type: string
+ title: value
+ title: ClaimsEntry
+ additionalProperties: false
+ bytebase.v1.TestIdentityProviderResponse.UserInfoEntry:
+ type: object
+ properties:
+ key:
+ type: string
+ title: key
+ value:
+ type: string
+ title: value
+ title: UserInfoEntry
+ additionalProperties: false
+ bytebase.v1.TestWebhookRequest:
+ type: object
+ properties:
+ project:
+ type: string
+ title: project
+ description: |-
+ The name of the project which owns the webhook to test.
+ Format: projects/{project}
+ webhook:
+ title: webhook
+ description: The webhook to test. Identified by its url.
+ $ref: '#/components/schemas/bytebase.v1.Webhook'
+ title: TestWebhookRequest
+ additionalProperties: false
+ bytebase.v1.TestWebhookResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ title: error
+ description: The result of the test, empty if the test is successful.
+ title: TestWebhookResponse
+ additionalProperties: false
+ bytebase.v1.TriggerMetadata:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: The name is the name of the trigger.
+ event:
+ type: string
+ title: event
+ description: |-
+ The event is the event of the trigger, such as INSERT, UPDATE, DELETE,
+ TRUNCATE.
+ timing:
+ type: string
+ title: timing
+ description: The timing is the timing of the trigger, such as BEFORE, AFTER.
+ body:
+ type: string
+ title: body
+ description: The body is the body of the trigger.
+ sqlMode:
+ type: string
+ title: sql_mode
+ description: The SQL mode setting for the trigger.
+ characterSetClient:
+ type: string
+ title: character_set_client
+ description: The character set used by the client creating the trigger.
+ collationConnection:
+ type: string
+ title: collation_connection
+ description: The collation used for the connection when creating the trigger.
+ comment:
+ type: string
+ title: comment
+ description: The comment describing the trigger.
+ skipDump:
+ type: boolean
+ title: skip_dump
+ description: Whether to skip this trigger during schema dump operations.
+ title: TriggerMetadata
+ additionalProperties: false
+ bytebase.v1.UndeleteInstanceRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the deleted instance.
+ Format: instances/{instance}
+ title: UndeleteInstanceRequest
+ additionalProperties: false
+ bytebase.v1.UndeleteProjectRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the deleted project.
+ Format: projects/{project}
+ title: UndeleteProjectRequest
+ additionalProperties: false
+ bytebase.v1.UndeleteReleaseRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the deleted release.
+ Format: projects/{project}/releases/{release}
+ title: UndeleteReleaseRequest
+ additionalProperties: false
+ bytebase.v1.UndeleteUserRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the deleted user.
+ Format: users/{email}
+ title: UndeleteUserRequest
+ additionalProperties: false
+ bytebase.v1.UpdateActuatorInfoRequest:
+ type: object
+ properties:
+ actuator:
+ title: actuator
+ description: The actuator to update.
+ $ref: '#/components/schemas/bytebase.v1.ActuatorInfo'
+ updateMask:
+ title: update_mask
+ description: The list of fields to update.
+ $ref: '#/components/schemas/google.protobuf.FieldMask'
+ allowMissing:
+ type: boolean
+ title: allow_missing
+ description: |-
+ If set to true, and the actuator is not found, a new actuator will be created.
+ In this situation, `update_mask` is ignored.
+ title: UpdateActuatorInfoRequest
+ additionalProperties: false
+ description: Request message for updating actuator information.
+ bytebase.v1.UpdateDataSourceRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the instance to update a data source.
+ Format: instances/{instance}
+ dataSource:
+ title: data_source
+ description: Identified by data source ID.
+ $ref: '#/components/schemas/bytebase.v1.DataSource'
+ updateMask:
+ title: update_mask
+ description: The list of fields to update.
+ $ref: '#/components/schemas/google.protobuf.FieldMask'
+ validateOnly:
+ type: boolean
+ title: validate_only
+ description: Validate only also tests the data source connection.
+ allowMissing:
+ type: boolean
+ title: allow_missing
+ description: |-
+ If set to true, and the data source is not found, a new data source will be created.
+ In this situation, `update_mask` is ignored.
+ title: UpdateDataSourceRequest
+ additionalProperties: false
+ bytebase.v1.UpdateDatabaseCatalogRequest:
+ type: object
+ properties:
+ catalog:
+ title: catalog
+ description: |-
+ The database catalog to update.
+
+ The catalog's `name` field is used to identify the database catalog to update.
+ Format: instances/{instance}/databases/{database}/catalog
+ $ref: '#/components/schemas/bytebase.v1.DatabaseCatalog'
+ allowMissing:
+ type: boolean
+ title: allow_missing
+ description: |-
+ If set to true, and the database catalog is not found, a new database catalog will be created.
+ In this situation, `update_mask` is ignored.
+ title: UpdateDatabaseCatalogRequest
+ additionalProperties: false
+ description: Request message for updating a database catalog.
+ bytebase.v1.UpdateDatabaseGroupRequest:
+ type: object
+ properties:
+ databaseGroup:
+ title: database_group
+ description: |-
+ The database group to update.
+
+ The database group's `name` field is used to identify the database group to update.
+ Format: projects/{project}/databaseGroups/{databaseGroup}
+ $ref: '#/components/schemas/bytebase.v1.DatabaseGroup'
+ updateMask:
+ title: update_mask
+ description: The list of fields to update.
+ $ref: '#/components/schemas/google.protobuf.FieldMask'
+ allowMissing:
+ type: boolean
+ title: allow_missing
+ description: |-
+ If set to true, and the database group is not found, a new database group will be created.
+ In this situation, `update_mask` is ignored.
+ title: UpdateDatabaseGroupRequest
+ additionalProperties: false
+ description: Request message for updating a database group.
+ bytebase.v1.UpdateDatabaseRequest:
+ type: object
+ properties:
+ database:
+ title: database
+ description: |-
+ The database to update.
+
+ The database's `name` field is used to identify the database to update.
+ Format: instances/{instance}/databases/{database}
+ $ref: '#/components/schemas/bytebase.v1.Database'
+ updateMask:
+ title: update_mask
+ description: The list of fields to update.
+ $ref: '#/components/schemas/google.protobuf.FieldMask'
+ allowMissing:
+ type: boolean
+ title: allow_missing
+ description: |-
+ If set to true, and the database is not found, a new database will be created.
+ In this situation, `update_mask` is ignored.
+ title: UpdateDatabaseRequest
+ additionalProperties: false
+ bytebase.v1.UpdateEmailRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the user whose email to update.
+ Format: users/{email}
+ Note: This is the current (old) email address. The new email is specified in the 'email' field.
+ email:
+ type: string
+ title: email
+ description: The new email address.
+ title: UpdateEmailRequest
+ additionalProperties: false
+ bytebase.v1.UpdateGroupRequest:
+ type: object
+ properties:
+ group:
+ title: group
+ description: |-
+ The group to update.
+
+ The group's `name` field is used to identify the group to update.
+ Format: groups/{email}
+ $ref: '#/components/schemas/bytebase.v1.Group'
+ updateMask:
+ title: update_mask
+ description: The list of fields to update.
+ $ref: '#/components/schemas/google.protobuf.FieldMask'
+ allowMissing:
+ type: boolean
+ title: allow_missing
+ description: |-
+ If set to true, and the group is not found, a new group will be created.
+ In this situation, `update_mask` is ignored.
+ title: UpdateGroupRequest
+ additionalProperties: false
+ description: Request message for updating a group.
+ bytebase.v1.UpdateIdentityProviderRequest:
+ type: object
+ properties:
+ identityProvider:
+ title: identity_provider
+ description: |-
+ The identity provider to update.
+
+ The identity provider's `name` field is used to identify the identity provider to update.
+ Format: idps/{identity_provider}
+ $ref: '#/components/schemas/bytebase.v1.IdentityProvider'
+ updateMask:
+ title: update_mask
+ description: The list of fields to update.
+ $ref: '#/components/schemas/google.protobuf.FieldMask'
+ allowMissing:
+ type: boolean
+ title: allow_missing
+ description: |-
+ If set to true, and the identity provider is not found, a new identity provider will be created.
+ In this situation, `update_mask` is ignored.
+ title: UpdateIdentityProviderRequest
+ additionalProperties: false
+ bytebase.v1.UpdateInstanceRequest:
+ type: object
+ properties:
+ instance:
+ title: instance
+ description: |-
+ The instance to update.
+
+ The instance's `name` field is used to identify the instance to update.
+ Format: instances/{instance}
+ $ref: '#/components/schemas/bytebase.v1.Instance'
+ updateMask:
+ title: update_mask
+ description: The list of fields to update.
+ $ref: '#/components/schemas/google.protobuf.FieldMask'
+ allowMissing:
+ type: boolean
+ title: allow_missing
+ description: |-
+ If set to true, and the instance is not found, a new instance will be created.
+ In this situation, `update_mask` is ignored.
+ title: UpdateInstanceRequest
+ additionalProperties: false
+ bytebase.v1.UpdateIssueCommentRequest:
+ type: object
+ properties:
+ parent:
+ type: string
+ title: parent
+ description: |-
+ The issue name
+ Format: projects/{project}/issues/{issue}
+ issueComment:
+ title: issue_comment
+ description: The comment to update.
+ $ref: '#/components/schemas/bytebase.v1.IssueComment'
+ updateMask:
+ title: update_mask
+ description: The list of fields to update.
+ $ref: '#/components/schemas/google.protobuf.FieldMask'
+ allowMissing:
+ type: boolean
+ title: allow_missing
+ description: |-
+ If set to true, and the issue comment is not found, a new issue comment will be created.
+ In this situation, `update_mask` is ignored.
+ title: UpdateIssueCommentRequest
+ additionalProperties: false
+ bytebase.v1.UpdateIssueRequest:
+ type: object
+ properties:
+ issue:
+ title: issue
+ description: |-
+ The issue to update.
+
+ The issue's `name` field is used to identify the issue to update.
+ Format: projects/{project}/issues/{issue}
+ $ref: '#/components/schemas/bytebase.v1.Issue'
+ updateMask:
+ title: update_mask
+ description: The list of fields to update.
+ $ref: '#/components/schemas/google.protobuf.FieldMask'
+ allowMissing:
+ type: boolean
+ title: allow_missing
+ description: |-
+ If set to true, and the issue is not found, a new issue will be created.
+ In this situation, `update_mask` is ignored.
+ title: UpdateIssueRequest
+ additionalProperties: false
+ bytebase.v1.UpdatePlanRequest:
+ type: object
+ properties:
+ plan:
+ title: plan
+ description: |-
+ The plan to update.
+
+ The plan's `name` field is used to identify the plan to update.
+ Format: projects/{project}/plans/{plan}
+ $ref: '#/components/schemas/bytebase.v1.Plan'
+ updateMask:
+ title: update_mask
+ description: The list of fields to update.
+ $ref: '#/components/schemas/google.protobuf.FieldMask'
+ allowMissing:
+ type: boolean
+ title: allow_missing
+ description: |-
+ If set to true, and the plan is not found, a new plan will be created.
+ In this situation, `update_mask` is ignored.
+ title: UpdatePlanRequest
+ additionalProperties: false
+ bytebase.v1.UpdatePolicyRequest:
+ type: object
+ properties:
+ policy:
+ title: policy
+ description: |-
+ The policy to update.
+
+ The policy's `name` field is used to identify the instance to update.
+ Format: {resource name}/policies/{policy type}
+ Workspace resource name: "".
+ Environment resource name: environments/environment-id.
+ Instance resource name: instances/instance-id.
+ Database resource name: instances/instance-id/databases/database-name.
+ $ref: '#/components/schemas/bytebase.v1.Policy'
+ updateMask:
+ title: update_mask
+ description: The list of fields to update.
+ $ref: '#/components/schemas/google.protobuf.FieldMask'
+ allowMissing:
+ type: boolean
+ title: allow_missing
+ description: |-
+ If set to true, and the policy is not found, a new policy will be created.
+ In this situation, `update_mask` is ignored.
+ title: UpdatePolicyRequest
+ additionalProperties: false
+ bytebase.v1.UpdateProjectRequest:
+ type: object
+ properties:
+ project:
+ title: project
+ description: |-
+ The project to update.
+
+ The project's `name` field is used to identify the project to update.
+ Format: projects/{project}
+ $ref: '#/components/schemas/bytebase.v1.Project'
+ updateMask:
+ title: update_mask
+ description: The list of fields to update.
+ $ref: '#/components/schemas/google.protobuf.FieldMask'
+ allowMissing:
+ type: boolean
+ title: allow_missing
+ description: |-
+ If set to true, and the project is not found, a new project will be created.
+ In this situation, `update_mask` is ignored.
+ title: UpdateProjectRequest
+ additionalProperties: false
+ bytebase.v1.UpdateReleaseRequest:
+ type: object
+ properties:
+ release:
+ title: release
+ description: The release to update.
+ $ref: '#/components/schemas/bytebase.v1.Release'
+ updateMask:
+ title: update_mask
+ description: The list of fields to be updated.
+ $ref: '#/components/schemas/google.protobuf.FieldMask'
+ allowMissing:
+ type: boolean
+ title: allow_missing
+ description: |-
+ If set to true, and the release is not found, a new release will be created.
+ In this situation, `update_mask` is ignored.
+ title: UpdateReleaseRequest
+ additionalProperties: false
+ bytebase.v1.UpdateReviewConfigRequest:
+ type: object
+ properties:
+ reviewConfig:
+ title: review_config
+ description: |-
+ The SQL review config to update.
+
+ The name field is used to identify the SQL review config to update.
+ $ref: '#/components/schemas/bytebase.v1.ReviewConfig'
+ updateMask:
+ title: update_mask
+ description: The list of fields to update.
+ $ref: '#/components/schemas/google.protobuf.FieldMask'
+ allowMissing:
+ type: boolean
+ title: allow_missing
+ description: |-
+ If set to true, and the config is not found, a new config will be created.
+ In this situation, `update_mask` is ignored.
+ title: UpdateReviewConfigRequest
+ additionalProperties: false
+ bytebase.v1.UpdateRoleRequest:
+ type: object
+ properties:
+ role:
+ title: role
+ description: The role to update.
+ $ref: '#/components/schemas/bytebase.v1.Role'
+ updateMask:
+ title: update_mask
+ description: The list of fields to update.
+ $ref: '#/components/schemas/google.protobuf.FieldMask'
+ allowMissing:
+ type: boolean
+ title: allow_missing
+ description: |-
+ If set to true, and the role is not found, a new role will be created.
+ In this situation, `update_mask` is ignored.
+ title: UpdateRoleRequest
+ additionalProperties: false
+ bytebase.v1.UpdateSettingRequest:
+ type: object
+ properties:
+ setting:
+ title: setting
+ description: The setting to update.
+ $ref: '#/components/schemas/bytebase.v1.Setting'
+ validateOnly:
+ type: boolean
+ title: validate_only
+ description: |-
+ validate_only is a flag to indicate whether to validate the setting value,
+ server would not persist the setting value if it is true.
+ allowMissing:
+ type: boolean
+ title: allow_missing
+ updateMask:
+ title: update_mask
+ $ref: '#/components/schemas/google.protobuf.FieldMask'
+ title: UpdateSettingRequest
+ additionalProperties: false
+ description: The request message for updating or creating a setting.
+ bytebase.v1.UpdateSheetRequest:
+ type: object
+ properties:
+ sheet:
+ title: sheet
+ description: |-
+ The sheet to update.
+
+ The sheet's `name` field is used to identify the sheet to update.
+ Format: projects/{project}/sheets/{sheet}
+ $ref: '#/components/schemas/bytebase.v1.Sheet'
+ updateMask:
+ title: update_mask
+ description: |-
+ The list of fields to be updated.
+ Fields are specified relative to the sheet.
+ (e.g., `title`, `statement`; *not* `sheet.title` or `sheet.statement`)
+ Only support update the following fields for now:
+ - `title`
+ - `statement`
+ $ref: '#/components/schemas/google.protobuf.FieldMask'
+ allowMissing:
+ type: boolean
+ title: allow_missing
+ description: |-
+ If set to true, and the sheet is not found, a new sheet will be created.
+ In this situation, `update_mask` is ignored.
+ title: UpdateSheetRequest
+ additionalProperties: false
+ bytebase.v1.UpdateSubscriptionRequest:
+ type: object
+ properties:
+ license:
+ type: string
+ title: license
+ allowMissing:
+ type: boolean
+ title: allow_missing
+ description: |-
+ If set to true, and the subscription is not found, a new subscription will be created.
+ In this situation, `update_mask` is ignored.
+ title: UpdateSubscriptionRequest
+ additionalProperties: false
+ bytebase.v1.UpdateUserRequest:
+ type: object
+ properties:
+ user:
+ title: user
+ description: |-
+ The user to update.
+
+ The user's `name` field is used to identify the user to update.
+ Format: users/{email}
+ $ref: '#/components/schemas/bytebase.v1.User'
+ updateMask:
+ title: update_mask
+ description: The list of fields to update.
+ $ref: '#/components/schemas/google.protobuf.FieldMask'
+ otpCode:
+ type: string
+ title: otp_code
+ description: The otp_code is used to verify the user's identity by MFA.
+ nullable: true
+ regenerateTempMfaSecret:
+ type: boolean
+ title: regenerate_temp_mfa_secret
+ description: |-
+ The regenerate_temp_mfa_secret flag means to regenerate temporary MFA secret for user.
+ This is used for MFA setup. The temporary MFA secret and recovery codes will be returned in the response.
+ regenerateRecoveryCodes:
+ type: boolean
+ title: regenerate_recovery_codes
+ description: The regenerate_recovery_codes flag means to regenerate recovery codes for user.
+ allowMissing:
+ type: boolean
+ title: allow_missing
+ description: |-
+ If set to true, and the user is not found, a new user will be created.
+ In this situation, `update_mask` is ignored.
+ title: UpdateUserRequest
+ additionalProperties: false
+ bytebase.v1.UpdateWebhookRequest:
+ type: object
+ properties:
+ webhook:
+ title: webhook
+ description: The webhook to modify.
+ $ref: '#/components/schemas/bytebase.v1.Webhook'
+ updateMask:
+ title: update_mask
+ description: The list of fields to update.
+ $ref: '#/components/schemas/google.protobuf.FieldMask'
+ allowMissing:
+ type: boolean
+ title: allow_missing
+ description: |-
+ If set to true, and the webhook is not found, a new webhook will be created.
+ In this situation, `update_mask` is ignored.
+ title: UpdateWebhookRequest
+ additionalProperties: false
+ bytebase.v1.UpdateWorksheetOrganizerRequest:
+ type: object
+ properties:
+ organizer:
+ title: organizer
+ description: |-
+ The organizer to update.
+
+ The organizer's `worksheet` field is used to identify the worksheet.
+ Format: worksheets/{worksheet}
+ $ref: '#/components/schemas/bytebase.v1.WorksheetOrganizer'
+ updateMask:
+ title: update_mask
+ description: |-
+ The list of fields to be updated.
+ Fields are specified relative to the worksheet organizer.
+ Only support update the following fields for now:
+ - `starred`
+ $ref: '#/components/schemas/google.protobuf.FieldMask'
+ allowMissing:
+ type: boolean
+ title: allow_missing
+ description: |-
+ If set to true, and the worksheet organizer is not found, a new worksheet organizer will be created.
+ In this situation, `update_mask` is ignored.
+ title: UpdateWorksheetOrganizerRequest
+ additionalProperties: false
+ bytebase.v1.UpdateWorksheetRequest:
+ type: object
+ properties:
+ worksheet:
+ title: worksheet
+ description: |-
+ The worksheet to update.
+
+ The worksheet's `name` field is used to identify the worksheet to update.
+ Format: worksheets/{worksheet}
+ $ref: '#/components/schemas/bytebase.v1.Worksheet'
+ updateMask:
+ title: update_mask
+ description: |-
+ The list of fields to be updated.
+ Fields are specified relative to the worksheet.
+ (e.g., `title`, `statement`; *not* `worksheet.title` or `worksheet.statement`)
+ Only support update the following fields for now:
+ - `title`
+ - `statement`
+ - `starred`
+ - `visibility`
+ $ref: '#/components/schemas/google.protobuf.FieldMask'
+ title: UpdateWorksheetRequest
+ additionalProperties: false
+ bytebase.v1.User:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the user.
+ Format: users/{email}
+ state:
+ title: state
+ description: The lifecycle state of the user account.
+ $ref: '#/components/schemas/bytebase.v1.State'
+ email:
+ type: string
+ title: email
+ description: The email address of the user, used for login and notifications.
+ title:
+ type: string
+ title: title
+ maxLength: 200
+ description: The display title or full name of the user.
+ userType:
+ title: user_type
+ description: The type of user account.
+ $ref: '#/components/schemas/bytebase.v1.UserType'
+ password:
+ type: string
+ title: password
+ description: The password for authentication. Only used during user creation or password updates.
+ serviceKey:
+ type: string
+ title: service_key
+ description: The service key for service account authentication. Only used for service accounts.
+ mfaEnabled:
+ type: boolean
+ title: mfa_enabled
+ description: The mfa_enabled flag means if the user has enabled MFA.
+ tempOtpSecret:
+ type: string
+ title: temp_otp_secret
+ description: Temporary OTP secret used during MFA setup and regeneration.
+ tempRecoveryCodes:
+ type: array
+ items:
+ type: string
+ title: temp_recovery_codes
+ description: Temporary recovery codes used during MFA setup and regeneration.
+ tempOtpSecretCreatedTime:
+ title: temp_otp_secret_created_time
+ description: Timestamp when temp_otp_secret was created. Used by frontend to show countdown timer.
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ phone:
+ type: string
+ title: phone
+ description: |-
+ Should be a valid E.164 compliant phone number.
+ Could be empty.
+ profile:
+ title: profile
+ description: User profile metadata.
+ $ref: '#/components/schemas/bytebase.v1.User.Profile'
+ groups:
+ type: array
+ items:
+ type: string
+ title: groups
+ description: |-
+ The groups for the user.
+ Format: groups/{email}
+ workloadIdentityConfig:
+ title: workload_identity_config
+ description: Workload Identity configuration (only for WORKLOAD_IDENTITY type)
+ $ref: '#/components/schemas/bytebase.v1.WorkloadIdentityConfig'
+ title: User
+ additionalProperties: false
+ bytebase.v1.User.Profile:
+ type: object
+ properties:
+ lastLoginTime:
+ title: last_login_time
+ description: The last time the user successfully logged in.
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ lastChangePasswordTime:
+ title: last_change_password_time
+ description: The last time the user changed their password.
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ source:
+ type: string
+ title: source
+ description: source means where the user comes from. For now we support Entra ID SCIM sync, so the source could be Entra ID.
+ title: Profile
+ additionalProperties: false
+ bytebase.v1.UserType:
+ type: string
+ title: UserType
+ enum:
+ - USER_TYPE_UNSPECIFIED
+ - USER
+ - SYSTEM_BOT
+ - SERVICE_ACCOUNT
+ - WORKLOAD_IDENTITY
+ bytebase.v1.VCSType:
+ type: string
+ title: VCSType
+ enum:
+ - VCS_TYPE_UNSPECIFIED
+ - GITHUB
+ - GITLAB
+ - BITBUCKET
+ - AZURE_DEVOPS
+ description: Version control system type.
+ bytebase.v1.ViewMetadata:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: The name is the name of a view.
+ definition:
+ type: string
+ title: definition
+ description: The definition is the definition of a view.
+ comment:
+ type: string
+ title: comment
+ description: The comment is the comment of a view.
+ dependencyColumns:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.DependencyColumn'
+ title: dependency_columns
+ description: The dependency_columns is the list of dependency columns of a view.
+ columns:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.ColumnMetadata'
+ title: columns
+ description: The columns is the ordered list of columns in a table.
+ triggers:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.TriggerMetadata'
+ title: triggers
+ description: The triggers is the list of triggers in a view.
+ skipDump:
+ type: boolean
+ title: skip_dump
+ title: ViewMetadata
+ additionalProperties: false
+ description: ViewMetadata is the metadata for views.
+ bytebase.v1.Webhook:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ name is the name of the webhook, generated by the server.
+ format: projects/{project}/webhooks/{webhook}
+ type:
+ title: type
+ description: |-
+ Webhook integration type.
+ type is the type of the webhook.
+ $ref: '#/components/schemas/bytebase.v1.WebhookType'
+ title:
+ type: string
+ title: title
+ description: title is the title of the webhook.
+ url:
+ type: string
+ title: url
+ description: url is the url of the webhook, should be unique within the project.
+ directMessage:
+ type: boolean
+ title: direct_message
+ description: |-
+ if direct_message is set, the notification is sent directly
+ to the persons and url will be ignored.
+ IM integration setting should be set for this function to work.
+ notificationTypes:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.Activity.Type'
+ title: notification_types
+ description: |-
+ notification_types is the list of activities types that the webhook is interested in.
+ Bytebase will only send notifications to the webhook if the activity type is in the list.
+ It should not be empty, and should be a subset of the following:
+ - ISSUE_CREATE
+ - ISSUE_COMMENT_CREATE
+ - ISSUE_FIELD_UPDATE
+ - ISSUE_STATUS_UPDATE
+ - ISSUE_APPROVAL_NOTIFY
+ - ISSUE_PIPELINE_STAGE_STATUS_UPDATE
+ - ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE
+ - NOTIFY_ISSUE_APPROVED
+ - NOTIFY_PIPELINE_ROLLOUT
+ title: Webhook
+ additionalProperties: false
+ bytebase.v1.WebhookType:
+ type: string
+ title: WebhookType
+ enum:
+ - WEBHOOK_TYPE_UNSPECIFIED
+ - SLACK
+ - DISCORD
+ - TEAMS
+ - DINGTALK
+ - FEISHU
+ - WECOM
+ - LARK
+ description: Webhook integration type.
+ bytebase.v1.WorkloadIdentityConfig:
+ type: object
+ properties:
+ providerType:
+ title: provider_type
+ description: Platform type (currently only GITHUB is supported)
+ $ref: '#/components/schemas/bytebase.v1.WorkloadIdentityConfig.ProviderType'
+ issuerUrl:
+ type: string
+ title: issuer_url
+ description: OIDC Issuer URL (auto-filled based on provider_type, can be overridden)
+ allowedAudiences:
+ type: array
+ items:
+ type: string
+ title: allowed_audiences
+ description: Allowed audiences for token validation
+ subjectPattern:
+ type: string
+ title: subject_pattern
+ description: Subject pattern to match (e.g., "repo:owner/repo:ref:refs/heads/main")
+ title: WorkloadIdentityConfig
+ additionalProperties: false
+ description: WorkloadIdentityConfig for API layer
+ bytebase.v1.WorkloadIdentityConfig.ProviderType:
+ type: string
+ title: ProviderType
+ enum:
+ - PROVIDER_TYPE_UNSPECIFIED
+ - GITHUB
+ description: ProviderType identifies the CI/CD platform.
+ bytebase.v1.Worksheet:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the worksheet resource, generated by the server.
+ Canonical parent is project.
+ Format: worksheets/{worksheet}
+ project:
+ type: string
+ title: project
+ description: |-
+ The project resource name.
+ Format: projects/{project}
+ database:
+ type: string
+ title: database
+ description: |-
+ The database resource name.
+ Format: instances/{instance}/databases/{database}
+ If the database parent doesn't exist, the database field is empty.
+ title:
+ type: string
+ title: title
+ maxLength: 200
+ description: The title of the worksheet.
+ creator:
+ type: string
+ title: creator
+ description: |-
+ The creator of the Worksheet.
+ Format: users/{email}
+ createTime:
+ title: create_time
+ description: The create time of the worksheet.
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ updateTime:
+ title: update_time
+ description: The last update time of the worksheet.
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ content:
+ type: string
+ title: content
+ format: byte
+ description: |-
+ The content of the worksheet.
+ By default, it will be cut off in SearchWorksheet() method. If it doesn't match the `content_size`, you can
+ use GetWorksheet() request to retrieve the full content.
+ contentSize:
+ type:
+ - integer
+ - string
+ title: content_size
+ format: int64
+ description: content_size is the full size of the content, may not match the size of the `content` field.
+ visibility:
+ title: visibility
+ $ref: '#/components/schemas/bytebase.v1.Worksheet.Visibility'
+ starred:
+ type: boolean
+ title: starred
+ description: starred indicates whether the worksheet is starred by the current authenticated user.
+ folders:
+ type: array
+ items:
+ type: string
+ title: folders
+ title: Worksheet
+ additionalProperties: false
+ bytebase.v1.Worksheet.Visibility:
+ type: string
+ title: Visibility
+ enum:
+ - VISIBILITY_UNSPECIFIED
+ - PROJECT_READ
+ - PROJECT_WRITE
+ - PRIVATE
+ bytebase.v1.WorksheetOrganizer:
+ type: object
+ properties:
+ worksheet:
+ type: string
+ title: worksheet
+ description: |-
+ The name of the worksheet.
+ Format: worksheets/{worksheet}
+ starred:
+ type: boolean
+ title: starred
+ description: starred means if the worksheet is starred.
+ folders:
+ type: array
+ items:
+ type: string
+ title: folders
+ title: WorksheetOrganizer
+ additionalProperties: false
+ bytebase.v1.WorkspaceApprovalSetting:
+ type: object
+ properties:
+ rules:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.WorkspaceApprovalSetting.Rule'
+ title: rules
+ title: WorkspaceApprovalSetting
+ additionalProperties: false
+ bytebase.v1.WorkspaceApprovalSetting.Rule:
+ type: object
+ properties:
+ template:
+ title: template
+ $ref: '#/components/schemas/bytebase.v1.ApprovalTemplate'
+ condition:
+ title: condition
+ description: |-
+ The condition that is associated with the rule.
+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+ The `source` field filters which rules apply. The `condition` field then evaluates with full context.
+
+ All supported variables:
+ statement.affected_rows: affected row count in the DDL/DML, support "==", "!=", "<", "<=", ">", ">=" operations.
+ statement.table_rows: table row count number, support "==", "!=", "<", "<=", ">", ">=" operations.
+ resource.environment_id: the environment resource id, support "==", "!=", "in [xx]", "!(in [xx])" operations.
+ resource.project_id: the project resource id, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.
+ resource.db_engine: the database engine type, support "==", "!=", "in [xx]", "!(in [xx])" operations. Check the Engine enum for values.
+ statement.sql_type: the SQL type, support "==", "!=", "in [xx]", "!(in [xx])" operations.
+ resource.database_name: the database name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.
+ resource.schema_name: the schema name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.
+ resource.table_name: the table name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.
+ statement.text: the SQL statement, support "contains()", "matches()", "startsWith()", "endsWith()" operations.
+ request.expiration_days: the role expiration days for the request, support "==", "!=", "<", "<=", ">", ">=" operations.
+ request.role: the request role full name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.
+
+ When source is CHANGE_DATABASE, support: statement.*, resource.* (excluding request.*)
+ When source is CREATE_DATABASE, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name
+ When source is EXPORT_DATA, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_name
+ When source is REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role
+
+ For examples:
+ resource.environment_id == "prod" && statement.affected_rows >= 100
+ resource.table_name.matches("sensitive_.*") && resource.db_engine == "MYSQL"
+ $ref: '#/components/schemas/google.type.Expr'
+ source:
+ title: source
+ $ref: '#/components/schemas/bytebase.v1.WorkspaceApprovalSetting.Rule.Source'
+ title: Rule
+ additionalProperties: false
+ bytebase.v1.WorkspaceApprovalSetting.Rule.Source:
+ type: string
+ title: Source
+ enum:
+ - SOURCE_UNSPECIFIED
+ - CHANGE_DATABASE
+ - CREATE_DATABASE
+ - EXPORT_DATA
+ - REQUEST_ROLE
+ bytebase.v1.WorkspaceProfileSetting:
+ type: object
+ properties:
+ externalUrl:
+ type: string
+ title: external_url
+ description: The external URL is used for sso authentication callback.
+ disallowSignup:
+ type: boolean
+ title: disallow_signup
+ description: Disallow self-service signup, users can only be invited by the owner.
+ require2fa:
+ type: boolean
+ title: require_2fa
+ description: Require 2FA for all users.
+ tokenDuration:
+ title: token_duration
+ description: The duration for token.
+ $ref: '#/components/schemas/google.protobuf.Duration'
+ announcement:
+ title: announcement
+ description: The setting of custom announcement
+ $ref: '#/components/schemas/bytebase.v1.Announcement'
+ maximumRoleExpiration:
+ title: maximum_role_expiration
+ description: The max duration for role expired.
+ $ref: '#/components/schemas/google.protobuf.Duration'
+ domains:
+ type: array
+ items:
+ type: string
+ title: domains
+ description: The workspace domain, e.g., bytebase.com.
+ enforceIdentityDomain:
+ type: boolean
+ title: enforce_identity_domain
+ description: Only user and group from the domains can be created and login.
+ databaseChangeMode:
+ title: database_change_mode
+ description: The workspace database change mode.
+ $ref: '#/components/schemas/bytebase.v1.DatabaseChangeMode'
+ disallowPasswordSignin:
+ type: boolean
+ title: disallow_password_signin
+ description: Whether to disallow password signin. (Except workspace admins)
+ enableMetricCollection:
+ type: boolean
+ title: enable_metric_collection
+ description: Whether to enable metric collection for the workspace.
+ inactiveSessionTimeout:
+ title: inactive_session_timeout
+ description: The session expiration time if not activity detected for the user. Value <= 0 means no limit.
+ $ref: '#/components/schemas/google.protobuf.Duration'
+ enableAuditLogStdout:
+ type: boolean
+ title: enable_audit_log_stdout
+ description: |-
+ Whether to enable audit logging to stdout in structured JSON format.
+ Requires TEAM or ENTERPRISE license.
+ watermark:
+ type: boolean
+ title: watermark
+ description: |-
+ Whether to display watermark on pages.
+ Requires ENTERPRISE license.
+ directorySyncToken:
+ type: string
+ title: directory_sync_token
+ description: The token for directory sync authentication.
+ brandingLogo:
+ type: string
+ title: branding_logo
+ description: The branding logo as a data URI (e.g. data:image/png;base64,...).
+ passwordRestriction:
+ title: password_restriction
+ description: Password restriction settings.
+ $ref: '#/components/schemas/bytebase.v1.WorkspaceProfileSetting.PasswordRestriction'
+ title: WorkspaceProfileSetting
+ additionalProperties: false
+ bytebase.v1.WorkspaceProfileSetting.PasswordRestriction:
+ type: object
+ properties:
+ minLength:
+ type: integer
+ title: min_length
+ format: int32
+ description: min_length is the minimum length for password, should no less than 8.
+ requireNumber:
+ type: boolean
+ title: require_number
+ description: require_number requires the password must contains at least one number.
+ requireLetter:
+ type: boolean
+ title: require_letter
+ description: require_letter requires the password must contains at least one letter, regardless of upper case or lower case
+ requireUppercaseLetter:
+ type: boolean
+ title: require_uppercase_letter
+ description: require_uppercase_letter requires the password must contains at least one upper case letter.
+ requireSpecialCharacter:
+ type: boolean
+ title: require_special_character
+ description: require_special_character requires the password must contains at least one special character.
+ requireResetPasswordForFirstLogin:
+ type: boolean
+ title: require_reset_password_for_first_login
+ description: require_reset_password_for_first_login requires users to reset their password after the 1st login.
+ passwordRotation:
+ title: password_rotation
+ description: password_rotation requires users to reset their password after the duration.
+ $ref: '#/components/schemas/google.protobuf.Duration'
+ title: PasswordRestriction
+ additionalProperties: false
+ connect-protocol-version:
+ type: number
+ title: Connect-Protocol-Version
+ enum:
+ - 1
+ description: Define the version of the Connect protocol
+ const: 1
+ connect-timeout-header:
+ type: number
+ title: Connect-Timeout-Ms
+ description: Define the timeout, in ms
+ connect.error:
+ type: object
+ properties:
+ code:
+ type: string
+ examples:
+ - not_found
+ enum:
+ - canceled
+ - unknown
+ - invalid_argument
+ - deadline_exceeded
+ - not_found
+ - already_exists
+ - permission_denied
+ - resource_exhausted
+ - failed_precondition
+ - aborted
+ - out_of_range
+ - unimplemented
+ - internal
+ - unavailable
+ - data_loss
+ - unauthenticated
+ description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
+ message:
+ type: string
+ description: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
+ details:
+ type: array
+ items:
+ $ref: '#/components/schemas/connect.error_details.Any'
+ description: A list of messages that carry the error details. There is no limit on the number of messages.
+ title: Connect Error
+ additionalProperties: true
+ description: 'Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation'
+ connect.error_details.Any:
+ type: object
+ properties:
+ type:
+ type: string
+ description: 'A URL that acts as a globally unique identifier for the type of the serialized message. For example: `type.googleapis.com/google.rpc.ErrorInfo`. This is used to determine the schema of the data in the `value` field and is the discriminator for the `debug` field.'
+ value:
+ type: string
+ format: binary
+ description: The Protobuf message, serialized as bytes and base64-encoded. The specific message type is identified by the `type` field.
+ debug:
+ oneOf:
+ - type: object
+ title: Any
+ additionalProperties: true
+ description: Detailed error information.
+ discriminator:
+ propertyName: type
+ title: Debug
+ description: Deserialized error detail payload. The 'type' field indicates the schema. This field is for easier debugging and should not be relied upon for application logic.
+ additionalProperties: true
+ description: Contains an arbitrary serialized message along with a @type that describes the type of the serialized message, with an additional debug field for ConnectRPC error details.
+ google.api.expr.v1alpha1.Constant:
+ type: object
+ oneOf:
+ - properties:
+ boolValue:
+ type: boolean
+ title: bool_value
+ description: boolean value.
+ title: bool_value
+ required:
+ - boolValue
+ - properties:
+ bytesValue:
+ type: string
+ title: bytes_value
+ format: byte
+ description: bytes value.
+ title: bytes_value
+ required:
+ - bytesValue
+ - properties:
+ doubleValue:
+ type: number
+ title: double_value
+ format: double
+ description: double value.
+ title: double_value
+ required:
+ - doubleValue
+ - properties:
+ durationValue:
+ title: duration_value
+ description: |-
+ protobuf.Duration value.
+
+ Deprecated: duration is no longer considered a builtin cel type.
+ deprecated: true
+ $ref: '#/components/schemas/google.protobuf.Duration'
+ title: duration_value
+ required:
+ - durationValue
+ - properties:
+ int64Value:
+ type:
+ - integer
+ - string
+ title: int64_value
+ format: int64
+ description: int64 value.
+ title: int64_value
+ required:
+ - int64Value
+ - properties:
+ nullValue:
+ title: null_value
+ description: null value.
+ $ref: '#/components/schemas/google.protobuf.NullValue'
+ title: null_value
+ required:
+ - nullValue
+ - properties:
+ stringValue:
+ type: string
+ title: string_value
+ description: string value.
+ title: string_value
+ required:
+ - stringValue
+ - properties:
+ timestampValue:
+ title: timestamp_value
+ description: |-
+ protobuf.Timestamp value.
+
+ Deprecated: timestamp is no longer considered a builtin cel type.
+ deprecated: true
+ $ref: '#/components/schemas/google.protobuf.Timestamp'
+ title: timestamp_value
+ required:
+ - timestampValue
+ - properties:
+ uint64Value:
+ type:
+ - integer
+ - string
+ title: uint64_value
+ format: int64
+ description: uint64 value.
+ title: uint64_value
+ required:
+ - uint64Value
+ title: Constant
+ additionalProperties: false
+ description: |-
+ Represents a primitive literal.
+
+ Named 'Constant' here for backwards compatibility.
+
+ This is similar as the primitives supported in the well-known type
+ `google.protobuf.Value`, but richer so it can represent CEL's full range of
+ primitives.
+
+ Lists and structs are not included as constants as these aggregate types may
+ contain [Expr][google.api.expr.v1alpha1.Expr] elements which require
+ evaluation and are thus not constant.
+
+ Examples of literals include: `"hello"`, `b'bytes'`, `1u`, `4.2`, `-2`,
+ `true`, `null`.
+ google.api.expr.v1alpha1.Expr:
+ type: object
+ allOf:
+ - properties:
+ id:
+ type:
+ - integer
+ - string
+ title: id
+ format: int64
+ description: |-
+ Required. An id assigned to this node by the parser which is unique in a
+ given expression tree. This is used to associate type information and other
+ attributes to a node in the parse tree.
+ - oneOf:
+ - properties:
+ callExpr:
+ title: call_expr
+ description: A call expression, including calls to predefined functions and operators.
+ $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.Call'
+ title: call_expr
+ required:
+ - callExpr
+ - properties:
+ comprehensionExpr:
+ title: comprehension_expr
+ description: A comprehension expression.
+ $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.Comprehension'
+ title: comprehension_expr
+ required:
+ - comprehensionExpr
+ - properties:
+ constExpr:
+ title: const_expr
+ description: A literal expression.
+ $ref: '#/components/schemas/google.api.expr.v1alpha1.Constant'
+ title: const_expr
+ required:
+ - constExpr
+ - properties:
+ identExpr:
+ title: ident_expr
+ description: An identifier expression.
+ $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.Ident'
+ title: ident_expr
+ required:
+ - identExpr
+ - properties:
+ listExpr:
+ title: list_expr
+ description: A list creation expression.
+ $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.CreateList'
+ title: list_expr
+ required:
+ - listExpr
+ - properties:
+ selectExpr:
+ title: select_expr
+ description: A field selection expression, e.g. `request.auth`.
+ $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.Select'
+ title: select_expr
+ required:
+ - selectExpr
+ - properties:
+ structExpr:
+ title: struct_expr
+ description: A map or message creation expression.
+ $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.CreateStruct'
+ title: struct_expr
+ required:
+ - structExpr
+ title: Expr
+ additionalProperties: false
+ description: |-
+ An abstract representation of a common expression.
+
+ Expressions are abstractly represented as a collection of identifiers,
+ select statements, function calls, literals, and comprehensions. All
+ operators with the exception of the '.' operator are modelled as function
+ calls. This makes it easy to represent new operators into the existing AST.
+
+ All references within expressions must resolve to a
+ [Decl][google.api.expr.v1alpha1.Decl] provided at type-check for an
+ expression to be valid. A reference may either be a bare identifier `name` or
+ a qualified identifier `google.api.name`. References may either refer to a
+ value or a function declaration.
+
+ For example, the expression `google.api.name.startsWith('expr')` references
+ the declaration `google.api.name` within a
+ [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression, and the
+ function declaration `startsWith`.
+ google.api.expr.v1alpha1.Expr.Call:
+ type: object
+ properties:
+ target:
+ title: target
+ description: |-
+ The target of an method call-style expression. For example, `x` in
+ `x.f()`.
+ $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'
+ function:
+ type: string
+ title: function
+ description: Required. The name of the function or method being called.
+ args:
+ type: array
+ items:
+ $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'
+ title: args
+ description: The arguments.
+ title: Call
+ additionalProperties: false
+ description: |-
+ A call expression, including calls to predefined functions and operators.
+
+ For example, `value == 10`, `size(map_value)`.
+ google.api.expr.v1alpha1.Expr.Comprehension:
+ type: object
+ properties:
+ iterVar:
+ type: string
+ title: iter_var
+ description: |-
+ The name of the first iteration variable.
+ When the iter_range is a list, this variable is the list element.
+ When the iter_range is a map, this variable is the map entry key.
+ iterVar2:
+ type: string
+ title: iter_var2
+ description: |-
+ The name of the second iteration variable, empty if not set.
+ When the iter_range is a list, this variable is the integer index.
+ When the iter_range is a map, this variable is the map entry value.
+ This field is only set for comprehension v2 macros.
+ iterRange:
+ title: iter_range
+ description: The range over which the comprehension iterates.
+ $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'
+ accuVar:
+ type: string
+ title: accu_var
+ description: The name of the variable used for accumulation of the result.
+ accuInit:
+ title: accu_init
+ description: The initial value of the accumulator.
+ $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'
+ loopCondition:
+ title: loop_condition
+ description: |-
+ An expression which can contain iter_var, iter_var2, and accu_var.
+
+ Returns false when the result has been computed and may be used as
+ a hint to short-circuit the remainder of the comprehension.
+ $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'
+ loopStep:
+ title: loop_step
+ description: |-
+ An expression which can contain iter_var, iter_var2, and accu_var.
+
+ Computes the next value of accu_var.
+ $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'
+ result:
+ title: result
+ description: |-
+ An expression which can contain accu_var.
+
+ Computes the result.
+ $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'
+ title: Comprehension
+ additionalProperties: false
+ description: |-
+ A comprehension expression applied to a list or map.
+
+ Comprehensions are not part of the core syntax, but enabled with macros.
+ A macro matches a specific call signature within a parsed AST and replaces
+ the call with an alternate AST block. Macro expansion happens at parse
+ time.
+
+ The following macros are supported within CEL:
+
+ Aggregate type macros may be applied to all elements in a list or all keys
+ in a map:
+
+ * `all`, `exists`, `exists_one` - test a predicate expression against
+ the inputs and return `true` if the predicate is satisfied for all,
+ any, or only one value `list.all(x, x < 10)`.
+ * `filter` - test a predicate expression against the inputs and return
+ the subset of elements which satisfy the predicate:
+ `payments.filter(p, p > 1000)`.
+ * `map` - apply an expression to all elements in the input and return the
+ output aggregate type: `[1, 2, 3].map(i, i * i)`.
+
+ The `has(m.x)` macro tests whether the property `x` is present in struct
+ `m`. The semantics of this macro depend on the type of `m`. For proto2
+ messages `has(m.x)` is defined as 'defined, but not set`. For proto3, the
+ macro tests whether the property is set to its default. For map and struct
+ types, the macro tests whether the property `x` is defined on `m`.
+
+ Comprehensions for the standard environment macros evaluation can be best
+ visualized as the following pseudocode:
+
+ ```
+ let `accu_var` = `accu_init`
+ for (let `iter_var` in `iter_range`) {
+ if (!`loop_condition`) {
+ break
+ }
+ `accu_var` = `loop_step`
+ }
+ return `result`
+ ```
+
+ Comprehensions for the optional V2 macros which support map-to-map
+ translation differ slightly from the standard environment macros in that
+ they expose both the key or index in addition to the value for each list
+ or map entry:
+
+ ```
+ let `accu_var` = `accu_init`
+ for (let `iter_var`, `iter_var2` in `iter_range`) {
+ if (!`loop_condition`) {
+ break
+ }
+ `accu_var` = `loop_step`
+ }
+ return `result`
+ ```
+ google.api.expr.v1alpha1.Expr.CreateList:
+ type: object
+ properties:
+ elements:
+ type: array
+ items:
+ $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'
+ title: elements
+ description: The elements part of the list.
+ optionalIndices:
+ type: array
+ items:
+ type: integer
+ format: int32
+ title: optional_indices
+ description: |-
+ The indices within the elements list which are marked as optional
+ elements.
+
+ When an optional-typed value is present, the value it contains
+ is included in the list. If the optional-typed value is absent, the list
+ element is omitted from the CreateList result.
+ title: CreateList
+ additionalProperties: false
+ description: |-
+ A list creation expression.
+
+ Lists may either be homogenous, e.g. `[1, 2, 3]`, or heterogeneous, e.g.
+ `dyn([1, 'hello', 2.0])`
+ google.api.expr.v1alpha1.Expr.CreateStruct:
+ type: object
+ properties:
+ messageName:
+ type: string
+ title: message_name
+ description: |-
+ The type name of the message to be created, empty when creating map
+ literals.
+ entries:
+ type: array
+ items:
+ $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.CreateStruct.Entry'
+ title: entries
+ description: The entries in the creation expression.
+ title: CreateStruct
+ additionalProperties: false
+ description: |-
+ A map or message creation expression.
+
+ Maps are constructed as `{'key_name': 'value'}`. Message construction is
+ similar, but prefixed with a type name and composed of field ids:
+ `types.MyType{field_id: 'value'}`.
+ google.api.expr.v1alpha1.Expr.CreateStruct.Entry:
+ type: object
+ allOf:
+ - properties:
+ id:
+ type:
+ - integer
+ - string
+ title: id
+ format: int64
+ description: |-
+ Required. An id assigned to this node by the parser which is unique
+ in a given expression tree. This is used to associate type
+ information and other attributes to the node.
+ value:
+ title: value
+ description: |-
+ Required. The value assigned to the key.
+
+ If the optional_entry field is true, the expression must resolve to an
+ optional-typed value. If the optional value is present, the key will be
+ set; however, if the optional value is absent, the key will be unset.
+ $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'
+ optionalEntry:
+ type: boolean
+ title: optional_entry
+ description: Whether the key-value pair is optional.
+ - oneOf:
+ - properties:
+ fieldKey:
+ type: string
+ title: field_key
+ description: The field key for a message creator statement.
+ title: field_key
+ required:
+ - fieldKey
+ - properties:
+ mapKey:
+ title: map_key
+ description: The key expression for a map creation statement.
+ $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'
+ title: map_key
+ required:
+ - mapKey
+ title: Entry
+ additionalProperties: false
+ description: Represents an entry.
+ google.api.expr.v1alpha1.Expr.Ident:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ Required. Holds a single, unqualified identifier, possibly preceded by a
+ '.'.
+
+ Qualified names are represented by the
+ [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression.
+ title: Ident
+ additionalProperties: false
+ description: An identifier expression. e.g. `request`.
+ google.api.expr.v1alpha1.Expr.Select:
+ type: object
+ properties:
+ operand:
+ title: operand
+ description: |-
+ Required. The target of the selection expression.
+
+ For example, in the select expression `request.auth`, the `request`
+ portion of the expression is the `operand`.
+ $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'
+ field:
+ type: string
+ title: field
+ description: |-
+ Required. The name of the field to select.
+
+ For example, in the select expression `request.auth`, the `auth` portion
+ of the expression would be the `field`.
+ testOnly:
+ type: boolean
+ title: test_only
+ description: |-
+ Whether the select is to be interpreted as a field presence test.
+
+ This results from the macro `has(request.auth)`.
+ title: Select
+ additionalProperties: false
+ description: A field selection expression. e.g. `request.auth`.
+ google.protobuf.Any:
+ type: object
+ properties:
+ type:
+ type: string
+ value:
+ type: string
+ format: binary
+ additionalProperties: true
+ description: Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.
+ google.protobuf.Duration:
+ type: string
+ format: duration
+ description: |-
+ A Duration represents a signed, fixed-length span of time represented
+ as a count of seconds and fractions of seconds at nanosecond
+ resolution. It is independent of any calendar and concepts like "day"
+ or "month". It is related to Timestamp in that the difference between
+ two Timestamp values is a Duration and it can be added or subtracted
+ from a Timestamp. Range is approximately +-10,000 years.
+
+ # Examples
+
+ Example 1: Compute Duration from two Timestamps in pseudo code.
+
+ Timestamp start = ...;
+ Timestamp end = ...;
+ Duration duration = ...;
+
+ duration.seconds = end.seconds - start.seconds;
+ duration.nanos = end.nanos - start.nanos;
+
+ if (duration.seconds < 0 && duration.nanos > 0) {
+ duration.seconds += 1;
+ duration.nanos -= 1000000000;
+ } else if (duration.seconds > 0 && duration.nanos < 0) {
+ duration.seconds -= 1;
+ duration.nanos += 1000000000;
+ }
+
+ Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
+
+ Timestamp start = ...;
+ Duration duration = ...;
+ Timestamp end = ...;
+
+ end.seconds = start.seconds + duration.seconds;
+ end.nanos = start.nanos + duration.nanos;
+
+ if (end.nanos < 0) {
+ end.seconds -= 1;
+ end.nanos += 1000000000;
+ } else if (end.nanos >= 1000000000) {
+ end.seconds += 1;
+ end.nanos -= 1000000000;
+ }
+
+ Example 3: Compute Duration from datetime.timedelta in Python.
+
+ td = datetime.timedelta(days=3, minutes=10)
+ duration = Duration()
+ duration.FromTimedelta(td)
+
+ # JSON Mapping
+
+ In JSON format, the Duration type is encoded as a string rather than an
+ object, where the string ends in the suffix "s" (indicating seconds) and
+ is preceded by the number of seconds, with nanoseconds expressed as
+ fractional seconds. For example, 3 seconds with 0 nanoseconds should be
+ encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
+ be expressed in JSON format as "3.000000001s", and 3 seconds and 1
+ microsecond should be expressed in JSON format as "3.000001s".
+ google.protobuf.Empty:
+ type: object
+ description: |-
+ A generic empty message that you can re-use to avoid defining duplicated
+ empty messages in your APIs. A typical example is to use it as the request
+ or the response type of an API method. For instance:
+
+ service Foo {
+ rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
+ }
+ google.protobuf.FieldMask:
+ type: string
+ description: |-
+ `FieldMask` represents a set of symbolic field paths, for example:
+
+ paths: "f.a"
+ paths: "f.b.d"
+
+ Here `f` represents a field in some root message, `a` and `b`
+ fields in the message found in `f`, and `d` a field found in the
+ message in `f.b`.
+
+ Field masks are used to specify a subset of fields that should be
+ returned by a get operation or modified by an update operation.
+ Field masks also have a custom JSON encoding (see below).
+
+ # Field Masks in Projections
+
+ When used in the context of a projection, a response message or
+ sub-message is filtered by the API to only contain those fields as
+ specified in the mask. For example, if the mask in the previous
+ example is applied to a response message as follows:
+
+ f {
+ a : 22
+ b {
+ d : 1
+ x : 2
+ }
+ y : 13
+ }
+ z: 8
+
+ The result will not contain specific values for fields x,y and z
+ (their value will be set to the default, and omitted in proto text
+ output):
+
+
+ f {
+ a : 22
+ b {
+ d : 1
+ }
+ }
+
+ A repeated field is not allowed except at the last position of a
+ paths string.
+
+ If a FieldMask object is not present in a get operation, the
+ operation applies to all fields (as if a FieldMask of all fields
+ had been specified).
+
+ Note that a field mask does not necessarily apply to the
+ top-level response message. In case of a REST get operation, the
+ field mask applies directly to the response, but in case of a REST
+ list operation, the mask instead applies to each individual message
+ in the returned resource list. In case of a REST custom method,
+ other definitions may be used. Where the mask applies will be
+ clearly documented together with its declaration in the API. In
+ any case, the effect on the returned resource/resources is required
+ behavior for APIs.
+
+ # Field Masks in Update Operations
+
+ A field mask in update operations specifies which fields of the
+ targeted resource are going to be updated. The API is required
+ to only change the values of the fields as specified in the mask
+ and leave the others untouched. If a resource is passed in to
+ describe the updated values, the API ignores the values of all
+ fields not covered by the mask.
+
+ If a repeated field is specified for an update operation, new values will
+ be appended to the existing repeated field in the target resource. Note that
+ a repeated field is only allowed in the last position of a `paths` string.
+
+ If a sub-message is specified in the last position of the field mask for an
+ update operation, then new value will be merged into the existing sub-message
+ in the target resource.
+
+ For example, given the target message:
+
+ f {
+ b {
+ d: 1
+ x: 2
+ }
+ c: [1]
+ }
+
+ And an update message:
+
+ f {
+ b {
+ d: 10
+ }
+ c: [2]
+ }
+
+ then if the field mask is:
+
+ paths: ["f.b", "f.c"]
+
+ then the result will be:
+
+ f {
+ b {
+ d: 10
+ x: 2
+ }
+ c: [1, 2]
+ }
+
+ An implementation may provide options to override this default behavior for
+ repeated and message fields.
+
+ In order to reset a field's value to the default, the field must
+ be in the mask and set to the default value in the provided resource.
+ Hence, in order to reset all fields of a resource, provide a default
+ instance of the resource and set all fields in the mask, or do
+ not provide a mask as described below.
+
+ If a field mask is not present on update, the operation applies to
+ all fields (as if a field mask of all fields has been specified).
+ Note that in the presence of schema evolution, this may mean that
+ fields the client does not know and has therefore not filled into
+ the request will be reset to their default. If this is unwanted
+ behavior, a specific service may require a client to always specify
+ a field mask, producing an error if not.
+
+ As with get operations, the location of the resource which
+ describes the updated values in the request message depends on the
+ operation kind. In any case, the effect of the field mask is
+ required to be honored by the API.
+
+ ## Considerations for HTTP REST
+
+ The HTTP kind of an update operation which uses a field mask must
+ be set to PATCH instead of PUT in order to satisfy HTTP semantics
+ (PUT must only be used for full updates).
+
+ # JSON Encoding of Field Masks
+
+ In JSON, a field mask is encoded as a single string where paths are
+ separated by a comma. Fields name in each path are converted
+ to/from lower-camel naming conventions.
+
+ As an example, consider the following message declarations:
+
+ message Profile {
+ User user = 1;
+ Photo photo = 2;
+ }
+ message User {
+ string display_name = 1;
+ string address = 2;
+ }
+
+ In proto a field mask for `Profile` may look as such:
+
+ mask {
+ paths: "user.display_name"
+ paths: "photo"
+ }
+
+ In JSON, the same mask is represented as below:
+
+ {
+ mask: "user.displayName,photo"
+ }
+
+ # Field Masks and Oneof Fields
+
+ Field masks treat fields in oneofs just as regular fields. Consider the
+ following message:
+
+ message SampleMessage {
+ oneof test_oneof {
+ string name = 4;
+ SubMessage sub_message = 9;
+ }
+ }
+
+ The field mask can be:
+
+ mask {
+ paths: "name"
+ }
+
+ Or:
+
+ mask {
+ paths: "sub_message"
+ }
+
+ Note that oneof type names ("test_oneof" in this case) cannot be used in
+ paths.
+
+ ## Field Mask Verification
+
+ The implementation of any API method which has a FieldMask type field in the
+ request should verify the included field paths, and return an
+ `INVALID_ARGUMENT` error if any path is unmappable.
+ google.protobuf.ListValue:
+ type: object
+ properties:
+ values:
+ type: array
+ items:
+ $ref: '#/components/schemas/google.protobuf.Value'
+ title: values
+ description: Repeated field of dynamically typed values.
+ title: ListValue
+ additionalProperties: false
+ description: |-
+ `ListValue` is a wrapper around a repeated field of values.
+
+ The JSON representation for `ListValue` is JSON array.
+ google.protobuf.NullValue:
+ type: string
+ title: NullValue
+ enum:
+ - NULL_VALUE
+ description: |-
+ `NullValue` is a singleton enumeration to represent the null value for the
+ `Value` type union.
+
+ The JSON representation for `NullValue` is JSON `null`.
+ google.protobuf.Struct:
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/google.protobuf.Value'
+ description: |-
+ `Struct` represents a structured data value, consisting of fields
+ which map to dynamically typed values. In some languages, `Struct`
+ might be supported by a native representation. For example, in
+ scripting languages like JS a struct is represented as an
+ object. The details of that representation are described together
+ with the proto support for the language.
+
+ The JSON representation for `Struct` is JSON object.
+ google.protobuf.Struct.FieldsEntry:
+ type: object
+ properties:
+ key:
+ type: string
+ title: key
+ value:
+ title: value
+ $ref: '#/components/schemas/google.protobuf.Value'
+ title: FieldsEntry
+ additionalProperties: false
+ google.protobuf.Timestamp:
+ type: string
+ examples:
+ - "2023-01-15T01:30:15.01Z"
+ - "2024-12-25T12:00:00Z"
+ format: date-time
+ description: |-
+ A Timestamp represents a point in time independent of any time zone or local
+ calendar, encoded as a count of seconds and fractions of seconds at
+ nanosecond resolution. The count is relative to an epoch at UTC midnight on
+ January 1, 1970, in the proleptic Gregorian calendar which extends the
+ Gregorian calendar backwards to year one.
+
+ All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
+ second table is needed for interpretation, using a [24-hour linear
+ smear](https://developers.google.com/time/smear).
+
+ The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
+ restricting to that range, we ensure that we can convert to and from [RFC
+ 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
+
+ # Examples
+
+ Example 1: Compute Timestamp from POSIX `time()`.
+
+ Timestamp timestamp;
+ timestamp.set_seconds(time(NULL));
+ timestamp.set_nanos(0);
+
+ Example 2: Compute Timestamp from POSIX `gettimeofday()`.
+
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+
+ Timestamp timestamp;
+ timestamp.set_seconds(tv.tv_sec);
+ timestamp.set_nanos(tv.tv_usec * 1000);
+
+ Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
+
+ FILETIME ft;
+ GetSystemTimeAsFileTime(&ft);
+ UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
+
+ // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
+ // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
+ Timestamp timestamp;
+ timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
+ timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
+
+ Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
+
+ long millis = System.currentTimeMillis();
+
+ Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
+ .setNanos((int) ((millis % 1000) * 1000000)).build();
+
+ Example 5: Compute Timestamp from Java `Instant.now()`.
+
+ Instant now = Instant.now();
+
+ Timestamp timestamp =
+ Timestamp.newBuilder().setSeconds(now.getEpochSecond())
+ .setNanos(now.getNano()).build();
+
+ Example 6: Compute Timestamp from current time in Python.
+
+ timestamp = Timestamp()
+ timestamp.GetCurrentTime()
+
+ # JSON Mapping
+
+ In JSON format, the Timestamp type is encoded as a string in the
+ [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
+ format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
+ where {year} is always expressed using four digits while {month}, {day},
+ {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
+ seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
+ are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
+ is required. A proto3 JSON serializer should always use UTC (as indicated by
+ "Z") when printing the Timestamp type and a proto3 JSON parser should be
+ able to accept both UTC and other timezones (as indicated by an offset).
+
+ For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
+ 01:30 UTC on January 15, 2017.
+
+ In JavaScript, one can convert a Date object to this format using the
+ standard
+ [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
+ method. In Python, a standard `datetime.datetime` object can be converted
+ to this format using
+ [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
+ the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
+ the Joda Time's [`ISODateTimeFormat.dateTime()`](
+ http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
+ ) to obtain a formatter capable of generating timestamps in this format.
+ google.protobuf.Value:
+ oneOf:
+ - type: "null"
+ - type: number
+ - type: string
+ - type: boolean
+ - type: array
+ - type: object
+ additionalProperties: true
+ description: |-
+ `Value` represents a dynamically typed value which can be either
+ null, a number, a string, a boolean, a recursive struct value, or a
+ list of values. A producer of value is expected to set one of these
+ variants. Absence of any variant indicates an error.
+
+ The JSON representation for `Value` is JSON value.
+ google.rpc.Status:
+ type: object
+ properties:
+ code:
+ type: integer
+ title: code
+ format: int32
+ description: |-
+ The status code, which should be an enum value of
+ [google.rpc.Code][google.rpc.Code].
+ message:
+ type: string
+ title: message
+ description: |-
+ A developer-facing error message, which should be in English. Any
+ user-facing error message should be localized and sent in the
+ [google.rpc.Status.details][google.rpc.Status.details] field, or localized
+ by the client.
+ details:
+ type: array
+ items:
+ $ref: '#/components/schemas/google.protobuf.Any'
+ title: details
+ description: |-
+ A list of messages that carry the error details. There is a common set of
+ message types for APIs to use.
+ title: Status
+ additionalProperties: false
+ description: |-
+ The `Status` type defines a logical error model that is suitable for
+ different programming environments, including REST APIs and RPC APIs. It is
+ used by [gRPC](https://github.com/grpc). Each `Status` message contains
+ three pieces of data: error code, error message, and error details.
+
+ You can find out more about this error model and how to work with it in the
+ [API Design Guide](https://cloud.google.com/apis/design/errors).
+ google.type.Expr:
+ type: object
+ properties:
+ expression:
+ type: string
+ title: expression
+ description: |-
+ Textual representation of an expression in Common Expression Language
+ syntax.
+ title:
+ type: string
+ title: title
+ description: |-
+ Optional. Title for the expression, i.e. a short string describing
+ its purpose. This can be used e.g. in UIs which allow to enter the
+ expression.
+ description:
+ type: string
+ title: description
+ description: |-
+ Optional. Description of the expression. This is a longer text which
+ describes the expression, e.g. when hovered over it in a UI.
+ location:
+ type: string
+ title: location
+ description: |-
+ Optional. String indicating the location of the expression for error
+ reporting, e.g. a file name and a position in the file.
+ title: Expr
+ additionalProperties: false
+ description: |-
+ Represents a textual expression in the Common Expression Language (CEL)
+ syntax. CEL is a C-like expression language. The syntax and semantics of CEL
+ are documented at https://github.com/google/cel-spec.
+
+ Example (Comparison):
+
+ title: "Summary size limit"
+ description: "Determines if a summary is less than 100 chars"
+ expression: "document.summary.size() < 100"
+
+ Example (Equality):
+
+ title: "Requestor is owner"
+ description: "Determines if requestor is the document owner"
+ expression: "document.owner == request.auth.claims.email"
+
+ Example (Logic):
+
+ title: "Public documents"
+ description: "Determine whether the document should be publicly visible"
+ expression: "document.type != 'private' && document.type != 'internal'"
+
+ Example (Data Manipulation):
+
+ title: "Notification string"
+ description: "Create a notification string with a timestamp."
+ expression: "'New message received at ' + string(document.create_time)"
+
+ The exact variables and functions that may be referenced within an expression
+ are determined by the service that evaluates it. See the service
+ documentation for additional information.
+security: []
+tags:
+ - name: bytebase.v1.IssueService
+ description: IssueService manages issues for tracking database changes and tasks.
+ - name: bytebase.v1.SettingService
+ description: SettingService manages workspace-level settings and configurations.
+ - name: bytebase.v1.UserService
+ description: UserService manages user accounts and authentication.
+ - name: bytebase.v1.ActuatorService
+ description: ActuatorService manages system health and operational information.
+ - name: bytebase.v1.AuditLogService
+ description: AuditLogService manages audit logs for system activities and API calls.
+ - name: bytebase.v1.AuthService
+ description: AuthService handles user authentication operations.
+ - name: bytebase.v1.CelService
+ description: CelService manages CEL (Common Expression Language) parsing and formatting operations.
+ - name: bytebase.v1.DatabaseCatalogService
+ description: DatabaseCatalogService manages database schema metadata and classification.
+ - name: bytebase.v1.DatabaseGroupService
+ description: DatabaseGroupService manages database groups for organizing databases by criteria.
+ - name: bytebase.v1.InstanceRoleService
+ description: InstanceRoleService manages database roles within instances.
+ - name: bytebase.v1.InstanceService
+ description: InstanceService manages database instances and their connections.
+ - name: bytebase.v1.DatabaseService
+ description: DatabaseService manages databases and their schemas.
+ - name: bytebase.v1.GroupService
+ description: GroupService manages user groups for organizing users and permissions.
+ - name: bytebase.v1.IdentityProviderService
+ description: IdentityProviderService manages external identity providers for SSO authentication.
+ - name: bytebase.v1.OrgPolicyService
+ description: OrgPolicyService manages organizational policies at various resource levels.
+ - name: bytebase.v1.SQLService
+ description: SQLService executes SQL queries and manages query operations.
+ - name: bytebase.v1.PlanService
+ description: PlanService manages deployment plans for database changes.
+ - name: bytebase.v1.ProjectService
+ description: ProjectService manages projects that group databases and changes.
+ - name: bytebase.v1.ReleaseService
+ description: ReleaseService manages releases for coordinating deployments.
+ - name: bytebase.v1.ReviewConfigService
+ description: ReviewConfigService manages approval flow configurations.
+ - name: bytebase.v1.RevisionService
+ description: RevisionService manages schema revision history.
+ - name: bytebase.v1.RoleService
+ description: RoleService manages workspace roles and permissions.
+ - name: bytebase.v1.RolloutService
+ description: RolloutService manages the execution of deployment plans.
+ - name: bytebase.v1.SheetService
+ description: SheetService manages SQL scripts and saved queries.
+ - name: bytebase.v1.SubscriptionService
+ description: SubscriptionService manages enterprise subscriptions and licensing.
+ - name: bytebase.v1.WorksheetService
+ description: WorksheetService manages SQL worksheets for query development.
+ - name: bytebase.v1.WorkspaceService
+ description: WorkspaceService manages workspace-level operations and profile.
diff --git a/backend/api/mcp/openapi_index.go b/backend/api/mcp/openapi_index.go
new file mode 100644
index 0000000000..c353e949d2
--- /dev/null
+++ b/backend/api/mcp/openapi_index.go
@@ -0,0 +1,465 @@
+package mcp
+
+import (
+ _ "embed"
+ "fmt"
+ "regexp"
+ "slices"
+ "strings"
+ "unicode"
+
+ "github.com/pb33f/libopenapi"
+ v3high "github.com/pb33f/libopenapi/datamodel/high/v3"
+)
+
+//go:embed gen/openapi.yaml
+var openAPISpec []byte
+
+// EndpointInfo is the indexed representation of an API endpoint.
+type EndpointInfo struct {
+ // OperationID is the unique identifier for the operation (e.g., "bytebase.v1.SQLService.Query").
+ OperationID string `json:"operationId"`
+ // Path is the HTTP path for the endpoint (e.g., "/bytebase.v1.SQLService/Query").
+ Path string `json:"path"`
+ // Service is the service name (e.g., "SQLService").
+ Service string `json:"service"`
+ // Method is the RPC method name (e.g., "Query").
+ Method string `json:"method"`
+ // Summary is a brief description of the endpoint.
+ Summary string `json:"summary"`
+ // Description is a detailed description of the endpoint.
+ Description string `json:"description"`
+ // Permissions is the list of permissions required to call this endpoint.
+ Permissions []string `json:"permissions,omitempty"`
+ // RequestSchemaRef is the reference to the request schema (e.g., "#/components/schemas/bytebase.v1.QueryRequest").
+ RequestSchemaRef string `json:"requestSchemaRef,omitempty"`
+ // ResponseSchemaRef is the reference to the response schema.
+ ResponseSchemaRef string `json:"responseSchemaRef,omitempty"`
+}
+
+// PropertyInfo describes a property in a schema.
+type PropertyInfo struct {
+ Name string `json:"name"`
+ Type string `json:"type"`
+ Description string `json:"description,omitempty"`
+ Required bool `json:"required,omitempty"`
+}
+
+// OpenAPIIndex is an indexed representation of the OpenAPI spec for fast lookup.
+type OpenAPIIndex struct {
+ doc *libopenapi.DocumentModel[v3high.Document]
+ endpoints []EndpointInfo
+ byOperation map[string]*EndpointInfo
+ byService map[string][]*EndpointInfo
+ services []string
+ keywords map[string][]*EndpointInfo
+}
+
+// NewOpenAPIIndex creates a new OpenAPI index from the embedded spec.
+func NewOpenAPIIndex() (*OpenAPIIndex, error) {
+ document, err := libopenapi.NewDocument(openAPISpec)
+ if err != nil {
+ return nil, err
+ }
+
+ model, err := document.BuildV3Model()
+ if err != nil {
+ return nil, err
+ }
+
+ idx := &OpenAPIIndex{
+ doc: model,
+ byOperation: make(map[string]*EndpointInfo),
+ byService: make(map[string][]*EndpointInfo),
+ keywords: make(map[string][]*EndpointInfo),
+ }
+
+ idx.parseSpec()
+ return idx, nil
+}
+
+var permissionRegex = regexp.MustCompile(`Permissions required:\s*([^\n]+)`)
+
+func (idx *OpenAPIIndex) parseSpec() {
+ serviceSet := make(map[string]bool)
+
+ if idx.doc.Model.Paths == nil {
+ return
+ }
+
+ for pair := idx.doc.Model.Paths.PathItems.First(); pair != nil; pair = pair.Next() {
+ path := pair.Key()
+ pathItem := pair.Value()
+
+ // Connect RPC uses POST for all endpoints
+ op := pathItem.Post
+ if op == nil {
+ continue
+ }
+
+ // Extract service and method from path
+ // /bytebase.v1.SQLService/Query -> service=SQLService, method=Query
+ trimmed := strings.TrimPrefix(path, "/bytebase.v1.")
+ parts := strings.Split(trimmed, "/")
+ if len(parts) != 2 {
+ continue
+ }
+
+ service := parts[0]
+ method := parts[1]
+
+ endpoint := EndpointInfo{
+ OperationID: op.OperationId,
+ Path: path,
+ Service: service,
+ Method: method,
+ Summary: op.Summary,
+ Description: op.Description,
+ Permissions: extractPermissions(op.Description),
+ }
+
+ // Extract request schema reference
+ if op.RequestBody != nil {
+ content := op.RequestBody.Content
+ if content != nil {
+ if jsonContent, ok := content.Get("application/json"); ok && jsonContent.Schema != nil {
+ endpoint.RequestSchemaRef = jsonContent.Schema.GetReference()
+ }
+ }
+ }
+
+ // Extract response schema reference (from 200 response)
+ if op.Responses != nil {
+ if resp, ok := op.Responses.Codes.Get("200"); ok && resp != nil {
+ if resp.Content != nil {
+ if jsonContent, ok := resp.Content.Get("application/json"); ok && jsonContent.Schema != nil {
+ endpoint.ResponseSchemaRef = jsonContent.Schema.GetReference()
+ }
+ }
+ }
+ }
+
+ idx.endpoints = append(idx.endpoints, endpoint)
+ ptr := &idx.endpoints[len(idx.endpoints)-1]
+
+ idx.byOperation[endpoint.OperationID] = ptr
+ idx.byService[service] = append(idx.byService[service], ptr)
+ serviceSet[service] = true
+
+ // Index keywords for search
+ idx.indexKeywords(ptr)
+ }
+
+ // Sort services alphabetically
+ for s := range serviceSet {
+ idx.services = append(idx.services, s)
+ }
+ slices.Sort(idx.services)
+}
+
+func extractPermissions(description string) []string {
+ matches := permissionRegex.FindStringSubmatch(description)
+ if len(matches) < 2 {
+ return nil
+ }
+
+ permStr := strings.TrimSpace(matches[1])
+ if permStr == "None" || permStr == "" {
+ return nil
+ }
+
+ // Remove parenthetical notes like "(for project parent)"
+ if idx := strings.Index(permStr, "("); idx > 0 {
+ permStr = strings.TrimSpace(permStr[:idx])
+ }
+
+ // Split by comma
+ perms := strings.Split(permStr, ",")
+
+ var result []string
+ for _, p := range perms {
+ p = strings.TrimSpace(p)
+ if p != "" && p != "None" {
+ result = append(result, p)
+ }
+ }
+ return result
+}
+
+func (idx *OpenAPIIndex) indexKeywords(ep *EndpointInfo) {
+ // Extract keywords from service, method, summary
+ keywords := extractKeywords(ep.Service, ep.Method, ep.Summary)
+ for _, kw := range keywords {
+ idx.keywords[kw] = append(idx.keywords[kw], ep)
+ }
+}
+
+func extractKeywords(texts ...string) []string {
+ keywordSet := make(map[string]bool)
+
+ for _, text := range texts {
+ // Split camelCase and PascalCase
+ words := splitCamelCase(text)
+ for _, word := range words {
+ word = strings.ToLower(word)
+ if len(word) >= 2 && !isStopWord(word) {
+ keywordSet[word] = true
+ }
+ }
+
+ // Also split by spaces and punctuation
+ for _, word := range strings.FieldsFunc(text, func(r rune) bool {
+ return !unicode.IsLetter(r) && !unicode.IsDigit(r)
+ }) {
+ word = strings.ToLower(word)
+ if len(word) >= 2 && !isStopWord(word) {
+ keywordSet[word] = true
+ }
+ }
+ }
+
+ var result []string
+ for kw := range keywordSet {
+ result = append(result, kw)
+ }
+ return result
+}
+
+func splitCamelCase(s string) []string {
+ var words []string
+ var current strings.Builder
+
+ for _, r := range s {
+ if r >= 'A' && r <= 'Z' {
+ if current.Len() > 0 {
+ words = append(words, current.String())
+ current.Reset()
+ }
+ current.WriteRune(r)
+ } else if r >= 'a' && r <= 'z' || r >= '0' && r <= '9' {
+ current.WriteRune(r)
+ } else if current.Len() > 0 {
+ // Non-alphanumeric, flush current word
+ words = append(words, current.String())
+ current.Reset()
+ }
+ }
+
+ if current.Len() > 0 {
+ words = append(words, current.String())
+ }
+
+ return words
+}
+
+func isStopWord(word string) bool {
+ stopWords := map[string]bool{
+ "the": true, "a": true, "an": true, "and": true, "or": true,
+ "is": true, "are": true, "was": true, "were": true,
+ "in": true, "on": true, "at": true, "to": true, "for": true,
+ "of": true, "with": true, "by": true, "from": true,
+ "service": true, "request": true, "response": true,
+ }
+ return stopWords[word]
+}
+
+// isPrimaryCRUD returns true if the method is a primary CRUD operation without prefixes.
+func isPrimaryCRUD(method string) bool {
+ primaryOps := map[string]bool{
+ "List": true, "Get": true, "Create": true, "Update": true, "Delete": true,
+ "Search": true, "Query": true, "Execute": true,
+ }
+ // Check if method starts with a primary operation (e.g., "ListDatabases" -> "List")
+ for op := range primaryOps {
+ if strings.HasPrefix(method, op) {
+ // Ensure it's at the beginning (not "BatchList" or "PreviewList")
+ return true
+ }
+ }
+ return false
+}
+
+// Services returns the list of all services.
+func (idx *OpenAPIIndex) Services() []string {
+ return idx.services
+}
+
+// GetEndpoint returns the endpoint info for the given operation ID.
+// Supports both full format (bytebase.v1.SQLService.Query) and short format (SQLService/Query).
+func (idx *OpenAPIIndex) GetEndpoint(operationID string) (*EndpointInfo, bool) {
+ // Try full format first
+ if ep, ok := idx.byOperation[operationID]; ok {
+ return ep, true
+ }
+
+ // Try short format: Service/Method -> bytebase.v1.Service.Method
+ if parts := strings.Split(operationID, "/"); len(parts) == 2 {
+ fullID := fmt.Sprintf("bytebase.v1.%s.%s", parts[0], parts[1])
+ if ep, ok := idx.byOperation[fullID]; ok {
+ return ep, true
+ }
+ }
+
+ return nil, false
+}
+
+// GetServiceEndpoints returns all endpoints for the given service.
+func (idx *OpenAPIIndex) GetServiceEndpoints(service string) []*EndpointInfo {
+ return idx.byService[service]
+}
+
+// Search searches for endpoints matching the query.
+func (idx *OpenAPIIndex) Search(query string) []*EndpointInfo {
+ queryKeywords := extractKeywords(query)
+ if len(queryKeywords) == 0 {
+ return nil
+ }
+
+ // Score each endpoint by number of matching keywords
+ scores := make(map[*EndpointInfo]int)
+ for _, kw := range queryKeywords {
+ for _, ep := range idx.keywords[kw] {
+ scores[ep]++
+ }
+ }
+
+ // Also do substring matching on operationID, summary, method, and service
+ queryLower := strings.ToLower(query)
+ for i := range idx.endpoints {
+ ep := &idx.endpoints[i]
+ methodLower := strings.ToLower(ep.Method)
+ serviceLower := strings.ToLower(ep.Service)
+ matched := false
+
+ // Exact method name match gets highest boost
+ if methodLower == queryLower {
+ scores[ep] += 10
+ matched = true
+ } else if strings.Contains(methodLower, queryLower) {
+ scores[ep] += 5
+ matched = true
+ }
+
+ // Service name match (e.g., "sql" matches "SQLService")
+ if strings.Contains(serviceLower, queryLower) {
+ scores[ep] += 4
+ matched = true
+ }
+
+ // Substring match in operationID
+ if strings.Contains(strings.ToLower(ep.OperationID), queryLower) {
+ scores[ep] += 3
+ matched = true
+ }
+
+ // Substring match in summary
+ if strings.Contains(strings.ToLower(ep.Summary), queryLower) {
+ scores[ep] += 2
+ matched = true
+ }
+
+ // Boost primary CRUD operations only if there's already a match
+ if matched && isPrimaryCRUD(ep.Method) {
+ scores[ep] += 2
+ }
+ }
+
+ // Sort by score descending
+ type scored struct {
+ ep *EndpointInfo
+ score int
+ }
+ var results []scored
+ for ep, score := range scores {
+ results = append(results, scored{ep, score})
+ }
+ slices.SortFunc(results, func(a, b scored) int {
+ return b.score - a.score // descending
+ })
+
+ var endpoints []*EndpointInfo
+ for _, r := range results {
+ endpoints = append(endpoints, r.ep)
+ }
+ return endpoints
+}
+
+// SearchInService searches for endpoints matching the query within a specific service.
+func (idx *OpenAPIIndex) SearchInService(query, service string) []*EndpointInfo {
+ allResults := idx.Search(query)
+ var filtered []*EndpointInfo
+ for _, ep := range allResults {
+ if ep.Service == service {
+ filtered = append(filtered, ep)
+ }
+ }
+ return filtered
+}
+
+// GetRequestSchema returns the simplified schema properties for a request type.
+func (idx *OpenAPIIndex) GetRequestSchema(schemaRef string) []PropertyInfo {
+ if schemaRef == "" || idx.doc.Model.Components == nil || idx.doc.Model.Components.Schemas == nil {
+ return nil
+ }
+
+ // Extract schema name from ref: "#/components/schemas/bytebase.v1.QueryRequest"
+ parts := strings.Split(schemaRef, "/")
+ schemaName := parts[len(parts)-1]
+
+ schemaProxy, ok := idx.doc.Model.Components.Schemas.Get(schemaName)
+ if !ok || schemaProxy == nil {
+ return nil
+ }
+
+ schema := schemaProxy.Schema()
+ if schema == nil {
+ return nil
+ }
+
+ var props []PropertyInfo
+ requiredSet := make(map[string]bool)
+ for _, r := range schema.Required {
+ requiredSet[r] = true
+ }
+
+ if schema.Properties == nil {
+ return nil
+ }
+
+ for pair := schema.Properties.First(); pair != nil; pair = pair.Next() {
+ name := pair.Key()
+ prop := pair.Value()
+
+ propType := "object"
+ if prop != nil {
+ propSchema := prop.Schema()
+ if propSchema != nil && len(propSchema.Type) > 0 {
+ propType = propSchema.Type[0]
+ }
+ if prop.GetReference() != "" {
+ // It's a reference to another type
+ refParts := strings.Split(prop.GetReference(), "/")
+ propType = refParts[len(refParts)-1]
+ }
+ }
+
+ desc := ""
+ if prop != nil && prop.Schema() != nil {
+ desc = prop.Schema().Description
+ }
+
+ props = append(props, PropertyInfo{
+ Name: name,
+ Type: propType,
+ Description: desc,
+ Required: requiredSet[name],
+ })
+ }
+
+ // Sort by name for consistent output
+ slices.SortFunc(props, func(a, b PropertyInfo) int {
+ return strings.Compare(a.Name, b.Name)
+ })
+
+ return props
+}
diff --git a/backend/api/mcp/server.go b/backend/api/mcp/server.go
index f33802768a..98c7b67022 100644
--- a/backend/api/mcp/server.go
+++ b/backend/api/mcp/server.go
@@ -2,52 +2,48 @@
package mcp
import (
- "context"
"net/http"
"strings"
"github.com/golang-jwt/jwt/v5"
"github.com/labstack/echo/v4"
"github.com/modelcontextprotocol/go-sdk/mcp"
+ "github.com/pkg/errors"
"github.com/bytebase/bytebase/backend/api/auth"
"github.com/bytebase/bytebase/backend/component/config"
"github.com/bytebase/bytebase/backend/store"
)
-// EchoInput is the input for the echo tool.
-type EchoInput struct {
- // The message to echo back.
- Message string `json:"message"`
-}
-
-// EchoOutput is the output for the echo tool.
-type EchoOutput struct {
- // The echoed message.
- Echo string `json:"echo"`
-}
-
// Server is the MCP server for Bytebase.
type Server struct {
- mcpServer *mcp.Server
- httpHandler *mcp.StreamableHTTPHandler
- store *store.Store
- profile *config.Profile
- secret string
+ mcpServer *mcp.Server
+ httpHandler *mcp.StreamableHTTPHandler
+ store *store.Store
+ profile *config.Profile
+ secret string
+ openAPIIndex *OpenAPIIndex
}
// NewServer creates a new MCP server.
-func NewServer(store *store.Store, profile *config.Profile, secret string) *Server {
+func NewServer(store *store.Store, profile *config.Profile, secret string) (*Server, error) {
mcpServer := mcp.NewServer(&mcp.Implementation{
Name: "bytebase",
Version: "1.0.0",
}, nil)
+ // Load OpenAPI index for API discovery and execution (embedded)
+ openAPIIndex, err := NewOpenAPIIndex()
+ if err != nil {
+ return nil, errors.Wrap(err, "failed to load OpenAPI spec")
+ }
+
s := &Server{
- mcpServer: mcpServer,
- store: store,
- profile: profile,
- secret: secret,
+ mcpServer: mcpServer,
+ store: store,
+ profile: profile,
+ secret: secret,
+ openAPIIndex: openAPIIndex,
}
s.registerTools()
@@ -56,26 +52,13 @@ func NewServer(store *store.Store, profile *config.Profile, secret string) *Serv
return s.mcpServer
}, nil)
- return s
+ return s, nil
}
// registerTools registers all MCP tools.
func (s *Server) registerTools() {
- // Echo tool for testing
- mcp.AddTool(s.mcpServer, &mcp.Tool{
- Name: "echo",
- Description: "Echo the input message back. Useful for testing the MCP connection.",
- }, s.handleEcho)
-}
-
-// handleEcho handles the echo tool call.
-func (*Server) handleEcho(_ context.Context, _ *mcp.CallToolRequest, input EchoInput) (*mcp.CallToolResult, EchoOutput, error) {
- output := EchoOutput{Echo: input.Message}
- return &mcp.CallToolResult{
- Content: []mcp.Content{
- &mcp.TextContent{Text: output.Echo},
- },
- }, output, nil
+ s.registerSearchTool()
+ s.registerCallTool()
}
// authMiddleware validates OAuth2 bearer tokens for MCP requests.
@@ -144,8 +127,10 @@ func (s *Server) authMiddleware(next echo.HandlerFunc) echo.HandlerFunc {
return echo.NewHTTPError(http.StatusUnauthorized, "invalid token: missing subject")
}
- // Store user email in context for downstream handlers
- c.Set("user_email", sub)
+ // Store access token in request context for MCP tools to forward auth
+ ctx := c.Request().Context()
+ ctx = withAccessToken(ctx, tokenStr)
+ c.SetRequest(c.Request().WithContext(ctx))
return next(c)
}
diff --git a/backend/api/mcp/server_test.go b/backend/api/mcp/server_test.go
index d0647fe757..3c9c0f1627 100644
--- a/backend/api/mcp/server_test.go
+++ b/backend/api/mcp/server_test.go
@@ -70,12 +70,13 @@ func TestMCPAuthMiddleware(t *testing.T) {
c := e.NewContext(req, rec)
// Create server with auth
- s := NewServer(nil, profile, secret)
+ s, err := NewServer(nil, profile, secret)
+ require.NoError(t, err)
handler := s.authMiddleware(func(c echo.Context) error {
return c.String(http.StatusOK, "success")
})
- err := handler(c)
+ err = handler(c)
if err != nil {
// Echo error handler
e.HTTPErrorHandler(err, c)
@@ -100,16 +101,17 @@ func TestMCPAuthMiddlewareValidToken(t *testing.T) {
// Create server with auth - note: we pass nil store since we're testing middleware only
// A full integration test would require a real store
- s := NewServer(nil, profile, secret)
+ s, err := NewServer(nil, profile, secret)
+ require.NoError(t, err)
handler := s.authMiddleware(func(c echo.Context) error {
- // Verify user email is set in context
- email := c.Get("user_email")
- require.NotNil(t, email)
- require.Equal(t, "[email protected]", email)
+ // Verify access token is set in request context
+ ctx := c.Request().Context()
+ token := getAccessToken(ctx)
+ require.NotEmpty(t, token)
return c.String(http.StatusOK, "success")
})
- err := handler(c)
+ err = handler(c)
require.NoError(t, err)
require.Equal(t, http.StatusOK, rec.Code)
}
diff --git a/backend/api/mcp/tool_call.go b/backend/api/mcp/tool_call.go
new file mode 100644
index 0000000000..f5af5c3ad8
--- /dev/null
+++ b/backend/api/mcp/tool_call.go
@@ -0,0 +1,204 @@
+package mcp
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "fmt"
+ "io"
+ "net/http"
+ "strings"
+ "time"
+
+ "github.com/modelcontextprotocol/go-sdk/mcp"
+ "github.com/pkg/errors"
+)
+
+// CallInput is the input for the call_api tool.
+type CallInput struct {
+ // OperationID is the unique identifier for the API endpoint to call.
+ // Use search_api to find the correct operationId for your task.
+ // Example: "bytebase.v1.SQLService.Query"
+ OperationID string `json:"operationId"`
+ // Body is the JSON request body to send to the endpoint.
+ // The structure depends on the endpoint - use search_api with includeSchema=true to see the expected format.
+ Body map[string]any `json:"body,omitempty"`
+}
+
+// CallOutput is the output for the call_api tool.
+type CallOutput struct {
+ // Status is the HTTP status code of the response.
+ Status int `json:"status"`
+ // Response is the JSON response body from the API.
+ Response any `json:"response,omitempty"`
+ // Error is the error message if the request failed.
+ Error string `json:"error,omitempty"`
+}
+
+// callAPIDescription is the description for the call_api tool.
+const callAPIDescription = `Execute a Bytebase API endpoint. **Use search_api first to get operationId and schema.**
+
+| Parameter | Required | Description |
+|-----------|----------|-------------|
+| operationId | Yes | e.g., "SQLService/Query" |
+| body | No | JSON request body |
+
+**Resource names:** projects/my-project, instances/prod/databases/main
+
+**Example:**
+call_api(operationId="SQLService/Query", body={"name": "instances/i/databases/db", "statement": "SELECT 1"})`
+
+func (s *Server) registerCallTool() {
+ mcp.AddTool(s.mcpServer, &mcp.Tool{
+ Name: "call_api",
+ Description: callAPIDescription,
+ }, s.handleCallAPI)
+}
+
+func (s *Server) handleCallAPI(ctx context.Context, _ *mcp.CallToolRequest, input CallInput) (*mcp.CallToolResult, CallOutput, error) {
+ // Validate input
+ if input.OperationID == "" {
+ return nil, CallOutput{}, errors.New("operationId is required")
+ }
+
+ // Look up endpoint
+ endpoint, ok := s.openAPIIndex.GetEndpoint(input.OperationID)
+ if !ok {
+ return nil, CallOutput{}, errors.Errorf("unknown operation %s, use search_api to find valid operations", input.OperationID)
+ }
+
+ // Build request body
+ body := input.Body
+ if body == nil {
+ body = make(map[string]any)
+ }
+ bodyBytes, err := json.Marshal(body)
+ if err != nil {
+ return nil, CallOutput{}, errors.Wrap(err, "failed to marshal request body")
+ }
+
+ // Build HTTP request
+ url := fmt.Sprintf("http://localhost:%d%s", s.profile.Port, endpoint.Path)
+ httpReq, err := http.NewRequestWithContext(ctx, http.MethodPost, url, bytes.NewReader(bodyBytes))
+ if err != nil {
+ return nil, CallOutput{}, errors.Wrap(err, "failed to create HTTP request")
+ }
+
+ // Set headers for Connect RPC
+ httpReq.Header.Set("Content-Type", "application/json")
+ httpReq.Header.Set("Connect-Protocol-Version", "1")
+
+ // Forward the auth token from the MCP context
+ if token := getAccessToken(ctx); token != "" {
+ httpReq.Header.Set("Authorization", "Bearer "+token)
+ }
+
+ // Execute request with timeout
+ client := &http.Client{Timeout: 30 * time.Second}
+ resp, err := client.Do(httpReq)
+ if err != nil {
+ return nil, CallOutput{}, errors.Wrap(err, "failed to execute API request")
+ }
+ defer resp.Body.Close()
+
+ // Read response body
+ respBody, err := io.ReadAll(resp.Body)
+ if err != nil {
+ return nil, CallOutput{}, errors.Wrap(err, "failed to read response body")
+ }
+
+ // Check for binary response - not supported
+ contentType := resp.Header.Get("Content-Type")
+ if isBinaryContentType(contentType) {
+ return nil, CallOutput{}, errors.Errorf("binary response not supported (content-type: %s)", contentType)
+ }
+
+ // Parse JSON response
+ var respJSON any
+ if len(respBody) > 0 {
+ if err := json.Unmarshal(respBody, &respJSON); err != nil {
+ // If not valid JSON, return as string
+ respJSON = string(respBody)
+ }
+ }
+
+ output := CallOutput{
+ Status: resp.StatusCode,
+ Response: respJSON,
+ }
+
+ // Check for error response
+ if resp.StatusCode >= 400 {
+ if errMap, ok := respJSON.(map[string]any); ok {
+ if msg, ok := errMap["message"].(string); ok {
+ output.Error = msg
+ } else if code, ok := errMap["code"].(string); ok {
+ output.Error = code
+ }
+ }
+ if output.Error == "" {
+ output.Error = fmt.Sprintf("HTTP %d", resp.StatusCode)
+ }
+ }
+
+ text := formatCallOutput(output, endpoint)
+ return &mcp.CallToolResult{
+ Content: []mcp.Content{&mcp.TextContent{Text: text}},
+ }, output, nil
+}
+
+func formatCallOutput(output CallOutput, endpoint *EndpointInfo) string {
+ var sb strings.Builder
+
+ sb.WriteString(fmt.Sprintf("## %s\n\n", endpoint.OperationID))
+
+ if output.Error != "" {
+ sb.WriteString(fmt.Sprintf("**Error** (HTTP %d): %s\n\n", output.Status, output.Error))
+ } else {
+ sb.WriteString(fmt.Sprintf("**Status:** %d OK\n\n", output.Status))
+ }
+
+ if output.Response != nil {
+ respBytes, _ := json.MarshalIndent(output.Response, "", " ")
+ sb.WriteString("**Response:**\n```json\n")
+ sb.Write(respBytes)
+ sb.WriteString("\n```\n")
+ }
+
+ return sb.String()
+}
+
+func isBinaryContentType(ct string) bool {
+ ct = strings.ToLower(ct)
+ binaryPrefixes := []string{
+ "application/octet-stream",
+ "application/zip",
+ "application/pdf",
+ "application/gzip",
+ "image/",
+ "audio/",
+ "video/",
+ }
+ for _, prefix := range binaryPrefixes {
+ if strings.HasPrefix(ct, prefix) {
+ return true
+ }
+ }
+ return false
+}
+
+// Context key for storing the access token.
+type accessTokenKey struct{}
+
+// withAccessToken adds the access token to the context.
+func withAccessToken(ctx context.Context, token string) context.Context {
+ return context.WithValue(ctx, accessTokenKey{}, token)
+}
+
+// getAccessToken retrieves the access token from the context.
+func getAccessToken(ctx context.Context) string {
+ if token, ok := ctx.Value(accessTokenKey{}).(string); ok {
+ return token
+ }
+ return ""
+}
diff --git a/backend/api/mcp/tool_call_test.go b/backend/api/mcp/tool_call_test.go
new file mode 100644
index 0000000000..9e81954996
--- /dev/null
+++ b/backend/api/mcp/tool_call_test.go
@@ -0,0 +1,43 @@
+package mcp
+
+import (
+ "testing"
+
+ "github.com/stretchr/testify/require"
+)
+
+func TestFormatCallOutput(t *testing.T) {
+ endpoint := &EndpointInfo{
+ OperationID: "test.Operation",
+ Service: "TestService",
+ Method: "Test",
+ }
+
+ output := CallOutput{
+ Status: 200,
+ Response: map[string]any{"data": "test"},
+ }
+
+ result := formatCallOutput(output, endpoint)
+ require.Contains(t, result, "test.Operation")
+ require.Contains(t, result, "200 OK")
+ require.Contains(t, result, "\"data\"")
+}
+
+func TestFormatCallOutputError(t *testing.T) {
+ endpoint := &EndpointInfo{
+ OperationID: "test.Operation",
+ Service: "TestService",
+ Method: "Test",
+ }
+
+ output := CallOutput{
+ Status: 404,
+ Error: "not found",
+ }
+
+ result := formatCallOutput(output, endpoint)
+ require.Contains(t, result, "Error")
+ require.Contains(t, result, "404")
+ require.Contains(t, result, "not found")
+}
diff --git a/backend/api/mcp/tool_search.go b/backend/api/mcp/tool_search.go
new file mode 100644
index 0000000000..00a1e5c438
--- /dev/null
+++ b/backend/api/mcp/tool_search.go
@@ -0,0 +1,204 @@
+package mcp
+
+import (
+ "context"
+ "fmt"
+ "strings"
+
+ "github.com/modelcontextprotocol/go-sdk/mcp"
+)
+
+// SearchInput is the input for the search_api tool.
+type SearchInput struct {
+ // OperationID gets detailed schema for a specific endpoint.
+ // Use this after finding the endpoint you need.
+ OperationID string `json:"operationId,omitempty"`
+ // Query is a free-text search query to find relevant API endpoints.
+ // Examples: "create database", "execute sql", "list projects"
+ Query string `json:"query,omitempty"`
+ // Service filters results to a specific service.
+ // Examples: "SQLService", "DatabaseService", "ProjectService"
+ Service string `json:"service,omitempty"`
+ // Limit is the maximum number of results to return (default: 5, max: 50).
+ Limit int `json:"limit,omitempty"`
+}
+
+// searchAPIDescription is the description for the search_api tool.
+const searchAPIDescription = `Discover Bytebase API endpoints. **Always call before call_api - never guess schemas.**
+
+| Mode | Parameters | Result |
+|------|------------|--------|
+| List | (none) | All services |
+| Browse | service="SQLService" | All endpoints in service |
+| Search | query="database" | Matching endpoints |
+| Filter | service+query | Search within service |
+| Details | operationId="SQLService/Query" | Request/response schema |
+
+**Workflow:** search_api() → search_api(operationId="...") → call_api(...)`
+
+func (s *Server) registerSearchTool() {
+ mcp.AddTool(s.mcpServer, &mcp.Tool{
+ Name: "search_api",
+ Description: searchAPIDescription,
+ }, s.handleSearchAPI)
+}
+
+func (s *Server) handleSearchAPI(_ context.Context, _ *mcp.CallToolRequest, input SearchInput) (*mcp.CallToolResult, any, error) {
+ var text string
+
+ switch {
+ case input.OperationID != "":
+ // Detail mode: get full schema for a specific endpoint
+ text = s.formatEndpointDetail(input.OperationID)
+
+ case input.Query == "" && input.Service == "":
+ // List all services
+ text = s.formatServiceList()
+
+ case input.Service != "" && input.Query != "":
+ // Search within a service
+ endpoints := s.openAPIIndex.SearchInService(input.Query, input.Service)
+ if len(endpoints) == 0 {
+ text = fmt.Sprintf("No endpoints found for query %q in service %s\n\nTry:\n- Different keywords\n- Browsing the service with search_api(service=\"%s\")",
+ input.Query, input.Service, input.Service)
+ } else {
+ text = s.formatEndpoints(endpoints, s.getLimit(input.Limit))
+ }
+
+ case input.Service != "":
+ // List all endpoints in a service (no limit)
+ endpoints := s.openAPIIndex.GetServiceEndpoints(input.Service)
+ if len(endpoints) == 0 {
+ text = fmt.Sprintf("No endpoints found for service: %s\n\nAvailable services:\n%s",
+ input.Service, s.formatServiceList())
+ } else {
+ text = s.formatEndpoints(endpoints, 0)
+ }
+
+ default:
+ // Search by query
+ endpoints := s.openAPIIndex.Search(input.Query)
+ if len(endpoints) == 0 {
+ text = fmt.Sprintf("No endpoints found for query: %q\n\nTry:\n- Different keywords\n- Listing services with search_api() (no parameters)\n- Browsing a service with search_api(service=\"ServiceName\")", input.Query)
+ } else {
+ text = s.formatEndpoints(endpoints, s.getLimit(input.Limit))
+ }
+ }
+
+ return &mcp.CallToolResult{
+ Content: []mcp.Content{&mcp.TextContent{Text: text}},
+ }, nil, nil
+}
+
+func (*Server) getLimit(limit int) int {
+ if limit <= 0 {
+ return 5
+ }
+ if limit > 50 {
+ return 50
+ }
+ return limit
+}
+
+func (s *Server) formatServiceList() string {
+ services := s.openAPIIndex.Services()
+ var sb strings.Builder
+
+ sb.WriteString("## Available Services\n\n")
+ sb.WriteString("Use `search_api(service=\"ServiceName\")` to list endpoints in a service.\n\n")
+
+ for _, svc := range services {
+ endpoints := s.openAPIIndex.GetServiceEndpoints(svc)
+ sb.WriteString(fmt.Sprintf("- **%s** (%d endpoints)\n", svc, len(endpoints)))
+ }
+
+ sb.WriteString(fmt.Sprintf("\nTotal: %d services\n", len(services)))
+ return sb.String()
+}
+
+func (*Server) formatEndpoints(endpoints []*EndpointInfo, limit int) string {
+ var sb strings.Builder
+
+ if limit > 0 && len(endpoints) > limit {
+ sb.WriteString(fmt.Sprintf("Showing %d of %d results:\n\n", limit, len(endpoints)))
+ endpoints = endpoints[:limit]
+ } else {
+ sb.WriteString(fmt.Sprintf("Found %d endpoints:\n\n", len(endpoints)))
+ }
+
+ for i, ep := range endpoints {
+ sb.WriteString(fmt.Sprintf("### %d. %s/%s\n", i+1, ep.Service, ep.Method))
+ sb.WriteString(fmt.Sprintf("%s\n", ep.Summary))
+
+ if len(ep.Permissions) > 0 {
+ sb.WriteString(fmt.Sprintf("Permissions: `%s`\n", strings.Join(ep.Permissions, "`, `")))
+ }
+ sb.WriteString("\n")
+ }
+
+ sb.WriteString("Use `search_api(operationId=\"Service/Method\")` to get full request/response schema.\n")
+ return sb.String()
+}
+
+func (s *Server) formatEndpointDetail(operationID string) string {
+ ep, ok := s.openAPIIndex.GetEndpoint(operationID)
+ if !ok {
+ return fmt.Sprintf("Unknown operationId: %s\n\nUse search_api(query=\"...\") to find valid operations.", operationID)
+ }
+
+ var sb strings.Builder
+
+ sb.WriteString(fmt.Sprintf("## %s/%s\n\n", ep.Service, ep.Method))
+ sb.WriteString(fmt.Sprintf("%s\n\n", ep.Summary))
+
+ if len(ep.Permissions) > 0 {
+ sb.WriteString(fmt.Sprintf("**Permissions:** `%s`\n\n", strings.Join(ep.Permissions, "`, `")))
+ }
+
+ // Request schema
+ if ep.RequestSchemaRef != "" {
+ props := s.openAPIIndex.GetRequestSchema(ep.RequestSchemaRef)
+ if len(props) > 0 {
+ sb.WriteString("### Request Body\n```json\n{\n")
+ for _, prop := range props {
+ s.formatProperty(&sb, prop)
+ }
+ sb.WriteString("}\n```\n\n")
+ }
+ }
+
+ // Response schema
+ if ep.ResponseSchemaRef != "" {
+ props := s.openAPIIndex.GetRequestSchema(ep.ResponseSchemaRef) // same method works for response
+ if len(props) > 0 {
+ sb.WriteString("### Response Body\n```json\n{\n")
+ for _, prop := range props {
+ s.formatProperty(&sb, prop)
+ }
+ sb.WriteString("}\n```\n")
+ }
+ }
+
+ return sb.String()
+}
+
+func (*Server) formatProperty(sb *strings.Builder, prop PropertyInfo) {
+ required := ""
+ if prop.Required {
+ required = " (required)"
+ }
+ desc := ""
+ if prop.Description != "" {
+ // Remove newlines for inline comment
+ cleanDesc := strings.ReplaceAll(prop.Description, "\n", " ")
+ cleanDesc = strings.ReplaceAll(cleanDesc, "\r", "")
+ desc = fmt.Sprintf(" // %s", cleanDesc)
+ }
+ sb.WriteString(" \"")
+ sb.WriteString(prop.Name)
+ sb.WriteString("\": ")
+ sb.WriteString(prop.Type)
+ sb.WriteString(required)
+ sb.WriteString(desc)
+ sb.WriteString("\n")
+}
diff --git a/backend/api/mcp/tool_search_test.go b/backend/api/mcp/tool_search_test.go
new file mode 100644
index 0000000000..56a34d1089
--- /dev/null
+++ b/backend/api/mcp/tool_search_test.go
@@ -0,0 +1,301 @@
+package mcp
+
+import (
+ "context"
+ "strings"
+ "testing"
+
+ mcpsdk "github.com/modelcontextprotocol/go-sdk/mcp"
+ "github.com/stretchr/testify/require"
+
+ "github.com/bytebase/bytebase/backend/common"
+ "github.com/bytebase/bytebase/backend/component/config"
+)
+
+func TestSearchAPIListServices(t *testing.T) {
+ profile := &config.Profile{Mode: common.ReleaseModeDev}
+ s, err := NewServer(nil, profile, "test-secret")
+ require.NoError(t, err)
+
+ // Test listing all services (no parameters)
+ result, _, err := s.handleSearchAPI(context.Background(), nil, SearchInput{})
+ require.NoError(t, err)
+ require.NotNil(t, result)
+ require.Len(t, result.Content, 1)
+
+ text := result.Content[0].(*mcpsdk.TextContent).Text
+ require.Contains(t, text, "Available Services")
+ require.Contains(t, text, "SQLService")
+ require.Contains(t, text, "DatabaseService")
+ require.Contains(t, text, "ProjectService")
+}
+
+func TestSearchAPIByQuery(t *testing.T) {
+ profile := &config.Profile{Mode: common.ReleaseModeDev}
+ s, err := NewServer(nil, profile, "test-secret")
+ require.NoError(t, err)
+
+ tests := []struct {
+ name string
+ query string
+ expectContain []string
+ }{
+ {
+ name: "search for sql",
+ query: "sql",
+ expectContain: []string{"SQL"},
+ },
+ {
+ name: "search for database",
+ query: "database",
+ expectContain: []string{"Database"},
+ },
+ {
+ name: "search for project",
+ query: "project",
+ expectContain: []string{"Project"},
+ },
+ }
+
+ for _, tc := range tests {
+ t.Run(tc.name, func(t *testing.T) {
+ result, _, err := s.handleSearchAPI(context.Background(), nil, SearchInput{
+ Query: tc.query,
+ })
+ require.NoError(t, err)
+ require.NotNil(t, result)
+ require.Len(t, result.Content, 1)
+
+ text := result.Content[0].(*mcpsdk.TextContent).Text
+ for _, expected := range tc.expectContain {
+ require.Contains(t, text, expected, "expected %q in result for query %q", expected, tc.query)
+ }
+ })
+ }
+}
+
+func TestSearchAPIByService(t *testing.T) {
+ profile := &config.Profile{Mode: common.ReleaseModeDev}
+ s, err := NewServer(nil, profile, "test-secret")
+ require.NoError(t, err)
+
+ // Test browsing a specific service
+ result, _, err := s.handleSearchAPI(context.Background(), nil, SearchInput{
+ Service: "SQLService",
+ })
+ require.NoError(t, err)
+ require.NotNil(t, result)
+ require.Len(t, result.Content, 1)
+
+ text := result.Content[0].(*mcpsdk.TextContent).Text
+ require.Contains(t, text, "SQLService/")
+ require.Contains(t, text, "endpoints")
+ // Browse mode should not include schema
+ require.NotContains(t, text, "Request Body")
+}
+
+func TestSearchAPIByServiceNotFound(t *testing.T) {
+ profile := &config.Profile{Mode: common.ReleaseModeDev}
+ s, err := NewServer(nil, profile, "test-secret")
+ require.NoError(t, err)
+
+ // Test browsing a non-existent service
+ result, _, err := s.handleSearchAPI(context.Background(), nil, SearchInput{
+ Service: "NonExistentService",
+ })
+ require.NoError(t, err)
+ require.NotNil(t, result)
+ require.Len(t, result.Content, 1)
+
+ text := result.Content[0].(*mcpsdk.TextContent).Text
+ require.Contains(t, text, "No endpoints found")
+ require.Contains(t, text, "Available services")
+}
+
+func TestSearchAPIDetailMode(t *testing.T) {
+ profile := &config.Profile{Mode: common.ReleaseModeDev}
+ s, err := NewServer(nil, profile, "test-secret")
+ require.NoError(t, err)
+
+ // Test detail mode with full operationId
+ result, _, err := s.handleSearchAPI(context.Background(), nil, SearchInput{
+ OperationID: "bytebase.v1.SQLService.Query",
+ })
+ require.NoError(t, err)
+ require.NotNil(t, result)
+ require.Len(t, result.Content, 1)
+
+ text := result.Content[0].(*mcpsdk.TextContent).Text
+ require.Contains(t, text, "SQLService/Query")
+ require.Contains(t, text, "Request Body")
+ require.Contains(t, text, "```json")
+}
+
+func TestSearchAPIDetailModeShortFormat(t *testing.T) {
+ profile := &config.Profile{Mode: common.ReleaseModeDev}
+ s, err := NewServer(nil, profile, "test-secret")
+ require.NoError(t, err)
+
+ // Test detail mode with short operationId format (Service/Method)
+ result, _, err := s.handleSearchAPI(context.Background(), nil, SearchInput{
+ OperationID: "SQLService/Query",
+ })
+ require.NoError(t, err)
+ require.NotNil(t, result)
+ require.Len(t, result.Content, 1)
+
+ text := result.Content[0].(*mcpsdk.TextContent).Text
+ require.Contains(t, text, "SQLService/Query")
+ require.Contains(t, text, "Request Body")
+ require.Contains(t, text, "```json")
+}
+
+func TestSearchAPIDetailModeWithResponse(t *testing.T) {
+ profile := &config.Profile{Mode: common.ReleaseModeDev}
+ s, err := NewServer(nil, profile, "test-secret")
+ require.NoError(t, err)
+
+ // Test detail mode shows response schema
+ result, _, err := s.handleSearchAPI(context.Background(), nil, SearchInput{
+ OperationID: "bytebase.v1.DatabaseService.ListDatabases",
+ })
+ require.NoError(t, err)
+ require.NotNil(t, result)
+ require.Len(t, result.Content, 1)
+
+ text := result.Content[0].(*mcpsdk.TextContent).Text
+ require.Contains(t, text, "Response Body")
+}
+
+func TestSearchAPIDetailModeNotFound(t *testing.T) {
+ profile := &config.Profile{Mode: common.ReleaseModeDev}
+ s, err := NewServer(nil, profile, "test-secret")
+ require.NoError(t, err)
+
+ // Test detail mode with unknown operationId
+ result, _, err := s.handleSearchAPI(context.Background(), nil, SearchInput{
+ OperationID: "unknown.operation.id",
+ })
+ require.NoError(t, err)
+ require.NotNil(t, result)
+ require.Len(t, result.Content, 1)
+
+ text := result.Content[0].(*mcpsdk.TextContent).Text
+ require.Contains(t, text, "Unknown operationId")
+}
+
+func TestSearchAPILimit(t *testing.T) {
+ profile := &config.Profile{Mode: common.ReleaseModeDev}
+ s, err := NewServer(nil, profile, "test-secret")
+ require.NoError(t, err)
+
+ // Test with custom limit
+ result, _, err := s.handleSearchAPI(context.Background(), nil, SearchInput{
+ Service: "DatabaseService",
+ Limit: 2,
+ })
+ require.NoError(t, err)
+ require.NotNil(t, result)
+ require.Len(t, result.Content, 1)
+
+ text := result.Content[0].(*mcpsdk.TextContent).Text
+ // Should show "Showing X of Y results" if limited
+ if strings.Contains(text, "Showing") {
+ require.Contains(t, text, "Showing 2 of")
+ }
+}
+
+func TestSearchAPIDefaultLimit(t *testing.T) {
+ profile := &config.Profile{Mode: common.ReleaseModeDev}
+ s, err := NewServer(nil, profile, "test-secret")
+ require.NoError(t, err)
+
+ // Test default limit (should be 5)
+ result, _, err := s.handleSearchAPI(context.Background(), nil, SearchInput{
+ Query: "list",
+ })
+ require.NoError(t, err)
+ require.NotNil(t, result)
+ require.Len(t, result.Content, 1)
+
+ text := result.Content[0].(*mcpsdk.TextContent).Text
+ // Count how many "###" headers (each endpoint starts with ###)
+ count := strings.Count(text, "### ")
+ require.LessOrEqual(t, count, 5, "default limit should be 5")
+}
+
+func TestSearchAPIMaxLimit(t *testing.T) {
+ profile := &config.Profile{Mode: common.ReleaseModeDev}
+ s, err := NewServer(nil, profile, "test-secret")
+ require.NoError(t, err)
+
+ // Test max limit enforcement (should cap at 50)
+ result, _, err := s.handleSearchAPI(context.Background(), nil, SearchInput{
+ Query: "list",
+ Limit: 100, // Should be capped to 50
+ })
+ require.NoError(t, err)
+ require.NotNil(t, result)
+ require.Len(t, result.Content, 1)
+
+ text := result.Content[0].(*mcpsdk.TextContent).Text
+ count := strings.Count(text, "### ")
+ require.LessOrEqual(t, count, 50, "max limit should be 50")
+}
+
+func TestSearchAPINoResults(t *testing.T) {
+ profile := &config.Profile{Mode: common.ReleaseModeDev}
+ s, err := NewServer(nil, profile, "test-secret")
+ require.NoError(t, err)
+
+ // Test query with no results - use a query that truly won't match anything
+ result, _, err := s.handleSearchAPI(context.Background(), nil, SearchInput{
+ Query: "zzzzqqqq",
+ })
+ require.NoError(t, err)
+ require.NotNil(t, result)
+ require.Len(t, result.Content, 1)
+
+ text := result.Content[0].(*mcpsdk.TextContent).Text
+ require.Contains(t, text, "No endpoints found")
+ require.Contains(t, text, "Try:")
+}
+
+func TestSearchAPIServiceShowsAll(t *testing.T) {
+ profile := &config.Profile{Mode: common.ReleaseModeDev}
+ s, err := NewServer(nil, profile, "test-secret")
+ require.NoError(t, err)
+
+ // Test browsing a service shows all endpoints (no limit)
+ result, _, err := s.handleSearchAPI(context.Background(), nil, SearchInput{
+ Service: "DatabaseService",
+ })
+ require.NoError(t, err)
+ require.NotNil(t, result)
+ require.Len(t, result.Content, 1)
+
+ text := result.Content[0].(*mcpsdk.TextContent).Text
+ // Should show "Found X endpoints" not "Showing X of Y"
+ require.Contains(t, text, "Found")
+ require.NotContains(t, text, "Showing")
+}
+
+func TestSearchAPIQueryWithService(t *testing.T) {
+ profile := &config.Profile{Mode: common.ReleaseModeDev}
+ s, err := NewServer(nil, profile, "test-secret")
+ require.NoError(t, err)
+
+ // Test query within a specific service
+ result, _, err := s.handleSearchAPI(context.Background(), nil, SearchInput{
+ Service: "SQLService",
+ Query: "query",
+ })
+ require.NoError(t, err)
+ require.NotNil(t, result)
+ require.Len(t, result.Content, 1)
+
+ text := result.Content[0].(*mcpsdk.TextContent).Text
+ require.Contains(t, text, "SQLService/")
+ // Should only return SQLService endpoints
+ require.NotContains(t, text, "DatabaseService/")
+}
diff --git a/backend/server/server.go b/backend/server/server.go
index 6e7ea40a0c..a348d7f7f8 100644
--- a/backend/server/server.go
+++ b/backend/server/server.go
@@ -219,7 +219,10 @@ func NewServer(ctx context.Context, profile *config.Profile) (*Server, error) {
directorySyncServer := directorysync.NewService(s.store, s.licenseService, s.iamManager, profile)
oauth2Service := oauth2.NewService(stores, profile, secret)
- mcpServer := mcp.NewServer(stores, profile, secret)
+ mcpServer, err := mcp.NewServer(stores, profile, secret)
+ if err != nil {
+ return nil, errors.Wrapf(err, "failed to create MCP server")
+ }
if err := configureGrpcRouters(ctx, s.echoServer, s.store, sheetManager, s.dbFactory, s.licenseService, s.profile, s.metricReporter, s.stateCfg, s.schemaSyncer, s.webhookManager, s.iamManager, secret, s.sampleInstanceManager); err != nil {
return nil, errors.Wrapf(err, "failed to configure gRPC routers")
diff --git a/go.mod b/go.mod
index f85baff939..8cb426d76a 100644
--- a/go.mod
+++ b/go.mod
@@ -72,6 +72,7 @@ require (
github.com/nyaruka/phonenumbers v1.6.7
github.com/opensearch-project/opensearch-go/v4 v4.5.0
github.com/paulmach/orb v0.12.0
+ github.com/pb33f/libopenapi v0.28.2
github.com/pingcap/tidb v1.1.0-beta.0.20241125141335-ec8b81b98edc
github.com/pingcap/tidb/pkg/parser v0.0.0-20241125141335-ec8b81b98edc
github.com/pkg/errors v0.9.1
@@ -134,12 +135,14 @@ require (
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.15 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.88.1 // indirect
github.com/aws/aws-sdk-go-v2/service/signin v1.0.3 // indirect
+ github.com/bahlo/generic-list-go v0.2.0 // indirect
github.com/bazelbuild/rules_go v0.49.0 // indirect
github.com/beltran/gosasl v1.0.0 // indirect
github.com/beltran/gssapi v0.0.0-20200324152954-d86554db4bab // indirect
github.com/biogo/store v0.0.0-20201120204734-aad293a2328f // indirect
github.com/blevesearch/snowballstem v0.9.0 // indirect
github.com/boombuler/barcode v1.0.2 // indirect
+ github.com/buger/jsonparser v1.1.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cockroachdb/apd/v3 v3.2.1 // indirect
github.com/cockroachdb/errors v1.11.3 // indirect
@@ -225,6 +228,8 @@ require (
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.1 // indirect
github.com/openzipkin/zipkin-go v0.4.3 // indirect
+ github.com/pb33f/jsonpath v0.1.2 // indirect
+ github.com/pb33f/ordered-map/v2 v2.3.0 // indirect
github.com/petermattis/goid v0.0.0-20250813065127-a731cc31b4fe // indirect
github.com/pierrec/lz4 v2.6.1+incompatible // indirect
github.com/pierrre/geohash v1.0.0 // indirect
@@ -264,6 +269,7 @@ require (
go.uber.org/zap v1.27.0 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
+ go.yaml.in/yaml/v4 v4.0.0-rc.2 // indirect
golang.org/x/mod v0.30.0 // indirect
golang.org/x/sys v0.38.0 // indirect
golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54 // indirect
diff --git a/go.sum b/go.sum
index 954b434701..0ad0066fe7 100644
--- a/go.sum
+++ b/go.sum
@@ -809,6 +809,8 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.41.3 h1:tzMkjh0yTChUqJDgGkcDdxvZDSrJ
github.com/aws/aws-sdk-go-v2/service/sts v1.41.3/go.mod h1:T270C0R5sZNLbWUe8ueiAF42XSZxxPocTaGSgs5c/60=
github.com/aws/smithy-go v1.24.0 h1:LpilSUItNPFr1eY85RYgTIg5eIEPtvFbskaFcmmIUnk=
github.com/aws/smithy-go v1.24.0/go.mod h1:LEj2LM3rBRQJxPZTB4KuzZkaZYnZPnvgIhb4pu07mx0=
+github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk=
+github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg=
github.com/bazelbuild/rules_go v0.49.0 h1:5vCbuvy8Q11g41lseGJDc5vxhDjJtfxr6nM/IC4VmqM=
github.com/bazelbuild/rules_go v0.49.0/go.mod h1:Dhcz716Kqg1RHNWos+N6MlXNkjNP2EwZQ0LukRKJfMs=
github.com/beltran/gssapi v0.0.0-20200324152954-d86554db4bab h1:ayfcn60tXOSYy5zUN1AMSTQo4nJCf7hrdzAVchpPst4=
@@ -841,6 +843,8 @@ github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
+github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs=
+github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
github.com/bytebase/antlr/v4 v4.0.0-20240827034948-8c385f108920 h1:IfmPt5o5R70NKtOrs+QHOoCgViYZelZysGxVBvV4ybA=
github.com/bytebase/antlr/v4 v4.0.0-20240827034948-8c385f108920/go.mod h1:ykhjIPiv0IWpu3OGXCHdz2eUSe8UNGGD6baqjs8jSuU=
github.com/bytebase/azure-sdk-for-go/sdk/data/azcosmos v0.0.0-20250109032656-87cf24d45689 h1:tTxTI91JlBuvbX5JPDJSvCje9TxSUoXOzsbRp8qtcPs=
@@ -1577,6 +1581,12 @@ github.com/ory/dockertest/v3 v3.12.0/go.mod h1:aKNDTva3cp8dwOWwb9cWuX84aH5akkxXR
github.com/paulmach/orb v0.12.0 h1:z+zOwjmG3MyEEqzv92UN49Lg1JFYx0L9GpGKNVDKk1s=
github.com/paulmach/orb v0.12.0/go.mod h1:5mULz1xQfs3bmQm63QEJA6lNGujuRafwA5S/EnuLaLU=
github.com/paulmach/protoscan v0.2.1/go.mod h1:SpcSwydNLrxUGSDvXvO0P7g7AuhJ7lcKfDlhJCDw2gY=
+github.com/pb33f/jsonpath v0.1.2 h1:PlqXjEyecMqoYJupLxYeClCGWEpAFnh4pmzgspbXDPI=
+github.com/pb33f/jsonpath v0.1.2/go.mod h1:TtKnUnfqZm48q7a56DxB3WtL3ipkVtukMKGKxaR/uXU=
+github.com/pb33f/libopenapi v0.28.2 h1:AXVCE8DWzytXu0jv0Z+cXVopnO/bXU1oWvgA9qiRWgw=
+github.com/pb33f/libopenapi v0.28.2/go.mod h1:mHMHA3ZKSZDTInNAuUtqkHlKLIjPm2HN1vgsGR57afc=
+github.com/pb33f/ordered-map/v2 v2.3.0 h1:k2OhVEQkhTCQMhAicQ3Z6iInzoZNQ7L9MVomwKBZ5WQ=
+github.com/pb33f/ordered-map/v2 v2.3.0/go.mod h1:oe5ue+6ZNhy7QN9cPZvPA23Hx0vMHnNVeMg4fGdCANw=
github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4=
github.com/petermattis/goid v0.0.0-20250813065127-a731cc31b4fe h1:vHpqOnPlnkba8iSxU4j/CvDSS9J4+F4473esQsYLGoE=
github.com/petermattis/goid v0.0.0-20250813065127-a731cc31b4fe/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4=
@@ -1944,6 +1954,8 @@ go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI=
go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU=
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
+go.yaml.in/yaml/v4 v4.0.0-rc.2 h1:/FrI8D64VSr4HtGIlUtlFMGsm7H7pWTbj6vOLVZcA6s=
+go.yaml.in/yaml/v4 v4.0.0-rc.2/go.mod h1:aZqd9kCMsGL7AuUv/m/PvWLdg5sjJsZ4oHDEnfPPfY0=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
diff --git a/proto/buf.gen.yaml b/proto/buf.gen.yaml
index 5179a10e4e..0beb4a2f08 100644
--- a/proto/buf.gen.yaml
+++ b/proto/buf.gen.yaml
@@ -38,3 +38,10 @@ plugins:
opt: paths=source_relative,enum_type=string
types:
- bytebase.v1
+ - remote: buf.build/community/sudorandom-connect-openapi
+ out: ../backend/api/mcp/gen
+ opt:
+ - features=connectrpc;gnostic;protovalidate
+ - path=openapi.yaml
+ types:
+ - bytebase.v1