Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
openapi: 3.1.0
info:
title: API
description: API documentation for API
version: 1.0.0
paths:
/bytebase.v1.AIService/Chat:
post:
tags:
- bytebase.v1.AIService
summary: Chat
description: |-
Chat sends a conversation with tool definitions to the configured AI provider
and returns the AI response.
operationId: bytebase.v1.AIService.Chat
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.AIChatRequest'
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.AIChatResponse'
/bytebase.v1.AccessGrantService/ActivateAccessGrant:
post:
tags:
- bytebase.v1.AccessGrantService
summary: ActivateAccessGrant
description: Activates a pending access grant.
operationId: bytebase.v1.AccessGrantService.ActivateAccessGrant
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.ActivateAccessGrantRequest'
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.AccessGrant'
/bytebase.v1.AccessGrantService/CreateAccessGrant:
post:
tags:
- bytebase.v1.AccessGrantService
summary: CreateAccessGrant
description: Creates an access grant.
operationId: bytebase.v1.AccessGrantService.CreateAccessGrant
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.CreateAccessGrantRequest'
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.AccessGrant'
/bytebase.v1.AccessGrantService/GetAccessGrant:
post:
tags:
- bytebase.v1.AccessGrantService
summary: GetAccessGrant
description: Gets an access grant by name.
operationId: bytebase.v1.AccessGrantService.GetAccessGrant
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.GetAccessGrantRequest'
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.AccessGrant'
/bytebase.v1.AccessGrantService/ListAccessGrants:
post:
tags:
- bytebase.v1.AccessGrantService
summary: ListAccessGrants
description: Lists access grants in a project.
operationId: bytebase.v1.AccessGrantService.ListAccessGrants
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.ListAccessGrantsRequest'
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.ListAccessGrantsResponse'
/bytebase.v1.AccessGrantService/RevokeAccessGrant:
post:
tags:
- bytebase.v1.AccessGrantService
summary: RevokeAccessGrant
description: Revokes an active access grant.
operationId: bytebase.v1.AccessGrantService.RevokeAccessGrant
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.RevokeAccessGrantRequest'
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.AccessGrant'
/bytebase.v1.AccessGrantService/SearchMyAccessGrants:
post:
tags:
- bytebase.v1.AccessGrantService
summary: SearchMyAccessGrants
description: Searches access grants created by the caller.
operationId: bytebase.v1.AccessGrantService.SearchMyAccessGrants
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.SearchMyAccessGrantsRequest'
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.SearchMyAccessGrantsResponse'
/bytebase.v1.ActuatorService/GetActuatorInfo:
post:
tags:
- bytebase.v1.ActuatorService
summary: GetActuatorInfo
description: |-
Gets system information and health status of the Bytebase instance.
The workspace is resolved from the authenticated session.
Permissions required: None (authentication required)
operationId: bytebase.v1.ActuatorService.GetActuatorInfo
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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.AuditLogService/ExportAuditLogs:
post:
tags:
- bytebase.v1.AuditLogService
summary: ExportAuditLogs
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: SearchAuditLogs
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: ExchangeToken
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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/GetAuthenticationInfo:
post:
tags:
- bytebase.v1.AuthService
summary: GetAuthenticationInfo
description: |-
Gets everything the login page renders: the sign-in restrictions and the
identity providers it offers.
Permissions required: None
operationId: bytebase.v1.AuthService.GetAuthenticationInfo
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.GetAuthenticationInfoRequest'
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.AuthenticationInfo'
/bytebase.v1.AuthService/Login:
post:
tags:
- bytebase.v1.AuthService
summary: Login
description: |-
Authenticates a user and returns access tokens.
Permissions required: None
operationId: bytebase.v1.AuthService.Login
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: Logout
description: |-
Logs out the current user session.
Permissions required: None
operationId: bytebase.v1.AuthService.Logout
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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.AuthService/Refresh:
post:
tags:
- bytebase.v1.AuthService
summary: Refresh
description: |-
Refreshes the access token using the refresh token cookie.
Permissions required: None (validates via refresh token cookie)
operationId: bytebase.v1.AuthService.Refresh
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.RefreshRequest'
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.RefreshResponse'
/bytebase.v1.AuthService/RequestPasswordReset:
post:
tags:
- bytebase.v1.AuthService
summary: RequestPasswordReset
description: |-
Requests a password reset email for the given email address.
Always returns success to avoid leaking whether the email exists.
Requires the workspace's SMTP mail delivery setting; without it the
recovery route is an admin password reset.
Permissions required: None
operationId: bytebase.v1.AuthService.RequestPasswordReset
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.RequestPasswordResetRequest'
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.AuthService/ResetPassword:
post:
tags:
- bytebase.v1.AuthService
summary: ResetPassword
description: |-
Resets the user's password using a password reset token from email.
Permissions required: None (validates via token)
operationId: bytebase.v1.AuthService.ResetPassword
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.ResetPasswordRequest'
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.AuthService/SendEmailLoginCode:
post:
tags:
- bytebase.v1.AuthService
summary: SendEmailLoginCode
description: |-
Sends a 6-digit verification code to the email for login/signup.
Always returns success (no email enumeration). Enforces 60-sec resend cooldown.
The signed-in counterpart is UserService.RequestReauthCode; LOGIN and
REAUTH codes are not interchangeable.
Permissions required: None
operationId: bytebase.v1.AuthService.SendEmailLoginCode
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.SendEmailLoginCodeRequest'
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.AuthService/Signup:
post:
tags:
- bytebase.v1.AuthService
summary: Signup
description: |-
Registers a new user account. Creates a principal and assigns a workspace:
- If the user's email was pre-invited to a workspace, joins that workspace.
- Otherwise, creates a new workspace with the user as admin.
Returns access tokens so the user is logged in immediately after signup.
operationId: bytebase.v1.AuthService.Signup
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.SignupRequest'
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/SwitchWorkspace:
post:
tags:
- bytebase.v1.AuthService
summary: SwitchWorkspace
description: |-
Switches the current user's active workspace and issues new tokens.
The user must be a member of the target workspace.
operationId: bytebase.v1.AuthService.SwitchWorkspace
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.SwitchWorkspaceRequest'
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.CelService/BatchDeparse:
post:
tags:
- bytebase.v1.CelService
summary: BatchDeparse
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: BatchParse
description: |-
Parses multiple CEL expression strings into AST representations.
Permissions required: None
operationId: bytebase.v1.CelService.BatchParse
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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.ChangelogService/GetChangelog:
post:
tags:
- bytebase.v1.ChangelogService
summary: GetChangelog
description: |-
Retrieves a specific changelog entry.
Permissions required: bb.changelogs.get
operationId: bytebase.v1.ChangelogService.GetChangelog
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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.ChangelogService/ListChangelogs:
post:
tags:
- bytebase.v1.ChangelogService
summary: ListChangelogs
description: |-
Lists migration history for a database.
Permissions required: bb.changelogs.list
operationId: bytebase.v1.ChangelogService.ListChangelogs
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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.DatabaseCatalogService/GetDatabaseCatalog:
post:
tags:
- bytebase.v1.DatabaseCatalogService
summary: GetDatabaseCatalog
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: UpdateDatabaseCatalog
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: CreateDatabaseGroup
description: |-
Creates a new database group.
Permissions required: bb.databaseGroups.create
operationId: bytebase.v1.DatabaseGroupService.CreateDatabaseGroup
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: DeleteDatabaseGroup
description: |-
Deletes a database group.
Permissions required: bb.databaseGroups.delete
operationId: bytebase.v1.DatabaseGroupService.DeleteDatabaseGroup
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: GetDatabaseGroup
description: |-
Gets a database group by name.
Permissions required: bb.databaseGroups.get
operationId: bytebase.v1.DatabaseGroupService.GetDatabaseGroup
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: ListDatabaseGroups
description: |-
Lists database groups in a project.
Permissions required: bb.databaseGroups.list
operationId: bytebase.v1.DatabaseGroupService.ListDatabaseGroups
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: UpdateDatabaseGroup
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: BatchGetDatabases
description: |-
Retrieves multiple databases by their names.
One resource per requested name, in request order. The first name that
does not resolve fails the whole call (AIP-231: no partial response).
Permissions required: bb.databases.get (on each named database's project)
operationId: bytebase.v1.DatabaseService.BatchGetDatabases
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: BatchSyncDatabases
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: BatchUpdateDatabases
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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/DiffMetadata:
post:
tags:
- bytebase.v1.DatabaseService
summary: DiffMetadata
description: |-
Generates migration statements from the database's current schema to the
given target metadata.
Permissions required: bb.databases.diffMetadata
operationId: bytebase.v1.DatabaseService.DiffMetadata
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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.DatabaseService/DiffSchema:
post:
tags:
- bytebase.v1.DatabaseService
summary: DiffSchema
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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/GetDatabase:
post:
tags:
- bytebase.v1.DatabaseService
summary: GetDatabase
description: |-
Retrieves a database by name.
Permissions required: bb.databases.get
operationId: bytebase.v1.DatabaseService.GetDatabase
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: GetDatabaseMetadata
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: GetDatabaseSDLSchema
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: GetDatabaseSchema
description: |-
Retrieves database schema as DDL statements.
Permissions required: bb.databases.getSchema
operationId: bytebase.v1.DatabaseService.GetDatabaseSchema
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: GetSchemaString
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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/ListDatabases:
post:
tags:
- bytebase.v1.DatabaseService
summary: ListDatabases
description: |-
Lists databases in a project, instance, or workspace.
Permissions required: bb.databases.list (for project or workspace parent), or bb.instances.get (for instance parent)
operationId: bytebase.v1.DatabaseService.ListDatabases
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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/SearchDatabases:
post:
tags:
- bytebase.v1.DatabaseService
summary: SearchDatabases
description: |-
Searches for databases in every active project where the caller has the bb.databases.get permission, filtered by the specified filter.
Permissions required: bb.databases.get (checked in each project)
operationId: bytebase.v1.DatabaseService.SearchDatabases
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.SearchDatabasesRequest'
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.SearchDatabasesResponse'
/bytebase.v1.DatabaseService/SyncDatabase:
post:
tags:
- bytebase.v1.DatabaseService
summary: SyncDatabase
description: |-
Synchronizes database schema from the instance.
Permissions required: bb.databases.sync
operationId: bytebase.v1.DatabaseService.SyncDatabase
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: UpdateDatabase
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: BatchGetGroups
description: |-
Gets multiple groups in a single request.
Group members or users with bb.groups.get permission can get the group.
One resource per requested name, in request order. The first name that
does not resolve fails the whole call (AIP-231: no partial response).
Permissions required: bb.groups.get OR caller is the group member
operationId: bytebase.v1.GroupService.BatchGetGroups
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: CreateGroup
description: |-
Creates a new group.
Permissions required: bb.groups.create
operationId: bytebase.v1.GroupService.CreateGroup
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: DeleteGroup
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: GetGroup
description: |-
Gets a group by name.
Group members or users with bb.groups.get permission can get the group.
Permissions required: bb.groups.get OR caller is the group member
operationId: bytebase.v1.GroupService.GetGroup
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: ListGroups
description: |-
Lists all groups in the workspace.
Permissions required: bb.groups.list
operationId: bytebase.v1.GroupService.ListGroups
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: UpdateGroup
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: CreateIdentityProvider
description: |-
Creates a new identity provider.
Permissions required: bb.identityProviders.create
operationId: bytebase.v1.IdentityProviderService.CreateIdentityProvider
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: DeleteIdentityProvider
description: |-
Deletes an identity provider.
Permissions required: bb.identityProviders.delete
operationId: bytebase.v1.IdentityProviderService.DeleteIdentityProvider
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: GetIdentityProvider
description: |-
Gets an identity provider by name.
Permissions required: bb.identityProviders.get
operationId: bytebase.v1.IdentityProviderService.GetIdentityProvider
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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 the identity providers configured for the caller's workspace.
The login page reads AuthService.GetAuthenticationInfo instead,
which publishes only the fields a browser needs to start an SSO redirect.
description: |-
Returns the same representation as GetIdentityProvider — secrets redacted,
the rest of the configuration included — so granting
bb.identityProviders.list conveys configuration read over the whole
collection, not merely the names in it.
Permissions required: bb.identityProviders.list
operationId: bytebase.v1.IdentityProviderService.ListIdentityProviders
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: TestIdentityProvider
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: UpdateIdentityProvider
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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/ListInstanceRoles:
post:
tags:
- bytebase.v1.InstanceRoleService
summary: ListInstanceRoles
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: AddDataSource
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: BatchSyncInstances
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: BatchUpdateInstances
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: CreateInstance
description: |-
Creates a new database instance.
Permissions required: bb.instances.create
operationId: bytebase.v1.InstanceService.CreateInstance
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: DeleteInstance
description: |-
Deletes or soft-deletes a database instance.
Soft-delete requests fail with FAILED_PRECONDITION while any task run
targeting the instance is pending, available, or running.
Permissions required: bb.instances.delete
operationId: bytebase.v1.InstanceService.DeleteInstance
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: GetInstance
description: |-
Gets a database instance by name.
Permissions required: bb.instances.get
operationId: bytebase.v1.InstanceService.GetInstance
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: ListInstanceDatabase
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: ListInstances
description: |-
Lists database instances, optionally within a project.
Permissions required: bb.instances.list
operationId: bytebase.v1.InstanceService.ListInstances
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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/PrepareSampleProjectInstance:
post:
tags:
- bytebase.v1.InstanceService
summary: PrepareSampleProjectInstance
description: |-
Prepares a Sample Project Instance for a project.
Permissions required: bb.instances.create
operationId: bytebase.v1.InstanceService.PrepareSampleProjectInstance
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.PrepareSampleProjectInstanceRequest'
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/RemoveDataSource:
post:
tags:
- bytebase.v1.InstanceService
summary: RemoveDataSource
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: SyncInstance
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: UndeleteInstance
description: |-
Restores a soft-deleted database instance.
Restore requests fail with FAILED_PRECONDITION while any task run targeting
the instance is pending, available, or running.
Permissions required: bb.instances.undelete
operationId: bytebase.v1.InstanceService.UndeleteInstance
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: UpdateDataSource
description: |-
Updates a data source configuration.
Permissions required: bb.instances.update
operationId: bytebase.v1.InstanceService.UpdateDataSource
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: UpdateInstance
description: |-
Updates a database instance.
Permissions required: bb.instances.update
operationId: bytebase.v1.InstanceService.UpdateInstance
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: ApproveIssue
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: BatchUpdateIssuesStatus
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: CreateIssue
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: CreateIssueComment
description: |-
Adds a comment to an issue.
Permissions required: bb.issueComments.create
operationId: bytebase.v1.IssueService.CreateIssueComment
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: GetIssue
description: |-
Retrieves an issue by name.
Permissions required: bb.issues.get
operationId: bytebase.v1.IssueService.GetIssue
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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/GetReviewRun:
post:
tags:
- bytebase.v1.IssueService
summary: GetReviewRun
description: |-
Gets the current run of one reviewer on an issue. The run carries
execution status only; review results are issue comments. A reviewer
that has never run on the issue is NOT_FOUND.
Permissions required: bb.reviewRuns.get
operationId: bytebase.v1.IssueService.GetReviewRun
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.GetReviewRunRequest'
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.ReviewRun'
/bytebase.v1.IssueService/ListIssueComments:
post:
tags:
- bytebase.v1.IssueService
summary: ListIssueComments
description: |-
Lists comments on an issue.
Permissions required: bb.issueComments.list
operationId: bytebase.v1.IssueService.ListIssueComments
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: ListIssues
description: |-
Lists issues in a project.
Permissions required: bb.issues.list
operationId: bytebase.v1.IssueService.ListIssues
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: RejectIssue
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: RequestIssue
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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/RetryIssueApproval:
post:
tags:
- bytebase.v1.IssueService
summary: RetryIssueApproval
description: |-
Re-runs approval-template finding for an issue stuck in CHECKING.
Useful when the synchronous post-create finding errored (e.g. against
a malformed workspace approval rule) and the operator has since
corrected it — without this, the issue would remain in CHECKING
indefinitely because there is no other retry path for non-DATABASE_CHANGE
issue types. Idempotent: returns the existing issue unchanged when
approval-finding has already completed.
Permissions required: None (caller must be the issue creator;
mirrors RequestIssue's authorization model).
operationId: bytebase.v1.IssueService.RetryIssueApproval
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.RetryIssueApprovalRequest'
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/RunReview:
post:
tags:
- bytebase.v1.IssueService
summary: RunReview
description: |-
Triggers a review run. The slot is reset unconditionally: a RUNNING
execution is superseded (its completion is fenced off), the attempt
number is bumped, and the returned run is AVAILABLE.
Review results are not returned by this RPC: they are posted as issue
comments. The returned run carries execution status only, and
GetReviewRun reads it back.
The audit log is the only record of who triggered a run.
Permissions required: bb.reviewRuns.run
operationId: bytebase.v1.IssueService.RunReview
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.RunReviewRequest'
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.ReviewRun'
/bytebase.v1.IssueService/SearchIssues:
post:
tags:
- bytebase.v1.IssueService
summary: SearchIssues
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: UpdateIssue
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: UpdateIssueComment
description: |-
Updates an existing issue comment.
Permissions required: bb.issueComments.update
operationId: bytebase.v1.IssueService.UpdateIssueComment
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: CreatePolicy
description: |-
Creates a new organizational policy.
Permissions required: bb.policies.create
operationId: bytebase.v1.OrgPolicyService.CreatePolicy
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: DeletePolicy
description: |-
Deletes an organizational policy.
Permissions required: bb.policies.delete
operationId: bytebase.v1.OrgPolicyService.DeletePolicy
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: GetPolicy
description: |-
Retrieves a policy by name.
Permissions required: bb.policies.get
operationId: bytebase.v1.OrgPolicyService.GetPolicy
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: ListPolicies
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: UpdatePolicy
description: |-
Updates an existing organizational policy.
Permissions required: bb.policies.update
operationId: bytebase.v1.OrgPolicyService.UpdatePolicy
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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/CancelPlanCheckRun:
post:
tags:
- bytebase.v1.PlanService
summary: CancelPlanCheckRun
description: |-
Cancels the plan check run for a deployment plan.
Permissions required: bb.planCheckRuns.run
operationId: bytebase.v1.PlanService.CancelPlanCheckRun
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.CancelPlanCheckRunRequest'
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.CancelPlanCheckRunResponse'
/bytebase.v1.PlanService/CreatePlan:
post:
tags:
- bytebase.v1.PlanService
summary: CreatePlan
description: |-
Creates a new deployment plan.
Permissions required: bb.plans.create
operationId: bytebase.v1.PlanService.CreatePlan
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: GetPlan
description: |-
Retrieves a deployment plan by name.
Permissions required: bb.plans.get
operationId: bytebase.v1.PlanService.GetPlan
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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/GetPlanCheckRun:
post:
tags:
- bytebase.v1.PlanService
summary: GetPlanCheckRun
description: |-
Gets the plan check run for a deployment plan.
Permissions required: bb.planCheckRuns.get
operationId: bytebase.v1.PlanService.GetPlanCheckRun
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.GetPlanCheckRunRequest'
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.PlanCheckRun'
/bytebase.v1.PlanService/ListPlans:
post:
tags:
- bytebase.v1.PlanService
summary: ListPlans
description: |-
Lists deployment plans in a project.
Permissions required: bb.plans.list
operationId: bytebase.v1.PlanService.ListPlans
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: RunPlanChecks
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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/UpdatePlan:
post:
tags:
- bytebase.v1.PlanService
summary: UpdatePlan
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: AddWebhook
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: BatchDeleteProjects
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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/BatchGetProjects:
post:
tags:
- bytebase.v1.ProjectService
summary: BatchGetProjects
description: |-
BatchGetProjects retrieves multiple projects by their names.
One resource per requested name, in request order. The first name that
does not resolve fails the whole call (AIP-231: no partial response).
Permissions required: bb.projects.get (on each named project)
operationId: bytebase.v1.ProjectService.BatchGetProjects
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.BatchGetProjectsRequest'
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.BatchGetProjectsResponse'
/bytebase.v1.ProjectService/CreateProject:
post:
tags:
- bytebase.v1.ProjectService
summary: CreateProject
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: DeleteProject
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: 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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: ListProjects
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: RemoveWebhook
description: |-
Removes a webhook from a project.
Permissions required: bb.projects.update
operationId: bytebase.v1.ProjectService.RemoveWebhook
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: SearchProjects
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: 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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: TestWebhook
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: UndeleteProject
description: |-
Restores a soft-deleted project.
Permissions required: bb.projects.undelete
operationId: bytebase.v1.ProjectService.UndeleteProject
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: UpdateProject
description: |-
Updates an existing project's properties.
Permissions required: bb.projects.update
operationId: bytebase.v1.ProjectService.UpdateProject
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: UpdateWebhook
description: |-
Updates an existing webhook configuration.
Permissions required: bb.projects.update
operationId: bytebase.v1.ProjectService.UpdateWebhook
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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.QueryHistoryService/GetQueryHistory:
post:
tags:
- bytebase.v1.QueryHistoryService
summary: GetQueryHistory
description: |-
GetQueryHistory gets a single query history for the caller.
Permissions required: None (only returns the caller's own query history)
operationId: bytebase.v1.QueryHistoryService.GetQueryHistory
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.GetQueryHistoryRequest'
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.QueryHistory'
/bytebase.v1.QueryHistoryService/ListQueryHistories:
post:
tags:
- bytebase.v1.QueryHistoryService
summary: ListQueryHistories
description: |-
ListQueryHistories lists query histories of all users in a project.
Results are ordered by create time descending (newest first).
Permissions required: bb.queryHistories.list
operationId: bytebase.v1.QueryHistoryService.ListQueryHistories
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.ListQueryHistoriesRequest'
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.ListQueryHistoriesResponse'
/bytebase.v1.QueryHistoryService/SearchQueryHistories:
post:
tags:
- bytebase.v1.QueryHistoryService
summary: SearchQueryHistories
description: |-
SearchQueryHistories searches query histories for the caller.
Permissions required: None (only returns caller's own query histories)
operationId: bytebase.v1.QueryHistoryService.SearchQueryHistories
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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.ReleaseService/CheckRelease:
post:
tags:
- bytebase.v1.ReleaseService
summary: CheckRelease
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: CreateRelease
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: DeleteRelease
description: |-
Deletes a release.
Permissions required: bb.releases.delete
operationId: bytebase.v1.ReleaseService.DeleteRelease
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: GetRelease
description: |-
Retrieves a release by name.
Permissions required: bb.releases.get
operationId: bytebase.v1.ReleaseService.GetRelease
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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/ListReleaseCategories:
post:
tags:
- bytebase.v1.ReleaseService
summary: ListReleaseCategories
description: |-
Lists all unique categories in a project.
Permissions required: bb.releases.list
operationId: bytebase.v1.ReleaseService.ListReleaseCategories
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.ListReleaseCategoriesRequest'
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.ListReleaseCategoriesResponse'
/bytebase.v1.ReleaseService/ListReleases:
post:
tags:
- bytebase.v1.ReleaseService
summary: ListReleases
description: |-
Lists releases in a project.
Permissions required: bb.releases.list
operationId: bytebase.v1.ReleaseService.ListReleases
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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/UndeleteRelease:
post:
tags:
- bytebase.v1.ReleaseService
summary: UndeleteRelease
description: |-
Restores a deleted release.
Permissions required: bb.releases.undelete
operationId: bytebase.v1.ReleaseService.UndeleteRelease
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: UpdateRelease
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: CreateReviewConfig
description: |-
Creates a new SQL review configuration.
Permissions required: bb.reviewConfigs.create
operationId: bytebase.v1.ReviewConfigService.CreateReviewConfig
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: DeleteReviewConfig
description: |-
Deletes a SQL review configuration.
Permissions required: bb.reviewConfigs.delete
operationId: bytebase.v1.ReviewConfigService.DeleteReviewConfig
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: GetReviewConfig
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: ListReviewConfigs
description: |-
Lists all SQL review configurations.
Permissions required: bb.reviewConfigs.list
operationId: bytebase.v1.ReviewConfigService.ListReviewConfigs
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: UpdateReviewConfig
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: BatchCreateRevisions
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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/DeleteRevision:
post:
tags:
- bytebase.v1.RevisionService
summary: DeleteRevision
description: |-
Deletes a schema revision.
Permissions required: bb.revisions.delete
operationId: bytebase.v1.RevisionService.DeleteRevision
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: GetRevision
description: |-
Retrieves a schema revision by name.
Permissions required: bb.revisions.get
operationId: bytebase.v1.RevisionService.GetRevision
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: ListRevisions
description: |-
Lists schema revisions for a database.
Permissions required: bb.revisions.list
operationId: bytebase.v1.RevisionService.ListRevisions
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: CreateRole
description: |-
Creates a new custom role.
Permissions required: bb.roles.create
operationId: bytebase.v1.RoleService.CreateRole
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: DeleteRole
description: |-
Deletes a custom role.
Permissions required: bb.roles.delete
operationId: bytebase.v1.RoleService.DeleteRole
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: GetRole
description: |-
Retrieves a role by name.
Permissions required: bb.roles.get
operationId: bytebase.v1.RoleService.GetRole
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: ListRoles
description: |-
Lists roles in the workspace.
Permissions required: bb.roles.list
operationId: bytebase.v1.RoleService.ListRoles
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: UpdateRole
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: BatchCancelTaskRuns
description: |-
Cancels multiple task runs.
PENDING and AVAILABLE task runs are moved to CANCELED synchronously. RUNNING task runs receive
a best-effort cancellation request and may continue running if the request is missed or the
executor does not stop. The response does not report which task runs were actually canceled.
Permissions required: bb.taskRuns.create (or user with rollout policy role for the environment)
operationId: bytebase.v1.RolloutService.BatchCancelTaskRuns
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: BatchRunTasks
description: |-
Executes multiple tasks in a rollout stage.
Permissions required: bb.taskRuns.create (or user with rollout policy role for the environment)
operationId: bytebase.v1.RolloutService.BatchRunTasks
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: BatchSkipTasks
description: |-
Skips multiple tasks in a rollout stage.
Permissions required: bb.taskRuns.create (or user with rollout policy role for the environment)
operationId: bytebase.v1.RolloutService.BatchSkipTasks
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: CreateRollout
description: |-
Creates a new rollout for a plan.
Permissions required: bb.rollouts.create
operationId: bytebase.v1.RolloutService.CreateRollout
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: GetRollout
description: |-
Retrieves a rollout by its plan name.
Permissions required: bb.rollouts.get
operationId: bytebase.v1.RolloutService.GetRollout
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: GetTaskRun
description: |-
Retrieves a task run by name.
Permissions required: bb.taskRuns.list
operationId: bytebase.v1.RolloutService.GetTaskRun
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: GetTaskRunLog
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: GetTaskRunSession
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: ListRollouts
description: |-
Lists rollouts in a project.
Permissions required: bb.rollouts.list
operationId: bytebase.v1.RolloutService.ListRollouts
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: ListTaskRuns
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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/PreviewTaskRunRollback:
post:
tags:
- bytebase.v1.RolloutService
summary: PreviewTaskRunRollback
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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/AdminExecute: {}
/bytebase.v1.SQLService/Export:
post:
tags:
- bytebase.v1.SQLService
summary: Export
description: |-
Exports query results to a file format.
Permissions required: bb.databases.get, and bb.sql.export on the data the statement reads.
An active access grant with export=true for the statement satisfies bb.sql.export on its target databases.
operationId: bytebase.v1.SQLService.Export
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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/GetQueryHistory:
post:
tags:
- bytebase.v1.SQLService
summary: GetQueryHistory
description: |-
Deprecated: use QueryHistoryService.GetQueryHistory instead.
Delegating alias kept for upgrade transition; will be removed in a future release.
No HTTP binding: the REST route is served by QueryHistoryService.
Permissions required: None (only returns the caller's own query history)
operationId: bytebase.v1.SQLService.GetQueryHistory
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.GetQueryHistoryRequest'
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.QueryHistory'
deprecated: true
/bytebase.v1.SQLService/ListQueryHistories:
post:
tags:
- bytebase.v1.SQLService
summary: ListQueryHistories
description: |-
Deprecated: use QueryHistoryService.ListQueryHistories instead.
Delegating alias kept for upgrade transition; will be removed in a future release.
No HTTP binding: the REST route is served by QueryHistoryService.
Permissions required: bb.queryHistories.list
operationId: bytebase.v1.SQLService.ListQueryHistories
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.ListQueryHistoriesRequest'
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.ListQueryHistoriesResponse'
deprecated: true
/bytebase.v1.SQLService/Query:
post:
tags:
- bytebase.v1.SQLService
summary: Query
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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
description: |-
Deprecated: use QueryHistoryService.SearchQueryHistories instead.
Delegating alias kept for upgrade transition; will be removed in a future release.
No HTTP binding: the REST route is served by QueryHistoryService.
Permissions required: None (only returns caller's own query histories)
operationId: bytebase.v1.SQLService.SearchQueryHistories
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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'
deprecated: true
/bytebase.v1.SavedQueryService/CreateSavedQuery:
post:
tags:
- bytebase.v1.SavedQueryService
summary: CreateSavedQuery
description: |-
Create a saved query. The creator becomes the owner and the saved query
starts private.
Permissions required: bb.savedQueries.create on the project
operationId: bytebase.v1.SavedQueryService.CreateSavedQuery
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.CreateSavedQueryRequest'
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.SavedQuery'
/bytebase.v1.SavedQueryService/DeleteSavedQuery:
post:
tags:
- bytebase.v1.SavedQueryService
summary: DeleteSavedQuery
description: |-
Delete a saved query and every user's stars on it. An EDITOR binding
cannot delete.
Permissions required: bb.savedQueries.delete (creator or project-level
grant)
operationId: bytebase.v1.SavedQueryService.DeleteSavedQuery
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.DeleteSavedQueryRequest'
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.SavedQueryService/GetSavedQuery:
post:
tags:
- bytebase.v1.SavedQueryService
summary: GetSavedQuery
description: |-
Get a saved query with its full content.
Permissions required: bb.savedQueries.get (creator, VIEWER/EDITOR
binding, or project-level grant)
operationId: bytebase.v1.SavedQueryService.GetSavedQuery
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.GetSavedQueryRequest'
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.SavedQuery'
/bytebase.v1.SavedQueryService/GetSavedQueryPolicy:
post:
tags:
- bytebase.v1.SavedQueryService
summary: GetSavedQueryPolicy
description: |-
Get a saved query's sharing policy: who it is shared with, at what level.
Permissions required: bb.savedQueries.getIamPolicy (creator, VIEWER/EDITOR
binding, or project-level grant)
operationId: bytebase.v1.SavedQueryService.GetSavedQueryPolicy
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.GetSavedQueryPolicyRequest'
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.SavedQueryPolicy'
/bytebase.v1.SavedQueryService/ListSavedQueries:
post:
tags:
- bytebase.v1.SavedQueryService
summary: ListSavedQueries
description: |-
List saved queries for auditing. The permission alone grants reading
every matched saved query with full content, private ones included;
bindings are ignored. Use parent "projects/-" for all projects.
Results default to title ascending; see `order_by`.
Permissions required: bb.savedQueries.list on the project, or on the
workspace when the parent is "projects/-"
operationId: bytebase.v1.SavedQueryService.ListSavedQueries
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.ListSavedQueriesRequest'
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.ListSavedQueriesResponse'
/bytebase.v1.SavedQueryService/MoveMySavedQueries:
post:
tags:
- bytebase.v1.SavedQueryService
summary: MoveMySavedQueries
description: |-
Move the caller's saved queries filed under `source_folder`, descendants
included, into `target_folder`: renaming "a/b" to "a/c" also moves
"a/b/deep". Only the caller's own saved queries move; the response counts
how many did. Re-filing a single saved query is UpdateSavedQuery's
`folder` field.
Permissions required: creator
operationId: bytebase.v1.SavedQueryService.MoveMySavedQueries
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.MoveMySavedQueriesRequest'
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.MoveMySavedQueriesResponse'
/bytebase.v1.SavedQueryService/SearchSavedQueries:
post:
tags:
- bytebase.v1.SavedQueryService
summary: SearchSavedQueries
description: |-
Search saved queries in one project. Returns content previews of the
saved queries the caller can read, the same access rule as GetSavedQuery.
Permissions required: bb.savedQueries.search on the project
operationId: bytebase.v1.SavedQueryService.SearchSavedQueries
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.SearchSavedQueriesRequest'
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.SearchSavedQueriesResponse'
/bytebase.v1.SavedQueryService/SearchSavedQueryFolders:
post:
tags:
- bytebase.v1.SavedQueryService
summary: SearchSavedQueryFolders
description: |-
Search folder paths. A path is returned when it holds at least one saved
query the caller can read, the same access rule as SearchSavedQueries.
Permissions required: bb.savedQueries.search on the project
operationId: bytebase.v1.SavedQueryService.SearchSavedQueryFolders
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.SearchSavedQueryFoldersRequest'
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.SearchSavedQueryFoldersResponse'
/bytebase.v1.SavedQueryService/SetSavedQueryPolicy:
post:
tags:
- bytebase.v1.SavedQueryService
summary: SetSavedQueryPolicy
description: |-
Replace a saved query's sharing policy in full. `policy.etag` must match
the stored policy; a mismatch fails with ABORTED.
Permissions required: bb.savedQueries.setIamPolicy (creator or
project-level grant; no predefined role carries it)
operationId: bytebase.v1.SavedQueryService.SetSavedQueryPolicy
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.SetSavedQueryPolicyRequest'
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.SavedQueryPolicy'
/bytebase.v1.SavedQueryService/UpdateSavedQuery:
post:
tags:
- bytebase.v1.SavedQueryService
summary: UpdateSavedQuery
description: |-
Update a saved query. `database` must belong to the saved query's project.
Permissions required: bb.savedQueries.update (creator, EDITOR binding, or
project-level grant)
operationId: bytebase.v1.SavedQueryService.UpdateSavedQuery
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.UpdateSavedQueryRequest'
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.SavedQuery'
/bytebase.v1.SavedQueryService/UpdateSavedQueryStar:
post:
tags:
- bytebase.v1.SavedQueryService
summary: UpdateSavedQueryStar
description: |-
Star or unstar a saved query for the caller. Stars are personal: nobody
else sees them and they grant nothing. The caller can star any saved
query they can read. When access is lost the star is hidden, not
deleted; it comes back if access returns.
Permissions required: bb.savedQueries.get (creator, VIEWER/EDITOR
binding, or project-level grant)
operationId: bytebase.v1.SavedQueryService.UpdateSavedQueryStar
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.UpdateSavedQueryStarRequest'
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.SavedQuery'
/bytebase.v1.ServiceAccountService/CreateServiceAccount:
post:
tags:
- bytebase.v1.ServiceAccountService
summary: CreateServiceAccount
description: |-
Creates a new service account.
For workspace-level: parent is workspaces/{id}, permission bb.serviceAccounts.create on workspace.
For project-level: parent is projects/{project}, permission bb.serviceAccounts.create on project.
operationId: bytebase.v1.ServiceAccountService.CreateServiceAccount
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.CreateServiceAccountRequest'
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.ServiceAccount'
/bytebase.v1.ServiceAccountService/DeleteServiceAccount:
post:
tags:
- bytebase.v1.ServiceAccountService
summary: DeleteServiceAccount
description: |-
Deletes a service account.
Permissions required: bb.serviceAccounts.delete
operationId: bytebase.v1.ServiceAccountService.DeleteServiceAccount
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.DeleteServiceAccountRequest'
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.ServiceAccountService/GetServiceAccount:
post:
tags:
- bytebase.v1.ServiceAccountService
summary: GetServiceAccount
description: |-
Gets a service account by name.
Permissions required: bb.serviceAccounts.get
operationId: bytebase.v1.ServiceAccountService.GetServiceAccount
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.GetServiceAccountRequest'
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.ServiceAccount'
/bytebase.v1.ServiceAccountService/ListServiceAccounts:
post:
tags:
- bytebase.v1.ServiceAccountService
summary: ListServiceAccounts
description: |-
Lists service accounts.
For workspace-level: parent is workspaces/{id}, permission bb.serviceAccounts.list on workspace.
For project-level: parent is projects/{project}, permission bb.serviceAccounts.list on project.
operationId: bytebase.v1.ServiceAccountService.ListServiceAccounts
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.ListServiceAccountsRequest'
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.ListServiceAccountsResponse'
/bytebase.v1.ServiceAccountService/UndeleteServiceAccount:
post:
tags:
- bytebase.v1.ServiceAccountService
summary: UndeleteServiceAccount
description: |-
Restores a deleted service account.
Permissions required: bb.serviceAccounts.undelete
operationId: bytebase.v1.ServiceAccountService.UndeleteServiceAccount
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.UndeleteServiceAccountRequest'
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.ServiceAccount'
/bytebase.v1.ServiceAccountService/UpdateServiceAccount:
post:
tags:
- bytebase.v1.ServiceAccountService
summary: UpdateServiceAccount
description: |-
Updates a service account.
Permissions required: bb.serviceAccounts.update
operationId: bytebase.v1.ServiceAccountService.UpdateServiceAccount
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.UpdateServiceAccountRequest'
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.ServiceAccount'
/bytebase.v1.SettingService/GetSetting:
post:
tags:
- bytebase.v1.SettingService
summary: GetSetting
description: |-
Retrieves a workspace setting by name.
Permissions required: bb.settings.getEnvironment for settings/ENVIRONMENT, bb.settings.getWorkspaceProfile for settings/WORKSPACE_PROFILE, bb.settings.get for the others
operationId: bytebase.v1.SettingService.GetSetting
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: ListSettings
description: |-
Lists all workspace settings.
Permissions required: bb.settings.list
operationId: bytebase.v1.SettingService.ListSettings
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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/TestEmailSetting:
post:
tags:
- bytebase.v1.SettingService
summary: TestEmailSetting
description: |-
Sends a test email using the provided config (without persisting).
Permissions required: bb.settings.set
operationId: bytebase.v1.SettingService.TestEmailSetting
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.TestEmailSettingRequest'
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.TestEmailSettingResponse'
/bytebase.v1.SettingService/UpdateSetting:
post:
tags:
- bytebase.v1.SettingService
summary: UpdateSetting
description: |-
Updates a workspace setting.
Permissions required: bb.settings.set
operationId: bytebase.v1.SettingService.UpdateSetting
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: BatchCreateSheets
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: CreateSheet
description: |-
Creates a new SQL sheet.
Permissions required: bb.sheets.create
operationId: bytebase.v1.SheetService.CreateSheet
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: GetSheet
description: |-
Retrieves a SQL sheet by name.
Permissions required: bb.sheets.get
operationId: bytebase.v1.SheetService.GetSheet
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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.SubscriptionService/CancelPurchase:
post:
tags:
- bytebase.v1.SubscriptionService
summary: CancelPurchase
description: CancelPurchase cancels an active subscription (SaaS only).
operationId: bytebase.v1.SubscriptionService.CancelPurchase
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.CancelPurchaseRequest'
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.PurchaseResponse'
/bytebase.v1.SubscriptionService/CreatePurchase:
post:
tags:
- bytebase.v1.SubscriptionService
summary: CreatePurchase
description: |-
CreatePurchase creates a new subscription purchase (SaaS only).
Returns a Stripe Checkout URL for the user to complete payment.
operationId: bytebase.v1.SubscriptionService.CreatePurchase
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.CreatePurchaseRequest'
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.PurchaseResponse'
/bytebase.v1.SubscriptionService/ExportVCSProviderUsers:
post:
tags:
- bytebase.v1.SubscriptionService
summary: ExportVCSProviderUsers
description: Exports active VCS users as CSV.
operationId: bytebase.v1.SubscriptionService.ExportVCSProviderUsers
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.ExportVCSProviderUsersRequest'
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.ExportVCSProviderUsersResponse'
/bytebase.v1.SubscriptionService/GetPaymentInfo:
post:
tags:
- bytebase.v1.SubscriptionService
summary: GetPaymentInfo
description: GetPaymentInfo returns payment details for the current subscription (SaaS only).
operationId: bytebase.v1.SubscriptionService.GetPaymentInfo
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.GetPaymentInfoRequest'
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.PaymentInfo'
/bytebase.v1.SubscriptionService/GetSubscription:
post:
tags:
- bytebase.v1.SubscriptionService
summary: GetSubscription
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.
operationId: bytebase.v1.SubscriptionService.GetSubscription
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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/ListPurchasePlans:
post:
tags:
- bytebase.v1.SubscriptionService
summary: ListPurchasePlans
description: ListPurchasePlans returns available plans for self-service purchase.
operationId: bytebase.v1.SubscriptionService.ListPurchasePlans
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.ListPurchasePlansRequest'
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.ListPurchasePlansResponse'
/bytebase.v1.SubscriptionService/StartTrial:
post:
tags:
- bytebase.v1.SubscriptionService
summary: StartTrial
description: StartTrial starts a free trial for an eligible SaaS workspace.
operationId: bytebase.v1.SubscriptionService.StartTrial
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.StartTrialRequest'
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/UpdatePurchase:
post:
tags:
- bytebase.v1.SubscriptionService
summary: UpdatePurchase
description: |-
UpdatePurchase updates an existing subscription (SaaS only).
May return a Stripe Checkout URL if payment method change is needed.
operationId: bytebase.v1.SubscriptionService.UpdatePurchase
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.UpdatePurchaseRequest'
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.PurchaseResponse'
/bytebase.v1.SubscriptionService/UploadLicense:
post:
tags:
- bytebase.v1.SubscriptionService
summary: UploadLicense
description: Uploads an enterprise license (self-hosted only).
operationId: bytebase.v1.SubscriptionService.UploadLicense
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.UploadLicenseRequest'
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/VerifyCheckoutSession:
post:
tags:
- bytebase.v1.SubscriptionService
summary: VerifyCheckoutSession
description: VerifyCheckoutSession verifies a Stripe Checkout Session status (SaaS only).
operationId: bytebase.v1.SubscriptionService.VerifyCheckoutSession
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.VerifyCheckoutSessionRequest'
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.VerifyCheckoutSessionResponse'
/bytebase.v1.UserService/BatchGetUsers:
post:
tags:
- bytebase.v1.UserService
summary: BatchGetUsers
description: |-
Get the users in batch.
Any authenticated user can batch get users.
One resource per requested name, in request order. The first name that
does not resolve fails the whole call (AIP-231: no partial response).
Permissions required: bb.users.get
operationId: bytebase.v1.UserService.BatchGetUsers
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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/ChangePassword:
post:
tags:
- bytebase.v1.UserService
summary: ChangePassword
description: |-
Changes the caller's own password. An administrator resetting someone
else's password uses UpdateUser with the `password` mask instead — that
is a different operation with a different audit story, even though both
end in a new password hash.
Permissions required: None beyond being signed in as `name`.
operationId: bytebase.v1.UserService.ChangePassword
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.ChangePasswordRequest'
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/ConfirmRecoveryCodes:
post:
tags:
- bytebase.v1.UserService
summary: ConfirmRecoveryCodes
description: |-
Promotes the pending recovery codes. During first-time enrollment this is
also where the pending TOTP secret goes live, so the factor and the codes
that recover it start existing in the same write.
Permissions required: None beyond being signed in as `name`.
operationId: bytebase.v1.UserService.ConfirmRecoveryCodes
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.ConfirmRecoveryCodesRequest'
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/CreateUser:
post:
tags:
- bytebase.v1.UserService
summary: CreateUser
description: |-
Creates a user in the caller's workspace (admin action, self-hosted only).
In SaaS mode, admins should add users via workspace IAM policy instead.
Permissions required: bb.users.create
operationId: bytebase.v1.UserService.CreateUser
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: DeleteUser
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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/DisableMFA:
post:
tags:
- bytebase.v1.UserService
summary: DisableMFA
description: |-
Turns MFA off, clearing the entire MFA config — live and pending state
alike. Callers may disable their own; an administrator may disable
another user's with bb.users.update, which is how a locked-out user is
recovered.
Permissions required: bb.users.update, unless `name` is the caller's own.
operationId: bytebase.v1.UserService.DisableMFA
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.DisableMFARequest'
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/EnableMFA:
post:
tags:
- bytebase.v1.UserService
summary: EnableMFA
description: |-
Verifies an otp_code against the pending enrollment. Nothing is written:
this is the step that catches a mistyped authenticator before the caller
is shown recovery codes, and promotion happens at ConfirmRecoveryCodes so
an account is never MFA-required with codes its owner never saved.
Permissions required: None beyond being signed in as `name`.
It writes nothing itself, but it is a required step of installing a
factor on the account, which is why it is denied on the same grounds as
the promotion it precedes.
operationId: bytebase.v1.UserService.EnableMFA
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.EnableMFARequest'
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/GetCurrentUser:
post:
tags:
- bytebase.v1.UserService
summary: GetCurrentUser
description: |-
Get the current authenticated user.
Permissions required: None
operationId: bytebase.v1.UserService.GetCurrentUser
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: GetUser
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: ListUsers
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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/RegenerateRecoveryCodes:
post:
tags:
- bytebase.v1.UserService
summary: RegenerateRecoveryCodes
description: |-
Mints a pending recovery-code set beside the live one and returns it.
The old codes keep working until ConfirmRecoveryCodes promotes these, so
a caller who closes the page mid-way is not left without any.
Permissions required: None beyond being signed in as `name`.
operationId: bytebase.v1.UserService.RegenerateRecoveryCodes
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.RegenerateRecoveryCodesRequest'
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.RegenerateRecoveryCodesResponse'
/bytebase.v1.UserService/RequestReauthCode:
post:
tags:
- bytebase.v1.UserService
summary: RequestReauthCode
description: |-
Sends a one-time code to the caller's own email, usable as
CredentialProof.email_code. Bytebase Cloud only, and only while the
account has no live MFA factor. Not AuthService.SendEmailLoginCode: that
one starts a session, this one proves an existing one.
Permissions required: None beyond being signed in as `name`.
operationId: bytebase.v1.UserService.RequestReauthCode
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.RequestReauthCodeRequest'
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/StartMFAEnrollment:
post:
tags:
- bytebase.v1.UserService
summary: StartMFAEnrollment
description: |-
Mints a pending TOTP secret and recovery codes for the caller's own
account and returns them. Nothing goes live until ConfirmRecoveryCodes,
so an abandoned enrollment leaves the account exactly as it was.
Permissions required: None beyond being signed in as `name`.
operationId: bytebase.v1.UserService.StartMFAEnrollment
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.StartMFAEnrollmentRequest'
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.StartMFAEnrollmentResponse'
/bytebase.v1.UserService/UndeleteUser:
post:
tags:
- bytebase.v1.UserService
summary: UndeleteUser
description: |-
Restores a deleted user.
Permissions required: bb.users.undelete
operationId: bytebase.v1.UserService.UndeleteUser
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: 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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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: UpdateUser
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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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.WorkloadIdentityService/CreateWorkloadIdentity:
post:
tags:
- bytebase.v1.WorkloadIdentityService
summary: CreateWorkloadIdentity
description: |-
Creates a new workload identity.
For workspace-level: parent is workspaces/{id}, permission bb.workloadIdentities.create on workspace.
For project-level: parent is projects/{project}, permission bb.workloadIdentities.create on project.
operationId: bytebase.v1.WorkloadIdentityService.CreateWorkloadIdentity
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.CreateWorkloadIdentityRequest'
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.WorkloadIdentity'
/bytebase.v1.WorkloadIdentityService/DeleteWorkloadIdentity:
post:
tags:
- bytebase.v1.WorkloadIdentityService
summary: DeleteWorkloadIdentity
description: |-
Deletes a workload identity.
Permissions required: bb.workloadIdentities.delete
operationId: bytebase.v1.WorkloadIdentityService.DeleteWorkloadIdentity
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.DeleteWorkloadIdentityRequest'
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.WorkloadIdentityService/GetWorkloadIdentity:
post:
tags:
- bytebase.v1.WorkloadIdentityService
summary: GetWorkloadIdentity
description: |-
Gets a workload identity by name.
Permissions required: bb.workloadIdentities.get
operationId: bytebase.v1.WorkloadIdentityService.GetWorkloadIdentity
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.GetWorkloadIdentityRequest'
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.WorkloadIdentity'
/bytebase.v1.WorkloadIdentityService/ListWorkloadIdentities:
post:
tags:
- bytebase.v1.WorkloadIdentityService
summary: ListWorkloadIdentities
description: |-
Lists workload identities.
For workspace-level: parent is workspaces/{id}, permission bb.workloadIdentities.list on workspace.
For project-level: parent is projects/{project}, permission bb.workloadIdentities.list on project.
operationId: bytebase.v1.WorkloadIdentityService.ListWorkloadIdentities
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.ListWorkloadIdentitiesRequest'
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.ListWorkloadIdentitiesResponse'
/bytebase.v1.WorkloadIdentityService/UndeleteWorkloadIdentity:
post:
tags:
- bytebase.v1.WorkloadIdentityService
summary: UndeleteWorkloadIdentity
description: |-
Restores a deleted workload identity.
Permissions required: bb.workloadIdentities.undelete
operationId: bytebase.v1.WorkloadIdentityService.UndeleteWorkloadIdentity
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.UndeleteWorkloadIdentityRequest'
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.WorkloadIdentity'
/bytebase.v1.WorkloadIdentityService/UpdateWorkloadIdentity:
post:
tags:
- bytebase.v1.WorkloadIdentityService
summary: UpdateWorkloadIdentity
description: |-
Updates a workload identity.
Permissions required: bb.workloadIdentities.update
operationId: bytebase.v1.WorkloadIdentityService.UpdateWorkloadIdentity
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.UpdateWorkloadIdentityRequest'
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.WorkloadIdentity'
/bytebase.v1.WorkspaceService/DeleteWorkspace:
post:
tags:
- bytebase.v1.WorkspaceService
summary: DeleteWorkspace
description: |-
Deletes a workspace. SaaS only. Cancels any active subscription and
soft-deletes the workspace so all associated data becomes inaccessible.
Requires workspace admin permission.
operationId: bytebase.v1.WorkspaceService.DeleteWorkspace
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.DeleteWorkspaceRequest'
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.WorkspaceService/GetIamPolicy:
post:
tags:
- bytebase.v1.WorkspaceService
summary: 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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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/GetWorkspace:
post:
tags:
- bytebase.v1.WorkspaceService
summary: GetWorkspace
description: |-
Gets a workspace by name.
Supports "workspaces/-" to resolve the current workspace:
- Authenticated: uses the workspace from JWT context
- Self-hosted unauthenticated: returns the single workspace
- SaaS unauthenticated: returns minimal response
operationId: bytebase.v1.WorkspaceService.GetWorkspace
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.GetWorkspaceRequest'
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.Workspace'
/bytebase.v1.WorkspaceService/LeaveWorkspace:
post:
tags:
- bytebase.v1.WorkspaceService
summary: LeaveWorkspace
description: |-
Removes the calling user from a workspace and switches to the next
available workspace. Available to any workspace member. Fails if the
caller is the last workspace admin.
operationId: bytebase.v1.WorkspaceService.LeaveWorkspace
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.LeaveWorkspaceRequest'
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.WorkspaceService/ListWorkspaces:
post:
tags:
- bytebase.v1.WorkspaceService
summary: ListWorkspaces
description: Lists all workspaces the current user is a member of.
operationId: bytebase.v1.WorkspaceService.ListWorkspaces
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.ListWorkspacesRequest'
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.ListWorkspacesResponse'
/bytebase.v1.WorkspaceService/RotateDirectorySyncToken:
post:
tags:
- bytebase.v1.WorkspaceService
summary: RotateDirectorySyncToken
description: |-
Mints a new directory sync (SCIM) token, immediately invalidating the
previous one. The plaintext token is returned exactly once and cannot be
retrieved afterwards; only its hash is stored. Callers that lose it must
rotate again and update their identity provider.
Permissions required: bb.workspaces.rotateDirectorySyncToken
operationId: bytebase.v1.WorkspaceService.RotateDirectorySyncToken
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.RotateDirectorySyncTokenRequest'
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.RotateDirectorySyncTokenResponse'
/bytebase.v1.WorkspaceService/SetIamPolicy:
post:
tags:
- bytebase.v1.WorkspaceService
summary: 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
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
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.WorkspaceService/UpdateWorkspace:
post:
tags:
- bytebase.v1.WorkspaceService
summary: UpdateWorkspace
description: Updates a workspace. Currently only title can be updated.
operationId: bytebase.v1.WorkspaceService.UpdateWorkspace
parameters:
- name: Connect-Protocol-Version
in: header
description: Define the version of the Connect protocol
schema:
$ref: '#/components/schemas/connect-protocol-version'
example: 1
- name: Connect-Timeout-Ms
in: header
description: Define the timeout, in ms
schema:
$ref: '#/components/schemas/connect-timeout-header'
example: 1000
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.UpdateWorkspaceRequest'
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.Workspace'
components:
schemas:
bytebase.v1.AIChatMessage:
type: object
properties:
role:
allOf:
- $ref: '#/components/schemas/bytebase.v1.AIChatMessageRole'
title: role
description: The role of the message sender.
content:
type:
- string
- "null"
title: content
description: The text content of the message. Optional for assistant messages that only contain tool calls.
toolCalls:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.AIChatToolCall'
title: tool_calls
description: Tool calls made by the assistant. Only present in assistant messages.
toolCallId:
type:
- string
- "null"
title: tool_call_id
description: The ID of the tool call this message is responding to. Only present in tool messages.
title: AIChatMessage
additionalProperties: false
description: A single message in the conversation.
bytebase.v1.AIChatMessageRole:
type: string
title: AIChatMessageRole
enum:
- AI_CHAT_MESSAGE_ROLE_UNSPECIFIED
- AI_CHAT_MESSAGE_ROLE_SYSTEM
- AI_CHAT_MESSAGE_ROLE_USER
- AI_CHAT_MESSAGE_ROLE_ASSISTANT
- AI_CHAT_MESSAGE_ROLE_TOOL
description: Role of a chat message.
bytebase.v1.AIChatRequest:
type: object
properties:
messages:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.AIChatMessage'
title: messages
description: The conversation messages.
toolDefinitions:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.AIChatToolDefinition'
title: tool_definitions
description: The tool definitions available to the AI.
title: AIChatRequest
additionalProperties: false
description: Request message for AIService.Chat.
bytebase.v1.AIChatResponse:
type: object
properties:
content:
type:
- string
- "null"
title: content
description: The text content of the AI response. Optional when the response only contains tool calls.
toolCalls:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.AIChatToolCall'
title: tool_calls
description: Tool calls the AI wants to make.
usage:
oneOf:
- $ref: '#/components/schemas/bytebase.v1.AIChatUsage'
- type: "null"
title: usage
description: Token usage for this provider call, when available.
stopReason:
allOf:
- $ref: '#/components/schemas/bytebase.v1.AIChatResponse.StopReason'
title: stop_reason
description: Why the model stopped. A truncated or blocked response can still carry content.
title: AIChatResponse
additionalProperties: false
description: Response message for AIService.Chat.
bytebase.v1.AIChatResponse.StopReason:
type: string
title: StopReason
enum:
- STOP_REASON_UNSPECIFIED
- TURN_COMPLETED
- TOKEN_LIMIT
- BLOCKED
- MALFORMED_TOOL_CALL
- OTHER
description: Why the model stopped generating a response.
bytebase.v1.AIChatToolCall:
type: object
properties:
id:
type: string
title: id
description: The unique ID of this tool call.
name:
type: string
title: name
description: The name of the tool to call.
arguments:
type: string
title: arguments
description: The JSON-encoded arguments to pass to the tool.
metadata:
type:
- string
- "null"
title: metadata
description: |-
Opaque provider-specific metadata (e.g., Gemini thought_signature).
Frontend must echo this back unchanged when sending tool results.
title: AIChatToolCall
additionalProperties: false
description: A tool call made by the AI.
bytebase.v1.AIChatToolDefinition:
type: object
properties:
name:
type: string
title: name
description: The name of the tool.
description:
type: string
title: description
description: A description of what the tool does.
parametersSchema:
type: string
title: parameters_schema
description: The JSON Schema describing the tool's parameters.
title: AIChatToolDefinition
additionalProperties: false
description: A tool definition that the AI can invoke.
bytebase.v1.AIChatUsage:
type: object
properties:
totalTokens:
type: integer
title: total_tokens
format: int32
description: Total tokens used by the provider call.
inputTokens:
type:
- integer
- "null"
title: input_tokens
format: int32
description: Input tokens used by the provider call, including cached input.
outputTokens:
type:
- integer
- "null"
title: output_tokens
format: int32
description: Output tokens used by the provider call, including reasoning tokens.
cachedInputTokens:
type:
- integer
- "null"
title: cached_input_tokens
format: int32
description: Input tokens read from cache. This is a subset of input_tokens.
title: AIChatUsage
additionalProperties: false
description: Token usage for a single AI provider call.
bytebase.v1.AISetting:
type: object
properties:
enabled:
type: boolean
title: enabled
provider:
allOf:
- $ref: '#/components/schemas/bytebase.v1.AISetting.Provider'
title: provider
endpoint:
type: string
title: endpoint
apiKey:
type: string
title: api_key
model:
type: string
title: model
version:
type: string
title: version
sqlReviewEnabled:
type: boolean
title: sql_review_enabled
description: |-
Whether the AI SQL review may run. It is off by default and is a consent
of its own beside `enabled`: a review sends the statements of a change to
the provider, and can send the schema of its target databases and their
table statistics.
title: AISetting
additionalProperties: false
bytebase.v1.AISetting.Provider:
type: string
title: Provider
enum:
- PROVIDER_UNSPECIFIED
- OPEN_AI
- CLAUDE
- GEMINI
- AZURE_OPENAI
bytebase.v1.AccessGrant:
type: object
anyOf:
- type: object
properties:
expireTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: expire_time
description: The expiration time of the access grant.
title: expire_time
- type: object
properties:
ttl:
allOf:
- $ref: '#/components/schemas/google.protobuf.Duration'
title: ttl
description: |-
Input only. The time-to-live duration for the access grant.
The server computes `expire_time` from this value at activation time.
writeOnly: true
title: ttl
unevaluatedProperties: false
not:
allOf:
- anyOf:
- required:
- expireTime
- required:
- ttl
- not:
oneOf:
- required:
- expireTime
- required:
- ttl
properties:
name:
type: string
title: name
description: |-
The name of the access grant, generated by the server.
Format: projects/{project}/accessGrants/{access_grant}
The {access_grant} segment is a server-generated unique ID.
creator:
type: string
title: creator
description: |-
The creator of the access grant, the caller who requested it.
Format: users/{email}
readOnly: true
status:
allOf:
- $ref: '#/components/schemas/bytebase.v1.AccessGrant.Status'
title: status
description: |-
The status of the access grant.
An ACTIVE grant with `expire_time` in the past is effectively expired
and no longer authorizes access. Use `expire_time` to determine
whether an ACTIVE grant has expired.
readOnly: true
issue:
type: string
title: issue
description: |-
The issue associated with the access grant.
Can be empty.
Format: projects/{project}/issues/{issue}
readOnly: true
targets:
type: array
items:
type: string
title: targets
description: |-
The target databases for this access grant.
Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}
query:
type: string
title: query
description: The query permission granted.
unmask:
type: boolean
title: unmask
description: Whether the grant allows unmasking sensitive data.
createTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: create_time
readOnly: true
updateTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: update_time
readOnly: true
reason:
type: string
title: reason
export:
type: boolean
title: export
description: |-
Whether the grant allows exporting the query result.
An active grant with export=true grants bb.sql.export for this query until the grant expires.
schema:
type: string
title: schema
description: The default schema to execute the query.
container:
type: string
title: container
description: The container name to execute the query against, used for CosmosDB only.
title: AccessGrant
required:
- targets
bytebase.v1.AccessGrant.Status:
type: string
title: Status
enum:
- STATUS_UNSPECIFIED
- PENDING
- ACTIVE
- REVOKED
description: The status of the access grant.
bytebase.v1.ActivateAccessGrantRequest:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the access grant to activate.
Format: projects/{project}/accessGrants/{access_grant}
title: ActivateAccessGrantRequest
required:
- name
additionalProperties: false
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
- ISSUE_CREATED
- ISSUE_APPROVAL_REQUESTED
- ISSUE_SENT_BACK
- PIPELINE_FAILED
- PIPELINE_COMPLETED
- ISSUE_APPROVED
description: Activity type enumeration.
bytebase.v1.ActuatorInfo:
type: object
properties:
version:
type: string
title: version
description: The Bytebase server version.
readOnly: true
gitCommit:
type: string
title: git_commit
description: The git commit hash of the build.
readOnly: true
saas:
type: boolean
title: saas
description: Whether the Bytebase instance is running in SaaS mode where some features cannot be edited by users.
readOnly: true
externalUrl:
type: string
title: external_url
description: The external URL where users or webhook callbacks access Bytebase.
readOnly: true
lastActiveTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: last_active_time
description: The last time any API call was made, refreshed on each request.
readOnly: true
workspace:
type: string
title: workspace
description: |-
The unique identifier for the workspace.
Format: workspaces/{id}
readOnly: true
unlicensedFeatures:
type: array
items:
type: string
readOnly: true
title: unlicensed_features
description: List of features that are not licensed.
readOnly: true
activatedInstanceCount:
type: integer
title: activated_instance_count
format: int32
description: The number of activated database instances.
readOnly: true
totalInstanceCount:
type: integer
title: total_instance_count
format: int32
description: The total number of database instances.
readOnly: true
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).
readOnly: true
replicaCount:
type: integer
title: replica_count
format: int32
description: The number of active replicas (servers sharing the same database).
readOnly: true
defaultProject:
type: string
title: default_project
description: |-
The default project for unassigned databases.
Format: projects/{id}
readOnly: true
userCountInIam:
type: integer
title: user_count_in_iam
format: int32
description: The number of users in the workspace IAM (for seat limit display).
readOnly: true
activeVcsUserCount:
type: integer
title: active_vcs_user_count
format: int32
description: The number of active VCS users seen in the active window.
readOnly: true
sample:
allOf:
- $ref: '#/components/schemas/bytebase.v1.SampleInfo'
title: sample
description: Sample setup availability and provisioned resources.
readOnly: true
mcpSetting:
allOf:
- $ref: '#/components/schemas/bytebase.v1.MCPSetting'
title: mcp_setting
description: The MCP (Model Context Protocol) setting in the current workspace.
readOnly: true
aiEnabled:
type: boolean
title: ai_enabled
description: Whether the workspace AI setting enables the AI agent.
readOnly: true
aiSqlReviewEnabled:
type: boolean
title: ai_sql_review_enabled
description: |-
Whether the workspace AI setting switches the AI SQL review on. A review
also needs `ai_enabled`.
readOnly: true
title: ActuatorInfo
additionalProperties: false
description: |-
System information and configuration for the Bytebase instance.
Actuator concept is similar to the Spring Boot Actuator.
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} or projects/{project}/instances/{instance}
dataSource:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DataSource'
title: data_source
description: |-
Identified by data source ID.
Only READ_ONLY data source can be added.
validateOnly:
type: boolean
title: validate_only
description: Validate only also tests the data source connection.
title: AddDataSourceRequest
required:
- name
- dataSource
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Webhook'
title: webhook
description: The webhook to add.
title: AddWebhookRequest
required:
- project
- webhook
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} or
projects/{project}/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
- "null"
title: schema
description: |-
The default schema to execute the statement. Equals to the current schema
in Oracle and search path in Postgres.
container:
type:
- string
- "null"
title: container
description: |-
Container is the container name to execute the query against, used for
CosmosDB only.
title: AdminExecuteRequest
required:
- name
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Advice.Level'
title: status
description: The 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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Position'
title: start_position
description: |-
The start_position is inclusive and the end_position is exclusive.
TODO: use range instead
endPosition:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Position'
title: end_position
ruleType:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Advice.RuleType'
title: rule_type
description: The type of linting rule that generated this advice.
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
anyOf:
- type: object
properties:
fullMask:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Algorithm.FullMask'
title: full_mask
title: full_mask
- type: object
properties:
innerOuterMask:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Algorithm.InnerOuterMask'
title: inner_outer_mask
title: inner_outer_mask
- type: object
properties:
md5Mask:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Algorithm.MD5Mask'
title: md5_mask
title: md5_mask
- type: object
properties:
rangeMask:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Algorithm.RangeMask'
title: range_mask
title: range_mask
unevaluatedProperties: false
not:
allOf:
- anyOf:
- required:
- fullMask
- required:
- innerOuterMask
- required:
- md5Mask
- required:
- rangeMask
- not:
oneOf:
- required:
- fullMask
- required:
- innerOuterMask
- required:
- md5Mask
- required:
- rangeMask
title: Algorithm
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Algorithm.InnerOuterMask.MaskType'
title: type
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 character index (0-based) of the original value, should be less than end.
Uses character indices (not byte offsets) for display-oriented masking.
Example: For "你好world", character index 2 refers to 'w' (the 3rd character).
end:
type: integer
title: end
format: int32
description: |-
end is the end character index (exclusive) of the original value.
Uses character indices (not byte offsets) for display-oriented masking.
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:
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
theme:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Announcement.AnnouncementTheme'
title: theme
description: |-
Banner colors. Built-in presets (info/warning/critical) are a
frontend-only concept that seeds these colors; the store only holds them.
title: Announcement
additionalProperties: false
bytebase.v1.Announcement.AnnouncementTheme:
type: object
properties:
background:
allOf:
- $ref: '#/components/schemas/google.type.Color'
title: background
text:
allOf:
- $ref: '#/components/schemas/google.type.Color'
title: text
title: AnnouncementTheme
additionalProperties: false
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
writeOnly: true
clientSecret:
type: string
title: client_secret
writeOnly: true
robotCode:
type: string
title: robot_code
writeOnly: true
title: DingTalk
additionalProperties: false
bytebase.v1.AppIMSetting.Feishu:
type: object
properties:
appId:
type: string
title: app_id
writeOnly: true
appSecret:
type: string
title: app_secret
writeOnly: true
title: Feishu
additionalProperties: false
bytebase.v1.AppIMSetting.IMSetting:
type: object
anyOf:
- type: object
properties:
dingtalk:
allOf:
- $ref: '#/components/schemas/bytebase.v1.AppIMSetting.DingTalk'
title: dingtalk
title: dingtalk
- type: object
properties:
feishu:
allOf:
- $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Feishu'
title: feishu
title: feishu
- type: object
properties:
lark:
allOf:
- $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Lark'
title: lark
title: lark
- type: object
properties:
slack:
allOf:
- $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Slack'
title: slack
title: slack
- type: object
properties:
teams:
allOf:
- $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Teams'
title: teams
title: teams
- type: object
properties:
wecom:
allOf:
- $ref: '#/components/schemas/bytebase.v1.AppIMSetting.Wecom'
title: wecom
title: wecom
unevaluatedProperties: false
not:
allOf:
- anyOf:
- required:
- dingtalk
- required:
- feishu
- required:
- lark
- required:
- slack
- required:
- teams
- required:
- wecom
- not:
oneOf:
- required:
- dingtalk
- required:
- feishu
- required:
- lark
- required:
- slack
- required:
- teams
- required:
- wecom
properties:
type:
allOf:
- $ref: '#/components/schemas/bytebase.v1.WebhookType'
title: type
title: IMSetting
bytebase.v1.AppIMSetting.Lark:
type: object
properties:
appId:
type: string
title: app_id
writeOnly: true
appSecret:
type: string
title: app_secret
writeOnly: true
title: Lark
additionalProperties: false
bytebase.v1.AppIMSetting.Slack:
type: object
properties:
token:
type: string
title: token
writeOnly: true
title: Slack
additionalProperties: false
bytebase.v1.AppIMSetting.Teams:
type: object
properties:
tenantId:
type: string
title: tenant_id
description: Azure AD tenant ID (Directory ID).
writeOnly: true
clientId:
type: string
title: client_id
description: Azure AD application (client) ID.
writeOnly: true
clientSecret:
type: string
title: client_secret
description: Azure AD client secret.
writeOnly: true
title: Teams
additionalProperties: false
bytebase.v1.AppIMSetting.Wecom:
type: object
properties:
corpId:
type: string
title: corp_id
writeOnly: true
agentId:
type: string
title: agent_id
writeOnly: true
secret:
type: string
title: secret
writeOnly: true
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.ApprovalStatus:
type: string
title: ApprovalStatus
enum:
- APPROVAL_STATUS_UNSPECIFIED
- CHECKING
- PENDING
- APPROVED
- REJECTED
- SKIPPED
description: |-
Approval workflow status for an issue or a plan.
Lives at the top level so both plan_service.proto and issue_service.proto
can reference it without a circular import.
bytebase.v1.ApprovalTemplate:
type: object
properties:
flow:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ApprovalFlow'
title: flow
description: The approval flow definition.
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
required:
- name
additionalProperties: false
bytebase.v1.AuditBehavior:
type: string
title: AuditBehavior
enum:
- AUDIT_BEHAVIOR_UNSPECIFIED
- SENSITIVE
- OMIT
description: |-
What an audit payload may carry for a field. One enum rather than a bool per
behavior, because a field has exactly one classification.
bytebase.v1.AuditData:
type: object
properties:
policyDelta:
allOf:
- $ref: '#/components/schemas/bytebase.v1.PolicyDelta'
title: policy_delta
description: Changes to IAM policies.
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}
readOnly: true
createTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: create_time
description: The timestamp when the audit log was created.
readOnly: true
actor:
type: string
title: actor
description: |-
The principal who performed the action.
Formats: users/{email}, serviceAccounts/{email}, or workloadIdentities/{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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.AuditLog.Severity'
title: severity
description: The severity level of this audit log entry.
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:
allOf:
- $ref: '#/components/schemas/google.rpc.Status'
title: status
description: The status of the operation.
latency:
allOf:
- $ref: '#/components/schemas/google.protobuf.Duration'
title: latency
description: The duration of the operation.
serviceData:
allOf:
- $ref: '#/components/schemas/google.protobuf.Any'
title: service_data
description: Service-specific metadata about the request, response, and activities.
requestMetadata:
allOf:
- $ref: '#/components/schemas/bytebase.v1.RequestMetadata'
title: request_metadata
description: Metadata about the request context.
mcpDelegation:
allOf:
- $ref: '#/components/schemas/bytebase.v1.MCPDelegation'
title: mcp_delegation
description: |-
MCP delegation provenance. Present exactly when the audited call arrived
through the MCP server's delegated credential; never set for public API
calls. Presence of this message is the MCP-origin marker.
readOnly: true
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.AuthenticationInfo:
type: object
properties:
workspace:
type: string
title: workspace
description: |-
The workspace used for authentication, when one can be resolved.
Format: workspaces/{workspace}
readOnly: true
restriction:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Restriction'
title: restriction
description: The effective authentication restrictions.
readOnly: true
identityProviders:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.LoginIdentityProvider'
title: identity_providers
description: The identity providers the login page renders, in display order.
readOnly: true
title: AuthenticationInfo
additionalProperties: false
bytebase.v1.AuthorizationRequest:
type: object
properties:
endpoint:
type: string
title: endpoint
description: |-
The OAuth2 auth_url, or the authorization endpoint from the OIDC issuer's
discovery document.
clientId:
type: string
title: client_id
description: The OAuth2 or OIDC client identifier.
scopes:
type: array
items:
type: string
title: scopes
description: The scopes to request.
title: AuthorizationRequest
additionalProperties: false
description: AuthorizationRequest is what a browser needs to start an SSO redirect.
bytebase.v1.BatchCancelTaskRunsRequest:
type: object
properties:
parent:
type: string
title: parent
description: |-
The task name for the taskRuns.
Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}
Use `projects/{project}/plans/{plan}/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}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}
title: BatchCancelTaskRunsRequest
required:
- parent
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} or projects/{project}/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
required:
- parent
- requests
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
required:
- parent
- requests
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}
purge:
type: boolean
title: purge
description: |-
If set to true, permanently purge the soft-deleted projects and all related resources.
This operation is irreversible. Following AIP-165, this should only be used for
administrative cleanup of old soft-deleted projects.
All projects must already be soft-deleted for this to work.
When purge=true, all databases will be moved to the default project before deletion.
When purge=false (soft delete/archive), the projects and their databases/issues remain unchanged.
title: BatchDeleteProjectsRequest
required:
- names
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/{instance}: batch get databases in an instance;
- projects/{project}/instances/{instance}: batch get databases in a project 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
required:
- parent
- names
additionalProperties: false
bytebase.v1.BatchGetDatabasesResponse:
type: object
properties:
databases:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.Database'
title: databases
description: One database per requested name, in the same order as `names`.
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
required:
- names
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: One group per requested name, in the same order as `names`.
title: BatchGetGroupsResponse
additionalProperties: false
description: Response message for batch getting groups.
bytebase.v1.BatchGetProjectsRequest:
type: object
properties:
names:
type: array
items:
type: string
title: names
description: |-
The names of projects to retrieve.
Format: projects/{project}
title: BatchGetProjectsRequest
required:
- names
additionalProperties: false
bytebase.v1.BatchGetProjectsResponse:
type: object
properties:
projects:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.Project'
title: projects
description: One project per requested name, in the same order as `names`.
title: BatchGetProjectsResponse
additionalProperties: false
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
required:
- names
additionalProperties: false
bytebase.v1.BatchGetUsersResponse:
type: object
properties:
users:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.User'
title: users
description: One user per requested name, in the same order as `names`.
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 stage name for the tasks.
Format: projects/{project}/plans/{plan}/rollout/stages/{stage}
tasks:
type: array
items:
type: string
title: tasks
description: |-
The tasks to run.
Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}
runTime:
oneOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
- type: "null"
title: run_time
description: The task run should run after run_time.
skipPriorBackup:
type: boolean
title: skip_prior_backup
description: If true, skip prior backup for this run even if the task has prior backup enabled.
title: BatchRunTasksRequest
required:
- parent
additionalProperties: false
bytebase.v1.BatchRunTasksResponse:
type: object
title: BatchRunTasksResponse
additionalProperties: false
bytebase.v1.BatchSkipTasksRequest:
type: object
properties:
parent:
type: string
title: parent
description: |-
The stage name for the tasks.
Format: projects/{project}/plans/{plan}/rollout/stages/{stage}
tasks:
type: array
items:
type: string
title: tasks
description: |-
The tasks to skip.
Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}
reason:
type: string
title: reason
maxLength: 1000
description: The reason for skipping the tasks.
title: BatchSkipTasksRequest
required:
- parent
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} or projects/{project}/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
required:
- names
additionalProperties: false
bytebase.v1.BatchSyncDatabasesResponse:
type: object
title: BatchSyncDatabasesResponse
additionalProperties: false
bytebase.v1.BatchSyncInstancesRequest:
type: object
properties:
parent:
type:
- string
- "null"
title: parent
description: |-
The parent, which owns this collection of instances.
Format: projects/{project}. If omitted, all targets must be workspace
instances; otherwise, every target must belong to this project collection.
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
required:
- requests
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} or projects/{project}/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
required:
- requests
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:
parent:
type:
- string
- "null"
title: parent
description: |-
The parent, which owns this collection of instances.
Format: projects/{project}. If omitted, all targets must be workspace
instances; otherwise, every target must belong to this project collection.
requests:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.UpdateInstanceRequest'
title: requests
description: The request message specifying the resources to update.
title: BatchUpdateInstancesRequest
required:
- requests
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.IssueStatus'
title: status
description: The new status.
reason:
type: string
title: reason
description: The reason for the status change.
title: BatchUpdateIssuesStatusRequest
required:
- parent
additionalProperties: false
bytebase.v1.BatchUpdateIssuesStatusResponse:
type: object
title: BatchUpdateIssuesStatusResponse
additionalProperties: false
bytebase.v1.BillingInterval:
type: string
title: BillingInterval
enum:
- BILLING_INTERVAL_UNSPECIFIED
- MONTH
- YEAR
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}
For service accounts, the member should be: serviceAccount:{email}
For workload identities, the member should be: workloadIdentity:{email}
condition:
allOf:
- $ref: '#/components/schemas/google.type.Expr'
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 canonical database full name in "instances/{instance}/databases/{database}" or "projects/{project}/instances/{instance}/databases/{database}" format, used by any role with SQL Editor read (e.g. "roles/sqlEditorUser", "roles/sqlEditorReadUser"), export (bb.sql.export, e.g. "roles/sqlEditorExporter") or write (bb.sql.ddl / bb.sql.dml) access, support "==" operator.
resource.schema_name: the schema name, used by any role with SQL Editor read, export (bb.sql.export) or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, support "==" operator.
resource.table_name: the table name, used by any role with SQL Editor read, export (bb.sql.export) or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, support "==" operator.
resource.environment_id: the environment to allow the DDL/DML operation in the SQL Editor, only works for the role with bb.sql.ddl or bb.sql.dml permissions. Support "in" operator.
request.time: the expiration. Only support "<" operation in `request.time < timestamp("{ISO datetime string format}")`.
Known limitations of table/schema-scoped DDL/DML grants:
- The scope only gates the write target, not the read sources of a write: e.g. `INSERT INTO granted_table SELECT * FROM other_table` may read `other_table` without a grant on it, so a table-scoped write grant is not an exfiltration boundary.
- It must be paired with a database/project-level read grant: a table-scoped grant alone does not satisfy the SQL Editor query method permission (bb.databases.get).
- A resource.schema_name-scoped grant only authorizes a write whose schema is unambiguous — qualify the table (schema.table) or select the schema for the SQL Editor session. An unqualified write whose effective schema cannot be determined ahead of execution is denied (qualify it, or use a table-only grant).
- Multi-statement batches are authorized at the database level: an earlier statement can rebind the session's default schema or database mid-batch, so per-table/schema scoping is dropped and a table/schema-scoped grant requires a database-level grant. The database-level check is still per target database — a qualified cross-database write is gated by a grant on its own database, not the request database — but an unqualified write whose session default is rebound mid-batch is evaluated against the database it literally names, so qualify cross-database writes or run them as single statements.
- A write target in a different project than the SQL-Editor session's database is denied: the per-target check evaluates the session project's IAM policy, so a cross-project write is failed closed (to write it, open the SQL Editor on a database in the target project).
- Enforcement is on the statement's literal write target; writes routed elsewhere by a view/synonym, or into a temporary schema (e.g. pg_temp), are evaluated against what the statement names, not the ultimate base object.
- Write-target gating uses an ALLOWLIST of statement types the resolver models. It does NOT cover every syntactically-identifiable cross-database write; statement types off the allowlist are authorized against the request database. The allowlist is:
- Modeled table/data writes (per-table/schema-scopable): INSERT/UPDATE/DELETE/TRUNCATE/MERGE, LOAD DATA, IMPORT INTO, CREATE TABLE AS / SELECT INTO, and table-level CREATE/DROP/ALTER/RENAME/index.
- Modeled non-table object DDL (gated at the DATABASE level by the object's own explicit database/schema qualifier; an unqualified name keeps the request-database check): CREATE/ALTER/DROP of view, procedure/function/routine, trigger, sequence, synonym, type, and (Oracle) package and cluster; plus Oracle ALTER/DROP MATERIALIZED VIEW (Oracle CREATE MATERIALIZED VIEW is not modeled — see below).
NOT modeled (these fall back to the request-database check, so a qualified cross-database one is authorized against the request database): MySQL CREATE TRIGGER and CREATE/ALTER/DROP EVENT (bare-string AST names); MSSQL ALTER of view/procedure/function/trigger (no ALTER node in the grammar); Oracle CREATE MATERIALIZED VIEW and the niche object DDL — dimension, attribute dimension, hierarchy, analytic view, JSON duality view, materialized zonemap, operator, in-memory join group, property graph, vector index, index type, domain; COPY ... FROM; and engine-specific bulk-load / deprecated text writes. A structural "write-target object database" extraction layer to remove this allowlist dependence is tracked as a follow-up.
- Out of scope (read sources / indirect effects): the tables a write READS (INSERT … SELECT, MERGE … USING, CREATE TABLE AS … SELECT) and objects reached indirectly via views/synonyms/function bodies/triggers are NOT gated.
Invariant: for a statement ON the modeled allowlist that explicitly names a different database as its write target, the ACL uses that target database, not the request database. Statement types OFF the allowlist are authorized against the request database.
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"]
resource.database == "instances/local-pg/databases/postgres" && resource.environment_id in ["test"]
request.time < timestamp("2025-04-26T11:24:48.655Z")
parsedExpr:
allOf:
- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'
title: parsed_expr
description: The parsed expression of the condition.
readOnly: true
title: Binding
additionalProperties: false
description: Binding associates members with a role and optional conditions.
bytebase.v1.BindingDelta:
type: object
properties:
action:
allOf:
- $ref: '#/components/schemas/bytebase.v1.BindingDelta.Action'
title: action
description: The action that was performed on a Binding.
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:
allOf:
- $ref: '#/components/schemas/google.type.Expr'
title: condition
description: The condition that is associated with this binding.
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.CancelPlanCheckRunRequest:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the plan check run to cancel.
Format: projects/{project}/plans/{plan}/planCheckRun
title: CancelPlanCheckRunRequest
required:
- name
additionalProperties: false
bytebase.v1.CancelPlanCheckRunResponse:
type: object
title: CancelPlanCheckRunResponse
additionalProperties: false
bytebase.v1.CancelPurchaseRequest:
type: object
properties:
feedback:
type: string
title: feedback
description: |-
Reason the customer is canceling. Maps to Stripe's cancellation_details.feedback.
Valid Stripe values: "customer_service", "low_quality", "missing_features",
"switched_service", "too_complex", "too_expensive", "unused", "other".
Required.
comment:
type: string
title: comment
description: Optional free-form comment. Max 500 chars (Stripe limit).
title: CancelPurchaseRequest
additionalProperties: false
bytebase.v1.ChangePasswordRequest:
type: object
properties:
name:
type: string
title: name
maxLength: 260
description: 'Format: users/{email}. Must be the caller''s own name.'
newPassword:
type: string
title: new_password
description: |
string.max_bytes = 72
credential:
allOf:
- $ref: '#/components/schemas/bytebase.v1.CredentialProof'
title: credential
title: ChangePasswordRequest
required:
- name
- newPassword
- credential
additionalProperties: false
bytebase.v1.Changelog:
type: object
properties:
name:
type: string
title: name
description: 'Format: instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog}'
createTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: create_time
status:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Changelog.Status'
title: status
schema:
type: string
title: schema
schemaSize:
type: string
title: schema_size
format: int64
taskRun:
type: string
title: task_run
description: 'Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}'
planTitle:
type: string
title: plan_title
description: |-
The title of the plan associated with this changelog's task run.
This field is populated by deriving the plan from task_run for display purposes.
readOnly: true
title: Changelog
additionalProperties: false
bytebase.v1.Changelog.Status:
type: string
title: Status
enum:
- STATUS_UNSPECIFIED
- PENDING
- DONE
- FAILED
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Release'
title: release
description: The release to check.
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}
projects/{project}/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"
vcsUser:
allOf:
- $ref: '#/components/schemas/bytebase.v1.VCSUser'
title: vcs_user
description: |-
The non-bot VCS pull request or merge request creator observed by bytebase-release.
If absent, Bytebase skips VCS user tracking and VCS user limit enforcement.
title: CheckReleaseRequest
required:
- parent
- release
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: string
title: affected_rows
format: int64
description: The total affected rows across all checks.
riskLevel:
allOf:
- $ref: '#/components/schemas/bytebase.v1.RiskLevel'
title: risk_level
description: The aggregated risk level of the check.
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} or projects/{project}/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: string
title: affected_rows
format: int64
description: The count of affected rows of the statement on the target.
riskLevel:
allOf:
- $ref: '#/components/schemas/bytebase.v1.RiskLevel'
title: risk_level
description: The risk level of the statement on the target.
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:
oneOf:
- $ref: '#/components/schemas/bytebase.v1.ObjectSchema'
- type: "null"
title: object_schema
description: Object schema for complex column types like JSON.
title: ColumnCatalog
additionalProperties: false
description: Column metadata within a table.
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.GenerationMetadata'
title: generation
description: The generation is the generation of a column.
isIdentity:
type: boolean
title: is_identity
identityGeneration:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ColumnMetadata.IdentityGeneration'
title: identity_generation
description: The identity_generation is for identity columns, PG only.
identitySeed:
type: string
title: identity_seed
format: int64
description: The identity_seed is for identity columns, MSSQL only.
identityIncrement:
type: 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.
srid:
type:
- integer
- "null"
title: srid
description: |-
The spatial reference system identifier of a spatial column, MySQL 8.0 only.
Unset means the column declares no SRID; presence carries the explicit SRID,
including the valid SRID 0. SRS_IDs are unsigned 32-bit (custom SRSs may exceed
int32).
isInvisible:
type: boolean
title: is_invisible
description: Whether the column is invisible (hidden from SELECT *), MySQL 8.0.23+ only.
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.CompositeTypeAttribute:
type: object
properties:
name:
type: string
title: name
description: The name of the attribute.
type:
type: string
title: type
description: The attribute type. User-defined types are always schema-qualified.
collation:
type: string
title: collation
description: |-
The non-default collation of the attribute as an emit-ready SQL
identifier reference (quoted as needed, schema-qualified when outside
pg_catalog), empty otherwise. e.g. `"C"` or `locale.en_us`.
comment:
type: string
title: comment
description: The comment describing the attribute.
title: CompositeTypeAttribute
additionalProperties: false
bytebase.v1.CompositeTypeMetadata:
type: object
properties:
name:
type: string
title: name
description: The name of the composite type.
attributes:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.CompositeTypeAttribute'
title: attributes
description: The ordered attributes of the composite type.
comment:
type: string
title: comment
description: The comment describing the composite type.
title: CompositeTypeMetadata
additionalProperties: false
bytebase.v1.ConfirmRecoveryCodesRequest:
type: object
properties:
name:
type: string
title: name
maxLength: 260
description: 'Format: users/{email}. Must be the caller''s own name.'
pendingVersion:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: pending_version
description: |-
The pending_version of the codes being confirmed. Confirming promotes
exactly the set this version identifies, or nothing.
credential:
allOf:
- $ref: '#/components/schemas/bytebase.v1.CredentialProof'
title: credential
otpCode:
type: string
title: otp_code
maxLength: 64
description: |-
(OPTIONAL) Required for first-time enrollment, rejected otherwise. A *fresh* code,
not the one EnableMFA took.
title: ConfirmRecoveryCodesRequest
required:
- name
- pendingVersion
- credential
additionalProperties: false
bytebase.v1.CreateAccessGrantRequest:
type: object
properties:
parent:
type: string
title: parent
description: |-
The parent project for the access grant.
Format: projects/{project}
accessGrant:
allOf:
- $ref: '#/components/schemas/bytebase.v1.AccessGrant'
title: access_grant
description: The access grant to create.
title: CreateAccessGrantRequest
required:
- parent
- accessGrant
additionalProperties: false
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DatabaseGroup'
title: database_group
description: The database group to create.
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
required:
- parent
- databaseGroup
additionalProperties: false
description: Request message for creating a database group.
bytebase.v1.CreateGroupRequest:
type: object
properties:
group:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Group'
title: group
description: The group to create.
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
required:
- group
- groupEmail
additionalProperties: false
description: Request message for creating a group.
bytebase.v1.CreateIdentityProviderRequest:
type: object
properties:
identityProvider:
allOf:
- $ref: '#/components/schemas/bytebase.v1.IdentityProvider'
title: identity_provider
description: The identity provider to create.
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
required:
- identityProvider
additionalProperties: false
bytebase.v1.CreateInstanceRequest:
type: object
properties:
parent:
type:
- string
- "null"
title: parent
description: |-
The parent, which owns this collection of instances.
Format: projects/{project}. If omitted, the instance is created in the
workspace collection.
instance:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Instance'
title: instance
description: The instance to create.
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
required:
- instance
additionalProperties: false
bytebase.v1.CreateIssueCommentRequest:
type: object
properties:
parent:
type: string
title: parent
description: |-
The issue name
Format: projects/{project}/issues/{issue}
issueComment:
allOf:
- $ref: '#/components/schemas/bytebase.v1.IssueComment'
title: issue_comment
description: The comment to create.
title: CreateIssueCommentRequest
required:
- parent
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Issue'
title: issue
description: The issue to create.
title: CreateIssueRequest
required:
- parent
- issue
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Plan'
title: plan
description: The plan to create.
title: CreatePlanRequest
required:
- parent
- plan
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: workspaces/{workspace-id}.
Environment resource name: environments/environment-id.
policy:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Policy'
title: policy
description: The policy to create.
type:
allOf:
- $ref: '#/components/schemas/bytebase.v1.PolicyType'
title: type
description: The type of policy to create.
title: CreatePolicyRequest
required:
- parent
- policy
additionalProperties: false
bytebase.v1.CreateProjectRequest:
type: object
properties:
project:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Project'
title: project
description: The project to create.
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
required:
- project
additionalProperties: false
bytebase.v1.CreatePurchaseRequest:
type: object
properties:
plan:
allOf:
- $ref: '#/components/schemas/bytebase.v1.PlanType'
title: plan
interval:
allOf:
- $ref: '#/components/schemas/bytebase.v1.BillingInterval'
title: interval
seats:
type: integer
title: seats
format: int32
title: CreatePurchaseRequest
additionalProperties: false
bytebase.v1.CreateReleaseRequest:
type: object
properties:
parent:
type: string
title: parent
description: 'Format: projects/{project}'
release:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Release'
title: release
description: The release to create.
releaseIdTemplate:
type: string
title: release_id_template
description: |-
Template for release ID generation.
Available variables: {date}, {time}, {timestamp}, {iteration}.
Example: "release_{date}-RC{iteration}" generates "release_20260119-RC00".
Default: "release_{date}-RC{iteration}".
releaseIdTimezone:
type: string
title: release_id_timezone
description: |-
Timezone for {date} and {time} variables in the template.
Must be a valid IANA timezone (e.g., "UTC", "America/Los_Angeles").
Default: "UTC".
title: CreateReleaseRequest
required:
- parent
- release
additionalProperties: false
bytebase.v1.CreateReviewConfigRequest:
type: object
properties:
reviewConfig:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ReviewConfig'
title: review_config
description: The SQL review config to create.
title: CreateReviewConfigRequest
required:
- reviewConfig
additionalProperties: false
bytebase.v1.CreateRevisionRequest:
type: object
properties:
parent:
type: string
title: parent
description: 'Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}'
revision:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Revision'
title: revision
description: The revision to create.
title: CreateRevisionRequest
required:
- parent
- revision
additionalProperties: false
bytebase.v1.CreateRoleRequest:
type: object
properties:
role:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Role'
title: role
description: The role to create.
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
required:
- role
- roleId
additionalProperties: false
bytebase.v1.CreateRolloutRequest:
type: object
properties:
parent:
type: string
title: parent
description: |-
The parent plan for which this rollout will be created.
Format: projects/{project}/plans/{plan}
target:
type:
- string
- "null"
title: target
description: |-
Create the rollout only for the specified target.
Format: environments/{environment}
If unspecified, all stages are created.
If set to "", no stages are created.
title: CreateRolloutRequest
required:
- parent
additionalProperties: false
bytebase.v1.CreateSavedQueryRequest:
type: object
properties:
parent:
type: string
title: parent
description: |-
The project to create the saved query in.
Format: projects/{project}
savedQuery:
allOf:
- $ref: '#/components/schemas/bytebase.v1.SavedQuery'
title: saved_query
description: The saved query to create.
title: CreateSavedQueryRequest
required:
- parent
- savedQuery
additionalProperties: false
bytebase.v1.CreateServiceAccountRequest:
type: object
properties:
parent:
type: string
title: parent
description: |-
The parent resource where this service account will be created.
Format: projects/{project} for project-level, workspaces/{id} for workspace-level.
serviceAccountId:
type: string
title: service_account_id
description: |-
The ID to use for the service account, which will become the final component
of the service account's email in the format: {service_account_id}@service.bytebase.com
or {service_account_id}@{project-id}.service.bytebase.com
serviceAccount:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ServiceAccount'
title: service_account
description: The service account to create.
title: CreateServiceAccountRequest
required:
- serviceAccountId
- serviceAccount
additionalProperties: false
description: Request message for creating a service account.
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Sheet'
title: sheet
description: The sheet to create.
title: CreateSheetRequest
required:
- parent
- sheet
additionalProperties: false
bytebase.v1.CreateUserRequest:
type: object
properties:
user:
allOf:
- $ref: '#/components/schemas/bytebase.v1.User'
title: user
description: The user to create.
title: CreateUserRequest
required:
- user
additionalProperties: false
bytebase.v1.CreateWorkloadIdentityRequest:
type: object
properties:
parent:
type: string
title: parent
description: |-
The parent resource where this workload identity will be created.
Format: projects/{project} for project-level, workspaces/{id} for workspace-level.
workloadIdentityId:
type: string
title: workload_identity_id
description: |-
The ID to use for the workload identity, which will become the final component
of the workload identity's email in the format: {workload_identity_id}@workload.bytebase.com
or {workload_identity_id}@{project-id}.workload.bytebase.com
workloadIdentity:
allOf:
- $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'
title: workload_identity
description: The workload identity to create.
title: CreateWorkloadIdentityRequest
required:
- workloadIdentityId
- workloadIdentity
additionalProperties: false
description: Request message for creating a workload identity.
bytebase.v1.CredentialProof:
type: object
anyOf:
- type: object
properties:
currentPassword:
type: string
title: current_password
description: |
The account's current password. Refused by a factor-touching method
while a live MFA factor exists.
string.max_bytes = 72
title: current_password
- type: object
properties:
emailCode:
type: string
title: email_code
maxLength: 64
description: |-
A one-time code from RequestReauthCode. Bytebase Cloud only, and only
while the account has no live MFA factor.
title: email_code
- type: object
properties:
otpCode:
type: string
title: otp_code
maxLength: 64
description: A live code from the account's enrolled TOTP authenticator.
title: otp_code
- type: object
properties:
recoveryCode:
type: string
title: recovery_code
maxLength: 64
description: A single-use MFA recovery code.
title: recovery_code
unevaluatedProperties: false
not:
allOf:
- anyOf:
- required:
- currentPassword
- required:
- emailCode
- required:
- otpCode
- required:
- recoveryCode
- not:
oneOf:
- required:
- currentPassword
- required:
- emailCode
- required:
- otpCode
- required:
- recoveryCode
title: CredentialProof
description: |-
One proof that the caller currently controls a credential on the account.
Exactly one field must be set; enforced in the handler.
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.
classification:
type: object
title: classification
additionalProperties:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification'
title: value
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.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
level:
type:
- integer
- "null"
title: level
format: int32
description: The sensitivity level. Maps to Level.level.
title: DataClassification
additionalProperties: false
bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level:
type: object
properties:
title:
type: string
title: title
level:
type: integer
title: level
format: int32
description: The numeric level for ordering. Higher = more sensitive.
title: Level
additionalProperties: false
bytebase.v1.DataSource:
type: object
anyOf:
- type: object
properties:
awsCredential:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DataSource.AWSCredential'
title: aws_credential
title: aws_credential
- type: object
properties:
azureCredential:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DataSource.AzureCredential'
title: azure_credential
title: azure_credential
- type: object
properties:
gcpCredential:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DataSource.GCPCredential'
title: gcp_credential
title: gcp_credential
unevaluatedProperties: false
not:
allOf:
- anyOf:
- required:
- awsCredential
- required:
- azureCredential
- required:
- gcpCredential
- not:
oneOf:
- required:
- awsCredential
- required:
- azureCredential
- required:
- gcpCredential
properties:
id:
type: string
title: id
description: The unique identifier for this data source.
type:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DataSourceType'
title: type
description: The type of data source (ADMIN or READ_ONLY).
username:
type: string
title: username
description: The username for database authentication.
password:
type: string
title: password
description: The password for database authentication.
writeOnly: true
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.
writeOnly: true
sslCert:
type: string
title: ssl_cert
description: The SSL client certificate.
writeOnly: true
sslKey:
type: string
title: ssl_key
description: The SSL client private key.
writeOnly: true
sslCaPath:
type: string
title: ssl_ca_path
description: The local filesystem path to the SSL certificate authority certificate.
writeOnly: true
sslCertPath:
type: string
title: ssl_cert_path
description: The local filesystem path to the SSL client certificate.
writeOnly: true
sslKeyPath:
type: string
title: ssl_key_path
description: The local filesystem path to the SSL client private key.
writeOnly: true
sslCaSet:
type: boolean
title: ssl_ca_set
description: Whether an SSL certificate authority certificate has been configured.
readOnly: true
sslCertSet:
type: boolean
title: ssl_cert_set
description: Whether an SSL client certificate has been configured.
readOnly: true
sslKeySet:
type: boolean
title: ssl_key_set
description: Whether an SSL client private key has been configured.
readOnly: true
sslCaPathSet:
type: boolean
title: ssl_ca_path_set
description: Whether an SSL certificate authority path has been configured.
readOnly: true
sslCertPathSet:
type: boolean
title: ssl_cert_path_set
description: Whether an SSL client certificate path has been configured.
readOnly: true
sslKeyPathSet:
type: boolean
title: ssl_key_path_set
description: Whether an SSL client private key path has been configured.
readOnly: true
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.
writeOnly: true
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").
writeOnly: true
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.
writeOnly: true
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.
writeOnly: true
externalSecret:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret'
title: external_secret
authenticationType:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DataSource.AuthenticationType'
title: authentication_type
cloudSqlIpType:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DataSource.CloudSQLIPType'
title: cloud_sql_ip_type
description: |-
cloud_sql_ip_type selects the Cloud SQL IP type for Google Cloud SQL IAM connections.
CLOUD_SQL_IP_TYPE_UNSPECIFIED is treated as PUBLIC for backward compatibility.
saslConfig:
allOf:
- $ref: '#/components/schemas/bytebase.v1.SASLConfig'
title: sasl_config
additionalAddresses:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.DataSource.Address'
title: additional_addresses
description: (OPTIONAL) 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
writeOnly: true
redisType:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DataSource.RedisType'
title: redis_type
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
projectId:
type: string
title: project_id
description: |-
project_id and instance_id are the GCP resource identifiers.
project_id is used by Spanner and BigQuery; instance_id is used by Spanner.
For these engines, host and port optionally override the default Google API
endpoint (e.g. a Private Service Connect endpoint like
spanner-nonprod.p.googleapis.com).
instanceId:
type: string
title: instance_id
title: DataSource
bytebase.v1.DataSource.AWSCredential:
type: object
properties:
accessKeyId:
type: string
title: access_key_id
writeOnly: true
secretAccessKey:
type: string
title: secret_access_key
writeOnly: true
sessionToken:
type: string
title: session_token
writeOnly: true
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
writeOnly: true
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
writeOnly: true
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
writeOnly: true
title: AzureCredential
additionalProperties: false
bytebase.v1.DataSource.CloudSQLIPType:
type: string
title: CloudSQLIPType
enum:
- CLOUD_SQL_IP_TYPE_UNSPECIFIED
- PUBLIC
- PRIVATE
- PSC
description: CloudSQLIPType selects which Cloud SQL IP to dial for Google Cloud SQL IAM connections.
bytebase.v1.DataSource.GCPCredential:
type: object
properties:
content:
type: string
title: content
writeOnly: true
title: GCPCredential
additionalProperties: false
bytebase.v1.DataSource.RedisType:
type: string
title: RedisType
enum:
- REDIS_TYPE_UNSPECIFIED
- STANDALONE
- SENTINEL
- CLUSTER
bytebase.v1.DataSourceExternalSecret:
type: object
anyOf:
- type: object
properties:
appRole:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption'
title: app_role
description: AppRole authentication configuration.
title: app_role
- type: object
properties:
token:
type: string
title: token
description: |-
Token for direct authentication. Interpreted according to token_type:
the literal token (PLAIN), an environment variable name (ENVIRONMENT),
or a file path (FILE).
writeOnly: true
title: token
unevaluatedProperties: false
not:
allOf:
- anyOf:
- required:
- appRole
- required:
- token
- not:
oneOf:
- required:
- appRole
- required:
- token
properties:
secretType:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.SecretType'
title: secret_type
description: The type of external secret store.
url:
type: string
title: url
description: The URL of the external secret store.
authType:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.AuthType'
title: auth_type
description: The authentication method for accessing the secret store.
tokenType:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.TokenType'
title: token_type
description: How to interpret the token field when auth_type is TOKEN.
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.
writeOnly: true
vaultSslCert:
type: string
title: vault_ssl_cert
description: Client certificate for mutual TLS authentication with Vault.
writeOnly: true
vaultSslKey:
type: string
title: vault_ssl_key
description: Client private key for mutual TLS authentication with Vault.
writeOnly: true
title: DataSourceExternalSecret
bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption:
type: object
properties:
roleId:
type: string
title: role_id
description: The role ID for Vault AppRole authentication.
writeOnly: true
secretId:
type: string
title: secret_id
description: the secret id for the role without ttl.
writeOnly: true
type:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType'
title: type
description: The type of secret for AppRole authentication.
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
- AZURE_KEY_VAULT
bytebase.v1.DataSourceExternalSecret.TokenType:
type: string
title: TokenType
enum:
- TOKEN_TYPE_UNSPECIFIED
- PLAIN
- ENVIRONMENT
- FILE
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} or projects/{project}/instances/{instance}/databases/{database}
{database} is the database name in the instance.
state:
allOf:
- $ref: '#/components/schemas/bytebase.v1.State'
title: state
description: The existence of a database.
readOnly: true
successfulSyncTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: successful_sync_time
description: The latest synchronization time.
readOnly: true
project:
type: string
title: project
description: |-
The project for a database.
Format: projects/{project}
release:
type: string
title: release
description: |-
The release that was last applied to this database.
Format: projects/{project}/releases/{release_id}
Example: projects/my-project/releases/release_20260115-RC00
readOnly: true
environment:
type:
- string
- "null"
title: environment
description: |-
(OPTIONAL) The environment resource.
Format: environments/prod where prod is the environment resource ID.
effectiveEnvironment:
type:
- string
- "null"
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.
readOnly: true
labels:
type: object
title: labels
additionalProperties:
type: string
title: value
description: Labels will be used for deployment and policy control.
instanceResource:
allOf:
- $ref: '#/components/schemas/bytebase.v1.InstanceResource'
title: instance_resource
description: The instance resource.
readOnly: true
backupAvailable:
type: boolean
title: backup_available
description: The database is available for DML prior backup.
readOnly: true
syncStatus:
allOf:
- $ref: '#/components/schemas/bytebase.v1.SyncStatus'
title: sync_status
description: The sync status of the database.
readOnly: true
syncError:
type: string
title: sync_error
description: The error message if sync failed.
readOnly: true
title: Database
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 or projects/{project}/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.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:
allOf:
- $ref: '#/components/schemas/google.type.Expr'
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"
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.
readOnly: true
title: DatabaseGroup
required:
- title
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 or projects/{project}/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
readOnly: true
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.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
required:
- name
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
required:
- name
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
required:
- name
additionalProperties: false
bytebase.v1.DeleteInstanceRequest:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the instance to delete.
Format: instances/{instance} or projects/{project}/instances/{instance}
force:
type: boolean
title: force
description: |-
If set to true, a workspace instance's databases are moved to the default
project before the instance is soft-deleted. Project instances reject this
option because their databases must remain in the owning project.
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
required:
- name
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: workspaces/{workspace-id}.
Environment resource name: environments/environment-id.
title: DeletePolicyRequest
required:
- name
additionalProperties: false
bytebase.v1.DeleteProjectRequest:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the project to delete.
Format: projects/{project}
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.
When purge=true, all databases will be moved to the default project before deletion.
When purge=false (soft delete/archive), the project and its databases/issues remain unchanged.
title: DeleteProjectRequest
required:
- name
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
required:
- name
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
required:
- name
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} or projects/{project}/instances/{instance}/databases/{database}/revisions/{revision}
title: DeleteRevisionRequest
required:
- name
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
required:
- name
additionalProperties: false
bytebase.v1.DeleteSavedQueryRequest:
type: object
properties:
name:
type: string
title: name
description: 'Format: projects/{project}/savedQueries/{savedQuery}'
title: DeleteSavedQueryRequest
required:
- name
additionalProperties: false
bytebase.v1.DeleteServiceAccountRequest:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the service account to delete.
Format: serviceAccounts/{email}
title: DeleteServiceAccountRequest
required:
- name
additionalProperties: false
description: Request message for deleting a service account.
bytebase.v1.DeleteUserRequest:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the user to delete.
Format: users/{email}
title: DeleteUserRequest
required:
- name
additionalProperties: false
bytebase.v1.DeleteWorkloadIdentityRequest:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the workload identity to delete.
Format: workloadIdentities/{email}
title: DeleteWorkloadIdentityRequest
required:
- name
additionalProperties: false
description: Request message for deleting a workload identity.
bytebase.v1.DeleteWorkspaceRequest:
type: object
properties:
name:
type: string
title: name
description: 'Format: workspaces/{workspace}'
title: DeleteWorkspaceRequest
required:
- name
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:
name:
type: string
title: name
description: |-
The database whose current schema is the diff source.
Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}
targetMetadata:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DatabaseMetadata'
title: target_metadata
description: |-
The metadata of the target schema. The source metadata and the engine are
read from the database, so only the target travels in the request.
Must describe the COMPLETE target schema: the diff runs against the full
stored source, so any object omitted from the target (for example by a
truncated metadata fetch) is treated as dropped.
title: DiffMetadataRequest
required:
- name
- targetMetadata
additionalProperties: false
bytebase.v1.DiffMetadataResponse:
type: object
properties:
diff:
type: string
title: diff
description: The generated migration statements.
title: DiffMetadataResponse
additionalProperties: false
bytebase.v1.DiffSchemaRequest:
type: object
anyOf:
- type: object
properties:
changelog:
type: string
title: changelog
description: |-
The resource name of the changelog
Format:
instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog}
title: changelog
- type: object
properties:
schema:
type: string
title: schema
description: The target schema.
title: schema
unevaluatedProperties: false
not:
allOf:
- anyOf:
- required:
- changelog
- required:
- schema
- not:
oneOf:
- required:
- changelog
- required:
- schema
properties:
name:
type: string
title: name
description: |-
The name of the database or changelog.
Format:
database: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}
changelog: instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog}
title: DiffSchemaRequest
required:
- name
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.DisableMFARequest:
type: object
properties:
name:
type: string
title: name
maxLength: 260
description: |-
Format: users/{email}. The caller's own, or another user's with
bb.users.update.
credential:
allOf:
- $ref: '#/components/schemas/bytebase.v1.CredentialProof'
title: credential
description: |-
(OPTIONAL) Required for a self-service call against a live factor, and then only
otp_code or recovery_code. Unused on an admin-assisted call.
title: DisableMFARequest
required:
- name
additionalProperties: false
bytebase.v1.EmailSetting:
type: object
anyOf:
- type: object
properties:
smtp:
allOf:
- $ref: '#/components/schemas/bytebase.v1.EmailSetting.SMTPConfig'
title: smtp
title: smtp
unevaluatedProperties: false
properties:
from:
type: string
title: from
fromName:
type: string
title: from_name
type:
allOf:
- $ref: '#/components/schemas/bytebase.v1.EmailSetting.Type'
title: type
title: EmailSetting
bytebase.v1.EmailSetting.SMTPConfig:
type: object
properties:
host:
type: string
title: host
port:
type: integer
title: port
format: int32
username:
type: string
title: username
password:
type: string
title: password
writeOnly: true
encryption:
allOf:
- $ref: '#/components/schemas/bytebase.v1.EmailSetting.SMTPConfig.Encryption'
title: encryption
authentication:
allOf:
- $ref: '#/components/schemas/bytebase.v1.EmailSetting.SMTPConfig.Authentication'
title: authentication
title: SMTPConfig
additionalProperties: false
bytebase.v1.EmailSetting.SMTPConfig.Authentication:
type: string
title: Authentication
enum:
- AUTHENTICATION_UNSPECIFIED
- AUTHENTICATION_NONE
- PLAIN
- LOGIN
- CRAM_MD5
bytebase.v1.EmailSetting.SMTPConfig.Encryption:
type: string
title: Encryption
enum:
- ENCRYPTION_UNSPECIFIED
- ENCRYPTION_NONE
- STARTTLS
- SSL_TLS
bytebase.v1.EmailSetting.Type:
type: string
title: Type
enum:
- TYPE_UNSPECIFIED
- SMTP
bytebase.v1.EnableMFARequest:
type: object
properties:
name:
type: string
title: name
maxLength: 260
description: 'Format: users/{email}. Must be the caller''s own name.'
otpCode:
type: string
title: otp_code
maxLength: 64
description: A code from the authenticator the pending secret was just added to.
pendingVersion:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: pending_version
description: The pending_version this enrollment was minted with.
credential:
allOf:
- $ref: '#/components/schemas/bytebase.v1.CredentialProof'
title: credential
description: |-
(OPTIONAL) Proof of the *existing* factor, not the new device above. Required for a
rotation, and for first-time enrollment on an account with a password.
title: EnableMFARequest
required:
- name
- otpCode
- pendingVersion
additionalProperties: false
bytebase.v1.Engine:
type: string
title: Engine
enum:
- ENGINE_UNSPECIFIED
- CLICKHOUSE
- MYSQL
- POSTGRES
- SNOWFLAKE
- 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.
readOnly: true
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:
allOf:
- $ref: '#/components/schemas/google.type.Color'
title: color
title: Environment
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
maxLength: 65536
description: External OIDC token (JWT) from CI/CD platform.
email:
type: string
title: email
maxLength: 254
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. The default sorting order is ascending.
For example:
- order_by = "create_time asc"
- order_by = "create_time desc"
format:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ExportFormat'
title: format
description: The export format.
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
required:
- parent
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.ExportDestination:
type: string
title: ExportDestination
enum:
- EXPORT_DESTINATION_UNSPECIFIED
- DOWNLOAD
- SHAREPOINT
description: Where an export goes. Values are added as destinations are supported.
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} or
projects/{project}/instances/{instance}/databases/{database}
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ExportFormat'
title: format
description: The export format.
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.
If omitted, Export resolves the data source server-side by using the
single read-only data source when exactly one exists, or the admin data
source otherwise. It can also be set explicitly to export from the admin
data source or a specific read-only data source.
schema:
type:
- string
- "null"
title: schema
description: |-
The default schema to search objects. Equals to the current schema in
Oracle and search path in Postgres.
container:
type:
- string
- "null"
title: container
description: |-
Container is the container name to execute the query against, used for
CosmosDB only.
destination:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ExportDestination'
title: destination
description: |-
Where the export goes. A destination the workspace query data policy
does not allow is rejected with FAILED_PRECONDITION.
title: ExportRequest
required:
- name
additionalProperties: false
bytebase.v1.ExportResponse:
type: object
properties:
content:
type: string
title: content
format: byte
description: The export file content.
appliedAccessGrant:
type: string
title: applied_access_grant
description: |-
The just-in-time access grant applied to this export, if any.
Format: projects/{project}/accessGrants/{accessGrant}.
Empty when the user was authorized through normal ACL rather than a grant.
uri:
type: string
title: uri
description: |-
Set when the export was sent to an export destination: the absolute
location of the folder or key prefix created for this export, for example
https://… for SharePoint or s3://bucket/prefix for S3. content is then empty.
title: ExportResponse
additionalProperties: false
bytebase.v1.ExportSetting:
type: object
properties:
sharepoint:
allOf:
- $ref: '#/components/schemas/bytebase.v1.SharePointSetting'
title: sharepoint
description: Unset when SharePoint is not configured.
title: ExportSetting
additionalProperties: false
description: ExportSetting holds each export destination provider's credentials.
bytebase.v1.ExportVCSProviderUsersRequest:
type: object
title: ExportVCSProviderUsersRequest
additionalProperties: false
bytebase.v1.ExportVCSProviderUsersResponse:
type: object
properties:
content:
type: string
title: content
format: byte
title: ExportVCSProviderUsersResponse
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.GenerationMetadata.Type'
title: 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.GetAccessGrantRequest:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the access grant to retrieve.
Format: projects/{project}/accessGrants/{access_grant}
title: GetAccessGrantRequest
required:
- name
additionalProperties: false
bytebase.v1.GetActuatorInfoRequest:
type: object
title: GetActuatorInfoRequest
additionalProperties: false
description: Request message for getting actuator information.
bytebase.v1.GetAuthenticationInfoRequest:
type: object
properties:
workspace:
type: string
title: workspace
description: |-
Optional. The workspace whose authentication policy should be returned.
Format: workspaces/{workspace}
When unset, self-hosted resolves the singleton workspace and SaaS uses
the deployment-level defaults.
title: GetAuthenticationInfoRequest
additionalProperties: false
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} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog}
view:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ChangelogView'
title: view
title: GetChangelogRequest
required:
- name
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 or projects/{project}/instances/{instance}/databases/{database}/catalog
title: GetDatabaseCatalogRequest
required:
- name
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DatabaseGroupView'
title: view
description: The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC.
title: GetDatabaseGroupRequest
required:
- name
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 or projects/{project}/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 ".contains()" operator.
For example:
schema == "schema-a"
table == "table-a"
table.contains("table-a")
schema == "schema-a" && table.contains("sample")
The filter is used to search for tables containing "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
required:
- name
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} or projects/{project}/instances/{instance}/databases/{database}
title: GetDatabaseRequest
required:
- name
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 or projects/{project}/instances/{instance}/databases/{database}/sdlSchema
format:
allOf:
- $ref: '#/components/schemas/bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat'
title: format
description: The format of the SDL schema output.
title: GetDatabaseSDLSchemaRequest
required:
- name
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 or projects/{project}/instances/{instance}/databases/{database}/schema
title: GetDatabaseSchemaRequest
required:
- name
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
required:
- name
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
required:
- resource
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
required:
- name
additionalProperties: false
bytebase.v1.GetInstanceRequest:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the instance to retrieve.
Format: instances/{instance} or projects/{project}/instances/{instance}
title: GetInstanceRequest
required:
- name
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
required:
- name
additionalProperties: false
bytebase.v1.GetPaymentInfoRequest:
type: object
title: GetPaymentInfoRequest
additionalProperties: false
bytebase.v1.GetPlanCheckRunRequest:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the plan check run to retrieve.
Format: projects/{project}/plans/{plan}/planCheckRun
title: GetPlanCheckRunRequest
required:
- name
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
required:
- name
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
required:
- name
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
required:
- name
additionalProperties: false
bytebase.v1.GetQueryHistoryRequest:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the query history to retrieve.
Format: projects/{project}/queryHistories/{id}
title: GetQueryHistoryRequest
required:
- name
additionalProperties: false
bytebase.v1.GetReleaseRequest:
type: object
properties:
name:
type: string
title: name
description: 'Format: projects/{project}/releases/{release}'
title: GetReleaseRequest
required:
- name
additionalProperties: false
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
required:
- name
additionalProperties: false
bytebase.v1.GetReviewRunRequest:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the review run to retrieve.
Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun}
title: GetReviewRunRequest
required:
- name
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} or projects/{project}/instances/{instance}/databases/{database}/revisions/{revision}
title: GetRevisionRequest
required:
- name
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
required:
- name
additionalProperties: false
bytebase.v1.GetRolloutRequest:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the rollout to retrieve.
This is the rollout resource name, which is the plan name plus /rollout suffix.
Format: projects/{project}/plans/{plan}/rollout
title: GetRolloutRequest
required:
- name
additionalProperties: false
bytebase.v1.GetSavedQueryPolicyRequest:
type: object
properties:
resource:
type: string
title: resource
description: 'Format: projects/{project}/savedQueries/{savedQuery}'
title: GetSavedQueryPolicyRequest
required:
- resource
additionalProperties: false
bytebase.v1.GetSavedQueryRequest:
type: object
properties:
name:
type: string
title: name
description: 'Format: projects/{project}/savedQueries/{savedQuery}'
title: GetSavedQueryRequest
required:
- name
additionalProperties: false
bytebase.v1.GetSchemaStringRequest:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the database.
Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}
type:
allOf:
- $ref: '#/components/schemas/bytebase.v1.GetSchemaStringRequest.ObjectType'
title: type
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DatabaseMetadata'
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.
title: GetSchemaStringRequest
required:
- name
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.GetServiceAccountRequest:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the service account to retrieve.
Format: serviceAccounts/{email}
title: GetServiceAccountRequest
required:
- name
additionalProperties: false
description: Request message for getting a service account.
bytebase.v1.GetSettingRequest:
type: object
properties:
name:
type: string
title: name
description: The resource name of the setting.
title: GetSettingRequest
required:
- name
additionalProperties: false
description: The request message for getting a setting.
bytebase.v1.GetSettingResponse:
type: object
properties:
setting:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Setting'
title: 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
required:
- name
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}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}'
title: GetTaskRunLogRequest
required:
- parent
additionalProperties: false
bytebase.v1.GetTaskRunRequest:
type: object
properties:
name:
type: string
title: name
description: 'Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}'
title: GetTaskRunRequest
required:
- name
additionalProperties: false
bytebase.v1.GetTaskRunSessionRequest:
type: object
properties:
parent:
type: string
title: parent
description: 'Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}'
title: GetTaskRunSessionRequest
required:
- parent
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
required:
- name
additionalProperties: false
bytebase.v1.GetWorkloadIdentityRequest:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the workload identity to retrieve.
Format: workloadIdentities/{email}
title: GetWorkloadIdentityRequest
required:
- name
additionalProperties: false
description: Request message for getting a workload identity.
bytebase.v1.GetWorkspaceRequest:
type: object
properties:
name:
type: string
title: name
description: |-
The workspace name, format: workspaces/{workspace}.
Use "workspaces/-" to get the current/default workspace.
title: GetWorkspaceRequest
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.
readOnly: true
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.GroupMember.Role'
title: role
description: The member's role in the group.
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, returned by GetIamPolicy and SetIamPolicy.
Sending it back on SetIamPolicy makes the write conditional: if the policy
changed since the read, the call returns ABORTED. Omitting it applies the
write unconditionally, overwriting any concurrent change (AIP-154).
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.IdentityProviderType'
title: type
description: The type of identity provider protocol.
config:
allOf:
- $ref: '#/components/schemas/bytebase.v1.IdentityProviderConfig'
title: config
description: The configuration details for the identity provider.
title: IdentityProvider
additionalProperties: false
bytebase.v1.IdentityProviderConfig:
type: object
anyOf:
- type: object
properties:
ldapConfig:
allOf:
- $ref: '#/components/schemas/bytebase.v1.LDAPIdentityProviderConfig'
title: ldap_config
description: LDAP protocol configuration.
title: ldap_config
- type: object
properties:
oauth2Config:
allOf:
- $ref: '#/components/schemas/bytebase.v1.OAuth2IdentityProviderConfig'
title: oauth2_config
description: OAuth2 protocol configuration.
title: oauth2_config
- type: object
properties:
oidcConfig:
allOf:
- $ref: '#/components/schemas/bytebase.v1.OIDCIdentityProviderConfig'
title: oidc_config
description: OIDC protocol configuration.
title: oidc_config
unevaluatedProperties: false
not:
allOf:
- anyOf:
- required:
- ldapConfig
- required:
- oauth2Config
- required:
- oidcConfig
- not:
oneOf:
- required:
- ldapConfig
- required:
- oauth2Config
- required:
- oidcConfig
title: IdentityProviderConfig
bytebase.v1.IdentityProviderContext:
type: object
anyOf:
- type: object
properties:
oauth2Context:
allOf:
- $ref: '#/components/schemas/bytebase.v1.OAuth2IdentityProviderContext'
title: oauth2_context
description: OAuth2 authentication context.
title: oauth2_context
- type: object
properties:
oidcContext:
allOf:
- $ref: '#/components/schemas/bytebase.v1.OIDCIdentityProviderContext'
title: oidc_context
description: OpenID Connect authentication context.
title: oidc_context
unevaluatedProperties: false
not:
allOf:
- anyOf:
- required:
- oauth2Context
- required:
- oidcContext
- not:
oneOf:
- required:
- oauth2Context
- required:
- oidcContext
title: IdentityProviderContext
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: 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: 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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.SpatialIndexConfig'
title: spatial_config
description: Spatial index configuration for spatial databases like SQL Server, PostgreSQL with PostGIS, etc.
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} or projects/{project}/instances/{instance}
state:
allOf:
- $ref: '#/components/schemas/bytebase.v1.State'
title: state
description: The lifecycle state of the instance.
title:
type: string
title: title
maxLength: 200
description: The display title of the instance.
engine:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Engine'
title: engine
description: The database engine type.
engineVersion:
type: string
title: engine_version
description: The version of the database engine.
readOnly: true
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
- "null"
title: environment
description: |-
(OPTIONAL) The environment resource.
Format: environments/prod where prod is the environment resource ID.
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.
readOnly: true
syncInterval:
allOf:
- $ref: '#/components/schemas/google.protobuf.Duration'
title: sync_interval
description: How often the instance is synced.
syncDatabases:
allOf:
- $ref: '#/components/schemas/bytebase.v1.SyncDatabases'
title: sync_databases
description: |-
Enable sync for following databases.
Not set means sync all schemas & databases.
lastSyncTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: last_sync_time
description: The last time the instance was synced.
readOnly: true
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.InstanceResource:
type: object
properties:
title:
type: string
title: title
description: The display title of the instance.
engine:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Engine'
title: engine
description: The database engine type.
engineVersion:
type: string
title: engine_version
description: The version of the database engine.
readOnly: true
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} or projects/{project}/instances/{instance}
environment:
type:
- string
- "null"
title: environment
description: |-
The environment resource.
Format: environments/prod where prod is the environment resource ID.
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} or projects/{project}/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
- "null"
title: password
description: The role password.
writeOnly: true
connectionLimit:
type:
- integer
- "null"
title: connection_limit
format: int32
description: The connection count limit for this role.
validUntil:
type:
- string
- "null"
title: valid_until
description: The expiration for the role's password.
attribute:
type:
- string
- "null"
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
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Issue.Type'
title: type
status:
allOf:
- $ref: '#/components/schemas/bytebase.v1.IssueStatus'
title: status
description: The status of the issue.
approvers:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.Issue.Approver'
title: approvers
approvalTemplate:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ApprovalTemplate'
title: approval_template
description: The approval template for the issue.
creator:
type: string
title: creator
description: 'Format: users/[email protected]'
readOnly: true
createTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: create_time
readOnly: true
updateTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: update_time
readOnly: true
plan:
type: string
title: plan
description: |-
The plan associated with the issue.
Can be empty.
Format: projects/{project}/plans/{plan}
roleGrant:
allOf:
- $ref: '#/components/schemas/bytebase.v1.RoleGrant'
title: role_grant
description: Used if the issue type is ROLE_GRANT.
riskLevel:
allOf:
- $ref: '#/components/schemas/bytebase.v1.RiskLevel'
title: risk_level
description: The risk level of the issue.
labels:
type: array
items:
type: string
title: labels
description: Labels attached to the issue for categorization and filtering.
approvalStatus:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ApprovalStatus'
title: approval_status
description: The overall approval status for the issue.
readOnly: true
accessGrant:
type: string
title: access_grant
description: |-
The access grant associated with this issue.
Format: projects/{project}/accessGrants/{access_grant}
readOnly: true
draft:
type: boolean
title: draft
description: (OPTIONAL) Whether this issue is a Draft Review Issue.
title: Issue
additionalProperties: false
bytebase.v1.Issue.Approver:
type: object
properties:
status:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Issue.Approver.Status'
title: status
description: The new 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.Type:
type: string
title: Type
enum:
- TYPE_UNSPECIFIED
- DATABASE_CHANGE
- ROLE_GRANT
- ACCESS_GRANT
description: The type of issue.
bytebase.v1.IssueComment:
type: object
anyOf:
- type: object
properties:
approval:
allOf:
- $ref: '#/components/schemas/bytebase.v1.IssueComment.Approval'
title: approval
description: Approval event.
title: approval
- type: object
properties:
issueUpdate:
allOf:
- $ref: '#/components/schemas/bytebase.v1.IssueComment.IssueUpdate'
title: issue_update
description: Issue update event.
title: issue_update
- type: object
properties:
planUpdate:
allOf:
- $ref: '#/components/schemas/bytebase.v1.IssueComment.PlanUpdate'
title: plan_update
description: Plan update event.
title: plan_update
- type: object
properties:
reviewRunCompletion:
allOf:
- $ref: '#/components/schemas/bytebase.v1.IssueComment.ReviewRunCompletion'
title: review_run_completion
description: Review run completion event.
title: review_run_completion
- type: object
properties:
reviewSubmission:
allOf:
- $ref: '#/components/schemas/bytebase.v1.IssueComment.ReviewSubmission'
title: review_submission
description: Review submission event.
title: review_submission
unevaluatedProperties: false
not:
allOf:
- anyOf:
- required:
- approval
- required:
- issueUpdate
- required:
- planUpdate
- required:
- reviewRunCompletion
- required:
- reviewSubmission
- not:
oneOf:
- required:
- approval
- required:
- issueUpdate
- required:
- planUpdate
- required:
- reviewRunCompletion
- required:
- reviewSubmission
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:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: create_time
readOnly: true
updateTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: update_time
readOnly: true
creator:
type: string
title: creator
description: 'Format: users/{email}'
readOnly: true
root:
type:
- string
- "null"
title: root
description: |-
(IMMUTABLE) The thread root's name, set only on replies. Immutable after creation.
Format: projects/{project}/issues/{issue}/issueComments/{issueComment}
Must name a thread root in the same issue, never a general comment or reply.
threadState:
oneOf:
- $ref: '#/components/schemas/bytebase.v1.IssueComment.ThreadState'
- type: "null"
title: thread_state
description: |-
Present only on thread roots. Set OPEN on create to start a thread; an
anchored root starts one without it. Omit root, thread_state, and
statement_anchor to create a general comment.
Update through the thread_state field mask to resolve or reopen.
Adding a reply does not reopen a resolved thread.
statementAnchor:
allOf:
- $ref: '#/components/schemas/bytebase.v1.StatementAnchor'
title: statement_anchor
description: |-
(IMMUTABLE) Optional source context on a root or reply. A reply's anchor must share
the root's spec and sheet_sha256 when created; it may narrow the range.
Cannot be set on events. Immutable after creation, except that a later
review run reporting a review result again moves the result to its
statement in the SQL that run reviewed.
reviewMetadata:
allOf:
- $ref: '#/components/schemas/bytebase.v1.IssueComment.ReviewMetadata'
title: review_metadata
description: |-
Present on review results, the comments the review executor posts.
Never accepted on create or update.
readOnly: true
title: IssueComment
description: A comment on an issue.
bytebase.v1.IssueComment.Approval:
type: object
properties:
status:
allOf:
- $ref: '#/components/schemas/bytebase.v1.IssueComment.Approval.Status'
title: status
description: The 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
- "null"
title: from_title
toTitle:
type:
- string
- "null"
title: to_title
fromDescription:
type:
- string
- "null"
title: from_description
toDescription:
type:
- string
- "null"
title: to_description
fromStatus:
oneOf:
- $ref: '#/components/schemas/bytebase.v1.IssueStatus'
- type: "null"
title: from_status
toStatus:
oneOf:
- $ref: '#/components/schemas/bytebase.v1.IssueStatus'
- type: "null"
title: to_status
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.PlanUpdate:
type: object
properties:
fromSpecs:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.Plan.Spec'
title: from_specs
toSpecs:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.Plan.Spec'
title: to_specs
title: PlanUpdate
additionalProperties: false
description: |-
Plan update event information (snapshot of plan.config.specs before
and after a PlanService.UpdatePlan call that mutated specs).
bytebase.v1.IssueComment.ReviewMetadata:
type: object
properties:
runType:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ReviewRun.Type'
title: run_type
description: The reviewer that posted the result.
ruleType:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ReviewRuleType'
title: rule_type
description: The rule judged against. Set if and only if run_type is RULE.
priority:
allOf:
- $ref: '#/components/schemas/bytebase.v1.IssueComment.ReviewMetadata.Priority'
title: priority
targets:
type: array
items:
type: string
title: targets
description: |-
Every database the result applies to, sorted.
Format: instances/{instance}/databases/{database}
superseded:
type: boolean
title: superseded
description: |-
A later run of the same reviewer has completed without reporting the
result again, whatever its thread state.
attempt:
type: string
title: attempt
format: int64
description: |-
The ReviewRunCompletion.attempt of the run that posted the result. A
result a later run reports again keeps its thread and its attempt.
codes:
type: array
items:
type: string
title: codes
description: |-
The conditions a RULE result reports, as finding codes such as
"WT101", one per reason. A code names the same condition on every
engine. Empty for other reviewers.
title: ReviewMetadata
additionalProperties: false
description: What a review result carries beyond its text.
bytebase.v1.IssueComment.ReviewMetadata.Priority:
type: string
title: Priority
enum:
- PRIORITY_UNSPECIFIED
- P0
- P1
- P2
description: |-
Priority says what resolving the thread means. It has no bearing on
blocking, which thread_state alone decides.
bytebase.v1.IssueComment.ReviewRunCompletion:
type: object
properties:
runType:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ReviewRun.Type'
title: run_type
description: The reviewer that ran.
attempt:
type: string
title: attempt
format: int64
description: |-
Identifies the run among its reviewer's runs on the issue. The results
it posted carry the same ReviewMetadata.attempt.
postedCount:
type: integer
title: posted_count
format: int32
description: Results the run posted as new threads.
keptCount:
type: integer
title: kept_count
format: int32
description: Earlier results the run reported again, which kept their threads.
supersededCount:
type: integer
title: superseded_count
format: int32
description: Earlier results the run no longer reports, now superseded.
title: ReviewRunCompletion
additionalProperties: false
description: |-
A review run completed, and what it did to the results of its reviewer.
Posted by the reviewer, with no creator.
bytebase.v1.IssueComment.ReviewSubmission:
type: object
title: ReviewSubmission
additionalProperties: false
description: Review submission event information.
bytebase.v1.IssueComment.ThreadState:
type: string
title: ThreadState
enum:
- THREAD_STATE_UNSPECIFIED
- OPEN
- RESOLVED
bytebase.v1.IssueStatus:
type: string
title: IssueStatus
enum:
- ISSUE_STATUS_UNSPECIFIED
- OPEN
- DONE
- CANCELED
description: |-
The status of an issue.
Lives at the top level so both plan_service.proto and issue_service.proto
can reference it without a circular import.
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.
writeOnly: true
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol'
title: security_protocol
description: |-
SecurityProtocol is the security protocol to be used for establishing
connections with the LDAP server.
fieldMapping:
allOf:
- $ref: '#/components/schemas/bytebase.v1.FieldMapping'
title: field_mapping
description: |-
FieldMapping is the mapping of the user attributes returned by the LDAP
server.
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.LDAPIdentityProviderTestRequestContext:
type: object
properties:
username:
type: string
title: username
description: The username of a directory user, substituted into the user filter.
password:
type: string
title: password
description: The password of the directory user.
title: LDAPIdentityProviderTestRequestContext
additionalProperties: false
bytebase.v1.Label:
type: object
properties:
value:
type: string
title: value
description: The label value/name.
color:
allOf:
- $ref: '#/components/schemas/google.type.Color'
title: color
description: The label 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.LeaveWorkspaceRequest:
type: object
properties:
name:
type: string
title: name
description: 'Format: workspaces/{workspace}'
title: LeaveWorkspaceRequest
required:
- name
additionalProperties: false
bytebase.v1.ListAccessGrantsRequest:
type: object
properties:
parent:
type: string
title: parent
description: |-
The parent project of the access grants.
Format: projects/{project}
pageSize:
type: integer
title: page_size
format: int32
description: The maximum number of access grants to return.
pageToken:
type: string
title: page_token
description: A page token from a previous ListAccessGrants call.
filter:
type: string
title: filter
description: |-
Filter expression using AIP-160 syntax.
Supported fields:
- name: the fullname in "projects/{project}/accessGrants/{access_grant}" format, support "==" operator.
- creator: the creator name in "users/{email}" format, support "==" operator.
- status: the access status, support "==" and "in" operator.
- issue: the access issue fullname, support "==" operator.
- expire_time: the access expire time in "2006-01-02T15:04:05Z07:00" format, support ">=", ">", "<=" and "<" operator.
- create_time: the access creation time in "2006-01-02T15:04:05Z07:00" format, support ">=", ">", "<=" and "<" operator.
- query: the access query, support "==" and ".contains(xx)" operator.
Equality trims only boundary ASCII space, tab, LF, CR, vertical tab, and form feed.
- query_hash: supports "==" with a lowercase hexadecimal SHA-256 digest of
the UTF-8 query after the same boundary trim. Internal whitespace and Unicode
remain unchanged.
- schema: execution schema, supports "=="; empty matches only empty or absent values.
- container: execution container, supports "=="; empty matches only empty or absent values.
- target: the target database fullname, support "==" operator.
- unmask: whether the grant allows unmasking sensitive data, support "==" operator with a boolean literal.
- export: whether the grant allows exporting the query result, support "==" operator with a boolean literal.
Examples:
- creator == "users/[email protected]"
- status == "ACTIVE"
- status in ["ACTIVE", "PENDING"]
- creator == "users/[email protected]" && status == "ACTIVE"
- issue == "projects/x/issues/123"
- status == "ACTIVE" && expire_time > "2024-02-01T00:00:00Z"
- target == "instances/sample/databases/employee"
- unmask == true
- export == true && status == "ACTIVE"
orderBy:
type: string
title: order_by
description: |-
The order by of access grants.
Support creator, expire_time, create_time. The default sorting order is ascending.
For example:
- order_by = "creator"
- order_by = "expire_time desc"
- order_by = "expire_time asc, create_time desc"
title: ListAccessGrantsRequest
required:
- parent
additionalProperties: false
bytebase.v1.ListAccessGrantsResponse:
type: object
properties:
accessGrants:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.AccessGrant'
title: access_grants
description: The access grants 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: ListAccessGrantsResponse
additionalProperties: false
bytebase.v1.ListChangelogsRequest:
type: object
properties:
parent:
type: string
title: parent
description: |-
The parent of the changelogs.
Format: instances/{instance}/databases/{database} or projects/{project}/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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ChangelogView'
title: view
filter:
type: string
title: filter
description: |-
Filter is used to filter changelogs returned in the list.
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
- status: the changelog status, support "==" operation. check Changelog.Status for available values.
- has_schema_snapshot: filters to changelogs with a schema snapshot; only "has_schema_snapshot == true" is supported.
- create_time: the changelog create time in RFC 3339 format, supports ">=", "<=", or "<" operator.
Example:
status == "DONE"
status == "FAILED"
has_schema_snapshot == true && create_time < "2024-01-02T00:00:00Z"
title: ListChangelogsRequest
required:
- parent
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DatabaseGroupView'
title: view
description: The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC.
title: ListDatabaseGroupsRequest
required:
- parent
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.databases.list" permission.
- workspaces/{id}: list databases in the workspace, require "bb.databases.list" permission.
- instances/{instance}: list databases in an instance, require "bb.instances.get" permission.
- projects/{project}/instances/{instance}: list databases in a project 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 ".contains()" operator.
- project: the project full name in "projects/{id}" format, support "==" operator.
- instance: the instance full name in "instances/{id}" or "projects/{project}/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.
- table: filter by the database table, support "==" and ".contains()" 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}"
instance == "projects/{project resource id}/instances/{instance resource id}"
name.contains("database name")
engine == "MYSQL"
engine in ["MYSQL", "POSTGRES"]
!(engine in ["MYSQL", "POSTGRES"])
exclude_unassigned == true
table == "sample"
table.contains("sam")
labels.environment == "production"
labels.region == "asia"
labels.region in ["asia", "europe"]
You can combine filter conditions like:
environment == "environments/prod" && name.contains("employee")
showDeleted:
type: boolean
title: show_deleted
description: Show deleted database if specified.
orderBy:
type: string
title: order_by
description: |-
The order by of databases.
Support name, project, instance. The default sorting order is ascending.
For example:
- order_by = "name" - order by name ascending
- order_by = "name desc"
- order_by = "name desc, project asc"
title: ListDatabasesRequest
required:
- parent
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 ".contains()" operator.
- email: the group email, support "==" and ".contains()" operator.
- project: the project full name in "projects/{id}" format, support "==" operator.
For example:
title == "dba"
email == "[email protected]"
title.contains("dba")
email.contains("dba")
project == "projects/sample-project"
You can combine filter conditions like:
title.contains("dba") || email.contains("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
properties:
parent:
type: string
title: parent
pattern: ^workspaces/[^/]+$
description: |-
The parent workspace whose identity providers should be listed. It must be
the workspace the caller's credential belongs to.
Format: workspaces/{workspace}
title: ListIdentityProvidersRequest
required:
- parent
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} or projects/{project}/instances/{instance}
instance:
oneOf:
- $ref: '#/components/schemas/bytebase.v1.Instance'
- type: "null"
title: instance
description: The target instance. We need to set this field if the target instance is not created yet.
title: ListInstanceDatabaseRequest
required:
- name
- instance
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} or projects/{project}/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
required:
- parent
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:
parent:
type:
- string
- "null"
title: parent
description: |-
The parent, which owns this collection of instances.
Format: projects/{project}. If omitted, only workspace instances are
returned. Wildcard project parents are not supported. When set, the
`project` filter must be omitted or match this parent.
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 ".contains()" operator.
- resource_id: the instance id, support "==" and ".contains()" 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 ".contains()" operator.
- port: the instance port, support "==" and ".contains()" 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.contains("sample")
resource_id == "sample-instance"
resource_id.contains("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.contains("127.0")
port == "54321"
port.contains("543")
labels.org_group == "infrastructure"
labels.environment in ["prod", "production"]
project == "projects/sample-project"
You can combine filter conditions like:
name.contains("sample") && environment == "environments/test"
host == "127.0.0.1" && port == "54321"
orderBy:
type: string
title: order_by
description: |-
The order by of instances.
Support title, environment. The default sorting order is ascending.
For example:
- order_by = "title"
- order_by = "title desc"
- order_by = "title desc, environment asc"
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.
filter:
type: string
title: filter
description: |-
CEL filter over events, root comments, and replies.
Supported: root == null, root == "<comment name>", or root in ["<comment name>", ...].
Root names must belong to parent. Empty and root == null return the
timeline (events and root comments); other filters return replies only.
title: ListIssueCommentsRequest
required:
- parent
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.
- labels: the issue labels, support "==" and "in" operator.
- risk_level: the issue risk level, support "in" operator, check the RiskLevel enum for the values.
- 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"
labels in ["label1", "label2"]
risk_level in ["HIGH", "MODERATE"]
create_time >= "2025-01-02T15:04:05Z07:00"
query:
type: string
title: query
description: Query is the query statement.
orderBy:
type: string
title: order_by
description: |-
The order by of issues.
Support:
- create_time
- update_time
The default sorting order is ascending.
For example:
- order_by = "create_time desc"
- order_by = "update_time asc"
title: ListIssuesRequest
required:
- parent
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.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.
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_rollout: whether the plan has rollout, support "==" operator, the value should be "true" or "false".
- title: the plan title, support "==" operator for exact match and ".contains()" operator for case-insensitive substring match.
- spec_type: the plan spec config type, support "==" operator, the value should be "create_database_config" or "change_database_config".
- state: the plan state, support "==" operator, the value should be "ACTIVE" or "DELETED".
- has_release: whether a spec references a release, support "==" operator, the value should be "true" or "false".
- release: the release a spec references, in "projects/{project}/releases/{release}" format, support "==" operator.
- task_status: the current status of any task in the plan, support "in" operator, the values should be Task.Status values except STATUS_UNSPECIFIED.
For example:
creator == "users/[email protected]" && create_time >= "2025-01-02T15:04:05Z07:00"
title == "My Plan"
title.contains("database migration")
spec_type == "change_database_config"
state == "ACTIVE"
has_release == true && task_status in ["FAILED", "RUNNING"]
release == "projects/my-project/releases/release_20260115-RC00"
title: ListPlansRequest
required:
- parent
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:
oneOf:
- $ref: '#/components/schemas/bytebase.v1.PolicyType'
- type: "null"
title: policy_type
description: Filter by specific policy type.
showDeleted:
type: boolean
title: show_deleted
description: Show deleted policies if specified.
title: ListPoliciesRequest
required:
- parent
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").
orderBy:
type: string
title: order_by
description: |-
The order by of projects.
Support title. The default sorting order is ascending.
For example:
- order_by = "title"
- order_by = "title desc"
- order_by = "title asc"
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.ListPurchasePlansRequest:
type: object
title: ListPurchasePlansRequest
additionalProperties: false
bytebase.v1.ListPurchasePlansResponse:
type: object
properties:
plans:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.PurchasePlan'
title: plans
title: ListPurchasePlansResponse
additionalProperties: false
bytebase.v1.ListQueryHistoriesRequest:
type: object
properties:
parent:
type: string
title: parent
description: |-
The parent project whose query histories are listed.
Format: projects/{project}
Use "projects/-" to list query histories across all projects
(https://google.aip.dev/159); this requires the bb.queryHistories.list
permission on the workspace.
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 `ListQueryHistories` call.
Provide this to retrieve the subsequent page.
filter:
type: string
title: filter
description: |-
Filter is the filter to apply on the list query histories.
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
- creator: the user full name in "users/{email}" format, support "==" operator.
For example:
creator == "users/{email}"
title: ListQueryHistoriesRequest
required:
- parent
additionalProperties: false
bytebase.v1.ListQueryHistoriesResponse:
type: object
properties:
queryHistories:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.QueryHistory'
title: query_histories
description: The list of query histories.
readOnly: true
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
`ListQueryHistories` method to retrieve the next page of history.
title: ListQueryHistoriesResponse
additionalProperties: false
bytebase.v1.ListReleaseCategoriesRequest:
type: object
properties:
parent:
type: string
title: parent
description: 'Format: projects/{project}'
title: ListReleaseCategoriesRequest
required:
- parent
additionalProperties: false
bytebase.v1.ListReleaseCategoriesResponse:
type: object
properties:
categories:
type: array
items:
type: string
title: categories
description: The unique category values in the project.
title: ListReleaseCategoriesResponse
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.
filter:
type: string
title: filter
description: |-
Filter is used to filter releases returned in the list.
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filters:
- category: release category, support "==" operator.
For example:
category == "webapp"
title: ListReleasesRequest
required:
- parent
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} or projects/{project}/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
required:
- parent
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:
- update_time: rollout update time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.
- task_type: the task type, support "in" operator, check the Task.Type enum for the values.
For example:
update_time >= "2025-01-02T15:04:05Z07:00"
task_type in ["DATABASE_MIGRATE", "DATABASE_CREATE"]
title: ListRolloutsRequest
required:
- parent
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.ListSavedQueriesRequest:
type: object
properties:
parent:
type: string
title: parent
description: |-
The project to list saved queries in, or "projects/-" for every project.
Format: projects/{project}
filter:
type: string
title: filter
description: |-
Filter the result, in CEL. See https://github.com/google/cel-spec
Supported fields:
- creator: the creator in "users/{email}" format. Supports "==" and "!=".
For example:
creator == "users/[email protected]"
pageSize:
type: integer
title: page_size
format: int32
description: |-
The maximum number of saved queries to return. The service may return
fewer. Defaults to 10; values above 1000 are coerced to 1000.
pageToken:
type: string
title: page_token
description: |-
A page token from a previous ListSavedQueries call. Keep every other
parameter the same as the call that returned it.
orderBy:
type: string
title: order_by
description: |-
Sort the results, per https://google.aip.dev/132#ordering. Supported
fields: `update_time`, `create_time`, `title`; append " desc" for
descending, e.g. "update_time desc" for most recently modified first.
A modification is a title, content, database, or folder write; sharing
and stars do not count, and a never-modified saved query counts its
create time. Empty means `title` ascending. `resource_id` is always
appended as a final tiebreak so pages stay stable.
title: ListSavedQueriesRequest
required:
- parent
additionalProperties: false
bytebase.v1.ListSavedQueriesResponse:
type: object
properties:
savedQueries:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.SavedQuery'
title: saved_queries
nextPageToken:
type: string
title: next_page_token
description: |-
Pass to the next ListSavedQueries call to fetch the following page. Empty
on the last page.
title: ListSavedQueriesResponse
additionalProperties: false
bytebase.v1.ListServiceAccountsRequest:
type: object
properties:
parent:
type: string
title: parent
description: |-
The parent resource.
Format: projects/{project} for project-level, workspaces/{id} for workspace-level.
pageSize:
type: integer
title: page_size
format: int32
description: |-
The maximum number of service accounts to return. The service may return fewer than
this value.
If unspecified, at most 10 service accounts 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 `ListServiceAccounts` call.
Provide this to retrieve the subsequent page.
When paginating, all other parameters provided to `ListServiceAccounts` must match
the call that provided the page token.
showDeleted:
type: boolean
title: show_deleted
description: Show deleted service accounts if specified.
filter:
type: string
title: filter
description: |-
Filter is used to filter service accounts returned in the list.
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
- name: the service account name, support "==" and ".contains()" operator.
- email: the service account email, support "==" and ".contains()" operator.
- state: check State enum for values, support "==" operator.
For example:
name == "ed"
name.contains("ed")
state == "DELETED"
email == "[email protected]"
email.contains("ed")
title: ListServiceAccountsRequest
additionalProperties: false
description: Request message for listing service accounts.
bytebase.v1.ListServiceAccountsResponse:
type: object
properties:
serviceAccounts:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.ServiceAccount'
title: service_accounts
description: The service accounts 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: ListServiceAccountsResponse
additionalProperties: false
description: Response message for listing service accounts.
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 taskRuns.
Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}
Use "projects/{project}/plans/{plan}/rollout/stages/-/tasks/-" to list all taskRuns from a rollout.
pageSize:
type: integer
title: page_size
format: int32
description: |-
The maximum number of task runs to return. The service may return fewer
than this value.
If unspecified, at most 1000 task runs 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 `ListTaskRuns` call.
Provide this to retrieve the subsequent page.
When paginating, all other parameters provided to `ListTaskRuns` must match
the call that provided the page token.
title: ListTaskRunsRequest
required:
- parent
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.
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: 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 ".contains()" operator.
- email: the user email, support "==" and ".contains()" 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.contains("ed")
email == "[email protected]"
email.contains("ed")
state == "DELETED"
project == "projects/sample-project"
You can combine filter conditions like:
name.contains("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.ListWorkloadIdentitiesRequest:
type: object
properties:
parent:
type: string
title: parent
description: |-
The parent resource.
Format: projects/{project} for project-level, workspaces/{id} for workspace-level.
pageSize:
type: integer
title: page_size
format: int32
description: |-
The maximum number of workload identities to return. The service may return fewer than
this value.
If unspecified, at most 10 workload identities 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 `ListWorkloadIdentities` call.
Provide this to retrieve the subsequent page.
When paginating, all other parameters provided to `ListWorkloadIdentities` must match
the call that provided the page token.
showDeleted:
type: boolean
title: show_deleted
description: Show deleted workload identities if specified.
filter:
type: string
title: filter
description: |-
Filter is used to filter workload identities returned in the list.
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
- name: the workload identity name, support "==" and ".contains()" operator.
- email: the workload identity email, support "==" and ".contains()" operator.
- state: check State enum for values, support "==" operator.
For example:
name == "ed"
name.contains("ed")
state == "DELETED"
email == "[email protected]"
email.contains("ed")
title: ListWorkloadIdentitiesRequest
additionalProperties: false
description: Request message for listing workload identities.
bytebase.v1.ListWorkloadIdentitiesResponse:
type: object
properties:
workloadIdentities:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'
title: workload_identities
description: The workload identities 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: ListWorkloadIdentitiesResponse
additionalProperties: false
description: Response message for listing workload identities.
bytebase.v1.ListWorkspacesRequest:
type: object
title: ListWorkspacesRequest
additionalProperties: false
bytebase.v1.ListWorkspacesResponse:
type: object
properties:
workspaces:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.Workspace'
title: workspaces
title: ListWorkspacesResponse
additionalProperties: false
bytebase.v1.LoginIdentityProvider:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the identity provider.
Format: idps/{idp}
type:
allOf:
- $ref: '#/components/schemas/bytebase.v1.IdentityProviderType'
title: type
description: The type of identity provider protocol.
title:
type: string
title: title
description: The display title of the identity provider.
authorizationRequest:
allOf:
- $ref: '#/components/schemas/bytebase.v1.AuthorizationRequest'
title: authorization_request
description: |-
The parameters the browser needs to start the authorization redirect.
Set for OAUTH2 and OIDC, absent for LDAP, whose bind happens server-side.
title: LoginIdentityProvider
additionalProperties: false
description: |-
LoginIdentityProvider is an identity provider as the login page sees it.
Deliberately not a view of IdentityProvider: this message is served without
a credential, so every field it exposes is published by hand and no
provider configuration reaches it by default.
bytebase.v1.LoginRequest:
type: object
properties:
email:
type: string
title: email
maxLength: 254
description: |-
User's email address.
Bounded so an oversized identity is refused at the edge before any
handler runs; the login-attempt lockout keys rows by this value.
password:
type: string
title: password
description: |
User's password for authentication. Bounded for abuse only: LDAP
directories may accept passwords beyond bcrypt's 72-byte limit, and the
local-password path rejects longer inputs itself.
string.max_bytes = 512
web:
type: boolean
title: web
description: |-
If true, sets access token and refresh token as HTTP-only cookies instead of
returning the token in the response body. Use for browser-based clients.
idpName:
type: string
title: idp_name
maxLength: 256
description: |-
The name of the identity provider.
Format: idps/{idp}
idpContext:
allOf:
- $ref: '#/components/schemas/bytebase.v1.IdentityProviderContext'
title: idp_context
description: The idp_context is used to get the user information from identity provider.
otpCode:
type:
- string
- "null"
title: otp_code
maxLength: 64
description: The otp_code is used to verify the user's identity by MFA.
recoveryCode:
type:
- string
- "null"
title: recovery_code
maxLength: 64
description: The recovery_code is used to recovery the user's identity with MFA.
mfaTempToken:
type:
- string
- "null"
title: mfa_temp_token
maxLength: 4096
description: The mfa_temp_token is used to verify the user's identity by MFA.
emailCode:
type:
- string
- "null"
title: email_code
maxLength: 64
description: |-
6-digit code from email for passwordless login/signup.
Pairs with `email`. Mutually exclusive with `password` and `idp_name`.
workspace:
type:
- string
- "null"
title: workspace
maxLength: 256
description: |-
Preferred workspace to land in after login. If the user is a member of this
workspace, the token is issued for it; otherwise falls back to the default
resolution (last login workspace → first membership). Typically populated
from the ?workspace= query parameter in invite links.
Format: workspaces/{workspace}
title: LoginRequest
additionalProperties: false
bytebase.v1.LoginResponse:
type: object
properties:
token:
type: string
title: token
description: |-
Access token for authenticated requests.
Only returned when web=false. For web=true, the token is set as an HTTP-only cookie.
mfaTempToken:
type:
- string
- "null"
title: mfa_temp_token
description: Temporary token for MFA verification.
requireResetPassword:
type: boolean
title: require_reset_password
description: Whether user must reset password before continuing.
user:
allOf:
- $ref: '#/components/schemas/bytebase.v1.User'
title: user
description: The user from the successful login.
title: LoginResponse
additionalProperties: false
bytebase.v1.LogoutRequest:
type: object
title: LogoutRequest
additionalProperties: false
description: Request to logout current user session.
bytebase.v1.MCPDelegation:
type: object
properties:
scope:
type: string
title: scope
description: |-
The OAuth2 grant's consented scope, e.g. "mcp:read-only".
Empty when the grant recorded no scope.
resource:
type: string
title: resource
description: |-
The grant's stored MCP resource URI.
Empty for pre-grant legacy sessions.
clientId:
type: string
title: client_id
description: |-
The OAuth2 client the grant was consented to.
Empty for legacy web-session tokens at /mcp.
correlationId:
type: string
title: correlation_id
description: |-
Correlates the audit rows an MCP session produces. Minted at the /mcp
boundary and session-scoped: the MCP SDK hands tool handlers the
initialize-time context, so one MCP session carries one correlation ID
across all of its tool calls.
title: MCPDelegation
additionalProperties: false
description: |-
Provenance of a call that reached the API through the MCP (Model Context
Protocol) server's delegated credential. The values are copied verbatim from
the verified credential's grant state; empty fields record that the grant
stored nothing (legacy sessions), never a resolved or synthesized value.
bytebase.v1.MCPDenialReason:
type: string
title: MCPDenialReason
enum:
- MCP_DENIAL_REASON_UNSPECIFIED
- MINTS_CREDENTIAL
- RESETS_CREDENTIAL
- TAKES_OVER_ACCOUNT
- ENDS_SESSION
- ENDS_MEMBERSHIP
- MINTS_CREDENTIAL_FOR_OTHERS
- REWRITES_SESSION_BOUNDARY
- DRIVES_THE_APPROVAL_DECISION
- ADMINISTERS_THE_WORKSPACE
- READS_OTHER_USERS_SQL
- OPENS_AN_ADMIN_CONNECTION
- SENDS_DATA_TO_A_THIRD_PARTY
- RETURNS_A_STORED_SECRET
- REDRAWS_GOVERNANCE_BOUNDARY
description: |-
Why an MCP session may not call an RPC. The mechanism, not the wording: each
value names what its methods actually do, and the serving side turns that
into a sentence. A denial whose stated reason has drifted from the mechanism
is worse than a bare refusal, because it is the thing the next reader trusts
— so a method changing what it does changes its reason here.
One enum covers both refused classes, and every value belongs to exactly one
of them: values 1-8 name a mechanism that breaks the MCP boundary, which is
what FORBIDDEN means, and values 9-14 name a scope decision this phase took,
which is what EXCLUDED means. The distinction is real and lives on the class
annotation — a FORBIDDEN mechanism is a durable never, an EXCLUDED scope
decision is what a future admin-capable ceiling would argue with, one
population at a time. Splitting it across two enums as well only made the
nonsense states representable: a method could carry both, or carry the kind
that contradicts its class. Neither is expressible now, and the one check
left — the reason belongs to the class it is used on — is a table the gate
already keeps for the wording.
bytebase.v1.MCPMethodClass:
type: string
title: MCPMethodClass
enum:
- MCP_METHOD_CLASS_UNSPECIFIED
- READ
- WRITE
- FORBIDDEN
- EXCLUDED
description: |-
Classification of an RPC for MCP (AI agent) sessions. The effective
authorization of an MCP session is this classification intersected with the
caller's own RBAC: it can only ever narrow what the human could do, never
widen it.
Every value is enforced, at the gate on the internal MCP chain. READ and
WRITE are the serving classes the workspace's MCP capability ceiling selects
between, EXCLUDED and FORBIDDEN are served by no ceiling, and an unclassified
method is refused rather than served. Annotating a method is therefore a
change to what an MCP session can reach, taking effect on the next request.
READ and WRITE methods are also disclosed to workspace admins, as capability
rows on the Access policy page, so annotating a method changes what the
product promises as well as what it serves.
bytebase.v1.MCPSetting:
type: object
properties:
capability:
allOf:
- $ref: '#/components/schemas/bytebase.v1.MCPSetting.Capability'
title: capability
description: |-
The maximum capability available to MCP sessions in this workspace, acting
as an admin-set ceiling. Enforced server-side at three points: the /mcp
endpoint decides whether a connection is admitted at all, the ceiling gate
on the internal MCP chain decides, per request, which method classes are
served, and under READ_ONLY the SQL clamp decides, per statement, whether
it only reads.
title: MCPSetting
additionalProperties: false
description: |-
MCPSetting is what an MCP (Model Context Protocol) session may do in this
workspace.
bytebase.v1.MCPSetting.Capability:
type: string
title: Capability
enum:
- CAPABILITY_UNSPECIFIED
- DISABLED
- READ_ONLY
- READ_WRITE
description: |-
Capability is the ceiling: a session runs at this level or lower.
Writing CAPABILITY_UNSPECIFIED, explicitly or by leaving
value.mcp.capability out of the update mask, is rejected.
bytebase.v1.MaskingExemptionPolicy:
type: object
properties:
exemptions:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.MaskingExemptionPolicy.Exemption'
title: exemptions
title: MaskingExemptionPolicy
additionalProperties: false
description: MaskingExemptionPolicy is the allowlist of users who can access sensitive data.
bytebase.v1.MaskingExemptionPolicy.Exemption:
type: object
properties:
members:
type: array
items:
type: string
title: members
description: |-
Specifies the principals who are exempt from masking.
For users, the member should be: user:{email}
For groups, the member should be: group:{email}
For service accounts, the member should be: serviceAccount:{email}
For workload identities, the member should be: workloadIdentity:{email}
condition:
allOf:
- $ref: '#/components/schemas/google.type.Expr'
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"
title: Exemption
additionalProperties: false
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: integer
title: classification_level
format: int32
description: The classification level that triggered masking.
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:
allOf:
- $ref: '#/components/schemas/google.type.Expr'
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 (integer).
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.
<, <=, >, >=: numeric comparison (classification_level only).
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")
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.MoveMySavedQueriesRequest:
type: object
properties:
parent:
type: string
title: parent
description: 'Format: projects/{project}'
sourceFolder:
type: string
title: source_folder
maxLength: 256
minLength: 1
description: The folder to move, descendants included, e.g. "a/b".
targetFolder:
type: string
title: target_folder
maxLength: 256
description: |-
Where it lands. A path like "a/b/c"; empty drops the `source_folder`
prefix, promoting the folder's contents toward the root.
title: MoveMySavedQueriesRequest
required:
- parent
- sourceFolder
additionalProperties: false
bytebase.v1.MoveMySavedQueriesResponse:
type: object
properties:
movedCount:
type: integer
title: moved_count
format: int32
description: How many moved.
title: MoveMySavedQueriesResponse
additionalProperties: false
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.FieldMapping'
title: field_mapping
description: Mapping configuration for user attributes from OAuth2 response.
skipTlsVerify:
type: boolean
title: skip_tls_verify
description: Whether to skip TLS certificate verification.
authStyle:
allOf:
- $ref: '#/components/schemas/bytebase.v1.OAuth2AuthStyle'
title: auth_style
description: The authentication style for client credentials.
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
maxLength: 4096
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.FieldMapping'
title: field_mapping
description: Mapping configuration for user attributes from OIDC claims.
skipTlsVerify:
type: boolean
title: skip_tls_verify
description: Whether to skip TLS certificate verification.
authStyle:
allOf:
- $ref: '#/components/schemas/bytebase.v1.OAuth2AuthStyle'
title: auth_style
description: The authentication style for client credentials.
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.
readOnly: true
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
maxLength: 4096
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
anyOf:
- type: object
properties:
arrayKind:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ObjectSchema.ArrayKind'
title: array_kind
description: Array schema.
title: array_kind
- type: object
properties:
structKind:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ObjectSchema.StructKind'
title: struct_kind
description: Struct schema.
title: struct_kind
unevaluatedProperties: false
not:
allOf:
- anyOf:
- required:
- arrayKind
- required:
- structKind
- not:
oneOf:
- required:
- arrayKind
- required:
- structKind
properties:
type:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ObjectSchema.Type'
title: type
description: The data type of this object.
semanticType:
type: string
title: semantic_type
description: The semantic type of this object.
title: ObjectSchema
description: Schema definition for object-type columns.
bytebase.v1.ObjectSchema.ArrayKind:
type: object
properties:
kind:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ObjectSchema'
title: kind
description: The schema of array elements.
title: ArrayKind
additionalProperties: false
description: Array type with element schema.
bytebase.v1.ObjectSchema.StructKind:
type: object
properties:
properties:
type: object
title: properties
additionalProperties:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ObjectSchema'
title: value
description: Properties of the struct.
title: StructKind
additionalProperties: false
description: Structure type with named properties.
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.PaymentInfo:
type: object
properties:
totalPrice:
type: string
title: total_price
description: Total amount paid for the current billing period, in the smallest currency unit (e.g. cents).
currency:
type: string
title: currency
periodStart:
type: string
title: period_start
periodEnd:
type: string
title: period_end
invoiceUrl:
type: string
title: invoice_url
description: Stripe Billing Portal URL for invoice management.
cancelAtPeriodEnd:
type: boolean
title: cancel_at_period_end
description: Whether the subscription is scheduled to cancel at the end of the current billing period.
nextPeriodPrice:
type: string
title: next_period_price
description: |-
Amount that will be charged at the next renewal, in the smallest currency unit (e.g. cents).
Empty when the subscription will not renew (e.g. scheduled to cancel at period end).
title: PaymentInfo
additionalProperties: false
bytebase.v1.PermissionDeniedDetail:
type: object
properties:
method:
type: string
title: method
description: The API method that was called.
requiredPermissions:
type: array
items:
type: string
title: required_permissions
description: The permissions required but not granted to the user.
resources:
type: array
items:
type: string
title: resources
description: The resources the user was trying to access.
title: PermissionDeniedDetail
additionalProperties: false
description: |-
PermissionDeniedDetail provides structured information about permission failures.
Used as error detail when returning CodePermissionDenied errors.
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.State'
title: state
description: The state of the plan.
issue:
type: string
title: issue
description: |-
The issue associated with the plan.
Can be empty.
Format: projects/{project}/issues/{issue}
readOnly: true
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]'
readOnly: true
createTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: create_time
readOnly: true
updateTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: update_time
readOnly: true
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
readOnly: true
hasRollout:
type: boolean
title: has_rollout
description: Whether the plan has started the rollout.
readOnly: true
approvalStatus:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ApprovalStatus'
title: approval_status
description: |-
The approval status of the linked issue.
Unspecified when no linked issue exists or the linked issue is a draft.
readOnly: true
rolloutStageSummaries:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.Plan.RolloutStageSummary'
title: rollout_stage_summaries
description: |-
Per-stage rollout status summary.
Ordered by environment deployment order. Empty when no rollout exists.
readOnly: true
issueStatus:
allOf:
- $ref: '#/components/schemas/bytebase.v1.IssueStatus'
title: issue_status
description: |-
The lifecycle status of the linked issue.
Unspecified when no linked issue exists.
readOnly: true
lastPlanEditor:
type: string
title: last_plan_editor
description: |-
The user who last created or updated the Plan specs.
Format: users/[email protected]. For legacy Plans without stored attribution,
this falls back to the Plan creator.
readOnly: true
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}
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.
title: ChangeDatabaseConfig
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} or projects/{project}/instances/{instance}
database:
type: string
title: database
description: The name of the database to create.
table:
type: string
title: table
description: |-
(OPTIONAL) 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: (OPTIONAL) character_set is the character set of the database.
collation:
type: string
title: collation
description: (OPTIONAL) collation is the collation of the database.
cluster:
type: string
title: cluster
description: (OPTIONAL) cluster is the cluster of the database. This is only applicable to ClickHouse for "ON CLUSTER <<cluster>>".
owner:
type: string
title: owner
description: (OPTIONAL) owner is the owner of the database. This is only applicable to Postgres for "WITH OWNER <<owner>>".
environment:
type: string
title: environment
description: |-
(OPTIONAL) The environment resource.
Format: environments/prod where prod is the environment resource ID.
title: CreateDatabaseConfig
required:
- target
- database
additionalProperties: false
bytebase.v1.Plan.RolloutStageSummary:
type: object
properties:
stage:
type: string
title: stage
description: |-
The stage resource name.
Format: projects/{project}/plans/{plan}/rollout/stages/{stage}
taskStatusCounts:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.Plan.TaskStatusCount'
title: task_status_counts
description: Task status counts for this stage.
title: RolloutStageSummary
additionalProperties: false
bytebase.v1.Plan.Spec:
type: object
anyOf:
- type: object
properties:
changeDatabaseConfig:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Plan.ChangeDatabaseConfig'
title: change_database_config
title: change_database_config
- type: object
properties:
createDatabaseConfig:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Plan.CreateDatabaseConfig'
title: create_database_config
title: create_database_config
unevaluatedProperties: false
not:
allOf:
- anyOf:
- required:
- changeDatabaseConfig
- required:
- createDatabaseConfig
- not:
oneOf:
- required:
- changeDatabaseConfig
- required:
- createDatabaseConfig
properties:
id:
type: string
title: id
description: A UUID4 string that uniquely identifies the Spec.
title: Spec
bytebase.v1.Plan.TaskStatusCount:
type: object
properties:
status:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Task.Status'
title: status
description: The task status.
count:
type: integer
title: count
format: int32
description: The number of tasks in the status.
title: TaskStatusCount
additionalProperties: false
bytebase.v1.PlanCheckRun:
type: object
properties:
name:
type: string
title: name
description: 'Format: projects/{project}/plans/{plan}/planCheckRun'
status:
allOf:
- $ref: '#/components/schemas/bytebase.v1.PlanCheckRun.Status'
title: status
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:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: create_time
readOnly: true
title: PlanCheckRun
additionalProperties: false
bytebase.v1.PlanCheckRun.Result:
type: object
anyOf:
- type: object
properties:
sqlReviewReport:
allOf:
- $ref: '#/components/schemas/bytebase.v1.PlanCheckRun.Result.SqlReviewReport'
title: sql_review_report
title: sql_review_report
- type: object
properties:
sqlSummaryReport:
allOf:
- $ref: '#/components/schemas/bytebase.v1.PlanCheckRun.Result.SqlSummaryReport'
title: sql_summary_report
title: sql_summary_report
unevaluatedProperties: false
not:
allOf:
- anyOf:
- required:
- sqlReviewReport
- required:
- sqlSummaryReport
- not:
oneOf:
- required:
- sqlReviewReport
- required:
- sqlSummaryReport
properties:
status:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Advice.Level'
title: status
title:
type: string
title: title
content:
type: string
title: content
code:
type: integer
title: code
format: int32
target:
type: string
title: target
description: |-
Target identification for consolidated results.
Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}
type:
allOf:
- $ref: '#/components/schemas/bytebase.v1.PlanCheckRun.Result.Type'
title: type
title: Result
bytebase.v1.PlanCheckRun.Result.SqlReviewReport:
type: object
properties:
startPosition:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Position'
title: start_position
description: Position of the SQL statement.
endPosition:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Position'
title: end_position
title: SqlReviewReport
additionalProperties: false
bytebase.v1.PlanCheckRun.Result.SqlSummaryReport:
type: object
properties:
statementTypes:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.StatementType'
title: statement_types
description: statement_types are the types of statements that are found in the sql.
affectedRows:
type: string
title: affected_rows
format: int64
title: SqlSummaryReport
additionalProperties: false
bytebase.v1.PlanCheckRun.Result.Type:
type: string
title: Type
enum:
- TYPE_UNSPECIFIED
- STATEMENT_ADVISE
- STATEMENT_SUMMARY_REPORT
- GHOST_SYNC
bytebase.v1.PlanCheckRun.Status:
type: string
title: Status
enum:
- STATUS_UNSPECIFIED
- RUNNING
- DONE
- FAILED
- CANCELED
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_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_JIT
- FEATURE_DATA_MASKING
- FEATURE_DATA_CLASSIFICATION
- FEATURE_SCIM
- FEATURE_DIRECTORY_SYNC
- FEATURE_TOKEN_DURATION_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
- FEATURE_SHAREPOINT_EXPORT
description: PlanFeature represents the available features in Bytebase
bytebase.v1.PlanLimitConfig:
type: object
properties:
type:
allOf:
- $ref: '#/components/schemas/bytebase.v1.PlanType'
title: type
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
anyOf:
- type: object
properties:
maskingExemptionPolicy:
allOf:
- $ref: '#/components/schemas/bytebase.v1.MaskingExemptionPolicy'
title: masking_exemption_policy
title: masking_exemption_policy
- type: object
properties:
maskingRulePolicy:
allOf:
- $ref: '#/components/schemas/bytebase.v1.MaskingRulePolicy'
title: masking_rule_policy
title: masking_rule_policy
- type: object
properties:
queryDataPolicy:
allOf:
- $ref: '#/components/schemas/bytebase.v1.QueryDataPolicy'
title: query_data_policy
title: query_data_policy
- type: object
properties:
reviewAiPolicy:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ReviewAIPolicy'
title: review_ai_policy
title: review_ai_policy
- type: object
properties:
reviewRulePolicy:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ReviewRulePolicy'
title: review_rule_policy
title: review_rule_policy
- type: object
properties:
rolloutPolicy:
allOf:
- $ref: '#/components/schemas/bytebase.v1.RolloutPolicy'
title: rollout_policy
title: rollout_policy
- type: object
properties:
tagPolicy:
allOf:
- $ref: '#/components/schemas/bytebase.v1.TagPolicy'
title: tag_policy
title: tag_policy
unevaluatedProperties: false
not:
allOf:
- anyOf:
- required:
- maskingExemptionPolicy
- required:
- maskingRulePolicy
- required:
- queryDataPolicy
- required:
- reviewAiPolicy
- required:
- reviewRulePolicy
- required:
- rolloutPolicy
- required:
- tagPolicy
- not:
oneOf:
- required:
- maskingExemptionPolicy
- required:
- maskingRulePolicy
- required:
- queryDataPolicy
- required:
- reviewAiPolicy
- required:
- reviewRulePolicy
- required:
- rolloutPolicy
- required:
- tagPolicy
properties:
name:
type: string
title: name
description: |-
The name of the policy.
Format: {resource name}/policies/{policy type}
Workspace resource name: workspaces/{workspace-id}.
Environment resource name: environments/environment-id.
inheritFromParent:
type: boolean
title: inherit_from_parent
description: Whether this policy inherits from its parent resource.
type:
allOf:
- $ref: '#/components/schemas/bytebase.v1.PolicyType'
title: type
description: The type of policy.
enforce:
type: boolean
title: enforce
description: Whether the policy is enforced.
resourceType:
allOf:
- $ref: '#/components/schemas/bytebase.v1.PolicyResourceType'
title: resource_type
description: The resource type for the policy.
readOnly: true
title: Policy
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
- MASKING_RULE
- MASKING_EXEMPTION
- ROLLOUT_POLICY
- TAG
- DATA_QUERY
- REVIEW_RULE
- REVIEW_AI
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.PrepareSampleProjectInstanceRequest:
type: object
properties:
parent:
type: string
title: parent
description: |-
The project that owns the sample instance.
Format: projects/{project}
title: PrepareSampleProjectInstanceRequest
required:
- parent
additionalProperties: false
bytebase.v1.PreviewTaskRunRollbackRequest:
type: object
properties:
name:
type: string
title: name
description: 'Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}'
title: PreviewTaskRunRollbackRequest
required:
- name
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.State'
title: state
description: The lifecycle state of the project.
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.
enforceIssueTitle:
type: boolean
title: enforce_issue_title
description: Enforce issue title to be created by user instead of generated by Bytebase.
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Project.ExecutionRetryPolicy'
title: execution_retry_policy
description: Execution retry policy for task runs.
ciSamplingSize:
type: integer
title: ci_sampling_size
format: int32
description: |-
The maximum number of databases to sample during CI data validation and
AI review. 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.
requireIssueApproval:
type: boolean
title: require_issue_approval
description: Whether to require issue approval before rollout.
requirePlanCheckNoError:
type: boolean
title: require_plan_check_no_error
description: Whether to require plan check to have no error before rollout.
allowRequestRole:
type: boolean
title: allow_request_role
allowJustInTimeAccess:
type: boolean
title: allow_just_in_time_access
description: Once enabled, users can request and use the just-in-time access in the SQL Editor.
allowLastPlanEditorApproval:
type: boolean
title: allow_last_plan_editor_approval
description: Whether to allow the last Plan editor to approve a database change issue.
exportSetting:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Project.ExportSetting'
title: export_setting
description: Export configuration for this project.
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.ExportSetting:
type: object
properties:
sharepoint:
allOf:
- $ref: '#/components/schemas/bytebase.v1.SharePointDestination'
title: sharepoint
description: Unset when the project has no SharePoint destination.
title: ExportSetting
additionalProperties: false
description: Destinations offered for this project's exports, at most one per provider.
bytebase.v1.PurchaseBillingMethod:
type: object
properties:
interval:
allOf:
- $ref: '#/components/schemas/bytebase.v1.BillingInterval'
title: interval
discount:
allOf:
- $ref: '#/components/schemas/bytebase.v1.PurchaseDiscount'
title: discount
title: PurchaseBillingMethod
additionalProperties: false
bytebase.v1.PurchaseDiscount:
type: object
properties:
type:
allOf:
- $ref: '#/components/schemas/bytebase.v1.PurchaseDiscount.Type'
title: type
value:
type: integer
title: value
format: int32
title: PurchaseDiscount
additionalProperties: false
bytebase.v1.PurchaseDiscount.Type:
type: string
title: Type
enum:
- TYPE_UNSPECIFIED
- PERCENTAGE_OFF
- FIXED_MONTH_OFF
- FIXED_PRICE_OFF
bytebase.v1.PurchasePlan:
type: object
properties:
type:
allOf:
- $ref: '#/components/schemas/bytebase.v1.PlanType'
title: type
selfServicePurchase:
type: boolean
title: self_service_purchase
additionals:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.PurchasePlanAdditional'
title: additionals
billingMethods:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.PurchaseBillingMethod'
title: billing_methods
title: PurchasePlan
additionalProperties: false
bytebase.v1.PurchasePlanAdditional:
type: object
properties:
type:
allOf:
- $ref: '#/components/schemas/bytebase.v1.PurchasePlanAdditional.Type'
title: type
unitPrice:
type: integer
title: unit_price
format: int32
description: Price in USD cents per month.
freeCount:
type: integer
title: free_count
format: int32
minimumCount:
type: integer
title: minimum_count
format: int32
maximumCount:
type: integer
title: maximum_count
format: int32
description: -1 means unlimited.
title: PurchasePlanAdditional
additionalProperties: false
bytebase.v1.PurchasePlanAdditional.Type:
type: string
title: Type
enum:
- TYPE_UNSPECIFIED
- USER
bytebase.v1.PurchaseResponse:
type: object
properties:
paymentUrl:
type: string
title: payment_url
description: |-
If set, redirect to this Stripe Checkout URL.
If empty, the update was applied directly using the existing payment method.
sessionId:
type: string
title: session_id
description: Stripe Checkout Session ID. Used to verify the session after redirect.
title: PurchaseResponse
additionalProperties: false
bytebase.v1.QueryDataPolicy:
type: object
properties:
maximumResultRows:
type: integer
title: maximum_result_rows
format: int32
description: |-
Support both project-level and workspace-level.
The maximum number of rows to return in the SQL editor.
The default value <= 0, means no limit.
disableExport:
type: boolean
title: disable_export
description: 'Deprecated: export is controlled by the bb.sql.export permission. Always false; setting it to true is rejected.'
deprecated: true
disableCopyData:
type: boolean
title: disable_copy_data
description: |-
workspace-level policy
Disable copying query results in the SQL editor.
allowAdminDataSource:
type: boolean
title: allow_admin_data_source
description: |-
workspace-level policy
Allow using the admin data source to query in the SQL editor.
If true, users can select the admin data source or read-only data source
If false,
1. when read-only data source is configured, users're force to use the read-only data source
2. otherwise fallback to use the admin data source.
disableDownload:
type: boolean
title: disable_download
description: |-
workspace-level policy
Disable the Download export destination. Exports can still go to a
configured storage destination such as SharePoint.
title: QueryDataPolicy
additionalProperties: false
description: QueryDataPolicy is the policy configuration for querying data in the SQL Editor.
bytebase.v1.QueryHistory:
type: object
properties:
name:
type: string
title: name
description: |-
The name for the query history.
Format: projects/{project}/queryHistories/{id}
readOnly: true
database:
type: string
title: database
description: |-
The database name to execute the query.
Format: instances/{instance}/databases/{databaseName} or projects/{project}/instances/{instance}/databases/{databaseName}
readOnly: true
creator:
type: string
title: creator
readOnly: true
createTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: create_time
readOnly: true
statement:
type: string
title: statement
readOnly: true
error:
type:
- string
- "null"
title: error
readOnly: true
duration:
allOf:
- $ref: '#/components/schemas/google.protobuf.Duration'
title: duration
readOnly: true
type:
allOf:
- $ref: '#/components/schemas/bytebase.v1.QueryHistory.Type'
title: 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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.QueryOption.RedisRunCommandsOn'
title: redis_run_commands_on
explainFormat:
allOf:
- $ref: '#/components/schemas/bytebase.v1.QueryOption.ExplainFormat'
title: explain_format
description: |-
Which explain output the caller wants, for an explain request.
Leave it unspecified for the engine's own default, which is the only
output most engines have. Naming a format an engine cannot produce is
INVALID_ARGUMENT rather than a silent fallback, as is any explain request
against an engine that has no explain at all.
title: QueryOption
additionalProperties: false
bytebase.v1.QueryOption.ExplainFormat:
type: string
title: ExplainFormat
enum:
- EXPLAIN_FORMAT_UNSPECIFIED
- TEXT
- JSON
- XML
- YAML
description: The output format of a query plan.
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 database resource name to execute the query against.
Format: instances/{instance}/databases/{databaseName} or
projects/{project}/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.
If omitted, Query resolves the data source server-side by using the single
read-only data source when exactly one exists, or the admin data source
otherwise. It can also be set explicitly to query the admin data source or
a specific read-only data source.
explain:
type: boolean
title: explain
description: Explain the statement.
schema:
type:
- string
- "null"
title: schema
description: |-
The default schema to search objects. Equals to the current schema in
Oracle and search path in Postgres.
queryOption:
allOf:
- $ref: '#/components/schemas/bytebase.v1.QueryOption'
title: query_option
container:
type:
- string
- "null"
title: container
description: |-
Container is the container name to execute the query against, used for
CosmosDB only.
title: QueryRequest
required:
- name
additionalProperties: false
bytebase.v1.QueryResponse:
type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.QueryResult'
title: results
description: The query results.
appliedAccessGrant:
type: string
title: applied_access_grant
description: |-
The just-in-time access grant applied to this query, if any.
Format: projects/{project}/accessGrants/{accessGrant}.
Empty when the user was authorized through normal ACL rather than a grant.
title: QueryResponse
additionalProperties: false
bytebase.v1.QueryResult:
type: object
anyOf:
- type: object
properties:
commandError:
allOf:
- $ref: '#/components/schemas/bytebase.v1.QueryResult.CommandError'
title: command_error
title: command_error
- type: object
properties:
permissionDenied:
allOf:
- $ref: '#/components/schemas/bytebase.v1.PermissionDeniedDetail'
title: permission_denied
title: permission_denied
- type: object
properties:
postgresError:
allOf:
- $ref: '#/components/schemas/bytebase.v1.QueryResult.PostgresError'
title: postgres_error
title: postgres_error
- type: object
properties:
syntaxError:
allOf:
- $ref: '#/components/schemas/bytebase.v1.QueryResult.SyntaxError'
title: syntax_error
title: syntax_error
unevaluatedProperties: false
not:
allOf:
- anyOf:
- required:
- commandError
- required:
- permissionDenied
- required:
- postgresError
- required:
- syntaxError
- not:
oneOf:
- required:
- commandError
- required:
- permissionDenied
- required:
- postgresError
- required:
- syntaxError
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: string
title: rows_count
format: int64
error:
type: string
title: error
description: The error message if the query failed.
latency:
allOf:
- $ref: '#/components/schemas/google.protobuf.Duration'
title: latency
description: The time it takes to execute the query.
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).
queryPlan:
allOf:
- $ref: '#/components/schemas/bytebase.v1.QueryResult.QueryPlan'
title: query_plan
description: Set when the result is a query plan. Unset for any other result.
title: QueryResult
bytebase.v1.QueryResult.CommandError:
type: object
properties:
commandType:
allOf:
- $ref: '#/components/schemas/bytebase.v1.QueryResult.CommandError.Type'
title: command_type
description: Disallowed command_type.
title: CommandError
additionalProperties: false
description: |-
Permission denied with resource information or disallowed command_type.
Either resources or command_type is available.
bytebase.v1.QueryResult.CommandError.Type:
type: string
title: Type
enum:
- TYPE_UNSPECIFIED
- DDL
- DML
- NON_READ_ONLY
bytebase.v1.QueryResult.Message:
type: object
properties:
level:
allOf:
- $ref: '#/components/schemas/bytebase.v1.QueryResult.Message.Level'
title: 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.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.QueryPlan:
type: object
properties:
format:
allOf:
- $ref: '#/components/schemas/bytebase.v1.QueryOption.ExplainFormat'
title: format
executed:
type: boolean
title: executed
description: |-
Whether producing the plan executed the statement, as EXPLAIN ANALYZE
does.
content:
type: string
title: content
description: |-
The plan itself, where the engine states it beside the result rather
than in the result's rows. BigQuery reports the stages its job ran in
the job's own statistics, so one result carries the query's data and
the plan of the run that produced it. Empty when the plan is the rows,
which is every other engine. Omitted from the audit log, as the rows
are: the statement is what an audit reads.
title: QueryPlan
additionalProperties: false
description: 'A query plan the result carries: in its rows, or beside them.'
bytebase.v1.QueryResult.SyntaxError:
type: object
properties:
startPosition:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Position'
title: start_position
description: Position information for highlighting in editor
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 index (inclusive).
end:
type: integer
title: end
format: int32
description: End index (exclusive).
title: Range
additionalProperties: false
description: |-
Range represents a span within a text or sequence.
Whether the indices are byte offsets or character indices depends on the context.
Check the documentation of the field using Range for specific semantics.
bytebase.v1.RefreshRequest:
type: object
title: RefreshRequest
additionalProperties: false
description: Request to refresh the access token.
bytebase.v1.RefreshResponse:
type: object
title: RefreshResponse
additionalProperties: false
description: Response from refreshing the access token.
bytebase.v1.RegenerateRecoveryCodesRequest:
type: object
properties:
name:
type: string
title: name
maxLength: 260
description: 'Format: users/{email}. Must be the caller''s own name.'
title: RegenerateRecoveryCodesRequest
required:
- name
additionalProperties: false
bytebase.v1.RegenerateRecoveryCodesResponse:
type: object
properties:
recoveryCodes:
type: array
items:
type: string
title: recovery_codes
description: The pending recovery codes, shown once for the caller to save.
pendingVersion:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: pending_version
description: Identifies this mint; see StartMFAEnrollmentResponse.pending_version.
title: RegenerateRecoveryCodesResponse
additionalProperties: false
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
required:
- name
additionalProperties: false
bytebase.v1.Release:
type: object
properties:
name:
type: string
title: name
description: 'Format: projects/{project}/releases/{release}'
readOnly: true
category:
type: string
title: category
description: |-
Category extracted from release name (e.g., "webapp", "analytics").
Set by Bytebase action during release creation.
files:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.Release.File'
title: files
description: The SQL files included in the release.
vcsSource:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Release.VCSSource'
title: vcs_source
description: The version control source of the release.
creator:
type: string
title: creator
description: 'Format: users/[email protected]'
readOnly: true
createTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: create_time
readOnly: true
state:
allOf:
- $ref: '#/components/schemas/bytebase.v1.State'
title: state
description: The lifecycle state of the release.
readOnly: true
type:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Release.Type'
title: type
description: The type of schema change for all files in this release.
title: Release
additionalProperties: false
bytebase.v1.Release.File:
type: object
properties:
path:
type: string
title: path
description: The path of the file. e.g., `2.2/V0001_create_table.sql`.
version:
type: string
title: version
description: The version identifier for the file.
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.
writeOnly: true
sheetSha256:
type: string
title: sheet_sha256
description: The SHA256 hash value of the sheet content or the statement.
readOnly: true
title: File
additionalProperties: false
description: A SQL file in a release.
bytebase.v1.Release.Type:
type: string
title: Type
enum:
- TYPE_UNSPECIFIED
- VERSIONED
- DECLARATIVE
description: The type of schema change.
bytebase.v1.Release.VCSSource:
type: object
properties:
vcsType:
allOf:
- $ref: '#/components/schemas/bytebase.v1.VCSType'
title: vcs_type
description: The type of VCS.
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} or projects/{project}/instances/{instance}
dataSource:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DataSource'
title: data_source
description: |-
Identified by data source ID.
Only READ_ONLY data source can be removed.
title: RemoveDataSourceRequest
required:
- name
- dataSource
additionalProperties: false
bytebase.v1.RemoveWebhookRequest:
type: object
properties:
webhook:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Webhook'
title: webhook
description: The webhook to remove. Identified by its url.
title: RemoveWebhookRequest
required:
- webhook
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
required:
- name
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.RequestPasswordResetRequest:
type: object
properties:
email:
type: string
title: email
maxLength: 254
description: |-
The email address of the account to reset.
Bounded so an oversized identity is refused at the edge before any
handler runs; the login-attempt lockout keys rows by this value.
workspace:
type:
- string
- "null"
title: workspace
maxLength: 256
description: |-
Optional workspace context captured at send time, used to locate the EMAIL setting,
and later (at verify time) for signup gate checks and workspace assignment.
Unset for SaaS brand-new signup (no workspace exists yet).
Format: workspaces/{workspace}
title: RequestPasswordResetRequest
additionalProperties: false
bytebase.v1.RequestReauthCodeRequest:
type: object
properties:
name:
type: string
title: name
maxLength: 260
description: 'Format: users/{email}. Must be the caller''s own name.'
title: RequestReauthCodeRequest
required:
- name
additionalProperties: false
bytebase.v1.ResetPasswordRequest:
type: object
properties:
email:
type: string
title: email
maxLength: 254
description: |-
The email address of the account.
Bounded so an oversized identity is refused at the edge before any
handler runs; the login-attempt lockout keys rows by this value.
code:
type: string
title: code
maxLength: 64
description: The 6-digit code from the reset email.
newPassword:
type: string
title: new_password
description: |
The new password to set.
string.max_bytes = 72
title: ResetPasswordRequest
additionalProperties: false
bytebase.v1.Restriction:
type: object
properties:
disallowSignup:
type: boolean
title: disallow_signup
description: Whether self-service user signup is disabled.
readOnly: true
disallowPasswordSignin:
type: boolean
title: disallow_password_signin
description: Whether password sign-in is disabled for all end users.
readOnly: true
passwordRestriction:
allOf:
- $ref: '#/components/schemas/bytebase.v1.WorkspaceProfileSetting.PasswordRestriction'
title: password_restriction
description: Password complexity and restriction requirements.
readOnly: true
allowEmailCodeSignin:
type: boolean
title: allow_email_code_signin
description: Whether email + 6-digit code signin is enabled for this workspace.
readOnly: true
passwordResetEnabled:
type: boolean
title: password_reset_enabled
description: |-
Whether password reset via email is available for this workspace.
True when the workspace (or deployment) has an email setting configured.
readOnly: true
title: Restriction
additionalProperties: false
bytebase.v1.RetryIssueApprovalRequest:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the issue whose approval-finding should be retried.
Format: projects/{project}/issues/{issue}
title: RetryIssueApprovalRequest
required:
- name
additionalProperties: false
bytebase.v1.ReviewAIPolicy:
type: object
properties:
content:
type: string
title: content
description: The policy text. Must not be blank, at most 64 KiB.
title: ReviewAIPolicy
additionalProperties: false
description: |-
Natural-language policy for the AI review. Unlike the review rule policy,
both levels apply: the workspace policy and the project policy both reach
the reviewer, and the project policy wins where they conflict.
bytebase.v1.ReviewConfig:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the SQL review config.
Format: reviewConfigs/{reviewConfig}
readOnly: true
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.ReviewRulePolicy:
type: object
properties:
rules:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.ReviewRuleType'
title: rules
description: The rules switched on. Unknown or unspecified values are rejected.
title: ReviewRulePolicy
additionalProperties: false
description: |-
Standard review rule policy: the rules switched on. The nearest policy
wins: a project's own policy applies as is; a project without one uses
the workspace policy; with neither, every rule is on. Getting the policy
of a project without its own is NOT_FOUND; getting the workspace's when it
has none returns every rule on.
SYNTAX gates the rest: the other rules judge only SQL that parses, so a
list without SYNTAX switches every rule off.
A saved list is explicit, so a rule added to the standard set in a later
release is appended to every saved policy by a data migration in that
release.
bytebase.v1.ReviewRuleType:
type: string
title: ReviewRuleType
enum:
- REVIEW_RULE_TYPE_UNSPECIFIED
- SYNTAX
- WALK_THROUGH
- ONLINE_MIGRATION
- PRIOR_BACKUP
- REQUIRE_IS_NULL
- REQUIRE_WHERE
- DISALLOW_DROP_OBJECT
- DISALLOW_TRUNCATE
- DISALLOW_DROP_CONSTRAINT
- DISALLOW_RENAME
- REQUIRE_PRIMARY_KEY
description: |-
ReviewRuleType is the standard review rule set. The rules are fixed:
every project gets them without configuration, and the only setting is a
switch (see ReviewRulePolicy).
A rule id names what the rule examines. An execution check is named for
what it checks; a rule about the SQL itself carries REQUIRE or DISALLOW so
the id says which way it cuts. DISALLOW on a P1 rule means the operation
needs a person's acceptance, not that it is forbidden.
bytebase.v1.ReviewRun:
type: object
properties:
name:
type: string
title: name
description: |-
Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun}
The {reviewRun} id is the reviewer: "rule" or "ai". The name
addresses a slot, not an execution.
type:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ReviewRun.Type'
title: type
description: Derived from the name.
readOnly: true
status:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ReviewRun.Status'
title: status
readOnly: true
createTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: create_time
description: When the current run was triggered. Reset on every re-run.
readOnly: true
endTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: end_time
description: |-
When the run reached a terminal status. Unset while AVAILABLE or
RUNNING.
readOnly: true
error:
type: string
title: error
description: |-
Fatal execution error, set if and only if status is FAILED: the review
failed to execute (a platform problem, never the SQL — SQL problems are
review results on a DONE run).
readOnly: true
outdated:
type: boolean
title: outdated
description: |-
Whether the plan's SQL changed after this run started, so the run
reviews an earlier version of it. The server starts a new run before it
creates the rollout automatically.
readOnly: true
title: ReviewRun
additionalProperties: false
bytebase.v1.ReviewRun.Status:
type: string
title: Status
enum:
- STATUS_UNSPECIFIED
- AVAILABLE
- RUNNING
- DONE
- FAILED
description: |-
States follow task_run, minus PENDING (review needs no admission
control) and minus CANCELED (runs are side-effect-free until the fenced
completion transaction, so re-running supersedes instead of canceling).
bytebase.v1.ReviewRun.Type:
type: string
title: Type
enum:
- TYPE_UNSPECIFIED
- RULE
- AI
bytebase.v1.Revision:
type: object
properties:
name:
type: string
title: name
description: 'Format: instances/{instance}/databases/{database}/revisions/{revision} or projects/{project}/instances/{instance}/databases/{database}/revisions/{revision}'
release:
type: string
title: release
description: |-
Format: projects/{project}/releases/{release}
Can be empty.
createTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: create_time
readOnly: true
deleter:
type: string
title: deleter
description: |-
Format: users/[email protected]
Can be empty.
readOnly: true
deleteTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: delete_time
description: Can be empty.
readOnly: true
file:
type: string
title: file
description: |-
Format: projects/{project}/releases/{release}/files/{file_path}
The file_path segment is URL-encoded since file paths may contain "/".
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.
readOnly: true
taskRun:
type: string
title: task_run
description: |-
The task run associated with the revision.
Can be empty.
Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}
type:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Revision.Type'
title: type
description: The type of the revision.
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.RevokeAccessGrantRequest:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the access grant to revoke.
Format: projects/{project}/accessGrants/{access_grant}
title: RevokeAccessGrantRequest
required:
- name
additionalProperties: false
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Role.Type'
title: type
description: Role type indicating if it's built-in or custom.
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.RoleGrant:
type: object
properties:
role:
type: string
title: role
description: |-
The requested role.
Format: roles/{role}.
user:
type: string
title: user
description: |-
The user to be granted.
Format: users/{email}.
condition:
allOf:
- $ref: '#/components/schemas/google.type.Expr'
title: condition
description: The condition for the role. Same as the condition in IAM Binding message.
expiration:
allOf:
- $ref: '#/components/schemas/google.protobuf.Duration'
title: expiration
description: The duration for which the grant is valid.
title: RoleGrant
additionalProperties: false
bytebase.v1.Rollout:
type: object
properties:
name:
type: string
title: name
description: |-
The resource name of the rollout.
Format: projects/{project}/plans/{plan}/rollout
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.
readOnly: true
stages:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.Stage'
title: stages
description: Stages and thus tasks of the rollout.
readOnly: true
createTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: create_time
readOnly: true
updateTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: update_time
readOnly: true
title: Rollout
additionalProperties: false
bytebase.v1.RolloutPolicy:
type: object
properties:
automatic:
type: boolean
title: automatic
description: Whether the environment's rollout tasks start on their own, with no one running them.
roles:
type: array
items:
type: string
title: roles
description: |-
Who can run, skip or cancel the environment's rollout tasks; WORKSPACE_APPROVAL sets approvers.
Anyone with bb.taskRuns.create can too.
title: RolloutPolicy
additionalProperties: false
description: Rollout policy configuration.
bytebase.v1.RotateDirectorySyncTokenRequest:
type: object
properties:
name:
type: string
title: name
description: |-
The workspace whose directory sync token is rotated.
Format: workspaces/{workspace}
title: RotateDirectorySyncTokenRequest
required:
- name
additionalProperties: false
bytebase.v1.RotateDirectorySyncTokenResponse:
type: object
properties:
token:
type: string
title: token
description: The new token, in plaintext. This is the only time it is ever returned.
readOnly: true
title: RotateDirectorySyncTokenResponse
additionalProperties: false
bytebase.v1.RowValue:
type: object
anyOf:
- type: object
properties:
boolValue:
type: boolean
title: bool_value
title: bool_value
- type: object
properties:
bytesValue:
type: string
title: bytes_value
format: byte
title: bytes_value
- type: object
properties:
doubleValue:
type: number
title: double_value
format: double
title: double_value
- type: object
properties:
floatValue:
type: number
title: float_value
format: float
title: float_value
- type: object
properties:
int32Value:
type: integer
title: int32_value
format: int32
title: int32_value
- type: object
properties:
int64Value:
type: string
title: int64_value
format: int64
title: int64_value
- type: object
properties:
nullValue:
allOf:
- $ref: '#/components/schemas/google.protobuf.NullValue'
title: null_value
title: null_value
- type: object
properties:
stringValue:
type: string
title: string_value
title: string_value
- type: object
properties:
timestampTzValue:
allOf:
- $ref: '#/components/schemas/bytebase.v1.RowValue.TimestampTZ'
title: timestamp_tz_value
description: |-
timestamp_tz_value is used for the timestamptz data type, which
accurately represents the timestamp with location information.
title: timestamp_tz_value
- type: object
properties:
timestampValue:
allOf:
- $ref: '#/components/schemas/bytebase.v1.RowValue.Timestamp'
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.
title: timestamp_value
- type: object
properties:
uint32Value:
type: integer
title: uint32_value
title: uint32_value
- type: object
properties:
uint64Value:
type: string
title: uint64_value
format: int64
title: uint64_value
- type: object
properties:
valueValue:
allOf:
- $ref: '#/components/schemas/google.protobuf.Value'
title: value_value
description: value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only.
title: value_value
unevaluatedProperties: false
not:
allOf:
- anyOf:
- required:
- boolValue
- required:
- bytesValue
- required:
- doubleValue
- required:
- floatValue
- required:
- int32Value
- required:
- int64Value
- required:
- nullValue
- required:
- stringValue
- required:
- timestampTzValue
- required:
- timestampValue
- required:
- uint32Value
- required:
- uint64Value
- required:
- valueValue
- not:
oneOf:
- required:
- boolValue
- required:
- bytesValue
- required:
- doubleValue
- required:
- floatValue
- required:
- int32Value
- required:
- int64Value
- required:
- nullValue
- required:
- stringValue
- required:
- timestampTzValue
- required:
- timestampValue
- required:
- uint32Value
- required:
- uint64Value
- required:
- valueValue
title: RowValue
bytebase.v1.RowValue.Timestamp:
type: object
properties:
googleTimestamp:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: google_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:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: google_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
- "null"
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.
title: RunPlanChecksRequest
required:
- name
additionalProperties: false
bytebase.v1.RunPlanChecksResponse:
type: object
title: RunPlanChecksResponse
additionalProperties: false
bytebase.v1.RunReviewRequest:
type: object
properties:
name:
type: string
title: name
description: 'Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun}'
title: RunReviewRequest
required:
- name
additionalProperties: false
bytebase.v1.SASLConfig:
type: object
anyOf:
- type: object
properties:
krbConfig:
allOf:
- $ref: '#/components/schemas/bytebase.v1.KerberosConfig'
title: krb_config
description: Kerberos authentication configuration.
title: krb_config
unevaluatedProperties: false
title: SASLConfig
bytebase.v1.SQLEditorThemeSetting:
type: object
properties:
id:
type: string
title: id
name:
type: string
title: name
monacoBase:
type: string
title: monaco_base
tokens:
type: object
title: tokens
additionalProperties:
allOf:
- $ref: '#/components/schemas/google.type.Color'
title: value
description: CSS token colors.
title: SQLEditorThemeSetting
additionalProperties: false
bytebase.v1.SQLReviewRule:
type: object
anyOf:
- type: object
properties:
commentConventionPayload:
allOf:
- $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.CommentConventionRulePayload'
title: comment_convention_payload
title: comment_convention_payload
- type: object
properties:
namingCasePayload:
allOf:
- $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.NamingCaseRulePayload'
title: naming_case_payload
title: naming_case_payload
- type: object
properties:
namingPayload:
allOf:
- $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.NamingRulePayload'
title: naming_payload
title: naming_payload
- type: object
properties:
numberPayload:
allOf:
- $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.NumberRulePayload'
title: number_payload
title: number_payload
- type: object
properties:
stringArrayPayload:
allOf:
- $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.StringArrayRulePayload'
title: string_array_payload
title: string_array_payload
- type: object
properties:
stringPayload:
allOf:
- $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.StringRulePayload'
title: string_payload
title: string_payload
unevaluatedProperties: false
not:
allOf:
- anyOf:
- required:
- commentConventionPayload
- required:
- namingCasePayload
- required:
- namingPayload
- required:
- numberPayload
- required:
- stringArrayPayload
- required:
- stringPayload
- not:
oneOf:
- required:
- commentConventionPayload
- required:
- namingCasePayload
- required:
- namingPayload
- required:
- numberPayload
- required:
- stringArrayPayload
- required:
- stringPayload
properties:
type:
allOf:
- $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.Type'
title: type
description: The type of SQL review rule.
level:
allOf:
- $ref: '#/components/schemas/bytebase.v1.SQLReviewRule.Level'
title: level
description: The severity level of the rule.
engine:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Engine'
title: engine
description: The database engine this rule applies to.
title: SQLReviewRule
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.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_CREATE_SPECIFY_SCHEMA
- STATEMENT_CHECK_SET_ROLE_VARIABLE
- STATEMENT_WHERE_NO_EQUAL_NULL
- STATEMENT_WHERE_DISALLOW_FUNCTIONS_AND_CALCULATIONS
- STATEMENT_WHERE_MAXIMUM_LOGICAL_OPERATOR_COUNT
- STATEMENT_MAXIMUM_STATEMENTS_IN_TRANSACTION
- 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
- BUILTIN_WALK_THROUGH_CHECK
- STATEMENT_DISALLOW_TRUNCATE
- BUILTIN_STATEMENT_MAXIMUM_SQL_SIZE
bytebase.v1.SampleInfo:
type: object
properties:
available:
type: boolean
title: available
description: Whether sample setup is currently available.
readOnly: true
instances:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.SampleInfo.Instance'
title: instances
description: The provisioned sample instances.
readOnly: true
title: SampleInfo
additionalProperties: false
description: SampleInfo describes sample setup availability and provisioned resources.
bytebase.v1.SampleInfo.Instance:
type: object
properties:
instance:
type: string
title: instance
description: |-
The provisioned sample instance.
Format: instances/{instance} or projects/{project}/instances/{instance}
readOnly: true
expireTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: expire_time
description: The time when the provisioned sample instance expires.
readOnly: true
title: Instance
additionalProperties: false
description: Instance describes one provisioned sample instance.
bytebase.v1.SavedQuery:
type: object
properties:
name:
type: string
title: name
description: |-
(IMMUTABLE) Server-generated.
Format: projects/{project}/savedQueries/{savedQuery}
project:
type: string
title: project
description: 'Format: projects/{project}'
readOnly: true
database:
type: string
title: database
description: |-
The connected database, which must belong to the saved query's own
project. Empty when none is connected, or when the database no longer
exists.
Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}
title:
type: string
title: title
maxLength: 200
description: The title of the saved query.
creator:
type: string
title: creator
description: |-
The owner. Ownership does not transfer.
Format: users/{email}
readOnly: true
createTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: create_time
readOnly: true
updateTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: update_time
readOnly: true
content:
type: string
title: content
format: byte
description: |-
The SQL text. SearchSavedQueries returns a truncated preview;
GetSavedQuery returns the full text.
contentSize:
type: string
title: content_size
format: int64
description: The full size of the content, which may exceed the `content` returned.
readOnly: true
starred:
type: boolean
title: starred
description: Whether the calling user starred it.
readOnly: true
folder:
type: string
title: folder
maxLength: 256
description: |-
The folder holding this saved query. A path like "a/b/c"; empty means
unfiled.
title: SavedQuery
required:
- name
- title
- content
additionalProperties: false
bytebase.v1.SavedQueryBinding:
type: object
properties:
level:
allOf:
- $ref: '#/components/schemas/bytebase.v1.SavedQueryBinding.Level'
title: level
members:
type: array
items:
type: string
title: members
minItems: 1
description: |-
The members granted `level`: "user:{email}" or "group:{email}" only.
Service accounts cannot be grantees — they reach their own saved queries
as the creator. Naming one under "user:" grants nothing rather than
failing. Groups are stored as references, so membership stays live.
title: SavedQueryBinding
required:
- level
- members
additionalProperties: false
description: Binds members to one access level on one saved query.
bytebase.v1.SavedQueryBinding.Level:
type: string
title: Level
enum:
- LEVEL_UNSPECIFIED
- VIEWER
- EDITOR
description: |-
Nested to avoid colliding with the package-scoped EDITOR in
DatabaseChangeMode.
bytebase.v1.SavedQueryPolicy:
type: object
properties:
bindings:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.SavedQueryBinding'
title: bindings
description: |-
At most one binding per level. A member listed under two levels is
rejected rather than resolved to the higher one.
etag:
type: string
title: etag
description: |-
The etag of the policy as read. SetSavedQueryPolicy requires it and fails
with ABORTED when it no longer matches.
title: SavedQueryPolicy
additionalProperties: false
description: |-
Who a saved query is shared with, and at what level. No bindings means
private. The creator is never a binding member; ownership cannot be granted.
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.
compositeTypes:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.CompositeTypeMetadata'
title: composite_types
description: |-
The composite_types is the list of user-defined composite types in a
schema (PostgreSQL family, CREATE TYPE ... AS). Excludes table/view row
types and derived types.
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. Usually "/bytebase.v1.…", for example "/bytebase.v1.UserService/CreateUser"; entries written outside the v1 API carry their own prefix, such as "/bytebase.mcp.Session/Authorize" or "/bytebase.cli.Recovery/ResetUserPassword". Support "==" operator.
- resource: the resource the entry is about, support "==" operator.
- severity: support "==" operator, check Severity enum in AuditLog message for values.
- actor: the actor, in users/{email}, serviceAccounts/{email}, or
workloadIdentities/{email} format. Support "==" operator.
- create_time: support ">=" and "<=" operator.
- mcp: true selects the entries MCP produced, false the rest. A boolean, not a string. Support "==" operator.
- mcp_correlation_id: the MCP session an entry belongs to, taken from an entry's mcp_delegation.correlation_id. Support "==" operator. Entries MCP produced outside a session — a refused connection or consent — carry none and match no value here.
For example:
- filter = "method == '/bytebase.v1.SQLService/Query'"
- filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR'"
- filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && actor == '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'"
- filter = "mcp == true"
- filter = "mcp_correlation_id == '0b7f1a3c-1d2e-4f56-8a90-1b2c3d4e5f60'"
orderBy:
type: string
title: order_by
description: |-
The order by of the log.
Only support order by create_time. The default sorting order is ascending.
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
required:
- parent
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.SearchDatabasesRequest:
type: object
properties:
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 `SearchDatabases` call.
Provide this to retrieve the subsequent page.
When paginating, all other parameters provided to `SearchDatabases` 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.
It supports the same fields and operators as `ListDatabasesRequest.filter`.
For example:
project == "projects/{project resource id}"
name.contains("database name") && engine == "POSTGRES"
title: SearchDatabasesRequest
additionalProperties: false
bytebase.v1.SearchDatabasesResponse:
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: SearchDatabasesResponse
additionalProperties: false
bytebase.v1.SearchIssuesRequest:
type: object
properties:
parent:
type: string
title: parent
description: |-
The parent, which owns this collection of issues.
Format: projects/{project}
Use the wildcard "projects/-" to search across collections (AIP-159); the
result is restricted to the projects where the caller holds
bb.issues.get. For a concrete project, the caller must hold bb.issues.get
on that project or the request is denied.
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.
orderBy:
type: string
title: order_by
description: |-
The order by of issues.
Support:
- create_time
- update_time
The default sorting order is ascending.
For example:
- order_by = "create_time desc"
- order_by = "update_time asc"
title: SearchIssuesRequest
required:
- parent
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.SearchMyAccessGrantsRequest:
type: object
properties:
parent:
type: string
title: parent
description: |-
The parent project to search in.
Format: projects/{project}
pageSize:
type: integer
title: page_size
format: int32
description: The maximum number of access grants to return.
pageToken:
type: string
title: page_token
description: A page token from a previous SearchMyAccessGrants call.
filter:
type: string
title: filter
description: Check the filter field in the ListAccessGrantsRequest message.
orderBy:
type: string
title: order_by
description: Check the order_by field in the ListAccessGrantsRequest message.
title: SearchMyAccessGrantsRequest
required:
- parent
additionalProperties: false
bytebase.v1.SearchMyAccessGrantsResponse:
type: object
properties:
accessGrants:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.AccessGrant'
title: access_grants
description: The access grants 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: SearchMyAccessGrantsResponse
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 ".contains()" operator.
- resource_id: the project id, support "==" and ".contains()" 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.contains("project name")
resource_id == "project id"
resource_id.contains("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.contains("project id")
name.contains("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.
orderBy:
type: string
title: order_by
description: |-
The order by of projects.
Support title. The default sorting order is ascending.
For example:
- order_by = "title"
- order_by = "title desc"
- order_by = "title asc"
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:
parent:
type: string
title: parent
description: |-
The parent project to search query histories in.
Format: projects/{project}
The AIP-159 wildcard "projects/-" is not supported; use
ListQueryHistories for cross-project reads.
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}" or "projects/{project}/instances/{id}/databases/{name}" format, support "==" operator.
- instance: the instance full name in "instances/{id}" or "projects/{project}/instances/{id}" format, support "==" operator.
- type: the type, should be "QUERY" or "EXPORT", support "==" operator.
- statement: the SQL statement, support "==" and ".contains()" operators.
For example:
project == "projects/{project}"
database == "instances/{instance}/databases/{database}"
instance == "instances/{instance}"
type == "QUERY"
type == "EXPORT"
statement == "SELECT 1;"
statement.contains("select")
type == "QUERY" && statement.contains("select")
title: SearchQueryHistoriesRequest
required:
- parent
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.
readOnly: true
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.SearchSavedQueriesRequest:
type: object
properties:
parent:
type: string
title: parent
description: 'Format: projects/{project}'
filter:
type: string
title: filter
description: |-
Filter the result, in CEL. See https://github.com/google/cel-spec
Supported fields:
- name: the saved query name. Supports "==" and "in [...]".
- title: the title. Supports "contains".
- creator: the creator in "users/{email}" format. Supports "==" and "!=".
- shared: whether a binding shares the saved query with the caller. Their
own saved queries, and ones visible only through a project-level
bb.savedQueries.get, are not "shared". Supports "==".
- starred: whether the caller starred it. Supports "==".
- folder: the exact folder path. Supports "==".
Use `creator == "users/{me}"` for a My view and `shared == true` for a
Shared view. Prefer `shared` over `creator !=`: with a project-level
bb.savedQueries.get, `creator !=` also matches saved queries nobody
shared with the caller.
For example:
creator == "users/[email protected]"
shared == true
starred == true
title.contains("weekly report")
folder == "foo/bar"
pageSize:
type: integer
title: page_size
format: int32
description: |-
The maximum number of saved queries to return. The service may return
fewer. Defaults to 10; values above 1000 are coerced to 1000.
pageToken:
type: string
title: page_token
description: |-
A page token from a previous SearchSavedQueries call. Keep every other
parameter the same as the call that returned it.
title: SearchSavedQueriesRequest
required:
- parent
additionalProperties: false
bytebase.v1.SearchSavedQueriesResponse:
type: object
properties:
savedQueries:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.SavedQuery'
title: saved_queries
nextPageToken:
type: string
title: next_page_token
description: |-
Pass to the next SearchSavedQueries call to fetch the following page.
Empty on the last page.
title: SearchSavedQueriesResponse
additionalProperties: false
bytebase.v1.SearchSavedQueryFoldersRequest:
type: object
properties:
parent:
type: string
title: parent
description: 'Format: projects/{project}'
filter:
type: string
title: filter
description: |-
Filter folders by the saved queries they hold. Takes the same fields and
syntax as SearchSavedQueries.filter, except `title`. A folder is returned
when at least one saved query the caller can read matches.
title: SearchSavedQueryFoldersRequest
required:
- parent
additionalProperties: false
bytebase.v1.SearchSavedQueryFoldersResponse:
type: object
properties:
folders:
type: array
items:
type: string
title: folders
description: |-
Folder paths, every ancestor prefix included, sorted. A folder is a path
on saved queries ("a/b/c"), so empty folders cannot exist.
title: SearchSavedQueryFoldersResponse
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Algorithm'
title: 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.SendEmailLoginCodeRequest:
type: object
properties:
email:
type: string
title: email
maxLength: 254
description: |-
The email address to send the code to.
Bounded so an oversized identity is refused at the edge before any
handler runs; the login-attempt lockout keys rows by this value.
workspace:
type:
- string
- "null"
title: workspace
maxLength: 256
description: |-
Optional workspace context captured at send time, used to locate the EMAIL setting,
and later (at verify time) for signup gate checks and workspace assignment.
Unset for SaaS brand-new signup (no workspace exists yet).
Format: workspaces/{workspace}
title: SendEmailLoginCodeRequest
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.ServiceAccount:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the service account.
Format: serviceAccounts/{email}
readOnly: true
state:
allOf:
- $ref: '#/components/schemas/bytebase.v1.State'
title: state
description: The state of the service account.
email:
type: string
title: email
description: |-
The email of the service account.
For workspace-level: {name}@service.bytebase.com
For project-level: {name}@{project-id}.service.bytebase.com
readOnly: true
title:
type: string
title: title
maxLength: 200
description: The display title of the service account.
serviceKey:
type: string
title: service_key
description: The service key for authentication. Only returned on creation or key rotation.
readOnly: true
createTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: create_time
description: The timestamp when the service account was created.
readOnly: true
title: ServiceAccount
additionalProperties: false
description: ServiceAccount represents an API integration account.
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.IamPolicy'
title: policy
etag:
type: string
title: etag
description: |-
(OPTIONAL) The current etag of the policy. Equivalent to setting `policy.etag`;
supplying both with different values returns INVALID_ARGUMENT.
title: SetIamPolicyRequest
required:
- resource
- policy
additionalProperties: false
description: Request message for setting an IAM policy.
bytebase.v1.SetSavedQueryPolicyRequest:
type: object
properties:
resource:
type: string
title: resource
description: 'Format: projects/{project}/savedQueries/{savedQuery}'
policy:
allOf:
- $ref: '#/components/schemas/bytebase.v1.SavedQueryPolicy'
title: policy
description: |-
The new policy, replacing the stored one in full. Empty `bindings` makes
the saved query private again.
title: SetSavedQueryPolicyRequest
required:
- resource
- policy
additionalProperties: false
bytebase.v1.Setting:
type: object
properties:
name:
type: string
title: name
description: |-
(IDENTIFIER) The resource name of the setting.
Format: settings/{setting}
Example: "settings/SEMANTIC_TYPES"
value:
allOf:
- $ref: '#/components/schemas/bytebase.v1.SettingValue'
title: value
description: The configuration value of the setting.
title: Setting
required:
- value
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
- EMAIL
- MCP
- EXPORT
bytebase.v1.SettingValue:
type: object
anyOf:
- type: object
properties:
ai:
allOf:
- $ref: '#/components/schemas/bytebase.v1.AISetting'
title: ai
title: ai
- type: object
properties:
appIm:
allOf:
- $ref: '#/components/schemas/bytebase.v1.AppIMSetting'
title: app_im
title: app_im
- type: object
properties:
dataClassification:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DataClassificationSetting'
title: data_classification
title: data_classification
- type: object
properties:
email:
allOf:
- $ref: '#/components/schemas/bytebase.v1.EmailSetting'
title: email
title: email
- type: object
properties:
environment:
allOf:
- $ref: '#/components/schemas/bytebase.v1.EnvironmentSetting'
title: environment
title: environment
- type: object
properties:
export:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ExportSetting'
title: export
title: export
- type: object
properties:
mcp:
allOf:
- $ref: '#/components/schemas/bytebase.v1.MCPSetting'
title: mcp
title: mcp
- type: object
properties:
semanticType:
allOf:
- $ref: '#/components/schemas/bytebase.v1.SemanticTypeSetting'
title: semantic_type
title: semantic_type
- type: object
properties:
workspaceApproval:
allOf:
- $ref: '#/components/schemas/bytebase.v1.WorkspaceApprovalSetting'
title: workspace_approval
title: workspace_approval
- type: object
properties:
workspaceProfile:
allOf:
- $ref: '#/components/schemas/bytebase.v1.WorkspaceProfileSetting'
title: workspace_profile
title: workspace_profile
unevaluatedProperties: false
not:
allOf:
- anyOf:
- required:
- ai
- required:
- appIm
- required:
- dataClassification
- required:
- email
- required:
- environment
- required:
- export
- required:
- mcp
- required:
- semanticType
- required:
- workspaceApproval
- required:
- workspaceProfile
- not:
oneOf:
- required:
- ai
- required:
- appIm
- required:
- dataClassification
- required:
- email
- required:
- environment
- required:
- export
- required:
- mcp
- required:
- semanticType
- required:
- workspaceApproval
- required:
- workspaceProfile
title: SettingValue
description: The data in setting value.
bytebase.v1.SharePointDestination:
type: object
properties:
url:
type: string
title: url
description: |-
The URL of the library root or folder. Normalized to its canonical form
and resolved with the workspace credentials on save.
title: SharePointDestination
additionalProperties: false
description: A SharePoint document library root or folder that receives exports.
bytebase.v1.SharePointSetting:
type: object
properties:
tenantId:
type: string
title: tenant_id
description: The Microsoft Entra tenant (directory) ID.
clientId:
type: string
title: client_id
description: The application (client) ID.
clientSecret:
type: string
title: client_secret
description: The client secret. It is never returned.
writeOnly: true
clientSecretSet:
type: boolean
title: client_secret_set
description: Whether a client secret is stored.
readOnly: true
title: SharePointSetting
additionalProperties: false
description: |-
SharePointSetting is the Microsoft Entra application that uploads exports to
SharePoint. It is granted access per library by the customer's SharePoint
administrators.
bytebase.v1.Sheet:
type: object
properties:
name:
type: string
title: name
description: |-
(IMMUTABLE) 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.
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: 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.
readOnly: true
title: Sheet
required:
- name
- content
additionalProperties: false
bytebase.v1.SignupRequest:
type: object
properties:
email:
type: string
title: email
maxLength: 254
description: |-
The email for the new account.
Bounded so an oversized identity is refused at the edge before any
handler runs; the login-attempt lockout keys rows by this value.
password:
type: string
title: password
description: |
The password for the new account.
string.max_bytes = 72
title:
type: string
title: title
maxLength: 200
description: The display name of the user.
title: SignupRequest
additionalProperties: false
bytebase.v1.SpatialIndexConfig:
type: object
properties:
method:
type: string
title: method
description: Spatial indexing method (e.g., "SPATIAL", "R-TREE", "GIST")
tessellation:
allOf:
- $ref: '#/components/schemas/bytebase.v1.TessellationConfig'
title: tessellation
description: Tessellation configuration for grid-based spatial indexes
storage:
allOf:
- $ref: '#/components/schemas/bytebase.v1.StorageConfig'
title: storage
description: Storage and performance configuration
dimensional:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DimensionalConfig'
title: dimensional
description: Dimensional configuration
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}/plans/{plan}/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.
readOnly: true
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.StartMFAEnrollmentRequest:
type: object
properties:
name:
type: string
title: name
maxLength: 260
description: 'Format: users/{email}. Must be the caller''s own name.'
title: StartMFAEnrollmentRequest
required:
- name
additionalProperties: false
bytebase.v1.StartMFAEnrollmentResponse:
type: object
properties:
otpSecret:
type: string
title: otp_secret
description: |-
The pending TOTP secret. The only response that carries it — it is never
readable from the User resource.
recoveryCodes:
type: array
items:
type: string
title: recovery_codes
description: The pending recovery codes, shown once for the caller to save.
expireTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: expire_time
description: When this enrollment stops being confirmable.
pendingVersion:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: pending_version
description: |-
Identifies this mint. Echo it back to EnableMFA and
ConfirmRecoveryCodes; a mint from another tab or device replaces the
pending state, and those methods refuse a version that is no longer the
pending one rather than promoting something this caller never saw.
title: StartMFAEnrollmentResponse
additionalProperties: false
bytebase.v1.StartTrialRequest:
type: object
title: StartTrialRequest
additionalProperties: false
bytebase.v1.State:
type: string
title: State
enum:
- STATE_UNSPECIFIED
- ACTIVE
- DELETED
description: Resource lifecycle state.
bytebase.v1.StatementAnchor:
type: object
properties:
spec:
type: string
title: spec
description: The Plan.Spec.id in the issue's plan; may no longer resolve after deletion.
sheetSha256:
type: string
title: sheet_sha256
description: SHA256 of the saved sheet, as 64 lowercase hexadecimal characters.
startPosition:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Position'
title: start_position
description: |-
One-based lines and Unicode code-point columns. When both columns are zero,
the range covers whole lines, including the end line. Otherwise both columns
must be positive, start_position is inclusive, and end_position is exclusive.
endPosition:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Position'
title: end_position
title: StatementAnchor
additionalProperties: false
description: |-
The saved statement revision and range referenced by a comment.
Source currency is derived by comparing the spec and hash with the current plan.
Historical SQL is available through SheetService.GetSheet with this hash.
bytebase.v1.StatementType:
type: string
title: StatementType
enum:
- STATEMENT_TYPE_UNSPECIFIED
- CREATE_DATABASE
- CREATE_TABLE
- CREATE_VIEW
- CREATE_INDEX
- CREATE_SEQUENCE
- CREATE_SCHEMA
- CREATE_FUNCTION
- CREATE_TRIGGER
- CREATE_PROCEDURE
- CREATE_EVENT
- CREATE_EXTENSION
- CREATE_TYPE
- DROP_DATABASE
- DROP_TABLE
- DROP_VIEW
- DROP_INDEX
- DROP_SEQUENCE
- DROP_SCHEMA
- DROP_FUNCTION
- DROP_TRIGGER
- DROP_PROCEDURE
- DROP_EVENT
- DROP_EXTENSION
- DROP_TYPE
- ALTER_DATABASE
- ALTER_TABLE
- ALTER_VIEW
- ALTER_SEQUENCE
- ALTER_EVENT
- ALTER_TYPE
- ALTER_INDEX
- TRUNCATE
- RENAME
- RENAME_INDEX
- RENAME_SCHEMA
- RENAME_SEQUENCE
- COMMENT
- INSERT
- UPDATE
- DELETE
- MERGE
description: StatementType represents the type of SQL statement.
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.StreamMetadata.Type'
title: type
description: The type of the stream.
stale:
type: boolean
title: stale
description: Indicates whether the stream was last read before the `stale_after` time.
mode:
allOf:
- $ref: '#/components/schemas/bytebase.v1.StreamMetadata.Mode'
title: mode
description: The mode of the stream.
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.PlanType'
title: plan
readOnly: true
seats:
type: integer
title: seats
format: int32
readOnly: true
instances:
type: integer
title: instances
format: int32
readOnly: true
activeInstances:
type: integer
title: active_instances
format: int32
readOnly: true
expiresTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: expires_time
readOnly: true
trialing:
type: boolean
title: trialing
readOnly: true
orgName:
type: string
title: org_name
readOnly: true
ha:
type: boolean
title: ha
description: Whether high availability (multiple replicas) is enabled.
readOnly: true
etag:
type: string
title: etag
description: Etag for optimistic concurrency on purchase updates. Only set in SaaS mode.
readOnly: true
title: Subscription
additionalProperties: false
bytebase.v1.SwitchWorkspaceRequest:
type: object
properties:
workspace:
type: string
title: workspace
maxLength: 256
description: |-
The target workspace to switch to.
Format: workspaces/{workspace}
web:
type: boolean
title: web
description: If true, sets tokens as HTTP-only cookies (browser clients).
otpCode:
type:
- string
- "null"
title: otp_code
maxLength: 64
description: OTP code for MFA verification. Required if the target workspace enforces MFA.
recoveryCode:
type:
- string
- "null"
title: recovery_code
maxLength: 64
description: Recovery code for MFA verification (alternative to otp_code).
mfaTempToken:
type:
- string
- "null"
title: mfa_temp_token
maxLength: 4096
description: Temporary MFA token from a previous SwitchWorkspace call that returned mfa_temp_token.
title: SwitchWorkspaceRequest
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} or projects/{project}/instances/{instance}/databases/{database}
title: SyncDatabaseRequest
required:
- name
additionalProperties: false
bytebase.v1.SyncDatabaseResponse:
type: object
title: SyncDatabaseResponse
additionalProperties: false
bytebase.v1.SyncDatabases:
type: object
properties:
databases:
type: array
items:
type: string
title: databases
title: SyncDatabases
additionalProperties: false
bytebase.v1.SyncInstanceRequest:
type: object
properties:
name:
type: string
title: name
description: |-
The name of instance.
Format: instances/{instance} or projects/{project}/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
required:
- name
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.SyncStatus:
type: string
title: SyncStatus
enum:
- SYNC_STATUS_UNSPECIFIED
- OK
- FAILED
description: SyncStatus is the status of the database sync operation.
bytebase.v1.TableCatalog:
type: object
anyOf:
- type: object
properties:
columns:
allOf:
- $ref: '#/components/schemas/bytebase.v1.TableCatalog.Columns'
title: columns
description: Regular table columns.
title: columns
- type: object
properties:
objectSchema:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ObjectSchema'
title: object_schema
description: Object schema for JSON/XML columns.
title: object_schema
unevaluatedProperties: false
not:
allOf:
- anyOf:
- required:
- columns
- required:
- objectSchema
- not:
oneOf:
- required:
- columns
- required:
- objectSchema
properties:
name:
type: string
title: name
description: The table name.
classification:
type: string
title: classification
description: The data classification level for this table.
title: TableCatalog
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: string
title: row_count
format: int64
description: The row_count is the estimated number of rows of a table.
dataSize:
type: string
title: data_size
format: int64
description: The data_size is the estimated data size of a table.
indexSize:
type: string
title: index_size
format: int64
description: The index_size is the estimated index size of a table.
dataFree:
type: 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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.TablePartitionMetadata.Type'
title: type
description: The type of a table partition.
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.Task:
type: object
anyOf:
- type: object
properties:
databaseCreate:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Task.DatabaseCreate'
title: database_create
title: database_create
- type: object
properties:
databaseUpdate:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Task.DatabaseUpdate'
title: database_update
title: database_update
unevaluatedProperties: false
not:
allOf:
- anyOf:
- required:
- databaseCreate
- required:
- databaseUpdate
- not:
oneOf:
- required:
- databaseCreate
- required:
- databaseUpdate
properties:
name:
type: string
title: name
description: 'Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}'
specId:
type: string
title: spec_id
description: A UUID4 string that uniquely identifies the Spec.
status:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Task.Status'
title: status
description: Status is the status of the task.
skippedReason:
type: string
title: skipped_reason
description: The reason why the task was skipped.
type:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Task.Type'
title: type
target:
type: string
title: target
description: |-
Format: instances/{instance} or projects/{project}/instances/{instance} if the task is DatabaseCreate.
Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database}
updateTime:
oneOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
- type: "null"
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.
readOnly: true
runTime:
oneOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
- type: "null"
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.
readOnly: true
title: Task
bytebase.v1.Task.DatabaseCreate:
type: object
properties:
sheet:
type: string
title: sheet
description: 'Format: projects/{project}/sheets/{sheet}'
title: DatabaseCreate
additionalProperties: false
description: Payload for creating a new database.
bytebase.v1.Task.DatabaseUpdate:
type: object
anyOf:
- type: object
properties:
release:
type: string
title: release
description: 'Format: projects/{project}/releases/{release}'
title: release
- type: object
properties:
sheet:
type: string
title: sheet
description: 'Format: projects/{project}/sheets/{sheet}'
title: sheet
unevaluatedProperties: false
not:
allOf:
- anyOf:
- required:
- release
- required:
- sheet
- not:
oneOf:
- required:
- release
- required:
- sheet
title: DatabaseUpdate
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
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.TaskMetadata.State'
title: state
description: The state of the task.
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}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}'
creator:
type: string
title: creator
description: 'Format: users/[email protected]'
createTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: create_time
readOnly: true
updateTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: update_time
readOnly: true
status:
allOf:
- $ref: '#/components/schemas/bytebase.v1.TaskRun.Status'
title: status
description: The current execution status of the task run.
detail:
type: string
title: detail
description: |-
Below are the results of a task run.
Detailed information about the task run result.
startTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: start_time
description: The time when the task run started execution.
readOnly: true
hasPriorBackup:
type: boolean
title: has_prior_backup
description: |-
Indicates whether a prior backup was created for this task run.
When true, rollback SQL can be generated via PreviewTaskRunRollback.
Backup details are available in the task run logs.
schedulerInfo:
allOf:
- $ref: '#/components/schemas/bytebase.v1.TaskRun.SchedulerInfo'
title: scheduler_info
description: Scheduling information about the task run.
readOnly: true
runTime:
oneOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
- type: "null"
title: run_time
description: |-
The task run should run after run_time.
This can only be set when creating the task run calling BatchRunTasks.
readOnly: true
title: TaskRun
additionalProperties: false
bytebase.v1.TaskRun.SchedulerInfo:
type: object
properties:
reportTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: report_time
description: The time when the scheduling info was reported.
waitingCause:
allOf:
- $ref: '#/components/schemas/bytebase.v1.TaskRun.SchedulerInfo.WaitingCause'
title: waiting_cause
description: The cause for the task run waiting.
title: SchedulerInfo
additionalProperties: false
description: Information about task run scheduling.
bytebase.v1.TaskRun.SchedulerInfo.WaitingCause:
type: object
anyOf:
- type: object
properties:
parallelTasksLimit:
type: boolean
title: parallel_tasks_limit
description: Waiting due to parallel tasks limit.
title: parallel_tasks_limit
unevaluatedProperties: false
title: WaitingCause
description: Information about why a task run is waiting.
bytebase.v1.TaskRun.Status:
type: string
title: Status
enum:
- STATUS_UNSPECIFIED
- PENDING
- RUNNING
- DONE
- FAILED
- CANCELED
- AVAILABLE
bytebase.v1.TaskRunLog:
type: object
properties:
name:
type: string
title: name
description: 'Format: projects/{project}/plans/{plan}/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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.Type'
title: type
description: The type of this log entry.
logTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: log_time
description: The time when the log was recorded.
replicaId:
type: string
title: replica_id
description: The replica ID for this log entry.
schemaDump:
allOf:
- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.SchemaDump'
title: schema_dump
description: Schema dump details (if type is SCHEMA_DUMP).
commandExecute:
allOf:
- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.CommandExecute'
title: command_execute
description: Command execution details (if type is COMMAND_EXECUTE).
databaseSync:
allOf:
- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.DatabaseSync'
title: database_sync
description: Database sync details (if type is DATABASE_SYNC).
transactionControl:
allOf:
- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.TransactionControl'
title: transaction_control
description: Transaction control details (if type is TRANSACTION_CONTROL).
priorBackup:
allOf:
- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.PriorBackup'
title: prior_backup
description: Prior backup details (if type is PRIOR_BACKUP).
retryInfo:
allOf:
- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.RetryInfo'
title: retry_info
description: Retry information details (if type is RETRY_INFO).
computeDiff:
allOf:
- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.ComputeDiff'
title: compute_diff
description: Compute diff details (if type is COMPUTE_DIFF).
releaseFileExecute:
allOf:
- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.ReleaseFileExecute'
title: release_file_execute
description: Release file execution details (if type is RELEASE_FILE_EXECUTE).
ghostMigration:
allOf:
- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.GhostMigration'
title: ghost_migration
description: gh-ost migration details (if type is GHOST_MIGRATION).
title: TaskRunLogEntry
additionalProperties: false
bytebase.v1.TaskRunLogEntry.CommandExecute:
type: object
properties:
logTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: log_time
description: When the command was logged.
range:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Range'
title: range
description: |-
The byte offset range of the executed command in the sheet.
Uses byte offsets (not character indices) for efficient slicing of sheet content bytes.
Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents all 13 bytes.
statement:
type: string
title: statement
description: The executed statement.
response:
allOf:
- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse'
title: response
description: The response from executing the command.
title: CommandExecute
additionalProperties: false
description: Command execution details.
bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse:
type: object
properties:
logTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: log_time
description: When the response was logged.
error:
type: string
title: error
description: Error message if command execution failed.
affectedRows:
type: string
title: affected_rows
format: int64
description: Total affected rows.
allAffectedRows:
type: array
items:
type: 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:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: start_time
description: When diff computation started.
endTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: end_time
description: When diff computation ended.
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:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: start_time
description: When the database sync started.
endTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: end_time
description: When the database sync ended.
error:
type: string
title: error
description: Error message if sync failed.
title: DatabaseSync
additionalProperties: false
description: Database synchronization details.
bytebase.v1.TaskRunLogEntry.GhostMigration:
type: object
properties:
startTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: start_time
description: When the gh-ost migration started.
endTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: end_time
description: When the gh-ost migration ended.
error:
type: string
title: error
description: Error message if the gh-ost migration failed.
title: GhostMigration
additionalProperties: false
description: gh-ost migration details.
bytebase.v1.TaskRunLogEntry.PriorBackup:
type: object
properties:
startTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: start_time
description: When the backup started.
endTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: end_time
description: When the backup ended.
priorBackupDetail:
allOf:
- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail'
title: prior_backup_detail
description: The backup details.
error:
type: string
title: error
description: Error message if the backup failed.
title: PriorBackup
additionalProperties: false
description: Prior backup operation details.
bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail:
type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item'
title: items
description: The list of backed up tables.
title: PriorBackupDetail
additionalProperties: false
description: Prior backup detail for rollback purposes.
bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item:
type: object
properties:
sourceTable:
allOf:
- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table'
title: source_table
description: The original table information.
targetTable:
allOf:
- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table'
title: target_table
description: The target backup table information.
startPosition:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Position'
title: start_position
description: The start position in the SQL statement.
endPosition:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Position'
title: end_position
description: The end position in the SQL statement.
title: Item
additionalProperties: false
description: A single backup table mapping.
bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table:
type: object
properties:
database:
type: string
title: database
description: |-
The database information.
Format: instances/{instance}/databases/{database} or projects/{project}/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.TaskRunLogEntry.ReleaseFileExecute:
type: object
properties:
version:
type: string
title: version
description: The version of the file being executed (e.g., "0001").
filePath:
type: string
title: file_path
description: The file path within the release (e.g., "2.2/V0001_create_table.sql").
title: ReleaseFileExecute
additionalProperties: false
description: Release file execution 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:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: start_time
description: When the schema dump started.
endTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: end_time
description: When the schema dump ended.
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.TransactionControl:
type: object
properties:
type:
allOf:
- $ref: '#/components/schemas/bytebase.v1.TaskRunLogEntry.TransactionControl.Type'
title: type
description: The type of transaction control.
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
- TRANSACTION_CONTROL
- PRIOR_BACKUP
- RETRY_INFO
- COMPUTE_DIFF
- RELEASE_FILE_EXECUTE
- GHOST_MIGRATION
description: The type of log entry.
bytebase.v1.TaskRunSession:
type: object
anyOf:
- type: object
properties:
postgres:
allOf:
- $ref: '#/components/schemas/bytebase.v1.TaskRunSession.Postgres'
title: postgres
description: PostgreSQL session information.
title: postgres
unevaluatedProperties: false
properties:
name:
type: string
title: name
description: 'Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/session'
title: TaskRunSession
bytebase.v1.TaskRunSession.Postgres:
type: object
properties:
session:
allOf:
- $ref: '#/components/schemas/bytebase.v1.TaskRunSession.Postgres.Session'
title: session
description: '`session` is the session of the task run executing commands.'
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
- "null"
title: state
description: Session state (active, idle, etc.).
waitEventType:
type:
- string
- "null"
title: wait_event_type
description: Wait event type if session is waiting.
waitEvent:
type:
- string
- "null"
title: wait_event
description: Specific wait event if session is waiting.
datname:
type:
- string
- "null"
title: datname
description: Database name.
usename:
type:
- string
- "null"
title: usename
description: User name.
applicationName:
type: string
title: application_name
description: Application name.
clientAddr:
type:
- string
- "null"
title: client_addr
description: Client IP address.
clientPort:
type:
- string
- "null"
title: client_port
description: Client port number.
backendStart:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: backend_start
description: When the backend process started.
xactStart:
oneOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
- type: "null"
title: xact_start
description: When the current transaction started.
queryStart:
oneOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
- type: "null"
title: query_start
description: When the current query started.
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.BoundingBox'
title: bounding_box
description: Bounding box for GEOMETRY tessellation (not used for GEOGRAPHY)
title: TessellationConfig
additionalProperties: false
description: TessellationConfig defines tessellation parameters for spatial indexes.
bytebase.v1.TestEmailSettingRequest:
type: object
properties:
parent:
type: string
title: parent
emailSetting:
allOf:
- $ref: '#/components/schemas/bytebase.v1.EmailSetting'
title: email_setting
to:
type: string
title: to
title: TestEmailSettingRequest
required:
- parent
- emailSetting
- to
additionalProperties: false
bytebase.v1.TestEmailSettingResponse:
type: object
properties:
success:
type: boolean
title: success
error:
type: string
title: error
title: TestEmailSettingResponse
additionalProperties: false
bytebase.v1.TestIdentityProviderRequest:
type: object
anyOf:
- type: object
properties:
ldapContext:
allOf:
- $ref: '#/components/schemas/bytebase.v1.LDAPIdentityProviderTestRequestContext'
title: ldap_context
description: LDAP credentials context for test connection.
title: ldap_context
- type: object
properties:
oauth2Context:
allOf:
- $ref: '#/components/schemas/bytebase.v1.OAuth2IdentityProviderTestRequestContext'
title: oauth2_context
title: oauth2_context
- type: object
properties:
oidcContext:
allOf:
- $ref: '#/components/schemas/bytebase.v1.OIDCIdentityProviderTestRequestContext'
title: oidc_context
description: OIDC authentication context for test connection.
title: oidc_context
unevaluatedProperties: false
not:
allOf:
- anyOf:
- required:
- ldapContext
- required:
- oauth2Context
- required:
- oidcContext
- not:
oneOf:
- required:
- ldapContext
- required:
- oauth2Context
- required:
- oidcContext
properties:
identityProvider:
allOf:
- $ref: '#/components/schemas/bytebase.v1.IdentityProvider'
title: identity_provider
description: The identity provider to test connection including uncreated.
title: TestIdentityProviderRequest
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.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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Webhook'
title: webhook
description: |-
The webhook to test.
The url is what gets posted to. Reads do not return a saved webhook's url,
so leave url empty and set name to test the one already stored; set url to
test a url before saving it.
title: TestWebhookRequest
required:
- project
- webhook
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} or projects/{project}/instances/{instance}
title: UndeleteInstanceRequest
required:
- name
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
required:
- name
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
required:
- name
additionalProperties: false
bytebase.v1.UndeleteServiceAccountRequest:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the deleted service account.
Format: serviceAccounts/{email}
title: UndeleteServiceAccountRequest
required:
- name
additionalProperties: false
description: Request message for restoring a deleted service account.
bytebase.v1.UndeleteUserRequest:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the deleted user.
Format: users/{email}
title: UndeleteUserRequest
required:
- name
additionalProperties: false
bytebase.v1.UndeleteWorkloadIdentityRequest:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the deleted workload identity.
Format: workloadIdentities/{email}
title: UndeleteWorkloadIdentityRequest
required:
- name
additionalProperties: false
description: Request message for restoring a deleted workload identity.
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} or projects/{project}/instances/{instance}
dataSource:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DataSource'
title: data_source
description: Identified by data source ID.
updateMask:
allOf:
- $ref: '#/components/schemas/google.protobuf.FieldMask'
title: update_mask
description: The list of fields to update.
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
required:
- name
- dataSource
additionalProperties: false
bytebase.v1.UpdateDatabaseCatalogRequest:
type: object
properties:
catalog:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DatabaseCatalog'
title: catalog
description: |-
The database catalog to update, identified by its `name` field.
Format: instances/{instance}/databases/{database}/catalog or projects/{project}/instances/{instance}/databases/{database}/catalog
Replaces the whole catalog: send the complete value, since anything omitted
is erased. There is no `update_mask` because `schemas` is a repeated field,
and AIP-161 forbids addressing one element of one.
title: UpdateDatabaseCatalogRequest
required:
- catalog
additionalProperties: false
description: Request message for updating a database catalog.
bytebase.v1.UpdateDatabaseGroupRequest:
type: object
properties:
databaseGroup:
allOf:
- $ref: '#/components/schemas/bytebase.v1.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}
updateMask:
allOf:
- $ref: '#/components/schemas/google.protobuf.FieldMask'
title: update_mask
description: The list of fields to update.
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
required:
- databaseGroup
additionalProperties: false
description: Request message for updating a database group.
bytebase.v1.UpdateDatabaseRequest:
type: object
properties:
database:
allOf:
- $ref: '#/components/schemas/bytebase.v1.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} or projects/{project}/instances/{instance}/databases/{database}
updateMask:
allOf:
- $ref: '#/components/schemas/google.protobuf.FieldMask'
title: update_mask
description: The list of fields to update.
title: UpdateDatabaseRequest
required:
- database
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
maxLength: 254
description: The new email address.
title: UpdateEmailRequest
required:
- name
- email
additionalProperties: false
bytebase.v1.UpdateGroupRequest:
type: object
properties:
group:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Group'
title: group
description: |-
The group to update.
The group's `name` field is used to identify the group to update.
Format: groups/{email}
updateMask:
allOf:
- $ref: '#/components/schemas/google.protobuf.FieldMask'
title: update_mask
description: The list of fields to update.
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
required:
- group
additionalProperties: false
description: Request message for updating a group.
bytebase.v1.UpdateIdentityProviderRequest:
type: object
properties:
identityProvider:
allOf:
- $ref: '#/components/schemas/bytebase.v1.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}
updateMask:
allOf:
- $ref: '#/components/schemas/google.protobuf.FieldMask'
title: update_mask
description: The list of fields to update.
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
required:
- identityProvider
additionalProperties: false
bytebase.v1.UpdateInstanceRequest:
type: object
properties:
instance:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Instance'
title: instance
description: |-
The instance to update.
The instance's `name` field is used to identify the instance to update.
Format: instances/{instance} or projects/{project}/instances/{instance}
updateMask:
allOf:
- $ref: '#/components/schemas/google.protobuf.FieldMask'
title: update_mask
description: The list of fields to update.
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. A project-nested name creates
the instance only under its encoded active, non-default project; it never
falls back to a workspace instance.
title: UpdateInstanceRequest
required:
- instance
additionalProperties: false
bytebase.v1.UpdateIssueCommentRequest:
type: object
properties:
parent:
type: string
title: parent
description: |-
The issue name
Format: projects/{project}/issues/{issue}
issueComment:
allOf:
- $ref: '#/components/schemas/bytebase.v1.IssueComment'
title: issue_comment
description: The comment to update.
updateMask:
allOf:
- $ref: '#/components/schemas/google.protobuf.FieldMask'
title: update_mask
description: The list of fields to update.
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
required:
- parent
- updateMask
additionalProperties: false
bytebase.v1.UpdateIssueRequest:
type: object
properties:
issue:
allOf:
- $ref: '#/components/schemas/bytebase.v1.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}
updateMask:
allOf:
- $ref: '#/components/schemas/google.protobuf.FieldMask'
title: update_mask
description: The list of fields to update.
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
required:
- issue
- updateMask
additionalProperties: false
bytebase.v1.UpdatePlanRequest:
type: object
properties:
plan:
allOf:
- $ref: '#/components/schemas/bytebase.v1.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}
updateMask:
allOf:
- $ref: '#/components/schemas/google.protobuf.FieldMask'
title: update_mask
description: The list of fields to update.
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
required:
- plan
- updateMask
additionalProperties: false
bytebase.v1.UpdatePolicyRequest:
type: object
properties:
policy:
allOf:
- $ref: '#/components/schemas/bytebase.v1.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: workspaces/{workspace-id}.
Environment resource name: environments/environment-id.
updateMask:
allOf:
- $ref: '#/components/schemas/google.protobuf.FieldMask'
title: update_mask
description: The list of fields to update.
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
required:
- policy
additionalProperties: false
bytebase.v1.UpdateProjectRequest:
type: object
properties:
project:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Project'
title: project
description: |-
The project to update.
The project's `name` field is used to identify the project to update.
Format: projects/{project}
updateMask:
allOf:
- $ref: '#/components/schemas/google.protobuf.FieldMask'
title: update_mask
description: The list of fields to update.
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
required:
- project
additionalProperties: false
bytebase.v1.UpdatePurchaseRequest:
type: object
properties:
plan:
allOf:
- $ref: '#/components/schemas/bytebase.v1.PlanType'
title: plan
interval:
allOf:
- $ref: '#/components/schemas/bytebase.v1.BillingInterval'
title: interval
seats:
type: integer
title: seats
format: int32
etag:
type: string
title: etag
title: UpdatePurchaseRequest
additionalProperties: false
bytebase.v1.UpdateReleaseRequest:
type: object
properties:
release:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Release'
title: release
description: The release to update.
updateMask:
allOf:
- $ref: '#/components/schemas/google.protobuf.FieldMask'
title: update_mask
description: The list of fields to be updated.
title: UpdateReleaseRequest
required:
- release
additionalProperties: false
bytebase.v1.UpdateReviewConfigRequest:
type: object
properties:
reviewConfig:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ReviewConfig'
title: review_config
description: |-
The SQL review config to update.
The name field is used to identify the SQL review config to update.
updateMask:
allOf:
- $ref: '#/components/schemas/google.protobuf.FieldMask'
title: update_mask
description: The list of fields to update.
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
required:
- reviewConfig
additionalProperties: false
bytebase.v1.UpdateRoleRequest:
type: object
properties:
role:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Role'
title: role
description: The role to update.
updateMask:
allOf:
- $ref: '#/components/schemas/google.protobuf.FieldMask'
title: update_mask
description: The list of fields to update.
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
required:
- role
additionalProperties: false
bytebase.v1.UpdateSavedQueryRequest:
type: object
properties:
savedQuery:
allOf:
- $ref: '#/components/schemas/bytebase.v1.SavedQuery'
title: saved_query
description: |-
`saved_query.name` identifies the saved query to update.
Format: projects/{project}/savedQueries/{savedQuery}
updateMask:
allOf:
- $ref: '#/components/schemas/google.protobuf.FieldMask'
title: update_mask
description: |-
Fields to update, relative to the saved query (`title`, not
`saved_query.title`). Supported: `title`, `content`, `database`, `folder`.
At least one path is required.
title: UpdateSavedQueryRequest
required:
- savedQuery
additionalProperties: false
bytebase.v1.UpdateSavedQueryStarRequest:
type: object
properties:
name:
type: string
title: name
description: 'Format: projects/{project}/savedQueries/{savedQuery}'
starred:
type: boolean
title: starred
description: Whether the caller stars the saved query.
title: UpdateSavedQueryStarRequest
required:
- name
additionalProperties: false
bytebase.v1.UpdateServiceAccountRequest:
type: object
properties:
serviceAccount:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ServiceAccount'
title: service_account
description: |-
The service account to update.
The service account's `name` field is used to identify the service account to update.
Format: serviceAccounts/{email}
updateMask:
allOf:
- $ref: '#/components/schemas/google.protobuf.FieldMask'
title: update_mask
description: |-
The list of fields to update.
Supported fields: title, service_key (triggers key rotation)
title: UpdateServiceAccountRequest
required:
- serviceAccount
additionalProperties: false
description: Request message for updating a service account.
bytebase.v1.UpdateSettingRequest:
type: object
properties:
setting:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Setting'
title: setting
description: The setting to update.
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:
allOf:
- $ref: '#/components/schemas/google.protobuf.FieldMask'
title: update_mask
title: UpdateSettingRequest
required:
- setting
additionalProperties: false
description: The request message for updating or creating a setting.
bytebase.v1.UpdateUserRequest:
type: object
properties:
user:
allOf:
- $ref: '#/components/schemas/bytebase.v1.User'
title: user
description: |-
The user to update.
The user's `name` field is used to identify the user to update.
Format: users/{email}
updateMask:
allOf:
- $ref: '#/components/schemas/google.protobuf.FieldMask'
title: update_mask
description: The list of fields to update.
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
required:
- user
additionalProperties: false
bytebase.v1.UpdateWebhookRequest:
type: object
properties:
webhook:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Webhook'
title: webhook
description: The webhook to modify.
updateMask:
allOf:
- $ref: '#/components/schemas/google.protobuf.FieldMask'
title: update_mask
description: The list of fields to update.
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
required:
- webhook
additionalProperties: false
bytebase.v1.UpdateWorkloadIdentityRequest:
type: object
properties:
workloadIdentity:
allOf:
- $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'
title: workload_identity
description: |-
The workload identity to update.
The workload identity's `name` field is used to identify the workload identity to update.
Format: workloadIdentities/{email}
updateMask:
allOf:
- $ref: '#/components/schemas/google.protobuf.FieldMask'
title: update_mask
description: |-
The list of fields to update.
Supported fields: title, workload_identity_config
title: UpdateWorkloadIdentityRequest
required:
- workloadIdentity
additionalProperties: false
description: Request message for updating a workload identity.
bytebase.v1.UpdateWorkspaceRequest:
type: object
properties:
workspace:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Workspace'
title: workspace
updateMask:
allOf:
- $ref: '#/components/schemas/google.protobuf.FieldMask'
title: update_mask
title: UpdateWorkspaceRequest
required:
- workspace
additionalProperties: false
bytebase.v1.UploadLicenseRequest:
type: object
properties:
license:
type: string
title: license
title: UploadLicenseRequest
additionalProperties: false
bytebase.v1.User:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the user.
Format: users/{email}
readOnly: true
state:
allOf:
- $ref: '#/components/schemas/bytebase.v1.State'
title: state
description: The lifecycle state of the user account.
email:
type: string
title: email
maxLength: 254
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.
password:
type: string
title: password
description: |
The password for authentication. Only used during user creation or password updates.
string.max_bytes = 72
writeOnly: true
mfaEnabled:
type: boolean
title: mfa_enabled
description: |-
Whether the user has a live MFA factor. Set by ConfirmRecoveryCodes and
DisableMFA, never by an update.
readOnly: true
phone:
type: string
title: phone
description: |-
Should be a valid E.164 compliant phone number.
Could be empty.
profile:
allOf:
- $ref: '#/components/schemas/bytebase.v1.User.Profile'
title: profile
description: User profile metadata.
groups:
type: array
items:
type: string
readOnly: true
title: groups
description: |-
The groups for the user.
Format: groups/{email}
readOnly: true
workspace:
type: string
title: workspace
description: |-
The current workspace.
Format: workspaces/{id}
readOnly: true
title: User
additionalProperties: false
bytebase.v1.User.Profile:
type: object
properties:
lastLoginTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: last_login_time
description: The last time the user successfully logged in.
lastChangePasswordTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: last_change_password_time
description: The last time the user changed their password.
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.VCSType:
type: string
title: VCSType
enum:
- VCS_TYPE_UNSPECIFIED
- GITHUB
- GITLAB
- BITBUCKET
- AZURE_DEVOPS
description: Version control system type.
bytebase.v1.VCSUser:
type: object
properties:
vcsType:
allOf:
- $ref: '#/components/schemas/bytebase.v1.VCSType'
title: vcs_type
userId:
type: string
title: user_id
userName:
type: string
title: user_name
displayName:
type: string
title: display_name
title: VCSUser
additionalProperties: false
bytebase.v1.VerifyCheckoutSessionRequest:
type: object
properties:
sessionId:
type: string
title: session_id
description: |-
The same Stripe Checkout Session ID PurchaseResponse mints, arriving back
the other way, so it carries the same classification. VerifyCheckoutSession
is EXCLUDED, and a refusal of it streams its request to the stdout audit
log, so leaving this unannotated would write the id into that line while
the response that produced it was redacted.
title: VerifyCheckoutSessionRequest
additionalProperties: false
bytebase.v1.VerifyCheckoutSessionResponse:
type: object
properties:
status:
type: string
title: status
description: 'Stripe Checkout Session status: "complete", "expired", or "open".'
title: VerifyCheckoutSessionResponse
additionalProperties: false
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.WebhookType'
title: type
description: |-
Webhook integration type.
type is the type of the webhook.
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.
Write-only: an incoming-webhook url is the whole credential for posting
into the customer's chat, so reads leave it empty, the same way a data
source's password and SSL material are left empty. Set it to change it.
Required to create a webhook. Not required on TestWebhook, where an empty
url on a request that names a webhook means the one already stored, so the
field carries no REQUIRED behavior it would contradict there.
writeOnly: true
urlSupportsDirectMessage:
type: boolean
title: url_supports_direct_message
description: |-
Whether the stored url's endpoint form can carry a direct message to the
users an event mentions, rather than only a post to the channel the url
names. False for a Microsoft Teams Power Automate workflow endpoint, which
direct messages bypass entirely: a webhook with direct_message set sends
them and returns, so the workflow post never happens.
Reads do not return the url, so a client editing a saved webhook cannot
work this out for itself. It is a fact about the stored url and says
nothing about what the url is.
readOnly: true
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: |-
(UNORDERED_LIST) 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_CREATED
- ISSUE_APPROVAL_REQUESTED
- ISSUE_SENT_BACK
- ISSUE_APPROVED
- PIPELINE_FAILED
- PIPELINE_COMPLETED
title: Webhook
required:
- type
- title
additionalProperties: false
bytebase.v1.WebhookType:
type: string
title: WebhookType
enum:
- WEBHOOK_TYPE_UNSPECIFIED
- SLACK
- DISCORD
- TEAMS
- DINGTALK
- FEISHU
- WECOM
- LARK
- GOOGLE_CHAT
description: Webhook integration type.
bytebase.v1.WorkloadIdentity:
type: object
properties:
name:
type: string
title: name
description: |-
The name of the workload identity.
Format: workloadIdentities/{email}
readOnly: true
state:
allOf:
- $ref: '#/components/schemas/bytebase.v1.State'
title: state
description: The state of the workload identity.
email:
type: string
title: email
description: |-
The email of the workload identity.
For workspace-level: {name}@workload.bytebase.com
For project-level: {name}@{project-id}.workload.bytebase.com
readOnly: true
title:
type: string
title: title
maxLength: 200
description: The display title of the workload identity.
createTime:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: create_time
description: The timestamp when the workload identity was created.
readOnly: true
workloadIdentityConfig:
allOf:
- $ref: '#/components/schemas/bytebase.v1.WorkloadIdentityConfig'
title: workload_identity_config
description: The workload identity configuration for OIDC token validation.
title: WorkloadIdentity
required:
- workloadIdentityConfig
additionalProperties: false
description: WorkloadIdentity represents an external CI/CD workload identity.
bytebase.v1.WorkloadIdentityConfig:
type: object
properties:
providerType:
allOf:
- $ref: '#/components/schemas/bytebase.v1.WorkloadIdentityConfig.ProviderType'
title: provider_type
description: Provider configuration mode.
issuerUrl:
type: string
title: issuer_url
description: |-
HTTPS URL of the OIDC issuer. The exchange fetches
{issuer_url}/.well-known/openid-configuration to verify a token, unless
jwks_url names the key set directly.
allowedAudiences:
type: array
items:
type: string
title: allowed_audiences
description: |-
Audiences a token may be minted for. A token authenticates if its `aud`
claim matches any entry.
subjectPattern:
type: string
title: subject_pattern
description: |-
The subject a token must carry, e.g. "repo:owner/repo:ref:refs/heads/main".
A trailing "*" is a prefix match. For GitHub and GitLab subjects it must
complete an owner or group segment, so "repo:my-org/*" is accepted and
"repo:*" is not. Other issuers write other vocabularies, so a wildcard
outside those two is accepted as given.
jwksUrl:
type: string
title: jwks_url
description: Optional JWKS endpoint. When empty, use OIDC discovery from issuer_url.
title: WorkloadIdentityConfig
required:
- providerType
- issuerUrl
- allowedAudiences
- subjectPattern
additionalProperties: false
description: WorkloadIdentityConfig for API layer
bytebase.v1.WorkloadIdentityConfig.ProviderType:
type: string
title: ProviderType
enum:
- PROVIDER_TYPE_UNSPECIFIED
- GITHUB
- GITLAB
- OIDC
description: ProviderType identifies the workload identity configuration mode.
bytebase.v1.Workspace:
type: object
properties:
name:
type: string
title: name
description: 'Format: workspaces/{workspace}'
title:
type: string
title: title
logo:
type: string
title: logo
description: The branding logo.
title: Workspace
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.ApprovalTemplate'
title: template
condition:
allOf:
- $ref: '#/components/schemas/google.type.Expr'
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 REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role
When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_name, request.unmask, request.data_export
For examples:
resource.environment_id == "prod" && statement.affected_rows >= 100
resource.table_name.matches("sensitive_.*") && resource.db_engine == "MYSQL"
source:
allOf:
- $ref: '#/components/schemas/bytebase.v1.WorkspaceApprovalSetting.Rule.Source'
title: source
title: Rule
additionalProperties: false
bytebase.v1.WorkspaceApprovalSetting.Rule.Source:
type: string
title: Source
enum:
- SOURCE_UNSPECIFIED
- CHANGE_DATABASE
- CREATE_DATABASE
- REQUEST_ROLE
- REQUEST_ACCESS
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.
requireMfa:
type: boolean
title: require_mfa
description: Require MFA for all users.
refreshTokenDuration:
allOf:
- $ref: '#/components/schemas/google.protobuf.Duration'
title: refresh_token_duration
description: The duration for refresh token. Default is 7 days.
announcement:
allOf:
- $ref: '#/components/schemas/bytebase.v1.Announcement'
title: announcement
description: The setting of custom announcement
maximumRequestExpiration:
allOf:
- $ref: '#/components/schemas/google.protobuf.Duration'
title: maximum_request_expiration
description: The max expiration duration for data access requests.
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:
allOf:
- $ref: '#/components/schemas/bytebase.v1.DatabaseChangeMode'
title: database_change_mode
description: The workspace database change mode.
disallowPasswordSignin:
type: boolean
title: disallow_password_signin
description: Whether password sign-in is disabled for all end users.
enableMetricCollection:
type: boolean
title: enable_metric_collection
description: Whether to enable metric collection for the workspace.
inactiveSessionTimeout:
allOf:
- $ref: '#/components/schemas/google.protobuf.Duration'
title: inactive_session_timeout
description: The session expiration time if not activity detected for the user. Value <= 0 means no limit.
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.
passwordRestriction:
allOf:
- $ref: '#/components/schemas/bytebase.v1.WorkspaceProfileSetting.PasswordRestriction'
title: password_restriction
description: Password restriction settings.
accessTokenDuration:
allOf:
- $ref: '#/components/schemas/google.protobuf.Duration'
title: access_token_duration
description: The duration for access token. Default is 1 hour.
enableDebug:
type: boolean
title: enable_debug
description: Whether debug mode is enabled.
sqlResultSize:
type: string
title: sql_result_size
format: int64
description: |-
The maximum result size limit in bytes for query and export, works for the SQL Editor and Export Center.
The default value is 100MB, we will use the default value if the setting not exists, or the limit <= 0.
queryTimeout:
allOf:
- $ref: '#/components/schemas/google.protobuf.Duration'
title: query_timeout
description: The query timeout duration for query and export, works for the SQL Editor and Export Center.
allowEmailCodeSignin:
type: boolean
title: allow_email_code_signin
description: |-
Allow signin/signup using email + a 6-digit one-time verification code.
Requires the EMAIL setting to be configured on the workspace.
sqlEditorThemeId:
type: string
title: sql_editor_theme_id
description: |-
Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id
OR a custom theme's uuid. Empty ⇒ default light.
sqlEditorCustomTheme:
allOf:
- $ref: '#/components/schemas/bytebase.v1.SQLEditorThemeSetting'
title: sql_editor_custom_theme
description: |-
The enforced CUSTOM theme's full definition — present ONLY when
sql_editor_theme_id is a custom uuid. tokens is always complete.
maximumRoleExpiration:
allOf:
- $ref: '#/components/schemas/google.protobuf.Duration'
title: maximum_role_expiration
description: |-
The max expiration duration for request role.
Deprecated: use just-in-time access request flows instead.
directorySyncTokenConfigured:
type: boolean
title: directory_sync_token_configured
description: |-
Whether a directory sync token has been generated for this workspace.
The token itself is never returned; this only lets the UI decide between
offering "generate" and "regenerate".
readOnly: true
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 password length. It must be at least 8.
requireNumber:
type: boolean
title: require_number
description: require_number requires the password to contain at least one number.
requireLetter:
type: boolean
title: require_letter
description: require_letter requires the password to contain at least one letter, either uppercase or lowercase.
requireUppercaseLetter:
type: boolean
title: require_uppercase_letter
description: require_uppercase_letter requires the password to contain at least one uppercase letter.
requireSpecialCharacter:
type: boolean
title: require_special_character
description: require_special_character requires the password to contain 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 change their password after their first login.
passwordRotation:
allOf:
- $ref: '#/components/schemas/google.protobuf.Duration'
title: password_rotation
description: password_rotation requires users to change their password after the duration.
title: PasswordRestriction
additionalProperties: false
connect-protocol-version:
type: number
examples:
- 1
title: Connect-Protocol-Version
description: Define the version of the Connect protocol
const: 1
connect-timeout-header:
type: number
examples:
- 1000
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`.'
value:
type: string
format: byte
description: The Protobuf message, serialized as bytes and base64-encoded. The specific message type is identified by the `type` field.
debug:
type: object
title: Debug
additionalProperties: true
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
anyOf:
- type: object
properties:
boolValue:
type: boolean
title: bool_value
description: boolean value.
title: bool_value
- type: object
properties:
bytesValue:
type: string
title: bytes_value
format: byte
description: bytes value.
title: bytes_value
- type: object
properties:
doubleValue:
type: number
title: double_value
format: double
description: double value.
title: double_value
- type: object
properties:
durationValue:
allOf:
- $ref: '#/components/schemas/google.protobuf.Duration'
title: duration_value
description: |-
protobuf.Duration value.
Deprecated: duration is no longer considered a builtin cel type.
deprecated: true
title: duration_value
- type: object
properties:
int64Value:
type: string
title: int64_value
format: int64
description: int64 value.
title: int64_value
- type: object
properties:
nullValue:
allOf:
- $ref: '#/components/schemas/google.protobuf.NullValue'
title: null_value
description: null value.
title: null_value
- type: object
properties:
stringValue:
type: string
title: string_value
description: string value.
title: string_value
- type: object
properties:
timestampValue:
allOf:
- $ref: '#/components/schemas/google.protobuf.Timestamp'
title: timestamp_value
description: |-
protobuf.Timestamp value.
Deprecated: timestamp is no longer considered a builtin cel type.
deprecated: true
title: timestamp_value
- type: object
properties:
uint64Value:
type: string
title: uint64_value
format: int64
description: uint64 value.
title: uint64_value
unevaluatedProperties: false
not:
allOf:
- anyOf:
- required:
- boolValue
- required:
- bytesValue
- required:
- doubleValue
- required:
- durationValue
- required:
- int64Value
- required:
- nullValue
- required:
- stringValue
- required:
- timestampValue
- required:
- uint64Value
- not:
oneOf:
- required:
- boolValue
- required:
- bytesValue
- required:
- doubleValue
- required:
- durationValue
- required:
- int64Value
- required:
- nullValue
- required:
- stringValue
- required:
- timestampValue
- required:
- uint64Value
title: Constant
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
anyOf:
- type: object
properties:
callExpr:
allOf:
- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.Call'
title: call_expr
description: A call expression, including calls to predefined functions and operators.
title: call_expr
- type: object
properties:
comprehensionExpr:
allOf:
- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.Comprehension'
title: comprehension_expr
description: A comprehension expression.
title: comprehension_expr
- type: object
properties:
constExpr:
allOf:
- $ref: '#/components/schemas/google.api.expr.v1alpha1.Constant'
title: const_expr
description: A literal expression.
title: const_expr
- type: object
properties:
identExpr:
allOf:
- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.Ident'
title: ident_expr
description: An identifier expression.
title: ident_expr
- type: object
properties:
listExpr:
allOf:
- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.CreateList'
title: list_expr
description: A list creation expression.
title: list_expr
- type: object
properties:
selectExpr:
allOf:
- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.Select'
title: select_expr
description: A field selection expression, e.g. `request.auth`.
title: select_expr
- type: object
properties:
structExpr:
allOf:
- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr.CreateStruct'
title: struct_expr
description: A map or message creation expression.
title: struct_expr
unevaluatedProperties: false
not:
allOf:
- anyOf:
- required:
- callExpr
- required:
- comprehensionExpr
- required:
- constExpr
- required:
- identExpr
- required:
- listExpr
- required:
- selectExpr
- required:
- structExpr
- not:
oneOf:
- required:
- callExpr
- required:
- comprehensionExpr
- required:
- constExpr
- required:
- identExpr
- required:
- listExpr
- required:
- selectExpr
- required:
- structExpr
properties:
id:
type: 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.
title: Expr
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:
allOf:
- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'
title: target
description: |-
The target of an method call-style expression. For example, `x` in
`x.f()`.
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:
allOf:
- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'
title: iter_range
description: The range over which the comprehension iterates.
accuVar:
type: string
title: accu_var
description: The name of the variable used for accumulation of the result.
accuInit:
allOf:
- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'
title: accu_init
description: The initial value of the accumulator.
loopCondition:
allOf:
- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'
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.
loopStep:
allOf:
- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'
title: loop_step
description: |-
An expression which can contain iter_var, iter_var2, and accu_var.
Computes the next value of accu_var.
result:
allOf:
- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'
title: result
description: |-
An expression which can contain accu_var.
Computes the result.
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
anyOf:
- type: object
properties:
fieldKey:
type: string
title: field_key
description: The field key for a message creator statement.
title: field_key
- type: object
properties:
mapKey:
allOf:
- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'
title: map_key
description: The key expression for a map creation statement.
title: map_key
unevaluatedProperties: false
not:
allOf:
- anyOf:
- required:
- fieldKey
- required:
- mapKey
- not:
oneOf:
- required:
- fieldKey
- required:
- mapKey
properties:
id:
type: 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:
allOf:
- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'
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.
optionalEntry:
type: boolean
title: optional_entry
description: Whether the key-value pair is optional.
title: Entry
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:
allOf:
- $ref: '#/components/schemas/google.api.expr.v1alpha1.Expr'
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`.
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: An arbitrary message with a type URL identifying the encoded message type.
google.protobuf.Duration:
type: string
format: duration
description: A signed duration in seconds, with up to nine fractional digits and an `s` suffix (for example, `3s` or `-0.001s`).
google.protobuf.Empty:
type: object
description: An empty JSON object.
google.protobuf.FieldMask:
type: string
description: Comma-separated field paths in lowerCamelCase (for example, `user.displayName,photo`).
google.protobuf.FloatValue:
oneOf:
- type: string
- type: number
description: A single-precision number. The non-finite values `NaN`, `Infinity`, and `-Infinity` are encoded as strings; `null` is also accepted.
google.protobuf.ListValue:
type: array
items:
$ref: '#/components/schemas/google.protobuf.Value'
description: A JSON array whose elements may be any JSON value.
google.protobuf.NullValue:
type: string
title: NullValue
enum:
- NULL_VALUE
description: |-
Represents a JSON `null`.
`NullValue` is a sentinel, using an enum with only one value to represent
the null value for the `Value` type union.
A field of type `NullValue` with any value other than `0` is considered
invalid. Most ProtoJSON serializers will emit a `Value` with a `null_value`
set as a JSON `null` regardless of the integer value, and so will round trip
to a `0` value.
google.protobuf.Struct:
type: object
additionalProperties:
$ref: '#/components/schemas/google.protobuf.Value'
description: A JSON object whose property values may be any JSON value.
google.protobuf.Timestamp:
type: string
examples:
- "2023-01-15T01:30:15.01Z"
- "2024-12-25T12:00:00Z"
format: date-time
description: A point in time in RFC 3339 format, with up to nanosecond precision. Output uses UTC (`Z`); input may use an offset from UTC.
google.protobuf.Value:
oneOf:
- type: "null"
- type: number
- type: string
- type: boolean
- type: array
- type: object
additionalProperties: true
description: 'Any JSON value: `null`, number, string, boolean, array, or object.'
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.Color:
type: object
properties:
red:
type: number
title: red
format: float
description: The amount of red in the color as a value in the interval [0, 1].
green:
type: number
title: green
format: float
description: The amount of green in the color as a value in the interval [0, 1].
blue:
type: number
title: blue
format: float
description: The amount of blue in the color as a value in the interval [0, 1].
alpha:
allOf:
- $ref: '#/components/schemas/google.protobuf.FloatValue'
title: alpha
description: |-
The fraction of this color that should be applied to the pixel. That is,
the final pixel color is defined by the equation:
`pixel color = alpha * (this color) + (1.0 - alpha) * (background color)`
This means that a value of 1.0 corresponds to a solid color, whereas
a value of 0.0 corresponds to a completely transparent color. This
uses a wrapper message rather than a simple float scalar so that it is
possible to distinguish between a default value and the value being unset.
If omitted, this color object is rendered as a solid color
(as if the alpha value had been explicitly given a value of 1.0).
title: Color
additionalProperties: false
description: |-
Represents a color in the RGBA color space. This representation is designed
for simplicity of conversion to/from color representations in various
languages over compactness. For example, the fields of this representation
can be trivially provided to the constructor of `java.awt.Color` in Java; it
can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
method in iOS; and, with just a little work, it can be easily formatted into
a CSS `rgba()` string in JavaScript.
This reference page doesn't carry information about the absolute color
space
that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB,
DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color
space.
When color equality needs to be decided, implementations, unless
documented otherwise, treat two colors as equal if all their red,
green, blue, and alpha values each differ by at most 1e-5.
Example (Java):
import com.google.type.Color;
// ...
public static java.awt.Color fromProto(Color protocolor) {
float alpha = protocolor.hasAlpha()
? protocolor.getAlpha().getValue()
: 1.0;
return new java.awt.Color(
protocolor.getRed(),
protocolor.getGreen(),
protocolor.getBlue(),
alpha);
}
public static Color toProto(java.awt.Color color) {
float red = (float) color.getRed();
float green = (float) color.getGreen();
float blue = (float) color.getBlue();
float denominator = 255.0;
Color.Builder resultBuilder =
Color
.newBuilder()
.setRed(red / denominator)
.setGreen(green / denominator)
.setBlue(blue / denominator);
int alpha = color.getAlpha();
if (alpha != 255) {
result.setAlpha(
FloatValue
.newBuilder()
.setValue(((float) alpha) / denominator)
.build());
}
return resultBuilder.build();
}
// ...
Example (iOS / Obj-C):
// ...
static UIColor* fromProto(Color* protocolor) {
float red = [protocolor red];
float green = [protocolor green];
float blue = [protocolor blue];
FloatValue* alpha_wrapper = [protocolor alpha];
float alpha = 1.0;
if (alpha_wrapper != nil) {
alpha = [alpha_wrapper value];
}
return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
}
static Color* toProto(UIColor* color) {
CGFloat red, green, blue, alpha;
if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
return nil;
}
Color* result = [[Color alloc] init];
[result setRed:red];
[result setGreen:green];
[result setBlue:blue];
if (alpha <= 0.9999) {
[result setAlpha:floatWrapperWithValue(alpha)];
}
[result autorelease];
return result;
}
// ...
Example (JavaScript):
// ...
var protoToCssColor = function(rgb_color) {
var redFrac = rgb_color.red || 0.0;
var greenFrac = rgb_color.green || 0.0;
var blueFrac = rgb_color.blue || 0.0;
var red = Math.floor(redFrac * 255);
var green = Math.floor(greenFrac * 255);
var blue = Math.floor(blueFrac * 255);
if (!('alpha' in rgb_color)) {
return rgbToCssColor(red, green, blue);
}
var alphaFrac = rgb_color.alpha.value || 0.0;
var rgbParams = [red, green, blue].join(',');
return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
};
var rgbToCssColor = function(red, green, blue) {
var rgbNumber = new Number((red << 16) | (green << 8) | blue);
var hexString = rgbNumber.toString(16);
var missingZeros = 6 - hexString.length;
var resultBuilder = ['#'];
for (var i = 0; i < missingZeros; i++) {
resultBuilder.push('0');
}
resultBuilder.push(hexString);
return resultBuilder.join('');
};
// ...
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.AccessGrantService
description: AccessGrantService manages temporary access grants within projects.
- name: bytebase.v1.RolloutService
description: RolloutService manages the execution of deployment plans.
- name: bytebase.v1.QueryHistoryService
description: QueryHistoryService manages query history records of SQL Editor queries and exports.
- 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.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.ActuatorService
description: ActuatorService manages system health and operational information.
- name: bytebase.v1.AIService
description: AIService provides AI chat capabilities for the page agent.
- name: bytebase.v1.AuditLogService
description: AuditLogService manages audit logs for system activities and API calls.
- name: bytebase.v1.IdentityProviderService
description: IdentityProviderService manages external identity providers for SSO authentication.
- name: bytebase.v1.UserService
description: UserService manages user accounts and authentication.
- 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.ChangelogService
description: ChangelogService manages database migration history.
- 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.OrgPolicyService
description: OrgPolicyService manages organizational policies at various resource levels.
- 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.SavedQueryService
description: |-
SavedQueryService manages saved queries in the SQL Editor.
A saved query is private to its creator until shared. Permissions come from
three places:
- The creator owns the saved query and holds every permission on it.
- A VIEWER binding grants bb.savedQueries.get and getIamPolicy; an EDITOR
binding adds update.
- Permissions granted on the project or workspace apply to every saved
query in the project, private ones included.
A caller without a method's permission gets NotFound, not
PermissionDenied, so private names stay unprobeable. Running a saved query
is governed by the SQL Editor's database permissions, not by this service.
- name: bytebase.v1.ServiceAccountService
description: ServiceAccountService manages service accounts for API integrations.
- 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.WorkloadIdentityService
description: WorkloadIdentityService manages workload identities for external CI/CD integrations.
- name: bytebase.v1.WorkspaceService
description: WorkspaceService manages workspace-level operations and profile.