Skip to content

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

feat(auth): publish login providers on AuthenticationInfo, gate the IdP list (#21328)

Danny Xue09ef6867b69
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yaml
index a3987e8aaa..7a7d2cb6fd 100644
--- a/backend/api/mcp/gen/openapi.yaml
+++ b/backend/api/mcp/gen/openapi.yaml
@@ -409,15 +409,16 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.ExchangeTokenResponse'
- /bytebase.v1.AuthService/GetAuthenticationRestriction:
+ /bytebase.v1.AuthService/GetAuthenticationInfo:
post:
tags:
- bytebase.v1.AuthService
- summary: GetAuthenticationRestriction
+ summary: GetAuthenticationInfo
description: |-
- Gets the effective restrictions needed to render authentication flows.
+ Gets everything the login page renders: the sign-in restrictions and the
+ identity providers it offers.
Permissions required: None
- operationId: bytebase.v1.AuthService.GetAuthenticationRestriction
+ operationId: bytebase.v1.AuthService.GetAuthenticationInfo
parameters:
- name: Connect-Protocol-Version
in: header
@@ -432,7 +433,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/bytebase.v1.GetAuthenticationRestrictionRequest'
+ $ref: '#/components/schemas/bytebase.v1.GetAuthenticationInfoRequest'
required: true
responses:
default:
@@ -2026,10 +2027,16 @@ paths:
post:
tags:
- bytebase.v1.IdentityProviderService
- summary: ListIdentityProviders
+ 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: |-
- Lists all configured identity providers (public endpoint for login page).
- Permissions required: None
+ 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
@@ -9337,8 +9344,36 @@ components:
title: restriction
description: The effective authentication restrictions.
$ref: '#/components/schemas/bytebase.v1.Restriction'
+ identityProviders:
+ type: array
+ items:
+ $ref: '#/components/schemas/bytebase.v1.LoginIdentityProvider'
+ title: identity_providers
+ description: The identity providers the login page renders, in display order.
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:
@@ -12604,7 +12639,7 @@ components:
title: GetActuatorInfoRequest
additionalProperties: false
description: Request message for getting actuator information.
- bytebase.v1.GetAuthenticationRestrictionRequest:
+ bytebase.v1.GetAuthenticationInfoRequest:
type: object
properties:
workspace:
@@ -12615,7 +12650,7 @@ components:
Format: workspaces/{workspace}
When unset, self-hosted resolves the singleton workspace and SaaS uses
the deployment-level defaults.
- title: GetAuthenticationRestrictionRequest
+ title: GetAuthenticationInfoRequest
additionalProperties: false
bytebase.v1.GetChangelogRequest:
type: object
@@ -14311,11 +14346,14 @@ components:
parent:
type: string
title: parent
+ pattern: ^workspaces/[^/]+$
description: |-
- The parent workspace whose identity providers should be listed.
+ The parent workspace whose identity providers should be listed. It must be
+ the workspace the caller's credential belongs to.
Format: workspaces/{workspace}
- When unset, the workspace is resolved from the request context.
title: ListIdentityProvidersRequest
+ required:
+ - parent
additionalProperties: false
bytebase.v1.ListIdentityProvidersResponse:
type: object
@@ -15438,6 +15476,36 @@ components:
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:
+ title: type
+ description: The type of identity provider protocol.
+ $ref: '#/components/schemas/bytebase.v1.IdentityProviderType'
+ title:
+ type: string
+ title: title
+ description: The display title of the identity provider.
+ 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.
+ $ref: '#/components/schemas/bytebase.v1.AuthorizationRequest'
+ 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:
@@ -23853,6 +23921,8 @@ tags:
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.RolloutService
description: RolloutService manages the execution of deployment plans.
- name: bytebase.v1.QueryHistoryService
@@ -23885,8 +23955,6 @@ tags:
description: DatabaseService manages databases and their schemas.
- name: bytebase.v1.GroupService
description: GroupService manages user groups for organizing users and permissions.
- - name: bytebase.v1.IdentityProviderService
- description: IdentityProviderService manages external identity providers for SSO authentication.
- name: bytebase.v1.OrgPolicyService
description: OrgPolicyService manages organizational policies at various resource levels.
- name: bytebase.v1.ProjectService
diff --git a/backend/api/mcp/openapi_index_refused_test.go b/backend/api/mcp/openapi_index_refused_test.go
index 536cf0effb..e570eaa5b2 100644
--- a/backend/api/mcp/openapi_index_refused_test.go
+++ b/backend/api/mcp/openapi_index_refused_test.go
@@ -41,7 +41,7 @@ func TestRefusedEndpointsAreNotAdvertised(t *testing.T) {
"AuthService has a served authentication restriction endpoint")
endpoints := idx.GetServiceEndpoints("AuthService")
require.Len(t, endpoints, 1)
- require.Equal(t, "bytebase.v1.AuthService.GetAuthenticationRestriction", endpoints[0].OperationID)
+ require.Equal(t, "bytebase.v1.AuthService.GetAuthenticationInfo", endpoints[0].OperationID)
})
t.Run("a service whose every method is refused is not listed at all", func(t *testing.T) {
diff --git a/backend/api/v1/actuator_service_test.go b/backend/api/v1/actuator_service_test.go
index e804b4211d..8c3c2fef49 100644
--- a/backend/api/v1/actuator_service_test.go
+++ b/backend/api/v1/actuator_service_test.go
@@ -54,7 +54,7 @@ func TestAuthenticationInfoAndActuatorBoundary(t *testing.T) {
actuatorService := NewActuatorService(stores, profile, nil, licenseService, sampleManager)
authService := NewAuthService(stores, "test-secret", licenseService, profile, nil)
- publicResponse, err := authService.GetAuthenticationRestriction(ctx, connect.NewRequest(&v1pb.GetAuthenticationRestrictionRequest{}))
+ publicResponse, err := authService.GetAuthenticationInfo(ctx, connect.NewRequest(&v1pb.GetAuthenticationInfoRequest{}))
require.NoError(t, err)
var populated []string
@@ -67,7 +67,7 @@ func TestAuthenticationInfoAndActuatorBoundary(t *testing.T) {
require.Empty(t, publicResponse.Msg.Workspace)
profile.SaaS = true
- saasPublicResponse, err := authService.GetAuthenticationRestriction(ctx, connect.NewRequest(&v1pb.GetAuthenticationRestrictionRequest{}))
+ saasPublicResponse, err := authService.GetAuthenticationInfo(ctx, connect.NewRequest(&v1pb.GetAuthenticationInfoRequest{}))
require.NoError(t, err)
require.True(t, saasPublicResponse.Msg.Restriction.DisallowSignup)
require.True(t, saasPublicResponse.Msg.Restriction.DisallowPasswordSignin)
@@ -80,7 +80,7 @@ func TestAuthenticationInfoAndActuatorBoundary(t *testing.T) {
require.NoError(t, err)
- publicResponse, err = authService.GetAuthenticationRestriction(ctx, connect.NewRequest(&v1pb.GetAuthenticationRestrictionRequest{}))
+ publicResponse, err = authService.GetAuthenticationInfo(ctx, connect.NewRequest(&v1pb.GetAuthenticationInfoRequest{}))
require.NoError(t, err)
populated = nil
publicResponse.Msg.ProtoReflect().Range(func(field protoreflect.FieldDescriptor, _ protoreflect.Value) bool {
diff --git a/backend/api/v1/audit_redact_inventory_test.go b/backend/api/v1/audit_redact_inventory_test.go
index 6dbb8fb6ca..622f89be84 100644
--- a/backend/api/v1/audit_redact_inventory_test.go
+++ b/backend/api/v1/audit_redact_inventory_test.go
@@ -263,6 +263,9 @@ var auditRecordedFields = []string{
"bytebase.v1.AuditLog.response",
"bytebase.v1.AuditLog.user",
"bytebase.v1.AuthenticationInfo.workspace",
+ "bytebase.v1.AuthorizationRequest.client_id",
+ "bytebase.v1.AuthorizationRequest.endpoint",
+ "bytebase.v1.AuthorizationRequest.scopes",
"bytebase.v1.BatchCancelTaskRunsRequest.parent",
"bytebase.v1.BatchCancelTaskRunsRequest.task_runs",
"bytebase.v1.BatchCreateRevisionsRequest.parent",
@@ -492,7 +495,7 @@ var auditRecordedFields = []string{
"bytebase.v1.FunctionMetadata.sql_mode",
"bytebase.v1.GenerationMetadata.expression",
"bytebase.v1.GetAccessGrantRequest.name",
- "bytebase.v1.GetAuthenticationRestrictionRequest.workspace",
+ "bytebase.v1.GetAuthenticationInfoRequest.workspace",
"bytebase.v1.GetChangelogRequest.name",
"bytebase.v1.GetDatabaseCatalogRequest.name",
"bytebase.v1.GetDatabaseGroupRequest.name",
@@ -679,6 +682,8 @@ var auditRecordedFields = []string{
"bytebase.v1.ListWorkloadIdentitiesRequest.page_token",
"bytebase.v1.ListWorkloadIdentitiesRequest.parent",
"bytebase.v1.ListWorkloadIdentitiesResponse.next_page_token",
+ "bytebase.v1.LoginIdentityProvider.name",
+ "bytebase.v1.LoginIdentityProvider.title",
"bytebase.v1.LoginRequest.email",
"bytebase.v1.LoginRequest.idp_name",
"bytebase.v1.LoginRequest.workspace",
diff --git a/backend/api/v1/auth_service.go b/backend/api/v1/auth_service.go
index 6b7d7ffcdd..610355b560 100644
--- a/backend/api/v1/auth_service.go
+++ b/backend/api/v1/auth_service.go
@@ -25,6 +25,7 @@ import (
storepb "github.com/bytebase/bytebase/backend/generated-go/store"
v1pb "github.com/bytebase/bytebase/backend/generated-go/v1"
"github.com/bytebase/bytebase/backend/generated-go/v1/v1connect"
+ "github.com/bytebase/bytebase/backend/plugin/idp/oidc"
"github.com/bytebase/bytebase/backend/plugin/idp/wif"
"github.com/bytebase/bytebase/backend/store"
)
@@ -103,10 +104,11 @@ func NewAuthService(store *store.Store, secret string, licenseService *enterpris
}
}
-// GetAuthenticationRestriction returns the public restrictions needed by authentication flows.
-func (s *AuthService) GetAuthenticationRestriction(
+// GetAuthenticationInfo returns everything the login page renders: the sign-in
+// restrictions and the identity providers it offers.
+func (s *AuthService) GetAuthenticationInfo(
ctx context.Context,
- req *connect.Request[v1pb.GetAuthenticationRestrictionRequest],
+ req *connect.Request[v1pb.GetAuthenticationInfoRequest],
) (*connect.Response[v1pb.AuthenticationInfo], error) {
workspaceID, err := s.resolveAuthenticationWorkspaceID(ctx, &req.Msg.Workspace)
if err != nil {
@@ -118,8 +120,14 @@ func (s *AuthService) GetAuthenticationRestriction(
return nil, err
}
+ identityProviders, err := s.listLoginIdentityProviders(ctx, workspaceID)
+ if err != nil {
+ return nil, err
+ }
+
info := &v1pb.AuthenticationInfo{
- Restriction: restriction,
+ Restriction: restriction,
+ IdentityProviders: identityProviders,
}
if workspaceID != "" {
info.Workspace = common.FormatWorkspace(workspaceID)
@@ -156,6 +164,67 @@ func (s *AuthService) resolveAuthenticationWorkspaceID(ctx context.Context, work
return workspaceID, nil
}
+// listLoginIdentityProviders returns the providers the login page renders for a
+// workspace, falling back to the global providers when the workspace has none.
+func (s *AuthService) listLoginIdentityProviders(ctx context.Context, workspaceID string) ([]*v1pb.LoginIdentityProvider, error) {
+ find := &store.FindIdentityProviderMessage{}
+ if workspaceID != "" {
+ find.Workspace = &workspaceID
+ }
+ identityProviders, err := s.store.ListIdentityProviders(ctx, find)
+ if err != nil {
+ return nil, connect.NewError(connect.CodeInternal, errors.Wrap(err, "failed to list identity providers"))
+ }
+ // Global providers are the SaaS shared login path. Self-hosted has none to
+ // fall back to, and counting them there would disagree with the
+ // workspace-scoped check UpdateSetting makes for disallow_password_signin.
+ if len(identityProviders) == 0 && workspaceID != "" && s.profile.SaaS {
+ identityProviders, err = s.store.ListIdentityProviders(ctx, &store.FindIdentityProviderMessage{})
+ if err != nil {
+ return nil, connect.NewError(connect.CodeInternal, errors.Wrap(err, "failed to list global identity providers"))
+ }
+ }
+
+ var loginIdentityProviders []*v1pb.LoginIdentityProvider
+ for _, identityProvider := range identityProviders {
+ loginIdentityProviders = append(loginIdentityProviders, convertToLoginIdentityProvider(identityProvider))
+ }
+ return loginIdentityProviders, nil
+}
+
+// convertToLoginIdentityProvider publishes the fields a browser needs to start
+// an SSO redirect and nothing else. This response is served without a
+// credential, so fields are added here by hand, never copied from the config.
+func convertToLoginIdentityProvider(identityProvider *store.IdentityProviderMessage) *v1pb.LoginIdentityProvider {
+ provider := &v1pb.LoginIdentityProvider{
+ Name: common.IdentityProviderNamePrefix + identityProvider.ResourceID,
+ Type: v1pb.IdentityProviderType(identityProvider.Type),
+ Title: identityProvider.Title,
+ }
+
+ if v := identityProvider.Config.GetOauth2Config(); v != nil {
+ provider.AuthorizationRequest = &v1pb.AuthorizationRequest{
+ Endpoint: v.AuthUrl,
+ ClientId: v.ClientId,
+ Scopes: v.Scopes,
+ }
+ } else if v := identityProvider.Config.GetOidcConfig(); v != nil {
+ provider.AuthorizationRequest = &v1pb.AuthorizationRequest{
+ ClientId: v.ClientId,
+ Scopes: v.Scopes,
+ }
+ // The authorization endpoint is not stored; it comes from the issuer's
+ // discovery document, which the plugin caches.
+ openidConfiguration, err := oidc.GetOpenIDConfiguration(v.Issuer, v.SkipTlsVerify)
+ if err != nil {
+ slog.Warn("failed to fetch openid configuration", slog.String("issuer", v.Issuer), log.BBError(err))
+ } else {
+ provider.AuthorizationRequest.Endpoint = openidConfiguration.AuthorizationEndpoint
+ }
+ }
+ return provider
+}
+
// Login is the auth login method including SSO.
func (s *AuthService) Login(ctx context.Context, req *connect.Request[v1pb.LoginRequest]) (*connect.Response[v1pb.LoginResponse], error) {
request := req.Msg
diff --git a/backend/api/v1/idp_service.go b/backend/api/v1/idp_service.go
index 89768624e3..47f4baf0ad 100644
--- a/backend/api/v1/idp_service.go
+++ b/backend/api/v1/idp_service.go
@@ -51,29 +51,21 @@ func (s *IdentityProviderService) GetIdentityProvider(ctx context.Context, req *
return connect.NewResponse(identityProvider), nil
}
-// ListIdentityProviders lists all identity providers.
+// ListIdentityProviders lists the identity providers of the parent workspace.
func (s *IdentityProviderService) ListIdentityProviders(ctx context.Context, req *connect.Request[v1pb.ListIdentityProvidersRequest]) (*connect.Response[v1pb.ListIdentityProvidersResponse], error) {
- // allow_without_credential: workspace may not be in context (login page).
- // Workspace resolution order: request.parent -> JWT context -> default workspace (self-hosted).
- var identityProviders []*store.IdentityProviderMessage
-
- if req.Msg.Parent != "" {
- workspaceID, err := common.GetWorkspaceID(req.Msg.Parent)
- if err != nil {
- return nil, connect.NewError(connect.CodeInvalidArgument, err)
- }
+ workspaceID, err := common.GetWorkspaceID(req.Msg.Parent)
+ if err != nil {
+ return nil, connect.NewError(connect.CodeInvalidArgument, err)
+ }
+ // The permission was checked against the credential's workspace, so that is
+ // the only workspace this request may name.
+ if workspaceID != common.GetWorkspaceIDFromContext(ctx) {
+ return nil, connect.NewError(connect.CodePermissionDenied, errors.Errorf("cannot list the identity providers of another workspace"))
+ }
- wsIDPs, err := s.store.ListIdentityProviders(ctx, &store.FindIdentityProviderMessage{Workspace: &workspaceID})
- if err != nil {
- return nil, connect.NewError(connect.CodeInternal, err)
- }
- identityProviders = append(identityProviders, wsIDPs...)
- } else {
- globalIDPs, err := s.store.ListIdentityProviders(ctx, &store.FindIdentityProviderMessage{})
- if err != nil {
- return nil, connect.NewError(connect.CodeInternal, err)
- }
- identityProviders = append(identityProviders, globalIDPs...)
+ identityProviders, err := s.store.ListIdentityProviders(ctx, &store.FindIdentityProviderMessage{Workspace: &workspaceID})
+ if err != nil {
+ return nil, connect.NewError(connect.CodeInternal, err)
}
response := &v1pb.ListIdentityProvidersResponse{}
diff --git a/backend/api/v1/mcp_gate_test.go b/backend/api/v1/mcp_gate_test.go
index cfefd8c2c6..6081f68677 100644
--- a/backend/api/v1/mcp_gate_test.go
+++ b/backend/api/v1/mcp_gate_test.go
@@ -1456,7 +1456,7 @@ var mcpDenialRequestsUnderReview = map[string]mcpDenialRequestReview{
v1connect.IssueServiceSearchIssuesProcedure: {
[]string{"query"}, "recorded: the caller's own search text",
},
- v1connect.AuthServiceGetAuthenticationRestrictionProcedure: {
+ v1connect.AuthServiceGetAuthenticationInfoProcedure: {
[]string{"workspace"}, "recorded: a workspace resource name",
},
v1connect.IssueServiceGetIssueProcedure: {
diff --git a/backend/api/v1/testdata/mcp_method_classification.md b/backend/api/v1/testdata/mcp_method_classification.md
index 88c9faf735..cd4aba1e59 100644
--- a/backend/api/v1/testdata/mcp_method_classification.md
+++ b/backend/api/v1/testdata/mcp_method_classification.md
@@ -36,7 +36,7 @@ served by no ceiling.
| AuditLogService/ExportAuditLogs | EXCLUDED | ADMINISTERS_THE_WORKSPACE | bb.auditLogs.export |
| AuditLogService/SearchAuditLogs | EXCLUDED | ADMINISTERS_THE_WORKSPACE | bb.auditLogs.search |
| AuthService/ExchangeToken | FORBIDDEN | MINTS_CREDENTIAL | — |
-| AuthService/GetAuthenticationRestriction | READ | — | — |
+| AuthService/GetAuthenticationInfo | READ | — | — |
| AuthService/Login | FORBIDDEN | MINTS_CREDENTIAL | — |
| AuthService/Logout | FORBIDDEN | ENDS_SESSION | — |
| AuthService/Refresh | FORBIDDEN | MINTS_CREDENTIAL | — |
@@ -78,7 +78,7 @@ served by no ceiling.
| IdentityProviderService/CreateIdentityProvider | FORBIDDEN | MINTS_CREDENTIAL_FOR_OTHERS | bb.identityProviders.create |
| IdentityProviderService/DeleteIdentityProvider | EXCLUDED | ADMINISTERS_THE_WORKSPACE | bb.identityProviders.delete |
| IdentityProviderService/GetIdentityProvider | EXCLUDED | ADMINISTERS_THE_WORKSPACE | bb.identityProviders.get |
-| IdentityProviderService/ListIdentityProviders | EXCLUDED | ADMINISTERS_THE_WORKSPACE | — |
+| IdentityProviderService/ListIdentityProviders | EXCLUDED | ADMINISTERS_THE_WORKSPACE | bb.identityProviders.list |
| IdentityProviderService/TestIdentityProvider | FORBIDDEN | MINTS_CREDENTIAL_FOR_OTHERS | bb.identityProviders.update |
| IdentityProviderService/UpdateIdentityProvider | FORBIDDEN | MINTS_CREDENTIAL_FOR_OTHERS | bb.identityProviders.update |
| InstanceRoleService/ListInstanceRoles | READ | — | bb.instanceRoles.list |
diff --git a/backend/common/permission/permission.go b/backend/common/permission/permission.go
index 146e5468b6..c037321621 100644
--- a/backend/common/permission/permission.go
+++ b/backend/common/permission/permission.go
@@ -38,6 +38,7 @@ const (
IdentityProvidersCreate Permission = "bb.identityProviders.create"
IdentityProvidersDelete Permission = "bb.identityProviders.delete"
IdentityProvidersGet Permission = "bb.identityProviders.get"
+ IdentityProvidersList Permission = "bb.identityProviders.list"
IdentityProvidersUpdate Permission = "bb.identityProviders.update"
InstancesCreate Permission = "bb.instances.create"
InstancesDelete Permission = "bb.instances.delete"
diff --git a/backend/common/permission/permission.yaml b/backend/common/permission/permission.yaml
index 6185a30242..befed0e857 100644
--- a/backend/common/permission/permission.yaml
+++ b/backend/common/permission/permission.yaml
@@ -30,6 +30,7 @@ permissions:
- bb.identityProviders.create
- bb.identityProviders.delete
- bb.identityProviders.get
+ - bb.identityProviders.list
- bb.identityProviders.update
- bb.instances.create
- bb.instances.delete
diff --git a/backend/generated-go/v1/auth_service.pb.go b/backend/generated-go/v1/auth_service.pb.go
index 781aa3f2f3..7992bf09d5 100644
--- a/backend/generated-go/v1/auth_service.pb.go
+++ b/backend/generated-go/v1/auth_service.pb.go
@@ -24,7 +24,7 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
-type GetAuthenticationRestrictionRequest struct {
+type GetAuthenticationInfoRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Optional. The workspace whose authentication policy should be returned.
// Format: workspaces/{workspace}
@@ -35,20 +35,20 @@ type GetAuthenticationRestrictionRequest struct {
sizeCache protoimpl.SizeCache
}
-func (x *GetAuthenticationRestrictionRequest) Reset() {
- *x = GetAuthenticationRestrictionRequest{}
+func (x *GetAuthenticationInfoRequest) Reset() {
+ *x = GetAuthenticationInfoRequest{}
mi := &file_v1_auth_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
-func (x *GetAuthenticationRestrictionRequest) String() string {
+func (x *GetAuthenticationInfoRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetAuthenticationRestrictionRequest) ProtoMessage() {}
+func (*GetAuthenticationInfoRequest) ProtoMessage() {}
-func (x *GetAuthenticationRestrictionRequest) ProtoReflect() protoreflect.Message {
+func (x *GetAuthenticationInfoRequest) ProtoReflect() protoreflect.Message {
mi := &file_v1_auth_service_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -60,12 +60,12 @@ func (x *GetAuthenticationRestrictionRequest) ProtoReflect() protoreflect.Messag
return mi.MessageOf(x)
}
-// Deprecated: Use GetAuthenticationRestrictionRequest.ProtoReflect.Descriptor instead.
-func (*GetAuthenticationRestrictionRequest) Descriptor() ([]byte, []int) {
+// Deprecated: Use GetAuthenticationInfoRequest.ProtoReflect.Descriptor instead.
+func (*GetAuthenticationInfoRequest) Descriptor() ([]byte, []int) {
return file_v1_auth_service_proto_rawDescGZIP(), []int{0}
}
-func (x *GetAuthenticationRestrictionRequest) GetWorkspace() string {
+func (x *GetAuthenticationInfoRequest) GetWorkspace() string {
if x != nil {
return x.Workspace
}
@@ -78,9 +78,11 @@ type AuthenticationInfo struct {
// Format: workspaces/{workspace}
Workspace string `protobuf:"bytes,1,opt,name=workspace,proto3" json:"workspace,omitempty"`
// The effective authentication restrictions.
- Restriction *Restriction `protobuf:"bytes,2,opt,name=restriction,proto3" json:"restriction,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
+ Restriction *Restriction `protobuf:"bytes,2,opt,name=restriction,proto3" json:"restriction,omitempty"`
+ // The identity providers the login page renders, in display order.
+ IdentityProviders []*LoginIdentityProvider `protobuf:"bytes,3,rep,name=identity_providers,json=identityProviders,proto3" json:"identity_providers,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *AuthenticationInfo) Reset() {
@@ -127,6 +129,13 @@ func (x *AuthenticationInfo) GetRestriction() *Restriction {
return nil
}
+func (x *AuthenticationInfo) GetIdentityProviders() []*LoginIdentityProvider {
+ if x != nil {
+ return x.IdentityProviders
+ }
+ return nil
+}
+
type Restriction struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Whether self-service user signup is disabled.
@@ -209,6 +218,149 @@ func (x *Restriction) GetPasswordResetEnabled() bool {
return false
}
+// 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.
+type LoginIdentityProvider struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The name of the identity provider.
+ // Format: idps/{idp}
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The type of identity provider protocol.
+ Type IdentityProviderType `protobuf:"varint,2,opt,name=type,proto3,enum=bytebase.v1.IdentityProviderType" json:"type,omitempty"`
+ // The display title of the identity provider.
+ Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
+ // The parameters the browser needs to start the authorization redirect.
+ // Set for OAUTH2 and OIDC, absent for LDAP, whose bind happens server-side.
+ AuthorizationRequest *AuthorizationRequest `protobuf:"bytes,4,opt,name=authorization_request,json=authorizationRequest,proto3" json:"authorization_request,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *LoginIdentityProvider) Reset() {
+ *x = LoginIdentityProvider{}
+ mi := &file_v1_auth_service_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *LoginIdentityProvider) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LoginIdentityProvider) ProtoMessage() {}
+
+func (x *LoginIdentityProvider) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_auth_service_proto_msgTypes[3]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use LoginIdentityProvider.ProtoReflect.Descriptor instead.
+func (*LoginIdentityProvider) Descriptor() ([]byte, []int) {
+ return file_v1_auth_service_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *LoginIdentityProvider) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *LoginIdentityProvider) GetType() IdentityProviderType {
+ if x != nil {
+ return x.Type
+ }
+ return IdentityProviderType_IDENTITY_PROVIDER_TYPE_UNSPECIFIED
+}
+
+func (x *LoginIdentityProvider) GetTitle() string {
+ if x != nil {
+ return x.Title
+ }
+ return ""
+}
+
+func (x *LoginIdentityProvider) GetAuthorizationRequest() *AuthorizationRequest {
+ if x != nil {
+ return x.AuthorizationRequest
+ }
+ return nil
+}
+
+// AuthorizationRequest is what a browser needs to start an SSO redirect.
+type AuthorizationRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The OAuth2 auth_url, or the authorization endpoint from the OIDC issuer's
+ // discovery document.
+ Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
+ // The OAuth2 or OIDC client identifier.
+ ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
+ // The scopes to request.
+ Scopes []string `protobuf:"bytes,3,rep,name=scopes,proto3" json:"scopes,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *AuthorizationRequest) Reset() {
+ *x = AuthorizationRequest{}
+ mi := &file_v1_auth_service_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *AuthorizationRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AuthorizationRequest) ProtoMessage() {}
+
+func (x *AuthorizationRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_auth_service_proto_msgTypes[4]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AuthorizationRequest.ProtoReflect.Descriptor instead.
+func (*AuthorizationRequest) Descriptor() ([]byte, []int) {
+ return file_v1_auth_service_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *AuthorizationRequest) GetEndpoint() string {
+ if x != nil {
+ return x.Endpoint
+ }
+ return ""
+}
+
+func (x *AuthorizationRequest) GetClientId() string {
+ if x != nil {
+ return x.ClientId
+ }
+ return ""
+}
+
+func (x *AuthorizationRequest) GetScopes() []string {
+ if x != nil {
+ return x.Scopes
+ }
+ return nil
+}
+
type LoginRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
// User's email address.
@@ -248,7 +400,7 @@ type LoginRequest struct {
func (x *LoginRequest) Reset() {
*x = LoginRequest{}
- mi := &file_v1_auth_service_proto_msgTypes[3]
+ mi := &file_v1_auth_service_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -260,7 +412,7 @@ func (x *LoginRequest) String() string {
func (*LoginRequest) ProtoMessage() {}
func (x *LoginRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_auth_service_proto_msgTypes[3]
+ mi := &file_v1_auth_service_proto_msgTypes[5]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -273,7 +425,7 @@ func (x *LoginRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.
func (*LoginRequest) Descriptor() ([]byte, []int) {
- return file_v1_auth_service_proto_rawDescGZIP(), []int{3}
+ return file_v1_auth_service_proto_rawDescGZIP(), []int{5}
}
func (x *LoginRequest) GetEmail() string {
@@ -360,7 +512,7 @@ type IdentityProviderContext struct {
func (x *IdentityProviderContext) Reset() {
*x = IdentityProviderContext{}
- mi := &file_v1_auth_service_proto_msgTypes[4]
+ mi := &file_v1_auth_service_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -372,7 +524,7 @@ func (x *IdentityProviderContext) String() string {
func (*IdentityProviderContext) ProtoMessage() {}
func (x *IdentityProviderContext) ProtoReflect() protoreflect.Message {
- mi := &file_v1_auth_service_proto_msgTypes[4]
+ mi := &file_v1_auth_service_proto_msgTypes[6]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -385,7 +537,7 @@ func (x *IdentityProviderContext) ProtoReflect() protoreflect.Message {
// Deprecated: Use IdentityProviderContext.ProtoReflect.Descriptor instead.
func (*IdentityProviderContext) Descriptor() ([]byte, []int) {
- return file_v1_auth_service_proto_rawDescGZIP(), []int{4}
+ return file_v1_auth_service_proto_rawDescGZIP(), []int{6}
}
func (x *IdentityProviderContext) GetContext() isIdentityProviderContext_Context {
@@ -442,7 +594,7 @@ type OAuth2IdentityProviderContext struct {
func (x *OAuth2IdentityProviderContext) Reset() {
*x = OAuth2IdentityProviderContext{}
- mi := &file_v1_auth_service_proto_msgTypes[5]
+ mi := &file_v1_auth_service_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -454,7 +606,7 @@ func (x *OAuth2IdentityProviderContext) String() string {
func (*OAuth2IdentityProviderContext) ProtoMessage() {}
func (x *OAuth2IdentityProviderContext) ProtoReflect() protoreflect.Message {
- mi := &file_v1_auth_service_proto_msgTypes[5]
+ mi := &file_v1_auth_service_proto_msgTypes[7]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -467,7 +619,7 @@ func (x *OAuth2IdentityProviderContext) ProtoReflect() protoreflect.Message {
// Deprecated: Use OAuth2IdentityProviderContext.ProtoReflect.Descriptor instead.
func (*OAuth2IdentityProviderContext) Descriptor() ([]byte, []int) {
- return file_v1_auth_service_proto_rawDescGZIP(), []int{5}
+ return file_v1_auth_service_proto_rawDescGZIP(), []int{7}
}
func (x *OAuth2IdentityProviderContext) GetCode() string {
@@ -488,7 +640,7 @@ type OIDCIdentityProviderContext struct {
func (x *OIDCIdentityProviderContext) Reset() {
*x = OIDCIdentityProviderContext{}
- mi := &file_v1_auth_service_proto_msgTypes[6]
+ mi := &file_v1_auth_service_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -500,7 +652,7 @@ func (x *OIDCIdentityProviderContext) String() string {
func (*OIDCIdentityProviderContext) ProtoMessage() {}
func (x *OIDCIdentityProviderContext) ProtoReflect() protoreflect.Message {
- mi := &file_v1_auth_service_proto_msgTypes[6]
+ mi := &file_v1_auth_service_proto_msgTypes[8]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -513,7 +665,7 @@ func (x *OIDCIdentityProviderContext) ProtoReflect() protoreflect.Message {
// Deprecated: Use OIDCIdentityProviderContext.ProtoReflect.Descriptor instead.
func (*OIDCIdentityProviderContext) Descriptor() ([]byte, []int) {
- return file_v1_auth_service_proto_rawDescGZIP(), []int{6}
+ return file_v1_auth_service_proto_rawDescGZIP(), []int{8}
}
func (x *OIDCIdentityProviderContext) GetCode() string {
@@ -540,7 +692,7 @@ type LoginResponse struct {
func (x *LoginResponse) Reset() {
*x = LoginResponse{}
- mi := &file_v1_auth_service_proto_msgTypes[7]
+ mi := &file_v1_auth_service_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -552,7 +704,7 @@ func (x *LoginResponse) String() string {
func (*LoginResponse) ProtoMessage() {}
func (x *LoginResponse) ProtoReflect() protoreflect.Message {
- mi := &file_v1_auth_service_proto_msgTypes[7]
+ mi := &file_v1_auth_service_proto_msgTypes[9]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -565,7 +717,7 @@ func (x *LoginResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.
func (*LoginResponse) Descriptor() ([]byte, []int) {
- return file_v1_auth_service_proto_rawDescGZIP(), []int{7}
+ return file_v1_auth_service_proto_rawDescGZIP(), []int{9}
}
func (x *LoginResponse) GetToken() string {
@@ -605,7 +757,7 @@ type LogoutRequest struct {
func (x *LogoutRequest) Reset() {
*x = LogoutRequest{}
- mi := &file_v1_auth_service_proto_msgTypes[8]
+ mi := &file_v1_auth_service_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -617,7 +769,7 @@ func (x *LogoutRequest) String() string {
func (*LogoutRequest) ProtoMessage() {}
func (x *LogoutRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_auth_service_proto_msgTypes[8]
+ mi := &file_v1_auth_service_proto_msgTypes[10]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -630,7 +782,7 @@ func (x *LogoutRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use LogoutRequest.ProtoReflect.Descriptor instead.
func (*LogoutRequest) Descriptor() ([]byte, []int) {
- return file_v1_auth_service_proto_rawDescGZIP(), []int{8}
+ return file_v1_auth_service_proto_rawDescGZIP(), []int{10}
}
type ExchangeTokenRequest struct {
@@ -646,7 +798,7 @@ type ExchangeTokenRequest struct {
func (x *ExchangeTokenRequest) Reset() {
*x = ExchangeTokenRequest{}
- mi := &file_v1_auth_service_proto_msgTypes[9]
+ mi := &file_v1_auth_service_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -658,7 +810,7 @@ func (x *ExchangeTokenRequest) String() string {
func (*ExchangeTokenRequest) ProtoMessage() {}
func (x *ExchangeTokenRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_auth_service_proto_msgTypes[9]
+ mi := &file_v1_auth_service_proto_msgTypes[11]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -671,7 +823,7 @@ func (x *ExchangeTokenRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ExchangeTokenRequest.ProtoReflect.Descriptor instead.
func (*ExchangeTokenRequest) Descriptor() ([]byte, []int) {
- return file_v1_auth_service_proto_rawDescGZIP(), []int{9}
+ return file_v1_auth_service_proto_rawDescGZIP(), []int{11}
}
func (x *ExchangeTokenRequest) GetToken() string {
@@ -698,7 +850,7 @@ type ExchangeTokenResponse struct {
func (x *ExchangeTokenResponse) Reset() {
*x = ExchangeTokenResponse{}
- mi := &file_v1_auth_service_proto_msgTypes[10]
+ mi := &file_v1_auth_service_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -710,7 +862,7 @@ func (x *ExchangeTokenResponse) String() string {
func (*ExchangeTokenResponse) ProtoMessage() {}
func (x *ExchangeTokenResponse) ProtoReflect() protoreflect.Message {
- mi := &file_v1_auth_service_proto_msgTypes[10]
+ mi := &file_v1_auth_service_proto_msgTypes[12]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -723,7 +875,7 @@ func (x *ExchangeTokenResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ExchangeTokenResponse.ProtoReflect.Descriptor instead.
func (*ExchangeTokenResponse) Descriptor() ([]byte, []int) {
- return file_v1_auth_service_proto_rawDescGZIP(), []int{10}
+ return file_v1_auth_service_proto_rawDescGZIP(), []int{12}
}
func (x *ExchangeTokenResponse) GetAccessToken() string {
@@ -749,7 +901,7 @@ type SignupRequest struct {
func (x *SignupRequest) Reset() {
*x = SignupRequest{}
- mi := &file_v1_auth_service_proto_msgTypes[11]
+ mi := &file_v1_auth_service_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -761,7 +913,7 @@ func (x *SignupRequest) String() string {
func (*SignupRequest) ProtoMessage() {}
func (x *SignupRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_auth_service_proto_msgTypes[11]
+ mi := &file_v1_auth_service_proto_msgTypes[13]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -774,7 +926,7 @@ func (x *SignupRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use SignupRequest.ProtoReflect.Descriptor instead.
func (*SignupRequest) Descriptor() ([]byte, []int) {
- return file_v1_auth_service_proto_rawDescGZIP(), []int{11}
+ return file_v1_auth_service_proto_rawDescGZIP(), []int{13}
}
func (x *SignupRequest) GetEmail() string {
@@ -807,7 +959,7 @@ type RefreshRequest struct {
func (x *RefreshRequest) Reset() {
*x = RefreshRequest{}
- mi := &file_v1_auth_service_proto_msgTypes[12]
+ mi := &file_v1_auth_service_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -819,7 +971,7 @@ func (x *RefreshRequest) String() string {
func (*RefreshRequest) ProtoMessage() {}
func (x *RefreshRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_auth_service_proto_msgTypes[12]
+ mi := &file_v1_auth_service_proto_msgTypes[14]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -832,7 +984,7 @@ func (x *RefreshRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use RefreshRequest.ProtoReflect.Descriptor instead.
func (*RefreshRequest) Descriptor() ([]byte, []int) {
- return file_v1_auth_service_proto_rawDescGZIP(), []int{12}
+ return file_v1_auth_service_proto_rawDescGZIP(), []int{14}
}
// Response from refreshing the access token.
@@ -844,7 +996,7 @@ type RefreshResponse struct {
func (x *RefreshResponse) Reset() {
*x = RefreshResponse{}
- mi := &file_v1_auth_service_proto_msgTypes[13]
+ mi := &file_v1_auth_service_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -856,7 +1008,7 @@ func (x *RefreshResponse) String() string {
func (*RefreshResponse) ProtoMessage() {}
func (x *RefreshResponse) ProtoReflect() protoreflect.Message {
- mi := &file_v1_auth_service_proto_msgTypes[13]
+ mi := &file_v1_auth_service_proto_msgTypes[15]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -869,7 +1021,7 @@ func (x *RefreshResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use RefreshResponse.ProtoReflect.Descriptor instead.
func (*RefreshResponse) Descriptor() ([]byte, []int) {
- return file_v1_auth_service_proto_rawDescGZIP(), []int{13}
+ return file_v1_auth_service_proto_rawDescGZIP(), []int{15}
}
type RequestPasswordResetRequest struct {
@@ -889,7 +1041,7 @@ type RequestPasswordResetRequest struct {
func (x *RequestPasswordResetRequest) Reset() {
*x = RequestPasswordResetRequest{}
- mi := &file_v1_auth_service_proto_msgTypes[14]
+ mi := &file_v1_auth_service_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -901,7 +1053,7 @@ func (x *RequestPasswordResetRequest) String() string {
func (*RequestPasswordResetRequest) ProtoMessage() {}
func (x *RequestPasswordResetRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_auth_service_proto_msgTypes[14]
+ mi := &file_v1_auth_service_proto_msgTypes[16]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -914,7 +1066,7 @@ func (x *RequestPasswordResetRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use RequestPasswordResetRequest.ProtoReflect.Descriptor instead.
func (*RequestPasswordResetRequest) Descriptor() ([]byte, []int) {
- return file_v1_auth_service_proto_rawDescGZIP(), []int{14}
+ return file_v1_auth_service_proto_rawDescGZIP(), []int{16}
}
func (x *RequestPasswordResetRequest) GetEmail() string {
@@ -947,7 +1099,7 @@ type ResetPasswordRequest struct {
func (x *ResetPasswordRequest) Reset() {
*x = ResetPasswordRequest{}
- mi := &file_v1_auth_service_proto_msgTypes[15]
+ mi := &file_v1_auth_service_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -959,7 +1111,7 @@ func (x *ResetPasswordRequest) String() string {
func (*ResetPasswordRequest) ProtoMessage() {}
func (x *ResetPasswordRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_auth_service_proto_msgTypes[15]
+ mi := &file_v1_auth_service_proto_msgTypes[17]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -972,7 +1124,7 @@ func (x *ResetPasswordRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ResetPasswordRequest.ProtoReflect.Descriptor instead.
func (*ResetPasswordRequest) Descriptor() ([]byte, []int) {
- return file_v1_auth_service_proto_rawDescGZIP(), []int{15}
+ return file_v1_auth_service_proto_rawDescGZIP(), []int{17}
}
func (x *ResetPasswordRequest) GetEmail() string {
@@ -1013,7 +1165,7 @@ type SendEmailLoginCodeRequest struct {
func (x *SendEmailLoginCodeRequest) Reset() {
*x = SendEmailLoginCodeRequest{}
- mi := &file_v1_auth_service_proto_msgTypes[16]
+ mi := &file_v1_auth_service_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1025,7 +1177,7 @@ func (x *SendEmailLoginCodeRequest) String() string {
func (*SendEmailLoginCodeRequest) ProtoMessage() {}
func (x *SendEmailLoginCodeRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_auth_service_proto_msgTypes[16]
+ mi := &file_v1_auth_service_proto_msgTypes[18]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1038,7 +1190,7 @@ func (x *SendEmailLoginCodeRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use SendEmailLoginCodeRequest.ProtoReflect.Descriptor instead.
func (*SendEmailLoginCodeRequest) Descriptor() ([]byte, []int) {
- return file_v1_auth_service_proto_rawDescGZIP(), []int{16}
+ return file_v1_auth_service_proto_rawDescGZIP(), []int{18}
}
func (x *SendEmailLoginCodeRequest) GetEmail() string {
@@ -1074,7 +1226,7 @@ type SwitchWorkspaceRequest struct {
func (x *SwitchWorkspaceRequest) Reset() {
*x = SwitchWorkspaceRequest{}
- mi := &file_v1_auth_service_proto_msgTypes[17]
+ mi := &file_v1_auth_service_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1086,7 +1238,7 @@ func (x *SwitchWorkspaceRequest) String() string {
func (*SwitchWorkspaceRequest) ProtoMessage() {}
func (x *SwitchWorkspaceRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_auth_service_proto_msgTypes[17]
+ mi := &file_v1_auth_service_proto_msgTypes[19]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1099,7 +1251,7 @@ func (x *SwitchWorkspaceRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use SwitchWorkspaceRequest.ProtoReflect.Descriptor instead.
func (*SwitchWorkspaceRequest) Descriptor() ([]byte, []int) {
- return file_v1_auth_service_proto_rawDescGZIP(), []int{17}
+ return file_v1_auth_service_proto_rawDescGZIP(), []int{19}
}
func (x *SwitchWorkspaceRequest) GetWorkspace() string {
@@ -1141,19 +1293,29 @@ var File_v1_auth_service_proto protoreflect.FileDescriptor
const file_v1_auth_service_proto_rawDesc = "" +
"\n" +
- "\x15v1/auth_service.proto\x12\vbytebase.v1\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x13v1/annotation.proto\x1a\x18v1/setting_service.proto\x1a\x15v1/user_service.proto\"`\n" +
- "#GetAuthenticationRestrictionRequest\x129\n" +
+ "\x15v1/auth_service.proto\x12\vbytebase.v1\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x13v1/annotation.proto\x1a\x14v1/idp_service.proto\x1a\x18v1/setting_service.proto\x1a\x15v1/user_service.proto\"Y\n" +
+ "\x1cGetAuthenticationInfoRequest\x129\n" +
"\tworkspace\x18\x01 \x01(\tB\x1b\xfaA\x18\n" +
- "\x16bytebase.com/WorkspaceR\tworkspace\"x\n" +
+ "\x16bytebase.com/WorkspaceR\tworkspace\"\xd0\x01\n" +
"\x12AuthenticationInfo\x12!\n" +
"\tworkspace\x18\x01 \x01(\tB\x03\xe0A\x03R\tworkspace\x12?\n" +
- "\vrestriction\x18\x02 \x01(\v2\x18.bytebase.v1.RestrictionB\x03\xe0A\x03R\vrestriction\"\xe3\x02\n" +
+ "\vrestriction\x18\x02 \x01(\v2\x18.bytebase.v1.RestrictionB\x03\xe0A\x03R\vrestriction\x12V\n" +
+ "\x12identity_providers\x18\x03 \x03(\v2\".bytebase.v1.LoginIdentityProviderB\x03\xe0A\x03R\x11identityProviders\"\xe3\x02\n" +
"\vRestriction\x12,\n" +
"\x0fdisallow_signup\x18\x01 \x01(\bB\x03\xe0A\x03R\x0edisallowSignup\x12=\n" +
"\x18disallow_password_signin\x18\x02 \x01(\bB\x03\xe0A\x03R\x16disallowPasswordSignin\x12p\n" +
"\x14password_restriction\x18\x03 \x01(\v28.bytebase.v1.WorkspaceProfileSetting.PasswordRestrictionB\x03\xe0A\x03R\x13passwordRestriction\x12:\n" +
"\x17allow_email_code_signin\x18\x04 \x01(\bB\x03\xe0A\x03R\x14allowEmailCodeSignin\x129\n" +
- "\x16password_reset_enabled\x18\x05 \x01(\bB\x03\xe0A\x03R\x14passwordResetEnabled\"\xa0\x04\n" +
+ "\x16password_reset_enabled\x18\x05 \x01(\bB\x03\xe0A\x03R\x14passwordResetEnabled\"\xd0\x01\n" +
+ "\x15LoginIdentityProvider\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x125\n" +
+ "\x04type\x18\x02 \x01(\x0e2!.bytebase.v1.IdentityProviderTypeR\x04type\x12\x14\n" +
+ "\x05title\x18\x03 \x01(\tR\x05title\x12V\n" +
+ "\x15authorization_request\x18\x04 \x01(\v2!.bytebase.v1.AuthorizationRequestR\x14authorizationRequest\"g\n" +
+ "\x14AuthorizationRequest\x12\x1a\n" +
+ "\bendpoint\x18\x01 \x01(\tR\bendpoint\x12\x1b\n" +
+ "\tclient_id\x18\x02 \x01(\tR\bclientId\x12\x16\n" +
+ "\x06scopes\x18\x03 \x03(\tR\x06scopes\"\xa0\x04\n" +
"\fLoginRequest\x12\x1e\n" +
"\x05email\x18\x01 \x01(\tB\b\xbaH\x05r\x03\x18\xfe\x01R\x05email\x12(\n" +
"\bpassword\x18\x02 \x01(\tB\f\xbaH\x05r\x03(\x80\x04\xd0\xea0\x01R\bpassword\x12\x10\n" +
@@ -1222,10 +1384,10 @@ const file_v1_auth_service_proto_rawDesc = "" +
"\x0emfa_temp_token\x18\x05 \x01(\tB\f\xbaH\x05r\x03\x18\x80 \xd0\xea0\x01H\x02R\fmfaTempToken\x88\x01\x01B\v\n" +
"\t_otp_codeB\x10\n" +
"\x0e_recovery_codeB\x11\n" +
- "\x0f_mfa_temp_token2\xc2\n" +
+ "\x0f_mfa_temp_token2\xa6\n" +
"\n" +
- "\vAuthService\x12\xcb\x01\n" +
- "\x1cGetAuthenticationRestriction\x120.bytebase.v1.GetAuthenticationRestrictionRequest\x1a\x1f.bytebase.v1.AuthenticationInfo\"X\xdaA\x00\x80\xea0\x01\xa0\xea0\x01\x82\xd3\xe4\x93\x02GZ/\x12-/v1/{workspace=workspaces/*}/auth/restriction\x12\x14/v1/auth/restriction\x12i\n" +
+ "\vAuthService\x12\xaf\x01\n" +
+ "\x15GetAuthenticationInfo\x12).bytebase.v1.GetAuthenticationInfoRequest\x1a\x1f.bytebase.v1.AuthenticationInfo\"J\xdaA\x00\x80\xea0\x01\xa0\xea0\x01\x82\xd3\xe4\x93\x029Z(\x12&/v1/{workspace=workspaces/*}/auth/info\x12\r/v1/auth/info\x12i\n" +
"\x05Login\x12\x19.bytebase.v1.LoginRequest\x1a\x1a.bytebase.v1.LoginResponse\")\x80\xea0\x01\x98\xea0\x01\xa0\xea0\x03\xa8\xea0\x01\x82\xd3\xe4\x93\x02\x13:\x01*\"\x0e/v1/auth/login\x12h\n" +
"\x06Logout\x12\x1a.bytebase.v1.LogoutRequest\x1a\x16.google.protobuf.Empty\"*\x80\xea0\x01\x98\xea0\x01\xa0\xea0\x03\xa8\xea0\x04\x82\xd3\xe4\x93\x02\x14:\x01*\"\x0f/v1/auth/logout\x12\x89\x01\n" +
"\rExchangeToken\x12!.bytebase.v1.ExchangeTokenRequest\x1a\".bytebase.v1.ExchangeTokenResponse\"1\x80\xea0\x01\x98\xea0\x01\xa0\xea0\x03\xa8\xea0\x01\x82\xd3\xe4\x93\x02\x1b:\x01*\"\x16/v1/auth:exchangeToken\x12l\n" +
@@ -1249,62 +1411,68 @@ func file_v1_auth_service_proto_rawDescGZIP() []byte {
return file_v1_auth_service_proto_rawDescData
}
-var file_v1_auth_service_proto_msgTypes = make([]protoimpl.MessageInfo, 18)
+var file_v1_auth_service_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
var file_v1_auth_service_proto_goTypes = []any{
- (*GetAuthenticationRestrictionRequest)(nil), // 0: bytebase.v1.GetAuthenticationRestrictionRequest
+ (*GetAuthenticationInfoRequest)(nil), // 0: bytebase.v1.GetAuthenticationInfoRequest
(*AuthenticationInfo)(nil), // 1: bytebase.v1.AuthenticationInfo
(*Restriction)(nil), // 2: bytebase.v1.Restriction
- (*LoginRequest)(nil), // 3: bytebase.v1.LoginRequest
- (*IdentityProviderContext)(nil), // 4: bytebase.v1.IdentityProviderContext
- (*OAuth2IdentityProviderContext)(nil), // 5: bytebase.v1.OAuth2IdentityProviderContext
- (*OIDCIdentityProviderContext)(nil), // 6: bytebase.v1.OIDCIdentityProviderContext
- (*LoginResponse)(nil), // 7: bytebase.v1.LoginResponse
- (*LogoutRequest)(nil), // 8: bytebase.v1.LogoutRequest
- (*ExchangeTokenRequest)(nil), // 9: bytebase.v1.ExchangeTokenRequest
- (*ExchangeTokenResponse)(nil), // 10: bytebase.v1.ExchangeTokenResponse
- (*SignupRequest)(nil), // 11: bytebase.v1.SignupRequest
- (*RefreshRequest)(nil), // 12: bytebase.v1.RefreshRequest
- (*RefreshResponse)(nil), // 13: bytebase.v1.RefreshResponse
- (*RequestPasswordResetRequest)(nil), // 14: bytebase.v1.RequestPasswordResetRequest
- (*ResetPasswordRequest)(nil), // 15: bytebase.v1.ResetPasswordRequest
- (*SendEmailLoginCodeRequest)(nil), // 16: bytebase.v1.SendEmailLoginCodeRequest
- (*SwitchWorkspaceRequest)(nil), // 17: bytebase.v1.SwitchWorkspaceRequest
- (*WorkspaceProfileSetting_PasswordRestriction)(nil), // 18: bytebase.v1.WorkspaceProfileSetting.PasswordRestriction
- (*User)(nil), // 19: bytebase.v1.User
- (*emptypb.Empty)(nil), // 20: google.protobuf.Empty
+ (*LoginIdentityProvider)(nil), // 3: bytebase.v1.LoginIdentityProvider
+ (*AuthorizationRequest)(nil), // 4: bytebase.v1.AuthorizationRequest
+ (*LoginRequest)(nil), // 5: bytebase.v1.LoginRequest
+ (*IdentityProviderContext)(nil), // 6: bytebase.v1.IdentityProviderContext
+ (*OAuth2IdentityProviderContext)(nil), // 7: bytebase.v1.OAuth2IdentityProviderContext
+ (*OIDCIdentityProviderContext)(nil), // 8: bytebase.v1.OIDCIdentityProviderContext
+ (*LoginResponse)(nil), // 9: bytebase.v1.LoginResponse
+ (*LogoutRequest)(nil), // 10: bytebase.v1.LogoutRequest
+ (*ExchangeTokenRequest)(nil), // 11: bytebase.v1.ExchangeTokenRequest
+ (*ExchangeTokenResponse)(nil), // 12: bytebase.v1.ExchangeTokenResponse
+ (*SignupRequest)(nil), // 13: bytebase.v1.SignupRequest
+ (*RefreshRequest)(nil), // 14: bytebase.v1.RefreshRequest
+ (*RefreshResponse)(nil), // 15: bytebase.v1.RefreshResponse
+ (*RequestPasswordResetRequest)(nil), // 16: bytebase.v1.RequestPasswordResetRequest
+ (*ResetPasswordRequest)(nil), // 17: bytebase.v1.ResetPasswordRequest
+ (*SendEmailLoginCodeRequest)(nil), // 18: bytebase.v1.SendEmailLoginCodeRequest
+ (*SwitchWorkspaceRequest)(nil), // 19: bytebase.v1.SwitchWorkspaceRequest
+ (*WorkspaceProfileSetting_PasswordRestriction)(nil), // 20: bytebase.v1.WorkspaceProfileSetting.PasswordRestriction
+ (IdentityProviderType)(0), // 21: bytebase.v1.IdentityProviderType
+ (*User)(nil), // 22: bytebase.v1.User
+ (*emptypb.Empty)(nil), // 23: google.protobuf.Empty
}
var file_v1_auth_service_proto_depIdxs = []int32{
2, // 0: bytebase.v1.AuthenticationInfo.restriction:type_name -> bytebase.v1.Restriction
- 18, // 1: bytebase.v1.Restriction.password_restriction:type_name -> bytebase.v1.WorkspaceProfileSetting.PasswordRestriction
- 4, // 2: bytebase.v1.LoginRequest.idp_context:type_name -> bytebase.v1.IdentityProviderContext
- 5, // 3: bytebase.v1.IdentityProviderContext.oauth2_context:type_name -> bytebase.v1.OAuth2IdentityProviderContext
- 6, // 4: bytebase.v1.IdentityProviderContext.oidc_context:type_name -> bytebase.v1.OIDCIdentityProviderContext
- 19, // 5: bytebase.v1.LoginResponse.user:type_name -> bytebase.v1.User
- 0, // 6: bytebase.v1.AuthService.GetAuthenticationRestriction:input_type -> bytebase.v1.GetAuthenticationRestrictionRequest
- 3, // 7: bytebase.v1.AuthService.Login:input_type -> bytebase.v1.LoginRequest
- 8, // 8: bytebase.v1.AuthService.Logout:input_type -> bytebase.v1.LogoutRequest
- 9, // 9: bytebase.v1.AuthService.ExchangeToken:input_type -> bytebase.v1.ExchangeTokenRequest
- 11, // 10: bytebase.v1.AuthService.Signup:input_type -> bytebase.v1.SignupRequest
- 12, // 11: bytebase.v1.AuthService.Refresh:input_type -> bytebase.v1.RefreshRequest
- 17, // 12: bytebase.v1.AuthService.SwitchWorkspace:input_type -> bytebase.v1.SwitchWorkspaceRequest
- 14, // 13: bytebase.v1.AuthService.RequestPasswordReset:input_type -> bytebase.v1.RequestPasswordResetRequest
- 15, // 14: bytebase.v1.AuthService.ResetPassword:input_type -> bytebase.v1.ResetPasswordRequest
- 16, // 15: bytebase.v1.AuthService.SendEmailLoginCode:input_type -> bytebase.v1.SendEmailLoginCodeRequest
- 1, // 16: bytebase.v1.AuthService.GetAuthenticationRestriction:output_type -> bytebase.v1.AuthenticationInfo
- 7, // 17: bytebase.v1.AuthService.Login:output_type -> bytebase.v1.LoginResponse
- 20, // 18: bytebase.v1.AuthService.Logout:output_type -> google.protobuf.Empty
- 10, // 19: bytebase.v1.AuthService.ExchangeToken:output_type -> bytebase.v1.ExchangeTokenResponse
- 7, // 20: bytebase.v1.AuthService.Signup:output_type -> bytebase.v1.LoginResponse
- 13, // 21: bytebase.v1.AuthService.Refresh:output_type -> bytebase.v1.RefreshResponse
- 7, // 22: bytebase.v1.AuthService.SwitchWorkspace:output_type -> bytebase.v1.LoginResponse
- 20, // 23: bytebase.v1.AuthService.RequestPasswordReset:output_type -> google.protobuf.Empty
- 20, // 24: bytebase.v1.AuthService.ResetPassword:output_type -> google.protobuf.Empty
- 20, // 25: bytebase.v1.AuthService.SendEmailLoginCode:output_type -> google.protobuf.Empty
- 16, // [16:26] is the sub-list for method output_type
- 6, // [6:16] is the sub-list for method input_type
- 6, // [6:6] is the sub-list for extension type_name
- 6, // [6:6] is the sub-list for extension extendee
- 0, // [0:6] is the sub-list for field type_name
+ 3, // 1: bytebase.v1.AuthenticationInfo.identity_providers:type_name -> bytebase.v1.LoginIdentityProvider
+ 20, // 2: bytebase.v1.Restriction.password_restriction:type_name -> bytebase.v1.WorkspaceProfileSetting.PasswordRestriction
+ 21, // 3: bytebase.v1.LoginIdentityProvider.type:type_name -> bytebase.v1.IdentityProviderType
+ 4, // 4: bytebase.v1.LoginIdentityProvider.authorization_request:type_name -> bytebase.v1.AuthorizationRequest
+ 6, // 5: bytebase.v1.LoginRequest.idp_context:type_name -> bytebase.v1.IdentityProviderContext
+ 7, // 6: bytebase.v1.IdentityProviderContext.oauth2_context:type_name -> bytebase.v1.OAuth2IdentityProviderContext
+ 8, // 7: bytebase.v1.IdentityProviderContext.oidc_context:type_name -> bytebase.v1.OIDCIdentityProviderContext
+ 22, // 8: bytebase.v1.LoginResponse.user:type_name -> bytebase.v1.User
+ 0, // 9: bytebase.v1.AuthService.GetAuthenticationInfo:input_type -> bytebase.v1.GetAuthenticationInfoRequest
+ 5, // 10: bytebase.v1.AuthService.Login:input_type -> bytebase.v1.LoginRequest
+ 10, // 11: bytebase.v1.AuthService.Logout:input_type -> bytebase.v1.LogoutRequest
+ 11, // 12: bytebase.v1.AuthService.ExchangeToken:input_type -> bytebase.v1.ExchangeTokenRequest
+ 13, // 13: bytebase.v1.AuthService.Signup:input_type -> bytebase.v1.SignupRequest
+ 14, // 14: bytebase.v1.AuthService.Refresh:input_type -> bytebase.v1.RefreshRequest
+ 19, // 15: bytebase.v1.AuthService.SwitchWorkspace:input_type -> bytebase.v1.SwitchWorkspaceRequest
+ 16, // 16: bytebase.v1.AuthService.RequestPasswordReset:input_type -> bytebase.v1.RequestPasswordResetRequest
+ 17, // 17: bytebase.v1.AuthService.ResetPassword:input_type -> bytebase.v1.ResetPasswordRequest
+ 18, // 18: bytebase.v1.AuthService.SendEmailLoginCode:input_type -> bytebase.v1.SendEmailLoginCodeRequest
+ 1, // 19: bytebase.v1.AuthService.GetAuthenticationInfo:output_type -> bytebase.v1.AuthenticationInfo
+ 9, // 20: bytebase.v1.AuthService.Login:output_type -> bytebase.v1.LoginResponse
+ 23, // 21: bytebase.v1.AuthService.Logout:output_type -> google.protobuf.Empty
+ 12, // 22: bytebase.v1.AuthService.ExchangeToken:output_type -> bytebase.v1.ExchangeTokenResponse
+ 9, // 23: bytebase.v1.AuthService.Signup:output_type -> bytebase.v1.LoginResponse
+ 15, // 24: bytebase.v1.AuthService.Refresh:output_type -> bytebase.v1.RefreshResponse
+ 9, // 25: bytebase.v1.AuthService.SwitchWorkspace:output_type -> bytebase.v1.LoginResponse
+ 23, // 26: bytebase.v1.AuthService.RequestPasswordReset:output_type -> google.protobuf.Empty
+ 23, // 27: bytebase.v1.AuthService.ResetPassword:output_type -> google.protobuf.Empty
+ 23, // 28: bytebase.v1.AuthService.SendEmailLoginCode:output_type -> google.protobuf.Empty
+ 19, // [19:29] is the sub-list for method output_type
+ 9, // [9:19] is the sub-list for method input_type
+ 9, // [9:9] is the sub-list for extension type_name
+ 9, // [9:9] is the sub-list for extension extendee
+ 0, // [0:9] is the sub-list for field type_name
}
func init() { file_v1_auth_service_proto_init() }
@@ -1313,24 +1481,25 @@ func file_v1_auth_service_proto_init() {
return
}
file_v1_annotation_proto_init()
+ file_v1_idp_service_proto_init()
file_v1_setting_service_proto_init()
file_v1_user_service_proto_init()
- file_v1_auth_service_proto_msgTypes[3].OneofWrappers = []any{}
- file_v1_auth_service_proto_msgTypes[4].OneofWrappers = []any{
+ file_v1_auth_service_proto_msgTypes[5].OneofWrappers = []any{}
+ file_v1_auth_service_proto_msgTypes[6].OneofWrappers = []any{
(*IdentityProviderContext_Oauth2Context)(nil),
(*IdentityProviderContext_OidcContext)(nil),
}
- file_v1_auth_service_proto_msgTypes[7].OneofWrappers = []any{}
- file_v1_auth_service_proto_msgTypes[14].OneofWrappers = []any{}
+ file_v1_auth_service_proto_msgTypes[9].OneofWrappers = []any{}
file_v1_auth_service_proto_msgTypes[16].OneofWrappers = []any{}
- file_v1_auth_service_proto_msgTypes[17].OneofWrappers = []any{}
+ file_v1_auth_service_proto_msgTypes[18].OneofWrappers = []any{}
+ file_v1_auth_service_proto_msgTypes[19].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_auth_service_proto_rawDesc), len(file_v1_auth_service_proto_rawDesc)),
NumEnums: 0,
- NumMessages: 18,
+ NumMessages: 20,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/backend/generated-go/v1/auth_service.pb.gw.go b/backend/generated-go/v1/auth_service.pb.gw.go
index 45c2506991..e82ad9fd4d 100644
--- a/backend/generated-go/v1/auth_service.pb.gw.go
+++ b/backend/generated-go/v1/auth_service.pb.gw.go
@@ -35,44 +35,44 @@ var (
_ = metadata.Join
)
-var filter_AuthService_GetAuthenticationRestriction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
+var filter_AuthService_GetAuthenticationInfo_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
-func request_AuthService_GetAuthenticationRestriction_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+func request_AuthService_GetAuthenticationInfo_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
- protoReq GetAuthenticationRestrictionRequest
+ protoReq GetAuthenticationInfoRequest
metadata runtime.ServerMetadata
)
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuthService_GetAuthenticationRestriction_0); err != nil {
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuthService_GetAuthenticationInfo_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if req.Body != nil {
_, _ = io.Copy(io.Discard, req.Body)
}
- msg, err := client.GetAuthenticationRestriction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.GetAuthenticationInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_AuthService_GetAuthenticationRestriction_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+func local_request_AuthService_GetAuthenticationInfo_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
- protoReq GetAuthenticationRestrictionRequest
+ protoReq GetAuthenticationInfoRequest
metadata runtime.ServerMetadata
)
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuthService_GetAuthenticationRestriction_0); err != nil {
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuthService_GetAuthenticationInfo_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := server.GetAuthenticationRestriction(ctx, &protoReq)
+ msg, err := server.GetAuthenticationInfo(ctx, &protoReq)
return msg, metadata, err
}
-func request_AuthService_GetAuthenticationRestriction_1(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+func request_AuthService_GetAuthenticationInfo_1(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
- protoReq GetAuthenticationRestrictionRequest
+ protoReq GetAuthenticationInfoRequest
metadata runtime.ServerMetadata
err error
)
@@ -87,13 +87,13 @@ func request_AuthService_GetAuthenticationRestriction_1(ctx context.Context, mar
if req.Body != nil {
_, _ = io.Copy(io.Discard, req.Body)
}
- msg, err := client.GetAuthenticationRestriction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.GetAuthenticationInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_AuthService_GetAuthenticationRestriction_1(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+func local_request_AuthService_GetAuthenticationInfo_1(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
- protoReq GetAuthenticationRestrictionRequest
+ protoReq GetAuthenticationInfoRequest
metadata runtime.ServerMetadata
err error
)
@@ -105,7 +105,7 @@ func local_request_AuthService_GetAuthenticationRestriction_1(ctx context.Contex
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "workspace", err)
}
- msg, err := server.GetAuthenticationRestriction(ctx, &protoReq)
+ msg, err := server.GetAuthenticationInfo(ctx, &protoReq)
return msg, metadata, err
}
@@ -358,45 +358,45 @@ func local_request_AuthService_SendEmailLoginCode_0(ctx context.Context, marshal
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthServiceHandlerFromEndpoint instead.
// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServiceServer) error {
- mux.Handle(http.MethodGet, pattern_AuthService_GetAuthenticationRestriction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle(http.MethodGet, pattern_AuthService_GetAuthenticationInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.AuthService/GetAuthenticationRestriction", runtime.WithHTTPPathPattern("/v1/auth/restriction"))
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.AuthService/GetAuthenticationInfo", runtime.WithHTTPPathPattern("/v1/auth/info"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_AuthService_GetAuthenticationRestriction_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_AuthService_GetAuthenticationInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_AuthService_GetAuthenticationRestriction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_AuthService_GetAuthenticationInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle(http.MethodGet, pattern_AuthService_GetAuthenticationRestriction_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle(http.MethodGet, pattern_AuthService_GetAuthenticationInfo_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.AuthService/GetAuthenticationRestriction", runtime.WithHTTPPathPattern("/v1/{workspace=workspaces/*}/auth/restriction"))
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.AuthService/GetAuthenticationInfo", runtime.WithHTTPPathPattern("/v1/{workspace=workspaces/*}/auth/info"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_AuthService_GetAuthenticationRestriction_1(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_AuthService_GetAuthenticationInfo_1(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_AuthService_GetAuthenticationRestriction_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_AuthService_GetAuthenticationInfo_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle(http.MethodPost, pattern_AuthService_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
@@ -618,39 +618,39 @@ func RegisterAuthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "AuthServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthServiceClient) error {
- mux.Handle(http.MethodGet, pattern_AuthService_GetAuthenticationRestriction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle(http.MethodGet, pattern_AuthService_GetAuthenticationInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.AuthService/GetAuthenticationRestriction", runtime.WithHTTPPathPattern("/v1/auth/restriction"))
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.AuthService/GetAuthenticationInfo", runtime.WithHTTPPathPattern("/v1/auth/info"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_AuthService_GetAuthenticationRestriction_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_AuthService_GetAuthenticationInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_AuthService_GetAuthenticationRestriction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_AuthService_GetAuthenticationInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle(http.MethodGet, pattern_AuthService_GetAuthenticationRestriction_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle(http.MethodGet, pattern_AuthService_GetAuthenticationInfo_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.AuthService/GetAuthenticationRestriction", runtime.WithHTTPPathPattern("/v1/{workspace=workspaces/*}/auth/restriction"))
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.AuthService/GetAuthenticationInfo", runtime.WithHTTPPathPattern("/v1/{workspace=workspaces/*}/auth/info"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_AuthService_GetAuthenticationRestriction_1(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_AuthService_GetAuthenticationInfo_1(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_AuthService_GetAuthenticationRestriction_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_AuthService_GetAuthenticationInfo_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle(http.MethodPost, pattern_AuthService_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
@@ -809,29 +809,29 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
}
var (
- pattern_AuthService_GetAuthenticationRestriction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "auth", "restriction"}, ""))
- pattern_AuthService_GetAuthenticationRestriction_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3, 2, 4}, []string{"v1", "workspaces", "workspace", "auth", "restriction"}, ""))
- pattern_AuthService_Login_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "auth", "login"}, ""))
- pattern_AuthService_Logout_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "auth", "logout"}, ""))
- pattern_AuthService_ExchangeToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "auth"}, "exchangeToken"))
- pattern_AuthService_Signup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "auth", "signup"}, ""))
- pattern_AuthService_Refresh_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "auth", "refresh"}, ""))
- pattern_AuthService_SwitchWorkspace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "auth"}, "switchWorkspace"))
- pattern_AuthService_RequestPasswordReset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "auth"}, "requestPasswordReset"))
- pattern_AuthService_ResetPassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "auth"}, "resetPassword"))
- pattern_AuthService_SendEmailLoginCode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "auth"}, "sendEmailLoginCode"))
+ pattern_AuthService_GetAuthenticationInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "auth", "info"}, ""))
+ pattern_AuthService_GetAuthenticationInfo_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3, 2, 4}, []string{"v1", "workspaces", "workspace", "auth", "info"}, ""))
+ pattern_AuthService_Login_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "auth", "login"}, ""))
+ pattern_AuthService_Logout_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "auth", "logout"}, ""))
+ pattern_AuthService_ExchangeToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "auth"}, "exchangeToken"))
+ pattern_AuthService_Signup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "auth", "signup"}, ""))
+ pattern_AuthService_Refresh_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "auth", "refresh"}, ""))
+ pattern_AuthService_SwitchWorkspace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "auth"}, "switchWorkspace"))
+ pattern_AuthService_RequestPasswordReset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "auth"}, "requestPasswordReset"))
+ pattern_AuthService_ResetPassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "auth"}, "resetPassword"))
+ pattern_AuthService_SendEmailLoginCode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "auth"}, "sendEmailLoginCode"))
)
var (
- forward_AuthService_GetAuthenticationRestriction_0 = runtime.ForwardResponseMessage
- forward_AuthService_GetAuthenticationRestriction_1 = runtime.ForwardResponseMessage
- forward_AuthService_Login_0 = runtime.ForwardResponseMessage
- forward_AuthService_Logout_0 = runtime.ForwardResponseMessage
- forward_AuthService_ExchangeToken_0 = runtime.ForwardResponseMessage
- forward_AuthService_Signup_0 = runtime.ForwardResponseMessage
- forward_AuthService_Refresh_0 = runtime.ForwardResponseMessage
- forward_AuthService_SwitchWorkspace_0 = runtime.ForwardResponseMessage
- forward_AuthService_RequestPasswordReset_0 = runtime.ForwardResponseMessage
- forward_AuthService_ResetPassword_0 = runtime.ForwardResponseMessage
- forward_AuthService_SendEmailLoginCode_0 = runtime.ForwardResponseMessage
+ forward_AuthService_GetAuthenticationInfo_0 = runtime.ForwardResponseMessage
+ forward_AuthService_GetAuthenticationInfo_1 = runtime.ForwardResponseMessage
+ forward_AuthService_Login_0 = runtime.ForwardResponseMessage
+ forward_AuthService_Logout_0 = runtime.ForwardResponseMessage
+ forward_AuthService_ExchangeToken_0 = runtime.ForwardResponseMessage
+ forward_AuthService_Signup_0 = runtime.ForwardResponseMessage
+ forward_AuthService_Refresh_0 = runtime.ForwardResponseMessage
+ forward_AuthService_SwitchWorkspace_0 = runtime.ForwardResponseMessage
+ forward_AuthService_RequestPasswordReset_0 = runtime.ForwardResponseMessage
+ forward_AuthService_ResetPassword_0 = runtime.ForwardResponseMessage
+ forward_AuthService_SendEmailLoginCode_0 = runtime.ForwardResponseMessage
)
diff --git a/backend/generated-go/v1/auth_service_equal.pb.go b/backend/generated-go/v1/auth_service_equal.pb.go
index f8c3fc617d..25f7248a39 100644
--- a/backend/generated-go/v1/auth_service_equal.pb.go
+++ b/backend/generated-go/v1/auth_service_equal.pb.go
@@ -3,7 +3,7 @@
package v1
-func (x *GetAuthenticationRestrictionRequest) Equal(y *GetAuthenticationRestrictionRequest) bool {
+func (x *GetAuthenticationInfoRequest) Equal(y *GetAuthenticationInfoRequest) bool {
if x == y {
return true
}
@@ -29,6 +29,14 @@ func (x *AuthenticationInfo) Equal(y *AuthenticationInfo) bool {
if !x.Restriction.Equal(y.Restriction) {
return false
}
+ if len(x.IdentityProviders) != len(y.IdentityProviders) {
+ return false
+ }
+ for i := 0; i < len(x.IdentityProviders); i++ {
+ if !x.IdentityProviders[i].Equal(y.IdentityProviders[i]) {
+ return false
+ }
+ }
return true
}
@@ -57,6 +65,52 @@ func (x *Restriction) Equal(y *Restriction) bool {
return true
}
+func (x *LoginIdentityProvider) Equal(y *LoginIdentityProvider) bool {
+ if x == y {
+ return true
+ }
+ if x == nil || y == nil {
+ return x == nil && y == nil
+ }
+ if x.Name != y.Name {
+ return false
+ }
+ if x.Type != y.Type {
+ return false
+ }
+ if x.Title != y.Title {
+ return false
+ }
+ if !x.AuthorizationRequest.Equal(y.AuthorizationRequest) {
+ return false
+ }
+ return true
+}
+
+func (x *AuthorizationRequest) Equal(y *AuthorizationRequest) bool {
+ if x == y {
+ return true
+ }
+ if x == nil || y == nil {
+ return x == nil && y == nil
+ }
+ if x.Endpoint != y.Endpoint {
+ return false
+ }
+ if x.ClientId != y.ClientId {
+ return false
+ }
+ if len(x.Scopes) != len(y.Scopes) {
+ return false
+ }
+ for i := 0; i < len(x.Scopes); i++ {
+ if x.Scopes[i] != y.Scopes[i] {
+ return false
+ }
+ }
+ return true
+}
+
func (x *LoginRequest) Equal(y *LoginRequest) bool {
if x == y {
return true
diff --git a/backend/generated-go/v1/auth_service_grpc.pb.go b/backend/generated-go/v1/auth_service_grpc.pb.go
index a3dd328bfb..903ce52f5a 100644
--- a/backend/generated-go/v1/auth_service_grpc.pb.go
+++ b/backend/generated-go/v1/auth_service_grpc.pb.go
@@ -20,16 +20,16 @@ import (
const _ = grpc.SupportPackageIsVersion9
const (
- AuthService_GetAuthenticationRestriction_FullMethodName = "/bytebase.v1.AuthService/GetAuthenticationRestriction"
- AuthService_Login_FullMethodName = "/bytebase.v1.AuthService/Login"
- AuthService_Logout_FullMethodName = "/bytebase.v1.AuthService/Logout"
- AuthService_ExchangeToken_FullMethodName = "/bytebase.v1.AuthService/ExchangeToken"
- AuthService_Signup_FullMethodName = "/bytebase.v1.AuthService/Signup"
- AuthService_Refresh_FullMethodName = "/bytebase.v1.AuthService/Refresh"
- AuthService_SwitchWorkspace_FullMethodName = "/bytebase.v1.AuthService/SwitchWorkspace"
- AuthService_RequestPasswordReset_FullMethodName = "/bytebase.v1.AuthService/RequestPasswordReset"
- AuthService_ResetPassword_FullMethodName = "/bytebase.v1.AuthService/ResetPassword"
- AuthService_SendEmailLoginCode_FullMethodName = "/bytebase.v1.AuthService/SendEmailLoginCode"
+ AuthService_GetAuthenticationInfo_FullMethodName = "/bytebase.v1.AuthService/GetAuthenticationInfo"
+ AuthService_Login_FullMethodName = "/bytebase.v1.AuthService/Login"
+ AuthService_Logout_FullMethodName = "/bytebase.v1.AuthService/Logout"
+ AuthService_ExchangeToken_FullMethodName = "/bytebase.v1.AuthService/ExchangeToken"
+ AuthService_Signup_FullMethodName = "/bytebase.v1.AuthService/Signup"
+ AuthService_Refresh_FullMethodName = "/bytebase.v1.AuthService/Refresh"
+ AuthService_SwitchWorkspace_FullMethodName = "/bytebase.v1.AuthService/SwitchWorkspace"
+ AuthService_RequestPasswordReset_FullMethodName = "/bytebase.v1.AuthService/RequestPasswordReset"
+ AuthService_ResetPassword_FullMethodName = "/bytebase.v1.AuthService/ResetPassword"
+ AuthService_SendEmailLoginCode_FullMethodName = "/bytebase.v1.AuthService/SendEmailLoginCode"
)
// AuthServiceClient is the client API for AuthService service.
@@ -38,9 +38,10 @@ const (
//
// AuthService handles user authentication operations.
type AuthServiceClient interface {
- // Gets the effective restrictions needed to render authentication flows.
+ // Gets everything the login page renders: the sign-in restrictions and the
+ // identity providers it offers.
// Permissions required: None
- GetAuthenticationRestriction(ctx context.Context, in *GetAuthenticationRestrictionRequest, opts ...grpc.CallOption) (*AuthenticationInfo, error)
+ GetAuthenticationInfo(ctx context.Context, in *GetAuthenticationInfoRequest, opts ...grpc.CallOption) (*AuthenticationInfo, error)
// Authenticates a user and returns access tokens.
// Permissions required: None
Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
@@ -87,10 +88,10 @@ func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient {
return &authServiceClient{cc}
}
-func (c *authServiceClient) GetAuthenticationRestriction(ctx context.Context, in *GetAuthenticationRestrictionRequest, opts ...grpc.CallOption) (*AuthenticationInfo, error) {
+func (c *authServiceClient) GetAuthenticationInfo(ctx context.Context, in *GetAuthenticationInfoRequest, opts ...grpc.CallOption) (*AuthenticationInfo, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AuthenticationInfo)
- err := c.cc.Invoke(ctx, AuthService_GetAuthenticationRestriction_FullMethodName, in, out, cOpts...)
+ err := c.cc.Invoke(ctx, AuthService_GetAuthenticationInfo_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -193,9 +194,10 @@ func (c *authServiceClient) SendEmailLoginCode(ctx context.Context, in *SendEmai
//
// AuthService handles user authentication operations.
type AuthServiceServer interface {
- // Gets the effective restrictions needed to render authentication flows.
+ // Gets everything the login page renders: the sign-in restrictions and the
+ // identity providers it offers.
// Permissions required: None
- GetAuthenticationRestriction(context.Context, *GetAuthenticationRestrictionRequest) (*AuthenticationInfo, error)
+ GetAuthenticationInfo(context.Context, *GetAuthenticationInfoRequest) (*AuthenticationInfo, error)
// Authenticates a user and returns access tokens.
// Permissions required: None
Login(context.Context, *LoginRequest) (*LoginResponse, error)
@@ -242,8 +244,8 @@ type AuthServiceServer interface {
// pointer dereference when methods are called.
type UnimplementedAuthServiceServer struct{}
-func (UnimplementedAuthServiceServer) GetAuthenticationRestriction(context.Context, *GetAuthenticationRestrictionRequest) (*AuthenticationInfo, error) {
- return nil, status.Error(codes.Unimplemented, "method GetAuthenticationRestriction not implemented")
+func (UnimplementedAuthServiceServer) GetAuthenticationInfo(context.Context, *GetAuthenticationInfoRequest) (*AuthenticationInfo, error) {
+ return nil, status.Error(codes.Unimplemented, "method GetAuthenticationInfo not implemented")
}
func (UnimplementedAuthServiceServer) Login(context.Context, *LoginRequest) (*LoginResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Login not implemented")
@@ -293,20 +295,20 @@ func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer) {
s.RegisterService(&AuthService_ServiceDesc, srv)
}
-func _AuthService_GetAuthenticationRestriction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetAuthenticationRestrictionRequest)
+func _AuthService_GetAuthenticationInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetAuthenticationInfoRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(AuthServiceServer).GetAuthenticationRestriction(ctx, in)
+ return srv.(AuthServiceServer).GetAuthenticationInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: AuthService_GetAuthenticationRestriction_FullMethodName,
+ FullMethod: AuthService_GetAuthenticationInfo_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(AuthServiceServer).GetAuthenticationRestriction(ctx, req.(*GetAuthenticationRestrictionRequest))
+ return srv.(AuthServiceServer).GetAuthenticationInfo(ctx, req.(*GetAuthenticationInfoRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -481,8 +483,8 @@ var AuthService_ServiceDesc = grpc.ServiceDesc{
HandlerType: (*AuthServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
- MethodName: "GetAuthenticationRestriction",
- Handler: _AuthService_GetAuthenticationRestriction_Handler,
+ MethodName: "GetAuthenticationInfo",
+ Handler: _AuthService_GetAuthenticationInfo_Handler,
},
{
MethodName: "Login",
diff --git a/backend/generated-go/v1/idp_service.pb.go b/backend/generated-go/v1/idp_service.pb.go
index 25d6c0eecc..a2303fe31d 100644
--- a/backend/generated-go/v1/idp_service.pb.go
+++ b/backend/generated-go/v1/idp_service.pb.go
@@ -231,9 +231,9 @@ func (x *GetIdentityProviderRequest) GetName() string {
type ListIdentityProvidersRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
- // The parent workspace whose identity providers should be listed.
+ // The parent workspace whose identity providers should be listed. It must be
+ // the workspace the caller's credential belongs to.
// Format: workspaces/{workspace}
- // When unset, the workspace is resolved from the request context.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
@@ -1427,10 +1427,10 @@ const file_v1_idp_service_proto_rawDesc = "" +
"\x14v1/idp_service.proto\x12\vbytebase.v1\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x13v1/annotation.proto\"J\n" +
"\x1aGetIdentityProviderRequest\x12,\n" +
"\x04name\x18\x01 \x01(\tB\x18\xe0A\x02\xfaA\x12\n" +
- "\x10bytebase.com/IdPR\x04name\"S\n" +
- "\x1cListIdentityProvidersRequest\x123\n" +
- "\x06parent\x18\x01 \x01(\tB\x1b\xfaA\x18\n" +
- "\x16bytebase.com/WorkspaceR\x06parent\"m\n" +
+ "\x10bytebase.com/IdPR\x04name\"r\n" +
+ "\x1cListIdentityProvidersRequest\x12R\n" +
+ "\x06parent\x18\x01 \x01(\tB:\xe0A\x02\xfaA\x18\n" +
+ "\x16bytebase.com/Workspace\xbaH\x19\xc8\x01\x01r\x142\x12^workspaces/[^/]+$R\x06parent\"m\n" +
"\x1dListIdentityProvidersResponse\x12L\n" +
"\x12identity_providers\x18\x01 \x03(\v2\x1d.bytebase.v1.IdentityProviderR\x11identityProviders\"\xc7\x01\n" +
"\x1dCreateIdentityProviderRequest\x12O\n" +
@@ -1534,10 +1534,10 @@ const file_v1_idp_service_proto_rawDesc = "" +
"\x0fOAuth2AuthStyle\x12!\n" +
"\x1dOAUTH2_AUTH_STYLE_UNSPECIFIED\x10\x00\x12\r\n" +
"\tIN_PARAMS\x10\x01\x12\r\n" +
- "\tIN_HEADER\x10\x022\x8f\t\n" +
+ "\tIN_HEADER\x10\x022\xb2\t\n" +
"\x17IdentityProviderService\x12\xa7\x01\n" +
- "\x13GetIdentityProvider\x12'.bytebase.v1.GetIdentityProviderRequest\x1a\x1d.bytebase.v1.IdentityProvider\"H\xdaA\x04name\x8a\xea0\x18bb.identityProviders.get\x90\xea0\x01\xa0\xea0\x04\xa8\xea0\t\x82\xd3\xe4\x93\x02\x13\x12\x11/v1/{name=idps/*}\x12\xb1\x01\n" +
- "\x15ListIdentityProviders\x12).bytebase.v1.ListIdentityProvidersRequest\x1a*.bytebase.v1.ListIdentityProvidersResponse\"A\xdaA\x00\x80\xea0\x01\xa0\xea0\x04\xa8\xea0\t\x82\xd3\xe4\x93\x02,Z \x12\x1e/v1/{parent=workspaces/*}/idps\x12\b/v1/idps\x12\xba\x01\n" +
+ "\x13GetIdentityProvider\x12'.bytebase.v1.GetIdentityProviderRequest\x1a\x1d.bytebase.v1.IdentityProvider\"H\xdaA\x04name\x8a\xea0\x18bb.identityProviders.get\x90\xea0\x01\xa0\xea0\x04\xa8\xea0\t\x82\xd3\xe4\x93\x02\x13\x12\x11/v1/{name=idps/*}\x12\xd4\x01\n" +
+ "\x15ListIdentityProviders\x12).bytebase.v1.ListIdentityProvidersRequest\x1a*.bytebase.v1.ListIdentityProvidersResponse\"d\xdaA\x06parent\x8a\xea0\x19bb.identityProviders.list\x90\xea0\x01\xa0\xea0\x04\xa8\xea0\t\x82\xd3\xe4\x93\x02,Z \x12\x1e/v1/{parent=workspaces/*}/idps\x12\b/v1/idps\x12\xba\x01\n" +
"\x16CreateIdentityProvider\x12*.bytebase.v1.CreateIdentityProviderRequest\x1a\x1d.bytebase.v1.IdentityProvider\"U\xdaA\x00\x8a\xea0\x1bbb.identityProviders.create\x90\xea0\x01\x98\xea0\x01\xa0\xea0\x03\xa8\xea0\x06\x82\xd3\xe4\x93\x02\x1d:\x11identity_provider\"\b/v1/idps\x12\xf3\x01\n" +
"\x16UpdateIdentityProvider\x12*.bytebase.v1.UpdateIdentityProviderRequest\x1a\x1d.bytebase.v1.IdentityProvider\"\x8d\x01\xdaA\x1didentity_provider,update_mask\x8a\xea0\x1bbb.identityProviders.update\x90\xea0\x01\x98\xea0\x01\xa0\xea0\x03\xa8\xea0\x06\x82\xd3\xe4\x93\x028:\x11identity_provider2#/v1/{identity_provider.name=idps/*}\x12\xad\x01\n" +
"\x16DeleteIdentityProvider\x12*.bytebase.v1.DeleteIdentityProviderRequest\x1a\x16.google.protobuf.Empty\"O\xdaA\x04name\x8a\xea0\x1bbb.identityProviders.delete\x90\xea0\x01\x98\xea0\x01\xa0\xea0\x04\xa8\xea0\t\x82\xd3\xe4\x93\x02\x13*\x11/v1/{name=idps/*}\x12\xb2\x01\n" +
diff --git a/backend/generated-go/v1/idp_service_grpc.pb.go b/backend/generated-go/v1/idp_service_grpc.pb.go
index 60fbc59912..51eeaedf86 100644
--- a/backend/generated-go/v1/idp_service_grpc.pb.go
+++ b/backend/generated-go/v1/idp_service_grpc.pb.go
@@ -37,8 +37,15 @@ type IdentityProviderServiceClient interface {
// Gets an identity provider by name.
// Permissions required: bb.identityProviders.get
GetIdentityProvider(ctx context.Context, in *GetIdentityProviderRequest, opts ...grpc.CallOption) (*IdentityProvider, error)
- // Lists all configured identity providers (public endpoint for login page).
- // Permissions required: None
+ // 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.
+ //
+ // 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
ListIdentityProviders(ctx context.Context, in *ListIdentityProvidersRequest, opts ...grpc.CallOption) (*ListIdentityProvidersResponse, error)
// Creates a new identity provider.
// Permissions required: bb.identityProviders.create
@@ -132,8 +139,15 @@ type IdentityProviderServiceServer interface {
// Gets an identity provider by name.
// Permissions required: bb.identityProviders.get
GetIdentityProvider(context.Context, *GetIdentityProviderRequest) (*IdentityProvider, error)
- // Lists all configured identity providers (public endpoint for login page).
- // Permissions required: None
+ // 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.
+ //
+ // 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
ListIdentityProviders(context.Context, *ListIdentityProvidersRequest) (*ListIdentityProvidersResponse, error)
// Creates a new identity provider.
// Permissions required: bb.identityProviders.create
diff --git a/backend/generated-go/v1/v1connect/auth_service.connect.go b/backend/generated-go/v1/v1connect/auth_service.connect.go
index 0d78c2eafc..d158b61401 100644
--- a/backend/generated-go/v1/v1connect/auth_service.connect.go
+++ b/backend/generated-go/v1/v1connect/auth_service.connect.go
@@ -34,9 +34,9 @@ const (
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
// period.
const (
- // AuthServiceGetAuthenticationRestrictionProcedure is the fully-qualified name of the AuthService's
- // GetAuthenticationRestriction RPC.
- AuthServiceGetAuthenticationRestrictionProcedure = "/bytebase.v1.AuthService/GetAuthenticationRestriction"
+ // AuthServiceGetAuthenticationInfoProcedure is the fully-qualified name of the AuthService's
+ // GetAuthenticationInfo RPC.
+ AuthServiceGetAuthenticationInfoProcedure = "/bytebase.v1.AuthService/GetAuthenticationInfo"
// AuthServiceLoginProcedure is the fully-qualified name of the AuthService's Login RPC.
AuthServiceLoginProcedure = "/bytebase.v1.AuthService/Login"
// AuthServiceLogoutProcedure is the fully-qualified name of the AuthService's Logout RPC.
@@ -64,9 +64,10 @@ const (
// AuthServiceClient is a client for the bytebase.v1.AuthService service.
type AuthServiceClient interface {
- // Gets the effective restrictions needed to render authentication flows.
+ // Gets everything the login page renders: the sign-in restrictions and the
+ // identity providers it offers.
// Permissions required: None
- GetAuthenticationRestriction(context.Context, *connect.Request[v1.GetAuthenticationRestrictionRequest]) (*connect.Response[v1.AuthenticationInfo], error)
+ GetAuthenticationInfo(context.Context, *connect.Request[v1.GetAuthenticationInfoRequest]) (*connect.Response[v1.AuthenticationInfo], error)
// Authenticates a user and returns access tokens.
// Permissions required: None
Login(context.Context, *connect.Request[v1.LoginRequest]) (*connect.Response[v1.LoginResponse], error)
@@ -116,10 +117,10 @@ func NewAuthServiceClient(httpClient connect.HTTPClient, baseURL string, opts ..
baseURL = strings.TrimRight(baseURL, "/")
authServiceMethods := v1.File_v1_auth_service_proto.Services().ByName("AuthService").Methods()
return &authServiceClient{
- getAuthenticationRestriction: connect.NewClient[v1.GetAuthenticationRestrictionRequest, v1.AuthenticationInfo](
+ getAuthenticationInfo: connect.NewClient[v1.GetAuthenticationInfoRequest, v1.AuthenticationInfo](
httpClient,
- baseURL+AuthServiceGetAuthenticationRestrictionProcedure,
- connect.WithSchema(authServiceMethods.ByName("GetAuthenticationRestriction")),
+ baseURL+AuthServiceGetAuthenticationInfoProcedure,
+ connect.WithSchema(authServiceMethods.ByName("GetAuthenticationInfo")),
connect.WithClientOptions(opts...),
),
login: connect.NewClient[v1.LoginRequest, v1.LoginResponse](
@@ -181,21 +182,21 @@ func NewAuthServiceClient(httpClient connect.HTTPClient, baseURL string, opts ..
// authServiceClient implements AuthServiceClient.
type authServiceClient struct {
- getAuthenticationRestriction *connect.Client[v1.GetAuthenticationRestrictionRequest, v1.AuthenticationInfo]
- login *connect.Client[v1.LoginRequest, v1.LoginResponse]
- logout *connect.Client[v1.LogoutRequest, emptypb.Empty]
- exchangeToken *connect.Client[v1.ExchangeTokenRequest, v1.ExchangeTokenResponse]
- signup *connect.Client[v1.SignupRequest, v1.LoginResponse]
- refresh *connect.Client[v1.RefreshRequest, v1.RefreshResponse]
- switchWorkspace *connect.Client[v1.SwitchWorkspaceRequest, v1.LoginResponse]
- requestPasswordReset *connect.Client[v1.RequestPasswordResetRequest, emptypb.Empty]
- resetPassword *connect.Client[v1.ResetPasswordRequest, emptypb.Empty]
- sendEmailLoginCode *connect.Client[v1.SendEmailLoginCodeRequest, emptypb.Empty]
+ getAuthenticationInfo *connect.Client[v1.GetAuthenticationInfoRequest, v1.AuthenticationInfo]
+ login *connect.Client[v1.LoginRequest, v1.LoginResponse]
+ logout *connect.Client[v1.LogoutRequest, emptypb.Empty]
+ exchangeToken *connect.Client[v1.ExchangeTokenRequest, v1.ExchangeTokenResponse]
+ signup *connect.Client[v1.SignupRequest, v1.LoginResponse]
+ refresh *connect.Client[v1.RefreshRequest, v1.RefreshResponse]
+ switchWorkspace *connect.Client[v1.SwitchWorkspaceRequest, v1.LoginResponse]
+ requestPasswordReset *connect.Client[v1.RequestPasswordResetRequest, emptypb.Empty]
+ resetPassword *connect.Client[v1.ResetPasswordRequest, emptypb.Empty]
+ sendEmailLoginCode *connect.Client[v1.SendEmailLoginCodeRequest, emptypb.Empty]
}
-// GetAuthenticationRestriction calls bytebase.v1.AuthService.GetAuthenticationRestriction.
-func (c *authServiceClient) GetAuthenticationRestriction(ctx context.Context, req *connect.Request[v1.GetAuthenticationRestrictionRequest]) (*connect.Response[v1.AuthenticationInfo], error) {
- return c.getAuthenticationRestriction.CallUnary(ctx, req)
+// GetAuthenticationInfo calls bytebase.v1.AuthService.GetAuthenticationInfo.
+func (c *authServiceClient) GetAuthenticationInfo(ctx context.Context, req *connect.Request[v1.GetAuthenticationInfoRequest]) (*connect.Response[v1.AuthenticationInfo], error) {
+ return c.getAuthenticationInfo.CallUnary(ctx, req)
}
// Login calls bytebase.v1.AuthService.Login.
@@ -245,9 +246,10 @@ func (c *authServiceClient) SendEmailLoginCode(ctx context.Context, req *connect
// AuthServiceHandler is an implementation of the bytebase.v1.AuthService service.
type AuthServiceHandler interface {
- // Gets the effective restrictions needed to render authentication flows.
+ // Gets everything the login page renders: the sign-in restrictions and the
+ // identity providers it offers.
// Permissions required: None
- GetAuthenticationRestriction(context.Context, *connect.Request[v1.GetAuthenticationRestrictionRequest]) (*connect.Response[v1.AuthenticationInfo], error)
+ GetAuthenticationInfo(context.Context, *connect.Request[v1.GetAuthenticationInfoRequest]) (*connect.Response[v1.AuthenticationInfo], error)
// Authenticates a user and returns access tokens.
// Permissions required: None
Login(context.Context, *connect.Request[v1.LoginRequest]) (*connect.Response[v1.LoginResponse], error)
@@ -293,10 +295,10 @@ type AuthServiceHandler interface {
// and JSON codecs. They also support gzip compression.
func NewAuthServiceHandler(svc AuthServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
authServiceMethods := v1.File_v1_auth_service_proto.Services().ByName("AuthService").Methods()
- authServiceGetAuthenticationRestrictionHandler := connect.NewUnaryHandler(
- AuthServiceGetAuthenticationRestrictionProcedure,
- svc.GetAuthenticationRestriction,
- connect.WithSchema(authServiceMethods.ByName("GetAuthenticationRestriction")),
+ authServiceGetAuthenticationInfoHandler := connect.NewUnaryHandler(
+ AuthServiceGetAuthenticationInfoProcedure,
+ svc.GetAuthenticationInfo,
+ connect.WithSchema(authServiceMethods.ByName("GetAuthenticationInfo")),
connect.WithHandlerOptions(opts...),
)
authServiceLoginHandler := connect.NewUnaryHandler(
@@ -355,8 +357,8 @@ func NewAuthServiceHandler(svc AuthServiceHandler, opts ...connect.HandlerOption
)
return "/bytebase.v1.AuthService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
switch r.URL.Path {
- case AuthServiceGetAuthenticationRestrictionProcedure:
- authServiceGetAuthenticationRestrictionHandler.ServeHTTP(w, r)
+ case AuthServiceGetAuthenticationInfoProcedure:
+ authServiceGetAuthenticationInfoHandler.ServeHTTP(w, r)
case AuthServiceLoginProcedure:
authServiceLoginHandler.ServeHTTP(w, r)
case AuthServiceLogoutProcedure:
@@ -384,8 +386,8 @@ func NewAuthServiceHandler(svc AuthServiceHandler, opts ...connect.HandlerOption
// UnimplementedAuthServiceHandler returns CodeUnimplemented from all methods.
type UnimplementedAuthServiceHandler struct{}
-func (UnimplementedAuthServiceHandler) GetAuthenticationRestriction(context.Context, *connect.Request[v1.GetAuthenticationRestrictionRequest]) (*connect.Response[v1.AuthenticationInfo], error) {
- return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.AuthService.GetAuthenticationRestriction is not implemented"))
+func (UnimplementedAuthServiceHandler) GetAuthenticationInfo(context.Context, *connect.Request[v1.GetAuthenticationInfoRequest]) (*connect.Response[v1.AuthenticationInfo], error) {
+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.AuthService.GetAuthenticationInfo is not implemented"))
}
func (UnimplementedAuthServiceHandler) Login(context.Context, *connect.Request[v1.LoginRequest]) (*connect.Response[v1.LoginResponse], error) {
diff --git a/backend/generated-go/v1/v1connect/idp_service.connect.go b/backend/generated-go/v1/v1connect/idp_service.connect.go
index 8084989730..3893b0e389 100644
--- a/backend/generated-go/v1/v1connect/idp_service.connect.go
+++ b/backend/generated-go/v1/v1connect/idp_service.connect.go
@@ -59,8 +59,15 @@ type IdentityProviderServiceClient interface {
// Gets an identity provider by name.
// Permissions required: bb.identityProviders.get
GetIdentityProvider(context.Context, *connect.Request[v1.GetIdentityProviderRequest]) (*connect.Response[v1.IdentityProvider], error)
- // Lists all configured identity providers (public endpoint for login page).
- // Permissions required: None
+ // 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.
+ //
+ // 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
ListIdentityProviders(context.Context, *connect.Request[v1.ListIdentityProvidersRequest]) (*connect.Response[v1.ListIdentityProvidersResponse], error)
// Creates a new identity provider.
// Permissions required: bb.identityProviders.create
@@ -173,8 +180,15 @@ type IdentityProviderServiceHandler interface {
// Gets an identity provider by name.
// Permissions required: bb.identityProviders.get
GetIdentityProvider(context.Context, *connect.Request[v1.GetIdentityProviderRequest]) (*connect.Response[v1.IdentityProvider], error)
- // Lists all configured identity providers (public endpoint for login page).
- // Permissions required: None
+ // 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.
+ //
+ // 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
ListIdentityProviders(context.Context, *connect.Request[v1.ListIdentityProvidersRequest]) (*connect.Response[v1.ListIdentityProvidersResponse], error)
// Creates a new identity provider.
// Permissions required: bb.identityProviders.create
diff --git a/backend/migrator/migration/3.23/0003##identity_provider_list_permission.sql b/backend/migrator/migration/3.23/0003##identity_provider_list_permission.sql
new file mode 100644
index 0000000000..219e4ccbb6
--- /dev/null
+++ b/backend/migrator/migration/3.23/0003##identity_provider_list_permission.sql
@@ -0,0 +1,16 @@
+-- Listing identity providers now needs its own permission.
+--
+-- The list RPC used to be anonymous; it is now gated on
+-- bb.identityProviders.list, which no existing role carries. The predefined
+-- workspace admin role gains it in code, but custom roles live in this table:
+-- any role that could already read a provider is the same role that reached
+-- the SSO console, so it keeps working only if it also gets the new
+-- permission. Idempotent, and no-ops on a fresh install.
+UPDATE role
+SET permissions = jsonb_set(
+ permissions,
+ '{permissions}',
+ (permissions -> 'permissions') || '"bb.identityProviders.list"'::jsonb
+ )
+WHERE permissions -> 'permissions' @> '["bb.identityProviders.get"]'
+ AND NOT permissions -> 'permissions' @> '["bb.identityProviders.list"]';
diff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.go
index 9dc0b66da9..6caa8910a5 100644
--- a/backend/migrator/migrator_test.go
+++ b/backend/migrator/migrator_test.go
@@ -21,8 +21,8 @@ import (
func TestLatestVersion(t *testing.T) {
files, err := getSortedVersionedFiles()
require.NoError(t, err)
- require.Equal(t, semver.MustParse("3.23.2"), *files[len(files)-1].version)
- require.Equal(t, "migration/3.23/0002##plan_last_editor_approval.sql", files[len(files)-1].path)
+ require.Equal(t, semver.MustParse("3.23.3"), *files[len(files)-1].version)
+ require.Equal(t, "migration/3.23/0003##identity_provider_list_permission.sql", files[len(files)-1].path)
}
func TestMigration3_23_1_IssueCommentThreads(t *testing.T) {
diff --git a/backend/plugin/idp/oidc/oidc.go b/backend/plugin/idp/oidc/oidc.go
index 8476cef6fd..e704419bf1 100644
--- a/backend/plugin/idp/oidc/oidc.go
+++ b/backend/plugin/idp/oidc/oidc.go
@@ -5,6 +5,7 @@ import (
"context"
"crypto/tls"
"encoding/json"
+ "fmt"
"io"
"log/slog"
"net/http"
@@ -15,6 +16,7 @@ import (
"github.com/hashicorp/golang-lru/v2/expirable"
"github.com/pkg/errors"
"golang.org/x/oauth2"
+ "golang.org/x/sync/singleflight"
"github.com/bytebase/bytebase/backend/common"
storepb "github.com/bytebase/bytebase/backend/generated-go/store"
@@ -206,19 +208,64 @@ type OpenIDConfigurationResponse struct {
// openidConfigResponseCache is a concurrent-safe LRU cache with TTL for OpenID Configuration responses.
var openidConfigResponseCache = expirable.NewLRU[string, *OpenIDConfigurationResponse](128, nil, 5*time.Minute)
+// openidConfigFailureCache remembers issuers that just failed. GetAuthenticationInfo
+// is on the login page and the dashboard's pre-mount path, so without it an
+// unreachable issuer would spend the client timeout on every single request.
+var openidConfigFailureCache = expirable.NewLRU[string, error](128, nil, time.Minute)
+
+// openidConfigGroup collapses concurrent misses for one issuer into a single
+// fetch, so a burst of page loads against an unreachable issuer waits once
+// rather than once per request.
+var openidConfigGroup singleflight.Group
+
+// openidConfigCacheKey keys both caches. The TLS mode belongs in the key: the
+// same issuer reached with and without certificate verification is two
+// different requests, and one's failure must not answer for the other.
+func openidConfigCacheKey(issuer string, insecureSkipVerify bool) string {
+ return fmt.Sprintf("%t\x00%s", insecureSkipVerify, issuer)
+}
+
// GetOpenIDConfiguration fetches the OpenID Configuration from the given issuer.
func GetOpenIDConfiguration(issuer string, insecureSkipVerify bool) (*OpenIDConfigurationResponse, error) {
+ key := openidConfigCacheKey(issuer, insecureSkipVerify)
// Return from cache if available.
- if config, found := openidConfigResponseCache.Get(issuer); found {
+ if config, found := openidConfigResponseCache.Get(key); found {
return config, nil
}
+ if err, found := openidConfigFailureCache.Get(key); found {
+ return nil, err
+ }
+ config, err, _ := openidConfigGroup.Do(key, func() (any, error) {
+ config, err := fetchOpenIDConfiguration(issuer, insecureSkipVerify)
+ if err != nil {
+ openidConfigFailureCache.Add(key, err)
+ return nil, err
+ }
+ openidConfigResponseCache.Add(key, config)
+ return config, nil
+ })
+ if err != nil {
+ return nil, err
+ }
+ response, ok := config.(*OpenIDConfigurationResponse)
+ if !ok {
+ return nil, errors.Errorf("unexpected openid configuration type %T", config)
+ }
+ return response, nil
+}
+
+func fetchOpenIDConfiguration(issuer string, insecureSkipVerify bool) (*OpenIDConfigurationResponse, error) {
req, err := http.NewRequest(http.MethodGet, strings.TrimSuffix(issuer, "/")+"/.well-known/openid-configuration", nil)
if err != nil {
return nil, errors.Wrap(err, "construct GET request")
}
req.Header.Set("Content-Type", "application/json")
client := &http.Client{
+ // Reached before authentication through GetAuthenticationInfo, which the
+ // dashboard awaits before it mounts, so a blackholing issuer must not
+ // hold a page load open for long.
+ Timeout: 3 * time.Second,
Transport: &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: insecureSkipVerify,
@@ -244,7 +291,5 @@ func GetOpenIDConfiguration(issuer string, insecureSkipVerify bool) (*OpenIDConf
if err := json.Unmarshal(b, &config); err != nil {
return nil, errors.Wrapf(err, "unmarshal openid configuration, body: %s", string(b))
}
-
- openidConfigResponseCache.Add(issuer, &config)
return &config, nil
}
diff --git a/backend/store/predefined_roles.go b/backend/store/predefined_roles.go
index dc68637506..002e79c3d0 100644
--- a/backend/store/predefined_roles.go
+++ b/backend/store/predefined_roles.go
@@ -57,6 +57,7 @@ var PredefinedRoles = []*RoleMessage{
permission.IdentityProvidersCreate,
permission.IdentityProvidersDelete,
permission.IdentityProvidersGet,
+ permission.IdentityProvidersList,
permission.IdentityProvidersUpdate,
permission.InstancesCreate,
permission.InstancesDelete,
diff --git a/backend/tests/tests.go b/backend/tests/tests.go
index df844ae371..0247c251e6 100644
--- a/backend/tests/tests.go
+++ b/backend/tests/tests.go
@@ -330,7 +330,7 @@ func (ctl *controller) waitForHealthz(ctx context.Context) error {
for {
select {
case <-ticker.C:
- _, err := ctl.authServiceClient.GetAuthenticationRestriction(ctx, &connect.Request[v1pb.GetAuthenticationRestrictionRequest]{})
+ _, err := ctl.authServiceClient.GetAuthenticationInfo(ctx, &connect.Request[v1pb.GetAuthenticationInfoRequest]{})
if err != nil && status.Code(err) == codes.Unavailable {
continue
}
diff --git a/docs/design/login-identity-provider-metadata.md b/docs/design/login-identity-provider-metadata.md
new file mode 100644
index 0000000000..8dedc2ea71
--- /dev/null
+++ b/docs/design/login-identity-provider-metadata.md
@@ -0,0 +1,165 @@
+# Login identity provider metadata
+
+`AuthenticationInfo` — the anonymous message the login page already fetches — grows a hand-written
+list of the providers that page renders, and `GetAuthenticationRestriction` is renamed
+`GetAuthenticationInfo` to match what it now returns. `ListIdentityProviders` becomes an ordinary
+IAM method behind a new `bb.identityProviders.list` permission, so LDAP host, bind DN, base DN and
+user filter stop being readable without a credential. Closes T12 in
+[`v1-api-audit-2026-08.md`](v1-api-audit-2026-08.md) /
+[BYT-10156](https://linear.app/bytebase/issue/BYT-10156/listidentityproviders-leaks-ldap-config-to-anonymous-callers-t12),
+which carries the line-level citations.
+
+## Background
+
+`ListIdentityProviders` is anonymous and takes a caller-supplied `parent`. Three journeys call it,
+and all three receive the same admin record — every provider field except `client_secret` and
+`bind_password`, the complete LDAP config included.
+
+| Journey | Reachable by | Needs |
+|---|---|---|
+| Login page | anyone | which providers exist, what to call them, where to send the browser |
+| SSO admin console | `bb.identityProviders.get` | the whole record |
+| General settings | every Workspace Member | whether any provider exists |
+
+### Problem
+
+- **Anonymous callers read the directory topology.** Self-hosted needs no guessing — `GetWorkspace`
+ is anonymous too and returns the singleton workspace ID — and self-hosted is where LDAP is
+ configured. The login page never needed any of it: it reads an authorization endpoint, a client ID
+ and scopes, and the LDAP bind happens server-side.
+- **Redaction is a denylist.** Two `SECURITY:` blanks stand between the admin record and an
+ anonymous caller. Every field added to the config is public the day it ships unless someone
+ remembers to blank it — the failure mode
+ [#21184](https://github.com/bytebase/bytebase/pull/21184) removed from `GetActuatorInfo`.
+- **The third journey is why it is still anonymous.** An IAM gate on today's method would break
+ General settings, whose route asks only for `bb.settings.getWorkspaceProfile` and
+ `bb.policies.get` — both held by `workspaceMember`, the role every user receives on joining a
+ workspace.
+
+## Goals
+
+- **G1** An anonymous caller learns only what the login page renders.
+- **G2** Provider configuration is readable only with `bb.identityProviders.get`.
+- **G3** A field added to the admin record stays private until someone publishes it on purpose.
+- **G4** No journey loses access on upgrade — including custom roles that already reached the SSO
+ console.
+- **G5** One anonymous request serves the pre-login page, and the server resolves workspace versus
+ global providers.
+
+### Non-goals
+
+- **Hiding that a workspace has SSO.** The login page renders "Continue with Okta" to anonymous
+ visitors. Provider existence, type and branding are public by construction here and everywhere
+ surveyed; only the configuration behind them is not.
+- **The workspace-existence oracle** on `GetAuthenticationRestriction`, accepted in T12. An unknown
+ workspace is refused before any provider is read, so the list adds no signal.
+- **Changing LDAP sign-in, or who may open General settings.**
+
+## Design
+
+### The pre-login list rides on `AuthenticationInfo`
+
+```proto
+// A provider as the login page sees it. Not a view of IdentityProvider:
+// every field here is published by hand.
+message LoginIdentityProvider {
+ string name = 1; // idps/{idp}
+ IdentityProviderType type = 2;
+ string title = 3;
+ // Set for OAUTH2 and OIDC, absent for LDAP.
+ AuthorizationRequest authorization_request = 4;
+}
+
+// What the browser needs to start the redirect, and nothing else.
+message AuthorizationRequest {
+ // The OAuth2 auth_url, or the authorization endpoint from the OIDC
+ // issuer's discovery document.
+ string endpoint = 1;
+ string client_id = 2;
+ repeated string scopes = 3;
+}
+```
+
+`AuthenticationInfo` gains `repeated LoginIdentityProvider identity_providers`. That is exactly what
+the browser puts in an authorization URL or on a button label; an LDAP entry carries name, type and
+title, and the message has nowhere to put a host.
+
+A separate message rather than a mask over `IdentityProvider` is what makes G3 structural: a new
+LDAP attribute or OIDC field reaches no one until someone writes a line for it here.
+
+The server returns the named workspace's providers, falling back to the global ones when it has
+none — the fallback the client codes today, at the cost of a second anonymous round trip.
+
+### `ListIdentityProviders` becomes an admin method
+
+Drop the anonymous option and require `bb.identityProviders.list` under `auth_method = IAM`. The
+permission is new: `bb.identityProviders.get` reads one provider, and a collection read is its own
+verb. Workspace admin gains it in code; custom roles that already carry `.get` — the same roles that
+could already reach the SSO console — gain it in a data migration, so no existing grant silently
+stops working (G4).
+
+`parent` stays. Identity providers are workspace children and AIP-132 names the parent, which is
+also how every other workspace-scoped list here reads. What made `parent` dangerous was the
+anonymous method behind it, not the field: the gate is what stops a caller reading another
+workspace. The permission is checked against the credential's workspace, so the handler refuses a
+`parent` naming any other workspace rather than quietly serving the caller's own — a request the
+check never authorized.
+
+Dropping the anonymous option is breaking.
+
+### The method is named for what it returns
+
+`GetAuthenticationRestriction` now returns restrictions *and* providers, so it becomes
+`GetAuthenticationInfo`, matching its long-standing `AuthenticationInfo` response and the
+`/v1/auth/info` path. It stays anonymous and workspace-named.
+
+### General settings reads the bit, not the list
+
+The disallow-password-signin checkbox is an affordance only: `UpdateSetting` already refuses the
+write when no provider exists, and the checkbox is disabled anyway without
+`bb.settings.setWorkspaceProfile`. So the page takes the length of
+`AuthenticationInfo.identity_providers` — no permission a signed-in user lacks, and nothing newly
+disclosed. It is also the truer signal: the guard means "an SSO login path exists", which is what
+the login list enumerates rather than what the IdP table holds. The fetch is gated on self-hosted to
+match the toggle it feeds; today it runs in SaaS too, where the setting cannot be changed.
+
+## Alternatives
+
+- **Redact `IdentityProvider` by caller.** Smallest diff, closes it today, leaves the denylist
+ standing for the next field (fails G3).
+- **A `view` enum or field mask on the one method (AIP-157).** Two shapes behind one name, where the
+ anonymous shape is the default a mistake widens (fails G3).
+- **A second anonymous RPC.** The same content under a better name, at the cost of another
+ unauthenticated endpoint and another round trip (fails G5).
+- **Grant `bb.identityProviders.get` to `workspaceMember`.** Makes today's method gateable by handing
+ every member the LDAP config (fails G2).
+- **Reuse `bb.identityProviders.get` for the list.** Adds no permission and needs no backfill, but
+ collapses "read one provider" and "enumerate the collection" into one grant, which no other
+ resource here does.
+- **Drop `parent` and take the workspace from the token,** as #21184 did to `GetActuatorInfo`'s
+ `name`. Safe, but it removes the parent from a child collection for a danger the IAM gate already
+ answers, and leaves the list shaped unlike every other workspace-scoped list.
+- **`bool sso_configured` on the workspace profile read.** Serves General settings with a permission
+ members already hold, but builds a second path to a bit `AuthenticationInfo` carries and that is
+ anonymous either way.
+
+## Reference
+
+Every product fronting an SSO login page draws the line in the same place: a public document holding
+exactly what a client needs to begin the flow, and a gated API holding the configuration. Surveyed
+2026-09-02.
+
+| Element | Same as |
+|---|---|
+| Public metadata document, contents fixed by a spec | OIDC Discovery `/.well-known/openid-configuration`, RFC 8414 |
+| A public API for untrusted front-ends, separate from the configuration API | Auth0 Authentication API vs. Management API |
+| Provider configuration behind an admin role or scoped token | Keycloak `manage-identity-providers`, Okta `/api/v1/idps`, Grafana SSO Settings under RBAC |
+| Secrets withheld even from authorized readers | Grafana returns `clientSecret` as `*********` |
+| Directory bind configuration never client-facing | LDAP and AD binds are server-side in all of the above |
+
+Sources: [OpenID Connect Discovery 1.0](https://openid.net/specs/openid-connect-discovery-1_0.html) ·
+[RFC 8414](https://datatracker.ietf.org/doc/html/rfc8414) ·
+[Auth0 Management API](https://auth0.com/docs/api/management/v2) ·
+[Keycloak Admin REST API](https://www.keycloak.org/docs-api/latest/rest-api/index.html) ·
+[Okta Identity Providers API](https://developer.okta.com/docs/reference/api/idps/) ·
+[Grafana SSO Settings API](https://grafana.com/docs/grafana/latest/developer-resources/api-reference/http-api/api-legacy/sso-settings/).
diff --git a/docs/design/v1-api-audit-2026-08.md b/docs/design/v1-api-audit-2026-08.md
index 1c5c750d2c..db0db0e90e 100644
--- a/docs/design/v1-api-audit-2026-08.md
+++ b/docs/design/v1-api-audit-2026-08.md
@@ -63,7 +63,7 @@ and only a sweep like this one finds it.
following [#21184](https://github.com/bytebase/bytebase/pull/21184), so a new admin-side config
field cannot become public by default. Tracked in
[BYT-10156](https://linear.app/bytebase/issue/BYT-10156/listidentityproviders-leaks-ldap-config-to-anonymous-callers-t12).
-- **Workspace-existence oracle.** `GetAuthenticationRestriction` (which replaced the actuator leak,
+- **Workspace-existence oracle.** `GetAuthenticationInfo` (which replaced the actuator leak,
now fixed) is anonymous by design and doesn't need membership. Naming a real workspace returns
200, a fake one returns `InvalidArgument`. Left open on purpose: workspace IDs are
`RandomString(16)` with no rename path, so this confirms an ID already held rather than
diff --git a/frontend/scripts/check-react-i18n.mjs b/frontend/scripts/check-react-i18n.mjs
index 508fe99e82..65d249612d 100644
--- a/frontend/scripts/check-react-i18n.mjs
+++ b/frontend/scripts/check-react-i18n.mjs
@@ -42,6 +42,10 @@ const DYNAMIC_PREFIXES = [
// render, not as literal t("…") calls. See
// frontend/src/routes/auth/OAuthCallbackPage.tsx.
"auth.oauth-callback.",
+ // SSO redirect failures, thrown as SsoConfigError i18nKey string literals in
+ // utils/sso.ts and translated via t(error.i18nKey) by whichever page renders
+ // the notification (SigninPage, IdpTestConnection).
+ "auth.sso.",
// Returned from getReviewBadge as labelKey string literals, not invoked
// via t("…") in source. See frontend/src/routes/project/utils/reviewBadge.ts.
"common.bypassed",
diff --git a/frontend/src/app/router/routes/dashboard.tsx b/frontend/src/app/router/routes/dashboard.tsx
index e9c06daa81..dd1c014dc6 100644
--- a/frontend/src/app/router/routes/dashboard.tsx
+++ b/frontend/src/app/router/routes/dashboard.tsx
@@ -227,7 +227,10 @@ const workspaceLevelRoutes: RouteObject[] = [
{
path: "idps",
handle: {
- requiredPermissionList: (): Permission[] => ["bb.identityProviders.get"],
+ requiredPermissionList: (): Permission[] => [
+ "bb.identityProviders.get",
+ "bb.identityProviders.list",
+ ],
},
element: <RouteGroupOutlet />,
children: [
diff --git a/frontend/src/components/auth/IdpBrandIcon.test.tsx b/frontend/src/components/auth/IdpBrandIcon.test.tsx
index eda54e4399..6dd42dfc6d 100644
--- a/frontend/src/components/auth/IdpBrandIcon.test.tsx
+++ b/frontend/src/components/auth/IdpBrandIcon.test.tsx
@@ -2,7 +2,7 @@ import type { ReactElement } from "react";
import { act } from "react";
import { createRoot } from "react-dom/client";
import { describe, expect, test } from "vitest";
-import type { IdentityProvider } from "@/types/proto-es/v1/idp_service_pb";
+import type { LoginIdentityProvider } from "@/types/proto-es/v1/auth_service_pb";
import { IdpBrandIcon } from "./IdpBrandIcon";
(
@@ -18,22 +18,22 @@ const renderIntoContainer = (element: ReactElement) => {
return container;
};
-const oauth2Idp = (title: string, authUrl: string) =>
+const oauth2Idp = (title: string, endpoint: string) =>
({
name: "idps/test",
title,
- config: { config: { case: "oauth2Config", value: { authUrl } } },
- }) as IdentityProvider;
+ authorizationRequest: { endpoint },
+ }) as LoginIdentityProvider;
-const oidcIdp = (title: string, issuer: string) =>
+const oidcIdp = (title: string, endpoint: string) =>
({
name: "idps/test",
title,
- config: { config: { case: "oidcConfig", value: { issuer } } },
- }) as IdentityProvider;
+ authorizationRequest: { endpoint },
+ }) as LoginIdentityProvider;
const configlessIdp = (title: string) =>
- ({ name: "idps/test", title }) as IdentityProvider;
+ ({ name: "idps/test", title }) as LoginIdentityProvider;
// The Google "G" carries its mandatory brand blue; GitHub is currentColor.
const GOOGLE_BLUE = "#4285F4";
diff --git a/frontend/src/components/auth/IdpBrandIcon.tsx b/frontend/src/components/auth/IdpBrandIcon.tsx
index ee649a172b..14bfb52055 100644
--- a/frontend/src/components/auth/IdpBrandIcon.tsx
+++ b/frontend/src/components/auth/IdpBrandIcon.tsx
@@ -1,9 +1,10 @@
-import type { IdentityProvider } from "@/types/proto-es/v1/idp_service_pb";
+import type { LoginIdentityProvider } from "@/types/proto-es/v1/auth_service_pb";
+import { IdentityProviderType } from "@/types/proto-es/v1/idp_service_pb";
type Brand = "github" | "google" | "gitlab";
type Props = {
- readonly idp: IdentityProvider;
+ readonly idp: LoginIdentityProvider;
readonly className?: string;
};
@@ -30,20 +31,21 @@ function brandFromTitle(title: string): Brand | undefined {
return undefined;
}
-function configUrlOf(idp: IdentityProvider): string {
- const config = idp.config?.config;
- if (config?.case === "oauth2Config") return config.value.authUrl;
- if (config?.case === "oidcConfig") return config.value.issuer;
- return "";
-}
-
-// The config URL identifies where the user actually authenticates, so it is
-// authoritative: when present, a non-brand host renders no icon rather than
+// The authorization endpoint is where the user actually authenticates, so it
+// is authoritative: when present, a non-brand host renders no icon rather than
// falling back to the admin-editable title (which could claim another brand).
-function resolveBrand(idp: IdentityProvider): Brand | undefined {
- const configUrl = configUrlOf(idp);
- if (configUrl) {
- return brandFromHost(hostnameOf(configUrl));
+function resolveBrand(idp: LoginIdentityProvider): Brand | undefined {
+ const endpoint = idp.authorizationRequest?.endpoint ?? "";
+ if (endpoint) {
+ return brandFromHost(hostnameOf(endpoint));
+ }
+ // A redirect provider with no endpoint is misconfigured or its issuer was
+ // unreachable. Falling back to the title here would let it claim a brand.
+ if (
+ idp.type === IdentityProviderType.OAUTH2 ||
+ idp.type === IdentityProviderType.OIDC
+ ) {
+ return undefined;
}
return brandFromTitle(idp.title);
}
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index 6858cf29d0..c18199bc28 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -156,6 +156,7 @@
"failed-to-send-code": "Failed to send verification code. {{error}}",
"forget-password": "Forgot your password?",
"invited-email": "You've been invited. Please sign in with {{email}}",
+ "load-failed": "Couldn't load sign-in options. Please retry.",
"new-user": "New to Bytebase?",
"resend-code": "Resend code",
"resend-in": "Resend in {{seconds}}s",
@@ -172,6 +173,11 @@
"existing-user": "Already have an account?",
"title": "Register your account"
},
+ "sso": {
+ "invalid-authorization-url": "Invalid authorization URL: it must be a valid HTTP or HTTPS URL.",
+ "no-authorization-endpoint": "The identity provider published no authorization endpoint. Check its configuration.",
+ "unsupported-provider-type": "This identity provider type does not support SSO redirect."
+ },
"token-expired-description": "Token has expired, please login again",
"token-expired-title": "Token expired"
},
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index 7485c2720a..1866737541 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -156,6 +156,7 @@
"failed-to-send-code": "No se pudo enviar el código de verificación. {{error}}",
"forget-password": "¿Olvidaste tu contraseña?",
"invited-email": "Has sido invitado. Inicia sesión con {{email}}",
+ "load-failed": "No se pudieron cargar las opciones de inicio de sesión. Inténtalo de nuevo.",
"new-user": "¿Nuevo en Bytebase?",
"resend-code": "Reenviar código",
"resend-in": "Reenviar en {{seconds}}s",
@@ -172,6 +173,11 @@
"existing-user": "¿Ya tienes una cuenta?",
"title": "Registre su cuenta"
},
+ "sso": {
+ "invalid-authorization-url": "URL de autorización no válida: debe ser una URL HTTP o HTTPS válida.",
+ "no-authorization-endpoint": "El proveedor de identidad no publicó ningún punto de autorización. Revisa su configuración.",
+ "unsupported-provider-type": "Este tipo de proveedor de identidad no admite la redirección SSO."
+ },
"token-expired-description": "El token ha expirado, por favor inicia sesión nuevamente",
"token-expired-title": "Token expirado"
},
diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.json
index 894f6f15cf..2eb6a2aaac 100644
--- a/frontend/src/locales/ja-JP.json
+++ b/frontend/src/locales/ja-JP.json
@@ -156,6 +156,7 @@
"failed-to-send-code": "認証コードの送信に失敗しました。{{error}}",
"forget-password": "パスワードを忘れましたか?",
"invited-email": "招待されました。{{email}} でログインしてください",
+ "load-failed": "サインインオプションを読み込めませんでした。もう一度お試しください。",
"new-user": "Bytebase を初めて使用しますか?",
"resend-code": "コードを再送信",
"resend-in": "{{seconds}}秒後に再送信可能",
@@ -172,6 +173,11 @@
"existing-user": "すでにアカウントをお持ちですか?",
"title": "アカウントを登録してください"
},
+ "sso": {
+ "invalid-authorization-url": "認可URLが無効です。有効なHTTPまたはHTTPSのURLを指定してください。",
+ "no-authorization-endpoint": "IDプロバイダーが認可エンドポイントを公開していません。設定を確認してください。",
+ "unsupported-provider-type": "このIDプロバイダーの種類はSSOリダイレクトに対応していません。"
+ },
"token-expired-description": "トークンの有効期限が切れています。再度ログインしてください。",
"token-expired-title": "トークンの期限切れ"
},
diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.json
index ae4ec00d5e..95b4b98529 100644
--- a/frontend/src/locales/vi-VN.json
+++ b/frontend/src/locales/vi-VN.json
@@ -156,6 +156,7 @@
"failed-to-send-code": "Không gửi được mã xác minh. {{error}}",
"forget-password": "Quên mật khẩu?",
"invited-email": "Bạn đã được mời. Vui lòng đăng nhập bằng {{email}}",
+ "load-failed": "Không thể tải các tùy chọn đăng nhập. Vui lòng thử lại.",
"new-user": "Mới sử dụng Bytebase?",
"resend-code": "Gửi lại mã",
"resend-in": "Gửi lại sau {{seconds}}s",
@@ -172,6 +173,11 @@
"existing-user": "Đã có tài khoản?",
"title": "Đăng ký tài khoản của bạn"
},
+ "sso": {
+ "invalid-authorization-url": "URL ủy quyền không hợp lệ: phải là URL HTTP hoặc HTTPS hợp lệ.",
+ "no-authorization-endpoint": "Nhà cung cấp danh tính không công bố điểm cuối ủy quyền. Hãy kiểm tra cấu hình.",
+ "unsupported-provider-type": "Loại nhà cung cấp danh tính này không hỗ trợ chuyển hướng SSO."
+ },
"token-expired-description": "Mã thông báo đã hết hạn, vui lòng đăng nhập lại",
"token-expired-title": "Mã thông báo đã hết hạn"
},
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 60d3a462a9..a8e10f8558 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -156,6 +156,7 @@
"failed-to-send-code": "发送验证码失败。{{error}}",
"forget-password": "忘记密码?",
"invited-email": "您已被邀请,请使用 {{email}} 登录",
+ "load-failed": "无法加载登录选项,请重试。",
"new-user": "第一次使用 Bytebase?",
"resend-code": "重新发送验证码",
"resend-in": "{{seconds}} 秒后重新发送",
@@ -172,6 +173,11 @@
"existing-user": "已有账号?",
"title": "注册您的账号"
},
+ "sso": {
+ "invalid-authorization-url": "授权 URL 无效:必须是有效的 HTTP 或 HTTPS 地址。",
+ "no-authorization-endpoint": "身份提供商未公开授权端点,请检查其配置。",
+ "unsupported-provider-type": "该身份提供商类型不支持 SSO 跳转。"
+ },
"token-expired-description": "Token 已过期,请重新登录",
"token-expired-title": "令牌已过期"
},
diff --git a/frontend/src/routes/auth/SigninPage.test.tsx b/frontend/src/routes/auth/SigninPage.test.tsx
index da0529d565..e3ef0f8158 100644
--- a/frontend/src/routes/auth/SigninPage.test.tsx
+++ b/frontend/src/routes/auth/SigninPage.test.tsx
@@ -17,8 +17,7 @@ const mocks = vi.hoisted(() => ({
pushNotification: vi.fn(),
openWindowForSSO: vi.fn(),
actuatorStore: null as unknown,
- identityProviderList: [] as unknown[],
- listIdentityProviders: vi.fn(),
+ identityProviders: [] as unknown[],
authStore: null as unknown,
}));
@@ -38,12 +37,18 @@ vi.mock("@/stores", () => ({
}));
vi.mock("@/stores/app", () => {
- const getState = () => ({
- ...(mocks.actuatorStore as Record<string, unknown>),
- identityProviderList: () => mocks.identityProviderList,
- listIdentityProviders: mocks.listIdentityProviders,
- login: (mocks.authStore as { login: unknown }).login,
- });
+ const getState = () => {
+ const store = mocks.actuatorStore as Record<string, unknown>;
+ const info = store.authenticationInfo as Record<string, unknown> | undefined;
+ return {
+ ...store,
+ // The login page reads its providers off the authentication info.
+ authenticationInfo: info
+ ? { ...info, identityProviders: mocks.identityProviders }
+ : info,
+ login: (mocks.authStore as { login: unknown }).login,
+ };
+ };
return {
useAppStore: Object.assign(
(selector?: (state: ReturnType<typeof getState>) => unknown) =>
@@ -120,20 +125,13 @@ beforeEach(async () => {
},
fetchAuthenticationInfo: vi.fn(async () => ({})),
};
- mocks.identityProviderList = [
+ mocks.identityProviders = [
{
name: "idps/corp-ldap",
title: "Corp LDAP",
type: IdentityProviderType.LDAP,
},
];
- mocks.listIdentityProviders.mockResolvedValue([
- {
- name: "idps/corp-ldap",
- title: "Corp LDAP",
- type: IdentityProviderType.LDAP,
- },
- ]);
mocks.authStore = {
login: vi.fn(async () => {}),
};
@@ -153,8 +151,7 @@ describe("SigninPage", () => {
},
fetchAuthenticationInfo: vi.fn(async () => ({})),
};
- mocks.identityProviderList = [];
- mocks.listIdentityProviders.mockResolvedValue([]);
+ mocks.identityProviders = [];
const { render, unmount } = renderIntoContainer(<SigninPage />);
render();
@@ -179,8 +176,7 @@ describe("SigninPage", () => {
},
fetchAuthenticationInfo: vi.fn(async () => ({})),
};
- mocks.identityProviderList = [];
- mocks.listIdentityProviders.mockResolvedValue([]);
+ mocks.identityProviders = [];
const { render, unmount } = renderIntoContainer(<SigninPage />);
render();
@@ -238,15 +234,20 @@ describe("SigninPage", () => {
name: "idps/github",
title: "GitHub",
type: IdentityProviderType.OAUTH2,
+ authorizationRequest: {
+ endpoint: "https://github.com/login/oauth/authorize",
+ },
},
{
name: "idps/google",
title: "Google",
type: IdentityProviderType.OAUTH2,
+ authorizationRequest: {
+ endpoint: "https://accounts.google.com/o/oauth2/v2/auth",
+ },
},
];
- mocks.identityProviderList = idps;
- mocks.listIdentityProviders.mockResolvedValue(idps);
+ mocks.identityProviders = idps;
const { container, render, unmount } = renderIntoContainer(<SigninPage />);
render();
@@ -313,8 +314,7 @@ describe("SigninPage", () => {
},
fetchAuthenticationInfo: vi.fn(async () => ({})),
};
- mocks.identityProviderList = [];
- mocks.listIdentityProviders.mockResolvedValue([]);
+ mocks.identityProviders = [];
const { container, render, unmount } = renderIntoContainer(<SigninPage />);
render();
@@ -342,8 +342,7 @@ describe("SigninPage", () => {
},
fetchAuthenticationInfo: vi.fn(async () => ({})),
};
- mocks.identityProviderList = [];
- mocks.listIdentityProviders.mockResolvedValue([]);
+ mocks.identityProviders = [];
const { container, render, unmount } = renderIntoContainer(
<SigninPage allowSignup={false} />
@@ -372,8 +371,7 @@ describe("SigninPage", () => {
},
fetchAuthenticationInfo: vi.fn(async () => ({})),
};
- mocks.identityProviderList = [];
- mocks.listIdentityProviders.mockResolvedValue([]);
+ mocks.identityProviders = [];
const { container, render, unmount } = renderIntoContainer(<SigninPage />);
render();
diff --git a/frontend/src/routes/auth/SigninPage.tsx b/frontend/src/routes/auth/SigninPage.tsx
index 3be9d0df3c..1db1a06dc7 100644
--- a/frontend/src/routes/auth/SigninPage.tsx
+++ b/frontend/src/routes/auth/SigninPage.tsx
@@ -12,15 +12,16 @@ import { RouterLink } from "@/components/RouterLink";
import { Alert } from "@/components/ui/alert";
import { Button } from "@/components/ui/button";
import { Tabs, TabsList, TabsPanel, TabsTrigger } from "@/components/ui/tabs";
-import { useIdentityProviderList } from "@/hooks/useAppState";
import { resolveWorkspaceName } from "@/lib/workspace";
import { pushNotification } from "@/stores";
import { useAppStore } from "@/stores/app";
import { idpNamePrefix } from "@/stores/modules/v1/common";
-import type { LoginRequest } from "@/types/proto-es/v1/auth_service_pb";
-import type { IdentityProvider } from "@/types/proto-es/v1/idp_service_pb";
+import type {
+ LoginIdentityProvider,
+ LoginRequest,
+} from "@/types/proto-es/v1/auth_service_pb";
import { IdentityProviderType } from "@/types/proto-es/v1/idp_service_pb";
-import { openWindowForSSO } from "@/utils";
+import { openWindowForSSO, SsoConfigError } from "@/utils";
export type SigninPageProps = {
readonly redirect?: boolean;
@@ -43,7 +44,7 @@ export function SigninPage(props: SigninPageProps) {
const [initialized, setInitialized] = useState(false);
const authenticationInfo = useAppStore((s) => s.authenticationInfo);
- const identityProviders = useIdentityProviderList();
+ const identityProviders = authenticationInfo?.identityProviders ?? [];
const query = router.currentRoute.value.query;
const invitedEmail = (query.email as string | undefined) ?? "";
@@ -79,7 +80,7 @@ export function SigninPage(props: SigninPageProps) {
}
}, [initialized, needsInitialSetup, disallowSignup]);
- const trySigninWithIdp = async (idp: IdentityProvider) => {
+ const trySigninWithIdp = async (idp: LoginIdentityProvider) => {
try {
await openWindowForSSO(idp, false, query.redirect as string);
} catch (error) {
@@ -87,7 +88,10 @@ export function SigninPage(props: SigninPageProps) {
module: "bytebase",
style: "CRITICAL",
title: "Request error occurred",
- description: (error as Error).message,
+ description:
+ error instanceof SsoConfigError
+ ? t(error.i18nKey)
+ : (error as Error).message,
});
}
};
@@ -106,40 +110,30 @@ export function SigninPage(props: SigninPageProps) {
}
};
- // Initial load: fetch authentication info + IDPs + handle `idp` query param.
- // Ref guard is critical — the `?idp=<name>` path triggers an SSO redirect
- // via `trySigninWithIdp`, which must not fire twice under StrictMode.
+ // Initial load: fetch authentication info, which carries the providers this
+ // page renders, then handle the `idp` query param. Ref guard is critical —
+ // the `?idp=<name>` path triggers an SSO redirect via `trySigninWithIdp`,
+ // which must not fire twice under StrictMode.
const initRef = useRef(false);
useEffect(() => {
if (initRef.current) return;
initRef.current = true;
(async () => {
- const workspaceName = resolveWorkspaceName();
- const listIdentityProviders =
- useAppStore.getState().listIdentityProviders;
- try {
- const [idpList] = await Promise.all([
- listIdentityProviders(workspaceName),
- useAppStore.getState().fetchAuthenticationInfo(workspaceName),
- ]);
- if (idpList.length === 0 && workspaceName) {
- await listIdentityProviders();
- }
- } catch (error) {
+ const info = await useAppStore
+ .getState()
+ .fetchAuthenticationInfo(resolveWorkspaceName());
+ if (!info) {
pushNotification({
module: "bytebase",
style: "CRITICAL",
title: "Request error occurred",
- description: (error as Error).message,
+ description: t("auth.sign-in.load-failed"),
});
}
const idpQuery = query.idp;
if (idpQuery) {
const name = `${idpNamePrefix}${idpQuery}`;
- const idp = useAppStore
- .getState()
- .identityProviderList()
- .find((i: IdentityProvider) => i.name === name);
+ const idp = info?.identityProviders.find((i) => i.name === name);
if (idp) {
// On success this navigates away; on failure `trySigninWithIdp`
// pushes a notification and we still need to show the form so the
diff --git a/frontend/src/routes/workspace/IdpTestConnection.tsx b/frontend/src/routes/workspace/IdpTestConnection.tsx
index be0f7a62b2..f7c6037519 100644
--- a/frontend/src/routes/workspace/IdpTestConnection.tsx
+++ b/frontend/src/routes/workspace/IdpTestConnection.tsx
@@ -17,7 +17,11 @@ import {
IdentityProviderType,
TestIdentityProviderRequestSchema,
} from "@/types/proto-es/v1/idp_service_pb";
-import { openWindowForSSO } from "@/utils";
+import {
+ openWindowForSSO,
+ SsoConfigError,
+ toLoginIdentityProvider,
+} from "@/utils";
// ============================================================
// KeyValueBox
@@ -349,13 +353,16 @@ export function TestConnectionButton({
currentEventNameRef.current = eventName;
try {
- await openWindowForSSO(idpForTesting);
+ await openWindowForSSO(toLoginIdentityProvider(idpForTesting));
} catch (error) {
pushNotification({
module: "bytebase",
style: "CRITICAL",
title: "Request error occurred",
- description: (error as ConnectError).message,
+ description:
+ error instanceof SsoConfigError
+ ? t(error.i18nKey)
+ : (error as ConnectError).message,
});
}
} else if (idp.type === IdentityProviderType.LDAP) {
diff --git a/frontend/src/routes/workspace/general/AccountSection.tsx b/frontend/src/routes/workspace/general/AccountSection.tsx
index afafc40138..794c7ba71d 100644
--- a/frontend/src/routes/workspace/general/AccountSection.tsx
+++ b/frontend/src/routes/workspace/general/AccountSection.tsx
@@ -96,11 +96,7 @@ export const AccountSection = forwardRef<SectionHandle, AccountSectionProps>(
function AccountSection({ title, onDirtyChange }, ref) {
const { t } = useTranslation();
- const listIdentityProviders = useAppStore(
- (state) => state.listIdentityProviders
- );
-
- const { isSaaSMode, workspaceResourceName } = useServerState();
+ const { isSaaSMode } = useServerState();
const hasDisallowSignupFeature = usePlanFeature(
PlanFeature.FEATURE_DISALLOW_SELF_SERVICE_SIGNUP
);
@@ -118,7 +114,7 @@ export const AccountSection = forwardRef<SectionHandle, AccountSectionProps>(
const [allowEdit] = usePermissionCheck(["bb.settings.setWorkspaceProfile"]);
const existActiveIdentityProvider = useAppStore(
- (state) => state.identityProviderList().length > 0
+ (state) => (state.authenticationInfo?.identityProviders.length ?? 0) > 0
);
// Track whether the EMAIL setting is configured (required to enable email-code signin).
@@ -127,12 +123,12 @@ export const AccountSection = forwardRef<SectionHandle, AccountSectionProps>(
(s) => !!s.getSettingByName(Setting_SettingName.EMAIL)
);
- // Fetch identity providers after the workspace resource name is ready.
+ // Refresh the login providers that gate the disallow-password-signin
+ // toggle, which is self-hosted only.
useEffect(() => {
- if (workspaceResourceName) {
- listIdentityProviders(workspaceResourceName);
- }
- }, [listIdentityProviders, workspaceResourceName]);
+ if (isSaaSMode) return;
+ useAppStore.getState().fetchAuthenticationInfo();
+ }, [isSaaSMode]);
// Fetch EMAIL setting on mount.
useEffect(() => {
diff --git a/frontend/src/stores/app/auth.ts b/frontend/src/stores/app/auth.ts
index 38a4c4df09..d86f3b464d 100644
--- a/frontend/src/stores/app/auth.ts
+++ b/frontend/src/stores/app/auth.ts
@@ -75,7 +75,7 @@ export const createAuthSlice: AppSliceCreator<AuthSlice> = (set, get) => ({
fetchAuthenticationInfo: async (workspace) => {
try {
- const info = await authServiceClientConnect.getAuthenticationRestriction({
+ const info = await authServiceClientConnect.getAuthenticationInfo({
workspace: workspace ?? get().currentUser?.workspace ?? "",
});
set({ authenticationInfo: info });
diff --git a/frontend/src/stores/app/identityProvider.ts b/frontend/src/stores/app/identityProvider.ts
index 04f0ff43d8..6f2bf7f1b6 100644
--- a/frontend/src/stores/app/identityProvider.ts
+++ b/frontend/src/stores/app/identityProvider.ts
@@ -42,9 +42,7 @@ export const createIdentityProviderSlice: AppSliceCreator<
listIdentityProviders: async (parent) => {
const response =
await identityProviderServiceClientConnect.listIdentityProviders(
- createProto(ListIdentityProvidersRequestSchema, {
- parent: parent ?? "",
- })
+ createProto(ListIdentityProvidersRequestSchema, { parent })
);
set({
identityProvidersByName: Object.fromEntries(
diff --git a/frontend/src/stores/app/index.test.ts b/frontend/src/stores/app/index.test.ts
index 2aa3333679..adb068a130 100644
--- a/frontend/src/stores/app/index.test.ts
+++ b/frontend/src/stores/app/index.test.ts
@@ -105,7 +105,7 @@ const mocks = vi.hoisted(() => ({
}
),
signup: vi.fn(),
- getAuthenticationRestriction: vi.fn(),
+ getAuthenticationInfo: vi.fn(),
getActuatorInfo: vi.fn(),
getWorkspace: vi.fn(),
updateWorkspace: vi.fn(),
@@ -196,7 +196,7 @@ vi.mock("@/api", () => ({
getActuatorInfo: mocks.getActuatorInfo,
},
authServiceClientConnect: {
- getAuthenticationRestriction: mocks.getAuthenticationRestriction,
+ getAuthenticationInfo: mocks.getAuthenticationInfo,
login: mocks.login,
logout: mocks.logout,
signup: mocks.signup,
@@ -1821,7 +1821,9 @@ describe("useAppStore", () => {
},
});
- const providers = await store.getState().listIdentityProviders();
+ const providers = await store
+ .getState()
+ .listIdentityProviders("workspaces/default");
expect(providers).toEqual([identityProviderA]);
expect(store.getState().identityProviderList()).toEqual([
@@ -2242,12 +2244,12 @@ describe("useAppStore", () => {
const info = createProto(AuthenticationInfoSchema, {
workspace: "workspaces/pre-login",
});
- mocks.getAuthenticationRestriction.mockResolvedValue(info);
+ mocks.getAuthenticationInfo.mockResolvedValue(info);
const store = createAppStore();
await store.getState().loadAuthenticationInfo();
- expect(mocks.getAuthenticationRestriction).toHaveBeenCalledWith({
+ expect(mocks.getAuthenticationInfo).toHaveBeenCalledWith({
workspace: "",
});
expect(mocks.getActuatorInfo).not.toHaveBeenCalled();
diff --git a/frontend/src/stores/app/types.ts b/frontend/src/stores/app/types.ts
index d38bbbf376..53823aa38a 100644
--- a/frontend/src/stores/app/types.ts
+++ b/frontend/src/stores/app/types.ts
@@ -798,7 +798,7 @@ export type IdentityProviderSlice = {
Promise<IdentityProvider | undefined>
>;
identityProviderList: () => IdentityProvider[];
- listIdentityProviders: (parent?: string) => Promise<IdentityProvider[]>;
+ listIdentityProviders: (parent: string) => Promise<IdentityProvider[]>;
fetchIdentityProvider: (
name: string,
silent?: boolean
diff --git a/frontend/src/types/iam/permission-generated.ts b/frontend/src/types/iam/permission-generated.ts
index 76d5db4f3b..a1cc6e9fc2 100644
--- a/frontend/src/types/iam/permission-generated.ts
+++ b/frontend/src/types/iam/permission-generated.ts
@@ -33,6 +33,7 @@ export type Permission =
| "bb.identityProviders.create"
| "bb.identityProviders.delete"
| "bb.identityProviders.get"
+ | "bb.identityProviders.list"
| "bb.identityProviders.update"
| "bb.instances.create"
| "bb.instances.delete"
diff --git a/frontend/src/types/proto-es/v1/auth_service_pb.d.ts b/frontend/src/types/proto-es/v1/auth_service_pb.d.ts
index 7e7881ed63..dd6dee027b 100644
--- a/frontend/src/types/proto-es/v1/auth_service_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/auth_service_pb.d.ts
@@ -5,6 +5,7 @@
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
import type { Message } from "@bufbuild/protobuf";
import type { WorkspaceProfileSetting_PasswordRestriction } from "./setting_service_pb";
+import type { IdentityProviderType } from "./idp_service_pb";
import type { User } from "./user_service_pb";
import type { EmptySchema } from "@bufbuild/protobuf/wkt";
@@ -14,9 +15,9 @@ import type { EmptySchema } from "@bufbuild/protobuf/wkt";
export declare const file_v1_auth_service: GenFile;
/**
- * @generated from message bytebase.v1.GetAuthenticationRestrictionRequest
+ * @generated from message bytebase.v1.GetAuthenticationInfoRequest
*/
-export declare type GetAuthenticationRestrictionRequest = Message<"bytebase.v1.GetAuthenticationRestrictionRequest"> & {
+export declare type GetAuthenticationInfoRequest = Message<"bytebase.v1.GetAuthenticationInfoRequest"> & {
/**
* Optional. The workspace whose authentication policy should be returned.
* Format: workspaces/{workspace}
@@ -29,10 +30,10 @@ export declare type GetAuthenticationRestrictionRequest = Message<"bytebase.v1.G
};
/**
- * Describes the message bytebase.v1.GetAuthenticationRestrictionRequest.
- * Use `create(GetAuthenticationRestrictionRequestSchema)` to create a new message.
+ * Describes the message bytebase.v1.GetAuthenticationInfoRequest.
+ * Use `create(GetAuthenticationInfoRequestSchema)` to create a new message.
*/
-export declare const GetAuthenticationRestrictionRequestSchema: GenMessage<GetAuthenticationRestrictionRequest>;
+export declare const GetAuthenticationInfoRequestSchema: GenMessage<GetAuthenticationInfoRequest>;
/**
* @generated from message bytebase.v1.AuthenticationInfo
@@ -52,6 +53,13 @@ export declare type AuthenticationInfo = Message<"bytebase.v1.AuthenticationInfo
* @generated from field: bytebase.v1.Restriction restriction = 2;
*/
restriction?: Restriction | undefined;
+
+ /**
+ * The identity providers the login page renders, in display order.
+ *
+ * @generated from field: repeated bytebase.v1.LoginIdentityProvider identity_providers = 3;
+ */
+ identityProviders: LoginIdentityProvider[];
};
/**
@@ -107,6 +115,87 @@ export declare type Restriction = Message<"bytebase.v1.Restriction"> & {
*/
export declare const RestrictionSchema: GenMessage<Restriction>;
+/**
+ * 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.
+ *
+ * @generated from message bytebase.v1.LoginIdentityProvider
+ */
+export declare type LoginIdentityProvider = Message<"bytebase.v1.LoginIdentityProvider"> & {
+ /**
+ * The name of the identity provider.
+ * Format: idps/{idp}
+ *
+ * @generated from field: string name = 1;
+ */
+ name: string;
+
+ /**
+ * The type of identity provider protocol.
+ *
+ * @generated from field: bytebase.v1.IdentityProviderType type = 2;
+ */
+ type: IdentityProviderType;
+
+ /**
+ * The display title of the identity provider.
+ *
+ * @generated from field: string title = 3;
+ */
+ title: string;
+
+ /**
+ * The parameters the browser needs to start the authorization redirect.
+ * Set for OAUTH2 and OIDC, absent for LDAP, whose bind happens server-side.
+ *
+ * @generated from field: bytebase.v1.AuthorizationRequest authorization_request = 4;
+ */
+ authorizationRequest?: AuthorizationRequest | undefined;
+};
+
+/**
+ * Describes the message bytebase.v1.LoginIdentityProvider.
+ * Use `create(LoginIdentityProviderSchema)` to create a new message.
+ */
+export declare const LoginIdentityProviderSchema: GenMessage<LoginIdentityProvider>;
+
+/**
+ * AuthorizationRequest is what a browser needs to start an SSO redirect.
+ *
+ * @generated from message bytebase.v1.AuthorizationRequest
+ */
+export declare type AuthorizationRequest = Message<"bytebase.v1.AuthorizationRequest"> & {
+ /**
+ * The OAuth2 auth_url, or the authorization endpoint from the OIDC issuer's
+ * discovery document.
+ *
+ * @generated from field: string endpoint = 1;
+ */
+ endpoint: string;
+
+ /**
+ * The OAuth2 or OIDC client identifier.
+ *
+ * @generated from field: string client_id = 2;
+ */
+ clientId: string;
+
+ /**
+ * The scopes to request.
+ *
+ * @generated from field: repeated string scopes = 3;
+ */
+ scopes: string[];
+};
+
+/**
+ * Describes the message bytebase.v1.AuthorizationRequest.
+ * Use `create(AuthorizationRequestSchema)` to create a new message.
+ */
+export declare const AuthorizationRequestSchema: GenMessage<AuthorizationRequest>;
+
/**
* @generated from message bytebase.v1.LoginRequest
*/
@@ -581,14 +670,15 @@ export declare const SwitchWorkspaceRequestSchema: GenMessage<SwitchWorkspaceReq
*/
export declare const AuthService: GenService<{
/**
- * Gets the effective restrictions needed to render authentication flows.
+ * Gets everything the login page renders: the sign-in restrictions and the
+ * identity providers it offers.
* Permissions required: None
*
- * @generated from rpc bytebase.v1.AuthService.GetAuthenticationRestriction
+ * @generated from rpc bytebase.v1.AuthService.GetAuthenticationInfo
*/
- getAuthenticationRestriction: {
+ getAuthenticationInfo: {
methodKind: "unary";
- input: typeof GetAuthenticationRestrictionRequestSchema;
+ input: typeof GetAuthenticationInfoRequestSchema;
output: typeof AuthenticationInfoSchema;
},
/**
diff --git a/frontend/src/types/proto-es/v1/auth_service_pb.js b/frontend/src/types/proto-es/v1/auth_service_pb.js
index ff3596203e..5186a0b07d 100644
--- a/frontend/src/types/proto-es/v1/auth_service_pb.js
+++ b/frontend/src/types/proto-es/v1/auth_service_pb.js
@@ -10,6 +10,7 @@ import { file_google_api_field_behavior } from "../google/api/field_behavior_pb"
import { file_google_api_resource } from "../google/api/resource_pb";
import { file_google_protobuf_empty } from "@bufbuild/protobuf/wkt";
import { file_v1_annotation } from "./annotation_pb";
+import { file_v1_idp_service } from "./idp_service_pb";
import { file_v1_setting_service } from "./setting_service_pb";
import { file_v1_user_service } from "./user_service_pb";
@@ -17,13 +18,13 @@ import { file_v1_user_service } from "./user_service_pb";
* Describes the file v1/auth_service.proto.
*/
export const file_v1_auth_service = /*@__PURE__*/
- fileDesc("ChV2MS9hdXRoX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIlUKI0dldEF1dGhlbnRpY2F0aW9uUmVzdHJpY3Rpb25SZXF1ZXN0Ei4KCXdvcmtzcGFjZRgBIAEoCUIb+kEYChZieXRlYmFzZS5jb20vV29ya3NwYWNlImAKEkF1dGhlbnRpY2F0aW9uSW5mbxIWCgl3b3Jrc3BhY2UYASABKAlCA+BBAxIyCgtyZXN0cmljdGlvbhgCIAEoCzIYLmJ5dGViYXNlLnYxLlJlc3RyaWN0aW9uQgPgQQMi+gEKC1Jlc3RyaWN0aW9uEhwKD2Rpc2FsbG93X3NpZ251cBgBIAEoCEID4EEDEiUKGGRpc2FsbG93X3Bhc3N3b3JkX3NpZ25pbhgCIAEoCEID4EEDElsKFHBhc3N3b3JkX3Jlc3RyaWN0aW9uGAMgASgLMjguYnl0ZWJhc2UudjEuV29ya3NwYWNlUHJvZmlsZVNldHRpbmcuUGFzc3dvcmRSZXN0cmljdGlvbkID4EEDEiQKF2FsbG93X2VtYWlsX2NvZGVfc2lnbmluGAQgASgIQgPgQQMSIwoWcGFzc3dvcmRfcmVzZXRfZW5hYmxlZBgFIAEoCEID4EEDIroDCgxMb2dpblJlcXVlc3QSFwoFZW1haWwYASABKAlCCLpIBXIDGP4BEh4KCHBhc3N3b3JkGAIgASgJQgy6SAVyAyiABNDqMAESCwoDd2ViGAMgASgIEhoKCGlkcF9uYW1lGAQgASgJQgi6SAVyAxiAAhI5CgtpZHBfY29udGV4dBgFIAEoCzIkLmJ5dGViYXNlLnYxLklkZW50aXR5UHJvdmlkZXJDb250ZXh0EiIKCG90cF9jb2RlGAYgASgJQgu6SARyAhhA0OowAUgAiAEBEicKDXJlY292ZXJ5X2NvZGUYByABKAlCC7pIBHICGEDQ6jABSAGIAQESKQoObWZhX3RlbXBfdG9rZW4YCCABKAlCDLpIBXIDGIAg0OowAUgCiAEBEiQKCmVtYWlsX2NvZGUYCSABKAlCC7pIBHICGEDQ6jABSAOIAQESIAoJd29ya3NwYWNlGAogASgJQgi6SAVyAxiAAkgEiAEBQgsKCV9vdHBfY29kZUIQCg5fcmVjb3ZlcnlfY29kZUIRCg9fbWZhX3RlbXBfdG9rZW5CDQoLX2VtYWlsX2NvZGVCDAoKX3dvcmtzcGFjZSKsAQoXSWRlbnRpdHlQcm92aWRlckNvbnRleHQSRAoOb2F1dGgyX2NvbnRleHQYASABKAsyKi5ieXRlYmFzZS52MS5PQXV0aDJJZGVudGl0eVByb3ZpZGVyQ29udGV4dEgAEkAKDG9pZGNfY29udGV4dBgCIAEoCzIoLmJ5dGViYXNlLnYxLk9JRENJZGVudGl0eVByb3ZpZGVyQ29udGV4dEgAQgkKB2NvbnRleHQiOwodT0F1dGgySWRlbnRpdHlQcm92aWRlckNvbnRleHQSGgoEY29kZRgBIAEoCUIMukgFcgMYgCDQ6jABIjkKG09JRENJZGVudGl0eVByb3ZpZGVyQ29udGV4dBIaCgRjb2RlGAEgASgJQgy6SAVyAxiAINDqMAEimwEKDUxvZ2luUmVzcG9uc2USEwoFdG9rZW4YASABKAlCBNDqMAESIQoObWZhX3RlbXBfdG9rZW4YAiABKAlCBNDqMAFIAIgBARIeChZyZXF1aXJlX3Jlc2V0X3Bhc3N3b3JkGAMgASgIEh8KBHVzZXIYBCABKAsyES5ieXRlYmFzZS52MS5Vc2VyQhEKD19tZmFfdGVtcF90b2tlbiIPCg1Mb2dvdXRSZXF1ZXN0Ik0KFEV4Y2hhbmdlVG9rZW5SZXF1ZXN0EhwKBXRva2VuGAEgASgJQg26SAZyBBiAgATQ6jABEhcKBWVtYWlsGAIgASgJQgi6SAVyAxj+ASIzChVFeGNoYW5nZVRva2VuUmVzcG9uc2USGgoMYWNjZXNzX3Rva2VuGAEgASgJQgTQ6jABImAKDVNpZ251cFJlcXVlc3QSFwoFZW1haWwYASABKAlCCLpIBXIDGP4BEh0KCHBhc3N3b3JkGAIgASgJQgu6SARyAihI0OowARIXCgV0aXRsZRgDIAEoCUIIukgFcgMYyAEiEAoOUmVmcmVzaFJlcXVlc3QiEQoPUmVmcmVzaFJlc3BvbnNlImYKG1JlcXVlc3RQYXNzd29yZFJlc2V0UmVxdWVzdBIXCgVlbWFpbBgBIAEoCUIIukgFcgMY/gESIAoJd29ya3NwYWNlGAIgASgJQgi6SAVyAxiAAkgAiAEBQgwKCl93b3Jrc3BhY2UibQoUUmVzZXRQYXNzd29yZFJlcXVlc3QSFwoFZW1haWwYASABKAlCCLpIBXIDGP4BEhkKBGNvZGUYAiABKAlCC7pIBHICGEDQ6jABEiEKDG5ld19wYXNzd29yZBgDIAEoCUILukgEcgIoSNDqMAEiZAoZU2VuZEVtYWlsTG9naW5Db2RlUmVxdWVzdBIXCgVlbWFpbBgBIAEoCUIIukgFcgMY/gESIAoJd29ya3NwYWNlGAIgASgJQgi6SAVyAxiAAkgAiAEBQgwKCl93b3Jrc3BhY2Ui7AEKFlN3aXRjaFdvcmtzcGFjZVJlcXVlc3QSGwoJd29ya3NwYWNlGAEgASgJQgi6SAVyAxiAAhILCgN3ZWIYAiABKAgSIgoIb3RwX2NvZGUYAyABKAlCC7pIBHICGEDQ6jABSACIAQESJwoNcmVjb3ZlcnlfY29kZRgEIAEoCUILukgEcgIYQNDqMAFIAYgBARIpCg5tZmFfdGVtcF90b2tlbhgFIAEoCUIMukgFcgMYgCDQ6jABSAKIAQFCCwoJX290cF9jb2RlQhAKDl9yZWNvdmVyeV9jb2RlQhEKD19tZmFfdGVtcF90b2tlbjLCCgoLQXV0aFNlcnZpY2USywEKHEdldEF1dGhlbnRpY2F0aW9uUmVzdHJpY3Rpb24SMC5ieXRlYmFzZS52MS5HZXRBdXRoZW50aWNhdGlvblJlc3RyaWN0aW9uUmVxdWVzdBofLmJ5dGViYXNlLnYxLkF1dGhlbnRpY2F0aW9uSW5mbyJY2kEAgOowAaDqMAGC0+STAkdaLxItL3YxL3t3b3Jrc3BhY2U9d29ya3NwYWNlcy8qfS9hdXRoL3Jlc3RyaWN0aW9uEhQvdjEvYXV0aC9yZXN0cmljdGlvbhJpCgVMb2dpbhIZLmJ5dGViYXNlLnYxLkxvZ2luUmVxdWVzdBoaLmJ5dGViYXNlLnYxLkxvZ2luUmVzcG9uc2UiKYDqMAGY6jABoOowA6jqMAGC0+STAhM6ASoiDi92MS9hdXRoL2xvZ2luEmgKBkxvZ291dBIaLmJ5dGViYXNlLnYxLkxvZ291dFJlcXVlc3QaFi5nb29nbGUucHJvdG9idWYuRW1wdHkiKoDqMAGY6jABoOowA6jqMASC0+STAhQ6ASoiDy92MS9hdXRoL2xvZ291dBKJAQoNRXhjaGFuZ2VUb2tlbhIhLmJ5dGViYXNlLnYxLkV4Y2hhbmdlVG9rZW5SZXF1ZXN0GiIuYnl0ZWJhc2UudjEuRXhjaGFuZ2VUb2tlblJlc3BvbnNlIjGA6jABmOowAaDqMAOo6jABgtPkkwIbOgEqIhYvdjEvYXV0aDpleGNoYW5nZVRva2VuEmwKBlNpZ251cBIaLmJ5dGViYXNlLnYxLlNpZ251cFJlcXVlc3QaGi5ieXRlYmFzZS52MS5Mb2dpblJlc3BvbnNlIiqA6jABmOowAaDqMAOo6jABgtPkkwIUOgEqIg8vdjEvYXV0aC9zaWdudXASbQoHUmVmcmVzaBIbLmJ5dGViYXNlLnYxLlJlZnJlc2hSZXF1ZXN0GhwuYnl0ZWJhc2UudjEuUmVmcmVzaFJlc3BvbnNlIieA6jABoOowA6jqMAGC0+STAhU6ASoiEC92MS9hdXRoL3JlZnJlc2gSgwEKD1N3aXRjaFdvcmtzcGFjZRIjLmJ5dGViYXNlLnYxLlN3aXRjaFdvcmtzcGFjZVJlcXVlc3QaGi5ieXRlYmFzZS52MS5Mb2dpblJlc3BvbnNlIi+Q6jACoOowA6jqMAGC0+STAh06ASoiGC92MS9hdXRoOnN3aXRjaFdvcmtzcGFjZRKSAQoUUmVxdWVzdFBhc3N3b3JkUmVzZXQSKC5ieXRlYmFzZS52MS5SZXF1ZXN0UGFzc3dvcmRSZXNldFJlcXVlc3QaFi5nb29nbGUucHJvdG9idWYuRW1wdHkiOIDqMAGY6jABoOowA6jqMAKC0+STAiI6ASoiHS92MS9hdXRoOnJlcXVlc3RQYXNzd29yZFJlc2V0En0KDVJlc2V0UGFzc3dvcmQSIS5ieXRlYmFzZS52MS5SZXNldFBhc3N3b3JkUmVxdWVzdBoWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eSIxgOowAZjqMAGg6jADqOowAoLT5JMCGzoBKiIWL3YxL2F1dGg6cmVzZXRQYXNzd29yZBKMAQoSU2VuZEVtYWlsTG9naW5Db2RlEiYuYnl0ZWJhc2UudjEuU2VuZEVtYWlsTG9naW5Db2RlUmVxdWVzdBoWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eSI2gOowAZjqMAGg6jADqOowAoLT5JMCIDoBKiIbL3YxL2F1dGg6c2VuZEVtYWlsTG9naW5Db2RlQqYBCg9jb20uYnl0ZWJhc2UudjFCEEF1dGhTZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_v1_annotation, file_v1_setting_service, file_v1_user_service]);
+ fileDesc("ChV2MS9hdXRoX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIk4KHEdldEF1dGhlbnRpY2F0aW9uSW5mb1JlcXVlc3QSLgoJd29ya3NwYWNlGAEgASgJQhv6QRgKFmJ5dGViYXNlLmNvbS9Xb3Jrc3BhY2UipQEKEkF1dGhlbnRpY2F0aW9uSW5mbxIWCgl3b3Jrc3BhY2UYASABKAlCA+BBAxIyCgtyZXN0cmljdGlvbhgCIAEoCzIYLmJ5dGViYXNlLnYxLlJlc3RyaWN0aW9uQgPgQQMSQwoSaWRlbnRpdHlfcHJvdmlkZXJzGAMgAygLMiIuYnl0ZWJhc2UudjEuTG9naW5JZGVudGl0eVByb3ZpZGVyQgPgQQMi+gEKC1Jlc3RyaWN0aW9uEhwKD2Rpc2FsbG93X3NpZ251cBgBIAEoCEID4EEDEiUKGGRpc2FsbG93X3Bhc3N3b3JkX3NpZ25pbhgCIAEoCEID4EEDElsKFHBhc3N3b3JkX3Jlc3RyaWN0aW9uGAMgASgLMjguYnl0ZWJhc2UudjEuV29ya3NwYWNlUHJvZmlsZVNldHRpbmcuUGFzc3dvcmRSZXN0cmljdGlvbkID4EEDEiQKF2FsbG93X2VtYWlsX2NvZGVfc2lnbmluGAQgASgIQgPgQQMSIwoWcGFzc3dvcmRfcmVzZXRfZW5hYmxlZBgFIAEoCEID4EEDIqcBChVMb2dpbklkZW50aXR5UHJvdmlkZXISDAoEbmFtZRgBIAEoCRIvCgR0eXBlGAIgASgOMiEuYnl0ZWJhc2UudjEuSWRlbnRpdHlQcm92aWRlclR5cGUSDQoFdGl0bGUYAyABKAkSQAoVYXV0aG9yaXphdGlvbl9yZXF1ZXN0GAQgASgLMiEuYnl0ZWJhc2UudjEuQXV0aG9yaXphdGlvblJlcXVlc3QiSwoUQXV0aG9yaXphdGlvblJlcXVlc3QSEAoIZW5kcG9pbnQYASABKAkSEQoJY2xpZW50X2lkGAIgASgJEg4KBnNjb3BlcxgDIAMoCSK6AwoMTG9naW5SZXF1ZXN0EhcKBWVtYWlsGAEgASgJQgi6SAVyAxj+ARIeCghwYXNzd29yZBgCIAEoCUIMukgFcgMogATQ6jABEgsKA3dlYhgDIAEoCBIaCghpZHBfbmFtZRgEIAEoCUIIukgFcgMYgAISOQoLaWRwX2NvbnRleHQYBSABKAsyJC5ieXRlYmFzZS52MS5JZGVudGl0eVByb3ZpZGVyQ29udGV4dBIiCghvdHBfY29kZRgGIAEoCUILukgEcgIYQNDqMAFIAIgBARInCg1yZWNvdmVyeV9jb2RlGAcgASgJQgu6SARyAhhA0OowAUgBiAEBEikKDm1mYV90ZW1wX3Rva2VuGAggASgJQgy6SAVyAxiAINDqMAFIAogBARIkCgplbWFpbF9jb2RlGAkgASgJQgu6SARyAhhA0OowAUgDiAEBEiAKCXdvcmtzcGFjZRgKIAEoCUIIukgFcgMYgAJIBIgBAUILCglfb3RwX2NvZGVCEAoOX3JlY292ZXJ5X2NvZGVCEQoPX21mYV90ZW1wX3Rva2VuQg0KC19lbWFpbF9jb2RlQgwKCl93b3Jrc3BhY2UirAEKF0lkZW50aXR5UHJvdmlkZXJDb250ZXh0EkQKDm9hdXRoMl9jb250ZXh0GAEgASgLMiouYnl0ZWJhc2UudjEuT0F1dGgySWRlbnRpdHlQcm92aWRlckNvbnRleHRIABJACgxvaWRjX2NvbnRleHQYAiABKAsyKC5ieXRlYmFzZS52MS5PSURDSWRlbnRpdHlQcm92aWRlckNvbnRleHRIAEIJCgdjb250ZXh0IjsKHU9BdXRoMklkZW50aXR5UHJvdmlkZXJDb250ZXh0EhoKBGNvZGUYASABKAlCDLpIBXIDGIAg0OowASI5ChtPSURDSWRlbnRpdHlQcm92aWRlckNvbnRleHQSGgoEY29kZRgBIAEoCUIMukgFcgMYgCDQ6jABIpsBCg1Mb2dpblJlc3BvbnNlEhMKBXRva2VuGAEgASgJQgTQ6jABEiEKDm1mYV90ZW1wX3Rva2VuGAIgASgJQgTQ6jABSACIAQESHgoWcmVxdWlyZV9yZXNldF9wYXNzd29yZBgDIAEoCBIfCgR1c2VyGAQgASgLMhEuYnl0ZWJhc2UudjEuVXNlckIRCg9fbWZhX3RlbXBfdG9rZW4iDwoNTG9nb3V0UmVxdWVzdCJNChRFeGNoYW5nZVRva2VuUmVxdWVzdBIcCgV0b2tlbhgBIAEoCUINukgGcgQYgIAE0OowARIXCgVlbWFpbBgCIAEoCUIIukgFcgMY/gEiMwoVRXhjaGFuZ2VUb2tlblJlc3BvbnNlEhoKDGFjY2Vzc190b2tlbhgBIAEoCUIE0OowASJgCg1TaWdudXBSZXF1ZXN0EhcKBWVtYWlsGAEgASgJQgi6SAVyAxj+ARIdCghwYXNzd29yZBgCIAEoCUILukgEcgIoSNDqMAESFwoFdGl0bGUYAyABKAlCCLpIBXIDGMgBIhAKDlJlZnJlc2hSZXF1ZXN0IhEKD1JlZnJlc2hSZXNwb25zZSJmChtSZXF1ZXN0UGFzc3dvcmRSZXNldFJlcXVlc3QSFwoFZW1haWwYASABKAlCCLpIBXIDGP4BEiAKCXdvcmtzcGFjZRgCIAEoCUIIukgFcgMYgAJIAIgBAUIMCgpfd29ya3NwYWNlIm0KFFJlc2V0UGFzc3dvcmRSZXF1ZXN0EhcKBWVtYWlsGAEgASgJQgi6SAVyAxj+ARIZCgRjb2RlGAIgASgJQgu6SARyAhhA0OowARIhCgxuZXdfcGFzc3dvcmQYAyABKAlCC7pIBHICKEjQ6jABImQKGVNlbmRFbWFpbExvZ2luQ29kZVJlcXVlc3QSFwoFZW1haWwYASABKAlCCLpIBXIDGP4BEiAKCXdvcmtzcGFjZRgCIAEoCUIIukgFcgMYgAJIAIgBAUIMCgpfd29ya3NwYWNlIuwBChZTd2l0Y2hXb3Jrc3BhY2VSZXF1ZXN0EhsKCXdvcmtzcGFjZRgBIAEoCUIIukgFcgMYgAISCwoDd2ViGAIgASgIEiIKCG90cF9jb2RlGAMgASgJQgu6SARyAhhA0OowAUgAiAEBEicKDXJlY292ZXJ5X2NvZGUYBCABKAlCC7pIBHICGEDQ6jABSAGIAQESKQoObWZhX3RlbXBfdG9rZW4YBSABKAlCDLpIBXIDGIAg0OowAUgCiAEBQgsKCV9vdHBfY29kZUIQCg5fcmVjb3ZlcnlfY29kZUIRCg9fbWZhX3RlbXBfdG9rZW4ypgoKC0F1dGhTZXJ2aWNlEq8BChVHZXRBdXRoZW50aWNhdGlvbkluZm8SKS5ieXRlYmFzZS52MS5HZXRBdXRoZW50aWNhdGlvbkluZm9SZXF1ZXN0Gh8uYnl0ZWJhc2UudjEuQXV0aGVudGljYXRpb25JbmZvIkraQQCA6jABoOowAYLT5JMCOVooEiYvdjEve3dvcmtzcGFjZT13b3Jrc3BhY2VzLyp9L2F1dGgvaW5mbxINL3YxL2F1dGgvaW5mbxJpCgVMb2dpbhIZLmJ5dGViYXNlLnYxLkxvZ2luUmVxdWVzdBoaLmJ5dGViYXNlLnYxLkxvZ2luUmVzcG9uc2UiKYDqMAGY6jABoOowA6jqMAGC0+STAhM6ASoiDi92MS9hdXRoL2xvZ2luEmgKBkxvZ291dBIaLmJ5dGViYXNlLnYxLkxvZ291dFJlcXVlc3QaFi5nb29nbGUucHJvdG9idWYuRW1wdHkiKoDqMAGY6jABoOowA6jqMASC0+STAhQ6ASoiDy92MS9hdXRoL2xvZ291dBKJAQoNRXhjaGFuZ2VUb2tlbhIhLmJ5dGViYXNlLnYxLkV4Y2hhbmdlVG9rZW5SZXF1ZXN0GiIuYnl0ZWJhc2UudjEuRXhjaGFuZ2VUb2tlblJlc3BvbnNlIjGA6jABmOowAaDqMAOo6jABgtPkkwIbOgEqIhYvdjEvYXV0aDpleGNoYW5nZVRva2VuEmwKBlNpZ251cBIaLmJ5dGViYXNlLnYxLlNpZ251cFJlcXVlc3QaGi5ieXRlYmFzZS52MS5Mb2dpblJlc3BvbnNlIiqA6jABmOowAaDqMAOo6jABgtPkkwIUOgEqIg8vdjEvYXV0aC9zaWdudXASbQoHUmVmcmVzaBIbLmJ5dGViYXNlLnYxLlJlZnJlc2hSZXF1ZXN0GhwuYnl0ZWJhc2UudjEuUmVmcmVzaFJlc3BvbnNlIieA6jABoOowA6jqMAGC0+STAhU6ASoiEC92MS9hdXRoL3JlZnJlc2gSgwEKD1N3aXRjaFdvcmtzcGFjZRIjLmJ5dGViYXNlLnYxLlN3aXRjaFdvcmtzcGFjZVJlcXVlc3QaGi5ieXRlYmFzZS52MS5Mb2dpblJlc3BvbnNlIi+Q6jACoOowA6jqMAGC0+STAh06ASoiGC92MS9hdXRoOnN3aXRjaFdvcmtzcGFjZRKSAQoUUmVxdWVzdFBhc3N3b3JkUmVzZXQSKC5ieXRlYmFzZS52MS5SZXF1ZXN0UGFzc3dvcmRSZXNldFJlcXVlc3QaFi5nb29nbGUucHJvdG9idWYuRW1wdHkiOIDqMAGY6jABoOowA6jqMAKC0+STAiI6ASoiHS92MS9hdXRoOnJlcXVlc3RQYXNzd29yZFJlc2V0En0KDVJlc2V0UGFzc3dvcmQSIS5ieXRlYmFzZS52MS5SZXNldFBhc3N3b3JkUmVxdWVzdBoWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eSIxgOowAZjqMAGg6jADqOowAoLT5JMCGzoBKiIWL3YxL2F1dGg6cmVzZXRQYXNzd29yZBKMAQoSU2VuZEVtYWlsTG9naW5Db2RlEiYuYnl0ZWJhc2UudjEuU2VuZEVtYWlsTG9naW5Db2RlUmVxdWVzdBoWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eSI2gOowAZjqMAGg6jADqOowAoLT5JMCIDoBKiIbL3YxL2F1dGg6c2VuZEVtYWlsTG9naW5Db2RlQqYBCg9jb20uYnl0ZWJhc2UudjFCEEF1dGhTZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_v1_annotation, file_v1_idp_service, file_v1_setting_service, file_v1_user_service]);
/**
- * Describes the message bytebase.v1.GetAuthenticationRestrictionRequest.
- * Use `create(GetAuthenticationRestrictionRequestSchema)` to create a new message.
+ * Describes the message bytebase.v1.GetAuthenticationInfoRequest.
+ * Use `create(GetAuthenticationInfoRequestSchema)` to create a new message.
*/
-export const GetAuthenticationRestrictionRequestSchema = /*@__PURE__*/
+export const GetAuthenticationInfoRequestSchema = /*@__PURE__*/
messageDesc(file_v1_auth_service, 0);
/**
@@ -40,110 +41,124 @@ export const AuthenticationInfoSchema = /*@__PURE__*/
export const RestrictionSchema = /*@__PURE__*/
messageDesc(file_v1_auth_service, 2);
+/**
+ * Describes the message bytebase.v1.LoginIdentityProvider.
+ * Use `create(LoginIdentityProviderSchema)` to create a new message.
+ */
+export const LoginIdentityProviderSchema = /*@__PURE__*/
+ messageDesc(file_v1_auth_service, 3);
+
+/**
+ * Describes the message bytebase.v1.AuthorizationRequest.
+ * Use `create(AuthorizationRequestSchema)` to create a new message.
+ */
+export const AuthorizationRequestSchema = /*@__PURE__*/
+ messageDesc(file_v1_auth_service, 4);
+
/**
* Describes the message bytebase.v1.LoginRequest.
* Use `create(LoginRequestSchema)` to create a new message.
*/
export const LoginRequestSchema = /*@__PURE__*/
- messageDesc(file_v1_auth_service, 3);
+ messageDesc(file_v1_auth_service, 5);
/**
* Describes the message bytebase.v1.IdentityProviderContext.
* Use `create(IdentityProviderContextSchema)` to create a new message.
*/
export const IdentityProviderContextSchema = /*@__PURE__*/
- messageDesc(file_v1_auth_service, 4);
+ messageDesc(file_v1_auth_service, 6);
/**
* Describes the message bytebase.v1.OAuth2IdentityProviderContext.
* Use `create(OAuth2IdentityProviderContextSchema)` to create a new message.
*/
export const OAuth2IdentityProviderContextSchema = /*@__PURE__*/
- messageDesc(file_v1_auth_service, 5);
+ messageDesc(file_v1_auth_service, 7);
/**
* Describes the message bytebase.v1.OIDCIdentityProviderContext.
* Use `create(OIDCIdentityProviderContextSchema)` to create a new message.
*/
export const OIDCIdentityProviderContextSchema = /*@__PURE__*/
- messageDesc(file_v1_auth_service, 6);
+ messageDesc(file_v1_auth_service, 8);
/**
* Describes the message bytebase.v1.LoginResponse.
* Use `create(LoginResponseSchema)` to create a new message.
*/
export const LoginResponseSchema = /*@__PURE__*/
- messageDesc(file_v1_auth_service, 7);
+ messageDesc(file_v1_auth_service, 9);
/**
* Describes the message bytebase.v1.LogoutRequest.
* Use `create(LogoutRequestSchema)` to create a new message.
*/
export const LogoutRequestSchema = /*@__PURE__*/
- messageDesc(file_v1_auth_service, 8);
+ messageDesc(file_v1_auth_service, 10);
/**
* Describes the message bytebase.v1.ExchangeTokenRequest.
* Use `create(ExchangeTokenRequestSchema)` to create a new message.
*/
export const ExchangeTokenRequestSchema = /*@__PURE__*/
- messageDesc(file_v1_auth_service, 9);
+ messageDesc(file_v1_auth_service, 11);
/**
* Describes the message bytebase.v1.ExchangeTokenResponse.
* Use `create(ExchangeTokenResponseSchema)` to create a new message.
*/
export const ExchangeTokenResponseSchema = /*@__PURE__*/
- messageDesc(file_v1_auth_service, 10);
+ messageDesc(file_v1_auth_service, 12);
/**
* Describes the message bytebase.v1.SignupRequest.
* Use `create(SignupRequestSchema)` to create a new message.
*/
export const SignupRequestSchema = /*@__PURE__*/
- messageDesc(file_v1_auth_service, 11);
+ messageDesc(file_v1_auth_service, 13);
/**
* Describes the message bytebase.v1.RefreshRequest.
* Use `create(RefreshRequestSchema)` to create a new message.
*/
export const RefreshRequestSchema = /*@__PURE__*/
- messageDesc(file_v1_auth_service, 12);
+ messageDesc(file_v1_auth_service, 14);
/**
* Describes the message bytebase.v1.RefreshResponse.
* Use `create(RefreshResponseSchema)` to create a new message.
*/
export const RefreshResponseSchema = /*@__PURE__*/
- messageDesc(file_v1_auth_service, 13);
+ messageDesc(file_v1_auth_service, 15);
/**
* Describes the message bytebase.v1.RequestPasswordResetRequest.
* Use `create(RequestPasswordResetRequestSchema)` to create a new message.
*/
export const RequestPasswordResetRequestSchema = /*@__PURE__*/
- messageDesc(file_v1_auth_service, 14);
+ messageDesc(file_v1_auth_service, 16);
/**
* Describes the message bytebase.v1.ResetPasswordRequest.
* Use `create(ResetPasswordRequestSchema)` to create a new message.
*/
export const ResetPasswordRequestSchema = /*@__PURE__*/
- messageDesc(file_v1_auth_service, 15);
+ messageDesc(file_v1_auth_service, 17);
/**
* Describes the message bytebase.v1.SendEmailLoginCodeRequest.
* Use `create(SendEmailLoginCodeRequestSchema)` to create a new message.
*/
export const SendEmailLoginCodeRequestSchema = /*@__PURE__*/
- messageDesc(file_v1_auth_service, 16);
+ messageDesc(file_v1_auth_service, 18);
/**
* Describes the message bytebase.v1.SwitchWorkspaceRequest.
* Use `create(SwitchWorkspaceRequestSchema)` to create a new message.
*/
export const SwitchWorkspaceRequestSchema = /*@__PURE__*/
- messageDesc(file_v1_auth_service, 17);
+ messageDesc(file_v1_auth_service, 19);
/**
* AuthService handles user authentication operations.
diff --git a/frontend/src/types/proto-es/v1/idp_service_pb.d.ts b/frontend/src/types/proto-es/v1/idp_service_pb.d.ts
index d949215692..cde3246802 100644
--- a/frontend/src/types/proto-es/v1/idp_service_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/idp_service_pb.d.ts
@@ -35,9 +35,9 @@ export declare const GetIdentityProviderRequestSchema: GenMessage<GetIdentityPro
*/
export declare type ListIdentityProvidersRequest = Message<"bytebase.v1.ListIdentityProvidersRequest"> & {
/**
- * The parent workspace whose identity providers should be listed.
+ * The parent workspace whose identity providers should be listed. It must be
+ * the workspace the caller's credential belongs to.
* Format: workspaces/{workspace}
- * When unset, the workspace is resolved from the request context.
*
* @generated from field: string parent = 1;
*/
@@ -766,8 +766,15 @@ export declare const IdentityProviderService: GenService<{
output: typeof IdentityProviderSchema;
},
/**
- * Lists all configured identity providers (public endpoint for login page).
- * Permissions required: None
+ * 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.
+ *
+ * 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
*
* @generated from rpc bytebase.v1.IdentityProviderService.ListIdentityProviders
*/
diff --git a/frontend/src/types/proto-es/v1/idp_service_pb.js b/frontend/src/types/proto-es/v1/idp_service_pb.js
index af00cb9842..0f2c8272a7 100644
--- a/frontend/src/types/proto-es/v1/idp_service_pb.js
+++ b/frontend/src/types/proto-es/v1/idp_service_pb.js
@@ -15,7 +15,7 @@ import { file_v1_annotation } from "./annotation_pb";
* Describes the file v1/idp_service.proto.
*/
export const file_v1_idp_service = /*@__PURE__*/
- fileDesc("ChR2MS9pZHBfc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEiRAoaR2V0SWRlbnRpdHlQcm92aWRlclJlcXVlc3QSJgoEbmFtZRgBIAEoCUIY4EEC+kESChBieXRlYmFzZS5jb20vSWRQIksKHExpc3RJZGVudGl0eVByb3ZpZGVyc1JlcXVlc3QSKwoGcGFyZW50GAEgASgJQhv6QRgKFmJ5dGViYXNlLmNvbS9Xb3Jrc3BhY2UiWgodTGlzdElkZW50aXR5UHJvdmlkZXJzUmVzcG9uc2USOQoSaWRlbnRpdHlfcHJvdmlkZXJzGAEgAygLMh0uYnl0ZWJhc2UudjEuSWRlbnRpdHlQcm92aWRlciKTAQodQ3JlYXRlSWRlbnRpdHlQcm92aWRlclJlcXVlc3QSPQoRaWRlbnRpdHlfcHJvdmlkZXIYASABKAsyHS5ieXRlYmFzZS52MS5JZGVudGl0eVByb3ZpZGVyQgPgQQISHAoUaWRlbnRpdHlfcHJvdmlkZXJfaWQYAiABKAkSFQoNdmFsaWRhdGVfb25seRgDIAEoCCKmAQodVXBkYXRlSWRlbnRpdHlQcm92aWRlclJlcXVlc3QSPQoRaWRlbnRpdHlfcHJvdmlkZXIYASABKAsyHS5ieXRlYmFzZS52MS5JZGVudGl0eVByb3ZpZGVyQgPgQQISLwoLdXBkYXRlX21hc2sYAiABKAsyGi5nb29nbGUucHJvdG9idWYuRmllbGRNYXNrEhUKDWFsbG93X21pc3NpbmcYAyABKAgiRwodRGVsZXRlSWRlbnRpdHlQcm92aWRlclJlcXVlc3QSJgoEbmFtZRgBIAEoCUIY4EEC+kESChBieXRlYmFzZS5jb20vSWRQIs0CChtUZXN0SWRlbnRpdHlQcm92aWRlclJlcXVlc3QSOAoRaWRlbnRpdHlfcHJvdmlkZXIYASABKAsyHS5ieXRlYmFzZS52MS5JZGVudGl0eVByb3ZpZGVyEk8KDm9hdXRoMl9jb250ZXh0GAIgASgLMjUuYnl0ZWJhc2UudjEuT0F1dGgySWRlbnRpdHlQcm92aWRlclRlc3RSZXF1ZXN0Q29udGV4dEgAEksKDG9pZGNfY29udGV4dBgDIAEoCzIzLmJ5dGViYXNlLnYxLk9JRENJZGVudGl0eVByb3ZpZGVyVGVzdFJlcXVlc3RDb250ZXh0SAASSwoMbGRhcF9jb250ZXh0GAQgASgLMjMuYnl0ZWJhc2UudjEuTERBUElkZW50aXR5UHJvdmlkZXJUZXN0UmVxdWVzdENvbnRleHRIAEIJCgdjb250ZXh0Ij4KKE9BdXRoMklkZW50aXR5UHJvdmlkZXJUZXN0UmVxdWVzdENvbnRleHQSEgoEY29kZRgBIAEoCUIE0OowASI8CiZPSURDSWRlbnRpdHlQcm92aWRlclRlc3RSZXF1ZXN0Q29udGV4dBISCgRjb2RlGAEgASgJQgTQ6jABIlIKJkxEQVBJZGVudGl0eVByb3ZpZGVyVGVzdFJlcXVlc3RDb250ZXh0EhAKCHVzZXJuYW1lGAEgASgJEhYKCHBhc3N3b3JkGAIgASgJQgTQ6jABIpECChxUZXN0SWRlbnRpdHlQcm92aWRlclJlc3BvbnNlEkUKBmNsYWltcxgBIAMoCzI1LmJ5dGViYXNlLnYxLlRlc3RJZGVudGl0eVByb3ZpZGVyUmVzcG9uc2UuQ2xhaW1zRW50cnkSSgoJdXNlcl9pbmZvGAIgAygLMjcuYnl0ZWJhc2UudjEuVGVzdElkZW50aXR5UHJvdmlkZXJSZXNwb25zZS5Vc2VySW5mb0VudHJ5Gi0KC0NsYWltc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCToCOAEaLwoNVXNlckluZm9FbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBItIBChBJZGVudGl0eVByb3ZpZGVyEgwKBG5hbWUYASABKAkSFwoFdGl0bGUYAiABKAlCCLpIBXIDGMgBEg4KBmRvbWFpbhgDIAEoCRIvCgR0eXBlGAQgASgOMiEuYnl0ZWJhc2UudjEuSWRlbnRpdHlQcm92aWRlclR5cGUSMwoGY29uZmlnGAUgASgLMiMuYnl0ZWJhc2UudjEuSWRlbnRpdHlQcm92aWRlckNvbmZpZzoh6kEeChBieXRlYmFzZS5jb20vSWRQEgppZHBzL3tpZHB9IuYBChZJZGVudGl0eVByb3ZpZGVyQ29uZmlnEkIKDW9hdXRoMl9jb25maWcYASABKAsyKS5ieXRlYmFzZS52MS5PQXV0aDJJZGVudGl0eVByb3ZpZGVyQ29uZmlnSAASPgoLb2lkY19jb25maWcYAiABKAsyJy5ieXRlYmFzZS52MS5PSURDSWRlbnRpdHlQcm92aWRlckNvbmZpZ0gAEj4KC2xkYXBfY29uZmlnGAMgASgLMicuYnl0ZWJhc2UudjEuTERBUElkZW50aXR5UHJvdmlkZXJDb25maWdIAEIICgZjb25maWcilwIKHE9BdXRoMklkZW50aXR5UHJvdmlkZXJDb25maWcSEAoIYXV0aF91cmwYASABKAkSEQoJdG9rZW5fdXJsGAIgASgJEhUKDXVzZXJfaW5mb191cmwYAyABKAkSEQoJY2xpZW50X2lkGAQgASgJEhsKDWNsaWVudF9zZWNyZXQYBSABKAlCBNDqMAESDgoGc2NvcGVzGAYgAygJEjAKDWZpZWxkX21hcHBpbmcYByABKAsyGS5ieXRlYmFzZS52MS5GaWVsZE1hcHBpbmcSFwoPc2tpcF90bHNfdmVyaWZ5GAggASgIEjAKCmF1dGhfc3R5bGUYCSABKA4yHC5ieXRlYmFzZS52MS5PQXV0aDJBdXRoU3R5bGUihQIKGk9JRENJZGVudGl0eVByb3ZpZGVyQ29uZmlnEg4KBmlzc3VlchgBIAEoCRIRCgljbGllbnRfaWQYAiABKAkSGwoNY2xpZW50X3NlY3JldBgDIAEoCUIE0OowARIOCgZzY29wZXMYBCADKAkSMAoNZmllbGRfbWFwcGluZxgFIAEoCzIZLmJ5dGViYXNlLnYxLkZpZWxkTWFwcGluZxIXCg9za2lwX3Rsc192ZXJpZnkYBiABKAgSMAoKYXV0aF9zdHlsZRgHIAEoDjIcLmJ5dGViYXNlLnYxLk9BdXRoMkF1dGhTdHlsZRIaCg1hdXRoX2VuZHBvaW50GAggASgJQgPgQQMi/QIKGkxEQVBJZGVudGl0eVByb3ZpZGVyQ29uZmlnEgwKBGhvc3QYASABKAkSDAoEcG9ydBgCIAEoBRIXCg9za2lwX3Rsc192ZXJpZnkYAyABKAgSDwoHYmluZF9kbhgEIAEoCRIbCg1iaW5kX3Bhc3N3b3JkGAUgASgJQgTQ6jABEg8KB2Jhc2VfZG4YBiABKAkSEwoLdXNlcl9maWx0ZXIYByABKAkSUwoRc2VjdXJpdHlfcHJvdG9jb2wYCCABKA4yOC5ieXRlYmFzZS52MS5MREFQSWRlbnRpdHlQcm92aWRlckNvbmZpZy5TZWN1cml0eVByb3RvY29sEjAKDWZpZWxkX21hcHBpbmcYCSABKAsyGS5ieXRlYmFzZS52MS5GaWVsZE1hcHBpbmciTwoQU2VjdXJpdHlQcm90b2NvbBIhCh1TRUNVUklUWV9QUk9UT0NPTF9VTlNQRUNJRklFRBAAEg0KCVNUQVJUX1RMUxABEgkKBUxEQVBTEAIiVwoMRmllbGRNYXBwaW5nEhIKCmlkZW50aWZpZXIYASABKAkSFAoMZGlzcGxheV9uYW1lGAIgASgJEg0KBXBob25lGAMgASgJEg4KBmdyb3VwcxgEIAEoCSpeChRJZGVudGl0eVByb3ZpZGVyVHlwZRImCiJJREVOVElUWV9QUk9WSURFUl9UWVBFX1VOU1BFQ0lGSUVEEAASCgoGT0FVVEgyEAESCAoET0lEQxACEggKBExEQVAQAypSCg9PQXV0aDJBdXRoU3R5bGUSIQodT0FVVEgyX0FVVEhfU1RZTEVfVU5TUEVDSUZJRUQQABINCglJTl9QQVJBTVMQARINCglJTl9IRUFERVIQAjKPCQoXSWRlbnRpdHlQcm92aWRlclNlcnZpY2USpwEKE0dldElkZW50aXR5UHJvdmlkZXISJy5ieXRlYmFzZS52MS5HZXRJZGVudGl0eVByb3ZpZGVyUmVxdWVzdBodLmJ5dGViYXNlLnYxLklkZW50aXR5UHJvdmlkZXIiSNpBBG5hbWWK6jAYYmIuaWRlbnRpdHlQcm92aWRlcnMuZ2V0kOowAaDqMASo6jAJgtPkkwITEhEvdjEve25hbWU9aWRwcy8qfRKxAQoVTGlzdElkZW50aXR5UHJvdmlkZXJzEikuYnl0ZWJhc2UudjEuTGlzdElkZW50aXR5UHJvdmlkZXJzUmVxdWVzdBoqLmJ5dGViYXNlLnYxLkxpc3RJZGVudGl0eVByb3ZpZGVyc1Jlc3BvbnNlIkHaQQCA6jABoOowBKjqMAmC0+STAixaIBIeL3YxL3twYXJlbnQ9d29ya3NwYWNlcy8qfS9pZHBzEggvdjEvaWRwcxK6AQoWQ3JlYXRlSWRlbnRpdHlQcm92aWRlchIqLmJ5dGViYXNlLnYxLkNyZWF0ZUlkZW50aXR5UHJvdmlkZXJSZXF1ZXN0Gh0uYnl0ZWJhc2UudjEuSWRlbnRpdHlQcm92aWRlciJV2kEAiuowG2JiLmlkZW50aXR5UHJvdmlkZXJzLmNyZWF0ZZDqMAGY6jABoOowA6jqMAaC0+STAh06EWlkZW50aXR5X3Byb3ZpZGVyIggvdjEvaWRwcxLzAQoWVXBkYXRlSWRlbnRpdHlQcm92aWRlchIqLmJ5dGViYXNlLnYxLlVwZGF0ZUlkZW50aXR5UHJvdmlkZXJSZXF1ZXN0Gh0uYnl0ZWJhc2UudjEuSWRlbnRpdHlQcm92aWRlciKNAdpBHWlkZW50aXR5X3Byb3ZpZGVyLHVwZGF0ZV9tYXNriuowG2JiLmlkZW50aXR5UHJvdmlkZXJzLnVwZGF0ZZDqMAGY6jABoOowA6jqMAaC0+STAjg6EWlkZW50aXR5X3Byb3ZpZGVyMiMvdjEve2lkZW50aXR5X3Byb3ZpZGVyLm5hbWU9aWRwcy8qfRKtAQoWRGVsZXRlSWRlbnRpdHlQcm92aWRlchIqLmJ5dGViYXNlLnYxLkRlbGV0ZUlkZW50aXR5UHJvdmlkZXJSZXF1ZXN0GhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5Ik/aQQRuYW1liuowG2JiLmlkZW50aXR5UHJvdmlkZXJzLmRlbGV0ZZDqMAGY6jABoOowBKjqMAmC0+STAhMqES92MS97bmFtZT1pZHBzLyp9ErIBChRUZXN0SWRlbnRpdHlQcm92aWRlchIoLmJ5dGViYXNlLnYxLlRlc3RJZGVudGl0eVByb3ZpZGVyUmVxdWVzdBopLmJ5dGViYXNlLnYxLlRlc3RJZGVudGl0eVByb3ZpZGVyUmVzcG9uc2UiRYrqMBtiYi5pZGVudGl0eVByb3ZpZGVycy51cGRhdGWQ6jABoOowA6jqMAaC0+STAhQ6ASoiDy92MS9pZHBzLyo6dGVzdEKlAQoPY29tLmJ5dGViYXNlLnYxQg9JZHBTZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_field_mask, file_v1_annotation]);
+ fileDesc("ChR2MS9pZHBfc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEiRAoaR2V0SWRlbnRpdHlQcm92aWRlclJlcXVlc3QSJgoEbmFtZRgBIAEoCUIY4EEC+kESChBieXRlYmFzZS5jb20vSWRQImoKHExpc3RJZGVudGl0eVByb3ZpZGVyc1JlcXVlc3QSSgoGcGFyZW50GAEgASgJQjrgQQL6QRgKFmJ5dGViYXNlLmNvbS9Xb3Jrc3BhY2W6SBnIAQFyFDISXndvcmtzcGFjZXMvW14vXSskIloKHUxpc3RJZGVudGl0eVByb3ZpZGVyc1Jlc3BvbnNlEjkKEmlkZW50aXR5X3Byb3ZpZGVycxgBIAMoCzIdLmJ5dGViYXNlLnYxLklkZW50aXR5UHJvdmlkZXIikwEKHUNyZWF0ZUlkZW50aXR5UHJvdmlkZXJSZXF1ZXN0Ej0KEWlkZW50aXR5X3Byb3ZpZGVyGAEgASgLMh0uYnl0ZWJhc2UudjEuSWRlbnRpdHlQcm92aWRlckID4EECEhwKFGlkZW50aXR5X3Byb3ZpZGVyX2lkGAIgASgJEhUKDXZhbGlkYXRlX29ubHkYAyABKAgipgEKHVVwZGF0ZUlkZW50aXR5UHJvdmlkZXJSZXF1ZXN0Ej0KEWlkZW50aXR5X3Byb3ZpZGVyGAEgASgLMh0uYnl0ZWJhc2UudjEuSWRlbnRpdHlQcm92aWRlckID4EECEi8KC3VwZGF0ZV9tYXNrGAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLkZpZWxkTWFzaxIVCg1hbGxvd19taXNzaW5nGAMgASgIIkcKHURlbGV0ZUlkZW50aXR5UHJvdmlkZXJSZXF1ZXN0EiYKBG5hbWUYASABKAlCGOBBAvpBEgoQYnl0ZWJhc2UuY29tL0lkUCLNAgobVGVzdElkZW50aXR5UHJvdmlkZXJSZXF1ZXN0EjgKEWlkZW50aXR5X3Byb3ZpZGVyGAEgASgLMh0uYnl0ZWJhc2UudjEuSWRlbnRpdHlQcm92aWRlchJPCg5vYXV0aDJfY29udGV4dBgCIAEoCzI1LmJ5dGViYXNlLnYxLk9BdXRoMklkZW50aXR5UHJvdmlkZXJUZXN0UmVxdWVzdENvbnRleHRIABJLCgxvaWRjX2NvbnRleHQYAyABKAsyMy5ieXRlYmFzZS52MS5PSURDSWRlbnRpdHlQcm92aWRlclRlc3RSZXF1ZXN0Q29udGV4dEgAEksKDGxkYXBfY29udGV4dBgEIAEoCzIzLmJ5dGViYXNlLnYxLkxEQVBJZGVudGl0eVByb3ZpZGVyVGVzdFJlcXVlc3RDb250ZXh0SABCCQoHY29udGV4dCI+CihPQXV0aDJJZGVudGl0eVByb3ZpZGVyVGVzdFJlcXVlc3RDb250ZXh0EhIKBGNvZGUYASABKAlCBNDqMAEiPAomT0lEQ0lkZW50aXR5UHJvdmlkZXJUZXN0UmVxdWVzdENvbnRleHQSEgoEY29kZRgBIAEoCUIE0OowASJSCiZMREFQSWRlbnRpdHlQcm92aWRlclRlc3RSZXF1ZXN0Q29udGV4dBIQCgh1c2VybmFtZRgBIAEoCRIWCghwYXNzd29yZBgCIAEoCUIE0OowASKRAgocVGVzdElkZW50aXR5UHJvdmlkZXJSZXNwb25zZRJFCgZjbGFpbXMYASADKAsyNS5ieXRlYmFzZS52MS5UZXN0SWRlbnRpdHlQcm92aWRlclJlc3BvbnNlLkNsYWltc0VudHJ5EkoKCXVzZXJfaW5mbxgCIAMoCzI3LmJ5dGViYXNlLnYxLlRlc3RJZGVudGl0eVByb3ZpZGVyUmVzcG9uc2UuVXNlckluZm9FbnRyeRotCgtDbGFpbXNFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBGi8KDVVzZXJJbmZvRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4ASLSAQoQSWRlbnRpdHlQcm92aWRlchIMCgRuYW1lGAEgASgJEhcKBXRpdGxlGAIgASgJQgi6SAVyAxjIARIOCgZkb21haW4YAyABKAkSLwoEdHlwZRgEIAEoDjIhLmJ5dGViYXNlLnYxLklkZW50aXR5UHJvdmlkZXJUeXBlEjMKBmNvbmZpZxgFIAEoCzIjLmJ5dGViYXNlLnYxLklkZW50aXR5UHJvdmlkZXJDb25maWc6IepBHgoQYnl0ZWJhc2UuY29tL0lkUBIKaWRwcy97aWRwfSLmAQoWSWRlbnRpdHlQcm92aWRlckNvbmZpZxJCCg1vYXV0aDJfY29uZmlnGAEgASgLMikuYnl0ZWJhc2UudjEuT0F1dGgySWRlbnRpdHlQcm92aWRlckNvbmZpZ0gAEj4KC29pZGNfY29uZmlnGAIgASgLMicuYnl0ZWJhc2UudjEuT0lEQ0lkZW50aXR5UHJvdmlkZXJDb25maWdIABI+CgtsZGFwX2NvbmZpZxgDIAEoCzInLmJ5dGViYXNlLnYxLkxEQVBJZGVudGl0eVByb3ZpZGVyQ29uZmlnSABCCAoGY29uZmlnIpcCChxPQXV0aDJJZGVudGl0eVByb3ZpZGVyQ29uZmlnEhAKCGF1dGhfdXJsGAEgASgJEhEKCXRva2VuX3VybBgCIAEoCRIVCg11c2VyX2luZm9fdXJsGAMgASgJEhEKCWNsaWVudF9pZBgEIAEoCRIbCg1jbGllbnRfc2VjcmV0GAUgASgJQgTQ6jABEg4KBnNjb3BlcxgGIAMoCRIwCg1maWVsZF9tYXBwaW5nGAcgASgLMhkuYnl0ZWJhc2UudjEuRmllbGRNYXBwaW5nEhcKD3NraXBfdGxzX3ZlcmlmeRgIIAEoCBIwCgphdXRoX3N0eWxlGAkgASgOMhwuYnl0ZWJhc2UudjEuT0F1dGgyQXV0aFN0eWxlIoUCChpPSURDSWRlbnRpdHlQcm92aWRlckNvbmZpZxIOCgZpc3N1ZXIYASABKAkSEQoJY2xpZW50X2lkGAIgASgJEhsKDWNsaWVudF9zZWNyZXQYAyABKAlCBNDqMAESDgoGc2NvcGVzGAQgAygJEjAKDWZpZWxkX21hcHBpbmcYBSABKAsyGS5ieXRlYmFzZS52MS5GaWVsZE1hcHBpbmcSFwoPc2tpcF90bHNfdmVyaWZ5GAYgASgIEjAKCmF1dGhfc3R5bGUYByABKA4yHC5ieXRlYmFzZS52MS5PQXV0aDJBdXRoU3R5bGUSGgoNYXV0aF9lbmRwb2ludBgIIAEoCUID4EEDIv0CChpMREFQSWRlbnRpdHlQcm92aWRlckNvbmZpZxIMCgRob3N0GAEgASgJEgwKBHBvcnQYAiABKAUSFwoPc2tpcF90bHNfdmVyaWZ5GAMgASgIEg8KB2JpbmRfZG4YBCABKAkSGwoNYmluZF9wYXNzd29yZBgFIAEoCUIE0OowARIPCgdiYXNlX2RuGAYgASgJEhMKC3VzZXJfZmlsdGVyGAcgASgJElMKEXNlY3VyaXR5X3Byb3RvY29sGAggASgOMjguYnl0ZWJhc2UudjEuTERBUElkZW50aXR5UHJvdmlkZXJDb25maWcuU2VjdXJpdHlQcm90b2NvbBIwCg1maWVsZF9tYXBwaW5nGAkgASgLMhkuYnl0ZWJhc2UudjEuRmllbGRNYXBwaW5nIk8KEFNlY3VyaXR5UHJvdG9jb2wSIQodU0VDVVJJVFlfUFJPVE9DT0xfVU5TUEVDSUZJRUQQABINCglTVEFSVF9UTFMQARIJCgVMREFQUxACIlcKDEZpZWxkTWFwcGluZxISCgppZGVudGlmaWVyGAEgASgJEhQKDGRpc3BsYXlfbmFtZRgCIAEoCRINCgVwaG9uZRgDIAEoCRIOCgZncm91cHMYBCABKAkqXgoUSWRlbnRpdHlQcm92aWRlclR5cGUSJgoiSURFTlRJVFlfUFJPVklERVJfVFlQRV9VTlNQRUNJRklFRBAAEgoKBk9BVVRIMhABEggKBE9JREMQAhIICgRMREFQEAMqUgoPT0F1dGgyQXV0aFN0eWxlEiEKHU9BVVRIMl9BVVRIX1NUWUxFX1VOU1BFQ0lGSUVEEAASDQoJSU5fUEFSQU1TEAESDQoJSU5fSEVBREVSEAIysgkKF0lkZW50aXR5UHJvdmlkZXJTZXJ2aWNlEqcBChNHZXRJZGVudGl0eVByb3ZpZGVyEicuYnl0ZWJhc2UudjEuR2V0SWRlbnRpdHlQcm92aWRlclJlcXVlc3QaHS5ieXRlYmFzZS52MS5JZGVudGl0eVByb3ZpZGVyIkjaQQRuYW1liuowGGJiLmlkZW50aXR5UHJvdmlkZXJzLmdldJDqMAGg6jAEqOowCYLT5JMCExIRL3YxL3tuYW1lPWlkcHMvKn0S1AEKFUxpc3RJZGVudGl0eVByb3ZpZGVycxIpLmJ5dGViYXNlLnYxLkxpc3RJZGVudGl0eVByb3ZpZGVyc1JlcXVlc3QaKi5ieXRlYmFzZS52MS5MaXN0SWRlbnRpdHlQcm92aWRlcnNSZXNwb25zZSJk2kEGcGFyZW50iuowGWJiLmlkZW50aXR5UHJvdmlkZXJzLmxpc3SQ6jABoOowBKjqMAmC0+STAixaIBIeL3YxL3twYXJlbnQ9d29ya3NwYWNlcy8qfS9pZHBzEggvdjEvaWRwcxK6AQoWQ3JlYXRlSWRlbnRpdHlQcm92aWRlchIqLmJ5dGViYXNlLnYxLkNyZWF0ZUlkZW50aXR5UHJvdmlkZXJSZXF1ZXN0Gh0uYnl0ZWJhc2UudjEuSWRlbnRpdHlQcm92aWRlciJV2kEAiuowG2JiLmlkZW50aXR5UHJvdmlkZXJzLmNyZWF0ZZDqMAGY6jABoOowA6jqMAaC0+STAh06EWlkZW50aXR5X3Byb3ZpZGVyIggvdjEvaWRwcxLzAQoWVXBkYXRlSWRlbnRpdHlQcm92aWRlchIqLmJ5dGViYXNlLnYxLlVwZGF0ZUlkZW50aXR5UHJvdmlkZXJSZXF1ZXN0Gh0uYnl0ZWJhc2UudjEuSWRlbnRpdHlQcm92aWRlciKNAdpBHWlkZW50aXR5X3Byb3ZpZGVyLHVwZGF0ZV9tYXNriuowG2JiLmlkZW50aXR5UHJvdmlkZXJzLnVwZGF0ZZDqMAGY6jABoOowA6jqMAaC0+STAjg6EWlkZW50aXR5X3Byb3ZpZGVyMiMvdjEve2lkZW50aXR5X3Byb3ZpZGVyLm5hbWU9aWRwcy8qfRKtAQoWRGVsZXRlSWRlbnRpdHlQcm92aWRlchIqLmJ5dGViYXNlLnYxLkRlbGV0ZUlkZW50aXR5UHJvdmlkZXJSZXF1ZXN0GhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5Ik/aQQRuYW1liuowG2JiLmlkZW50aXR5UHJvdmlkZXJzLmRlbGV0ZZDqMAGY6jABoOowBKjqMAmC0+STAhMqES92MS97bmFtZT1pZHBzLyp9ErIBChRUZXN0SWRlbnRpdHlQcm92aWRlchIoLmJ5dGViYXNlLnYxLlRlc3RJZGVudGl0eVByb3ZpZGVyUmVxdWVzdBopLmJ5dGViYXNlLnYxLlRlc3RJZGVudGl0eVByb3ZpZGVyUmVzcG9uc2UiRYrqMBtiYi5pZGVudGl0eVByb3ZpZGVycy51cGRhdGWQ6jABoOowA6jqMAaC0+STAhQ6ASoiDy92MS9pZHBzLyo6dGVzdEKlAQoPY29tLmJ5dGViYXNlLnYxQg9JZHBTZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_field_mask, file_v1_annotation]);
/**
* Describes the message bytebase.v1.GetIdentityProviderRequest.
diff --git a/frontend/src/utils/sso.ts b/frontend/src/utils/sso.ts
index 4de105ad96..5e5643f57e 100644
--- a/frontend/src/utils/sso.ts
+++ b/frontend/src/utils/sso.ts
@@ -1,4 +1,13 @@
+import { create } from "@bufbuild/protobuf";
import type { OAuthState } from "@/types";
+import type {
+ AuthorizationRequest,
+ LoginIdentityProvider,
+} from "@/types/proto-es/v1/auth_service_pb";
+import {
+ AuthorizationRequestSchema,
+ LoginIdentityProviderSchema,
+} from "@/types/proto-es/v1/auth_service_pb";
import type { IdentityProvider } from "@/types/proto-es/v1/idp_service_pb";
import { IdentityProviderType } from "@/types/proto-es/v1/idp_service_pb";
@@ -86,15 +95,43 @@ export function clearOAuthState(token: string): void {
console.error("Failed to clear OAuth state:", error);
}
}
+/**
+ * An SSO failure whose message is an i18n key. `sso.ts` has no translator, so
+ * the caller that renders the failure translates it.
+ */
+export class SsoConfigError extends Error {
+ constructor(readonly i18nKey: string) {
+ super(i18nKey);
+ this.name = "SsoConfigError";
+ }
+}
export async function openWindowForSSO(
- identityProvider: IdentityProvider,
+ identityProvider: LoginIdentityProvider,
popup = true,
redirect?: string
) {
+ // The callback route differs by protocol; anything else has no redirect flow.
+ let callbackPath: string;
+ if (identityProvider.type === IdentityProviderType.OAUTH2) {
+ callbackPath = "/oauth/callback";
+ } else if (identityProvider.type === IdentityProviderType.OIDC) {
+ callbackPath = "/oidc/callback";
+ } else {
+ throw new SsoConfigError("auth.sso.unsupported-provider-type");
+ }
+
+ const request = identityProvider.authorizationRequest;
+ if (!request || request.endpoint === "") {
+ throw new SsoConfigError("auth.sso.no-authorization-endpoint");
+ }
+ // Validate the endpoint to prevent XSS via javascript: URIs.
+ if (!isValidHttpUrl(request.endpoint)) {
+ throw new SsoConfigError("auth.sso.invalid-authorization-url");
+ }
+
// Generate cryptographically secure random token for CSRF protection
const token = generateSecureToken();
-
const state: OAuthState = {
token,
// we use type to determine oauth type when receiving the callback
@@ -105,88 +142,59 @@ export async function openWindowForSSO(
// Store IdP type to determine correct context type in callback
idpType: identityProvider.type,
};
-
// Store state in localStorage before redirecting
storeOAuthState(state);
- const uri = {
- basePath: "",
- query: {
- // Only send the opaque token as per RFC 6749 and Auth0 best practices
- // All other state data is stored server-side for security
- state: token,
- response_type: "code",
- } as Record<string, string>,
- };
-
- if (identityProvider.type === IdentityProviderType.OAUTH2) {
- if (identityProvider.config?.config?.case !== "oauth2Config") {
- return null;
- }
- const oauth2Config = identityProvider.config.config.value;
-
- // Validate auth URL to prevent XSS via javascript: URIs
- if (!isValidHttpUrl(oauth2Config.authUrl)) {
- throw new Error(
- "Invalid authentication URL: must be a valid HTTP or HTTPS URL"
- );
- }
-
- uri.basePath = oauth2Config.authUrl;
- Object.assign(uri.query, {
- client_id: oauth2Config.clientId,
- scope: oauth2Config.scopes.join(" "),
- redirect_uri: `${window.location.origin}/oauth/callback`,
- });
- } else if (identityProvider.type === IdentityProviderType.OIDC) {
- if (identityProvider.config?.config?.case !== "oidcConfig") {
- return null;
- }
- const oidcConfig = identityProvider.config.config.value;
- if (oidcConfig.authEndpoint === "") {
- throw new Error(
- `Invalid authentication URL from issuer ${oidcConfig.issuer}, please check your configuration`
- );
- }
-
- // Validate auth endpoint to prevent XSS via javascript: URIs
- if (!isValidHttpUrl(oidcConfig.authEndpoint)) {
- throw new Error(
- "Invalid authentication endpoint: must be a valid HTTP or HTTPS URL"
- );
- }
-
- uri.basePath = oidcConfig.authEndpoint;
- Object.assign(uri.query, {
- client_id: oidcConfig.clientId,
- scope: oidcConfig.scopes.join(" "),
- redirect_uri: `${window.location.origin}/oidc/callback`,
- });
- } else {
- throw new Error(
- `identity provider type ${identityProvider.type.toString()} is not supported`
- );
- }
-
- // Use URL API for safe URL construction with query parameters
- const authUrl = new URL(uri.basePath);
- Object.entries(uri.query).forEach(([key, value]) => {
- authUrl.searchParams.set(key, value);
- });
-
- const authUrlString = authUrl.toString();
- if (!authUrlString) {
- throw new Error("Invalid authentication URL");
- }
+ const authUrl = new URL(request.endpoint);
+ // Only send the opaque token as per RFC 6749 and Auth0 best practices;
+ // all other state data is stored client-side under that token.
+ authUrl.searchParams.set("state", token);
+ authUrl.searchParams.set("response_type", "code");
+ authUrl.searchParams.set("client_id", request.clientId);
+ authUrl.searchParams.set("scope", request.scopes.join(" "));
+ authUrl.searchParams.set(
+ "redirect_uri",
+ `${window.location.origin}${callbackPath}`
+ );
if (popup) {
window.open(
- authUrlString,
+ authUrl.toString(),
"oauth",
"location=yes,left=200,top=200,height=640,width=480,scrollbars=yes,status=yes"
);
} else {
// Redirect to the auth URL.
- window.location.href = authUrlString;
+ window.location.href = authUrl.toString();
}
}
+
+/**
+ * Projects a full IdentityProvider onto the shape the redirect needs, so the
+ * SSO admin test drives the same path the login page does.
+ */
+export function toLoginIdentityProvider(
+ identityProvider: IdentityProvider
+): LoginIdentityProvider {
+ let authorizationRequest: AuthorizationRequest | undefined;
+ const config = identityProvider.config?.config;
+ if (config?.case === "oauth2Config") {
+ authorizationRequest = create(AuthorizationRequestSchema, {
+ endpoint: config.value.authUrl,
+ clientId: config.value.clientId,
+ scopes: config.value.scopes,
+ });
+ } else if (config?.case === "oidcConfig") {
+ authorizationRequest = create(AuthorizationRequestSchema, {
+ endpoint: config.value.authEndpoint,
+ clientId: config.value.clientId,
+ scopes: config.value.scopes,
+ });
+ }
+ return create(LoginIdentityProviderSchema, {
+ name: identityProvider.name,
+ type: identityProvider.type,
+ title: identityProvider.title,
+ authorizationRequest,
+ });
+}
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index 35f59db9a0..35dcf1b879 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -207,6 +207,34 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.SearchAuditLogsResponse'
+ /v1/auth/info:
+ get:
+ tags:
+ - AuthService
+ summary: GetAuthenticationInfo
+ description: |-
+ Gets everything the login page renders: the sign-in restrictions and the
+ identity providers it offers.
+ Permissions required: None
+ operationId: AuthService_GetAuthenticationInfo
+ parameters:
+ - name: workspace
+ in: query
+ 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.
+ schema:
+ type: string
+ title: workspace
+ responses:
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.AuthenticationInfo'
/v1/auth/login:
post:
tags:
@@ -273,33 +301,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.RefreshResponse'
- /v1/auth/restriction:
- get:
- tags:
- - AuthService
- summary: GetAuthenticationRestriction
- description: |-
- Gets the effective restrictions needed to render authentication flows.
- Permissions required: None
- operationId: AuthService_GetAuthenticationRestriction
- parameters:
- - name: workspace
- in: query
- 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.
- schema:
- type: string
- title: workspace
- responses:
- "200":
- description: Success
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/bytebase.v1.AuthenticationInfo'
/v1/auth/signup:
post:
tags:
@@ -1301,21 +1302,29 @@ paths:
get:
tags:
- IdentityProviderService
- summary: ListIdentityProviders
- description: |-
- Lists all configured identity providers (public endpoint for login page).
- Permissions required: None
+ 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: IdentityProviderService_ListIdentityProviders
parameters:
- name: parent
in: query
description: |-
- The parent workspace whose identity providers should be listed.
+ The parent workspace whose identity providers should be listed. It must be
+ the workspace the caller's credential belongs to.
Format: workspaces/{workspace}
- When unset, the workspace is resolved from the request context.
+ required: true
schema:
type: string
title: parent
+ pattern: ^workspaces/[^/]+$
responses:
"200":
description: Success
@@ -18156,15 +18165,16 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.Workspace'
- /v1/workspaces/{workspace}/auth/restriction:
+ /v1/workspaces/{workspace}/auth/info:
get:
tags:
- AuthService
- summary: GetAuthenticationRestriction
+ summary: GetAuthenticationInfo
description: |-
- Gets the effective restrictions needed to render authentication flows.
+ Gets everything the login page renders: the sign-in restrictions and the
+ identity providers it offers.
Permissions required: None
- operationId: AuthService_GetAuthenticationRestriction2
+ operationId: AuthService_GetAuthenticationInfo2
parameters:
- name: workspace
in: path
@@ -18284,10 +18294,16 @@ paths:
get:
tags:
- IdentityProviderService
- summary: ListIdentityProviders
- description: |-
- Lists all configured identity providers (public endpoint for login page).
- Permissions required: None
+ 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: IdentityProviderService_ListIdentityProviders2
parameters:
- name: workspace
@@ -20177,8 +20193,37 @@ components:
description: The effective authentication restrictions.
readOnly: true
$ref: '#/components/schemas/bytebase.v1.Restriction'
+ 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:
@@ -23630,7 +23675,7 @@ components:
title: GetActuatorInfoRequest
additionalProperties: false
description: Request message for getting actuator information.
- bytebase.v1.GetAuthenticationRestrictionRequest:
+ bytebase.v1.GetAuthenticationInfoRequest:
type: object
properties:
workspace:
@@ -23641,7 +23686,7 @@ components:
Format: workspaces/{workspace}
When unset, self-hosted resolves the singleton workspace and SaaS uses
the deployment-level defaults.
- title: GetAuthenticationRestrictionRequest
+ title: GetAuthenticationInfoRequest
additionalProperties: false
bytebase.v1.GetChangelogRequest:
type: object
@@ -25428,11 +25473,14 @@ components:
parent:
type: string
title: parent
+ pattern: ^workspaces/[^/]+$
description: |-
- The parent workspace whose identity providers should be listed.
+ The parent workspace whose identity providers should be listed. It must be
+ the workspace the caller's credential belongs to.
Format: workspaces/{workspace}
- When unset, the workspace is resolved from the request context.
title: ListIdentityProvidersRequest
+ required:
+ - parent
additionalProperties: false
bytebase.v1.ListIdentityProvidersResponse:
type: object
@@ -26583,6 +26631,36 @@ components:
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:
+ title: type
+ description: The type of identity provider protocol.
+ $ref: '#/components/schemas/bytebase.v1.IdentityProviderType'
+ title:
+ type: string
+ title: title
+ description: The display title of the identity provider.
+ 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.
+ $ref: '#/components/schemas/bytebase.v1.AuthorizationRequest'
+ 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:
@@ -35242,6 +35320,8 @@ tags:
description: AIService provides AI chat capabilities for the page agent.
- name: AuditLogService
description: AuditLogService manages audit logs for system activities and API calls.
+ - name: IdentityProviderService
+ description: IdentityProviderService manages external identity providers for SSO authentication.
- name: RolloutService
description: RolloutService manages the execution of deployment plans.
- name: QueryHistoryService
@@ -35274,8 +35354,6 @@ tags:
description: DatabaseService manages databases and their schemas.
- name: GroupService
description: GroupService manages user groups for organizing users and permissions.
- - name: IdentityProviderService
- description: IdentityProviderService manages external identity providers for SSO authentication.
- name: OrgPolicyService
description: OrgPolicyService manages organizational policies at various resource levels.
- name: ProjectService
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 1824902e3d..ae9abc10e1 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -91,6 +91,33 @@
- [AuditLogService](#bytebase-v1-AuditLogService)
+- [v1/idp_service.proto](#v1_idp_service-proto)
+ - [CreateIdentityProviderRequest](#bytebase-v1-CreateIdentityProviderRequest)
+ - [DeleteIdentityProviderRequest](#bytebase-v1-DeleteIdentityProviderRequest)
+ - [FieldMapping](#bytebase-v1-FieldMapping)
+ - [GetIdentityProviderRequest](#bytebase-v1-GetIdentityProviderRequest)
+ - [IdentityProvider](#bytebase-v1-IdentityProvider)
+ - [IdentityProviderConfig](#bytebase-v1-IdentityProviderConfig)
+ - [LDAPIdentityProviderConfig](#bytebase-v1-LDAPIdentityProviderConfig)
+ - [LDAPIdentityProviderTestRequestContext](#bytebase-v1-LDAPIdentityProviderTestRequestContext)
+ - [ListIdentityProvidersRequest](#bytebase-v1-ListIdentityProvidersRequest)
+ - [ListIdentityProvidersResponse](#bytebase-v1-ListIdentityProvidersResponse)
+ - [OAuth2IdentityProviderConfig](#bytebase-v1-OAuth2IdentityProviderConfig)
+ - [OAuth2IdentityProviderTestRequestContext](#bytebase-v1-OAuth2IdentityProviderTestRequestContext)
+ - [OIDCIdentityProviderConfig](#bytebase-v1-OIDCIdentityProviderConfig)
+ - [OIDCIdentityProviderTestRequestContext](#bytebase-v1-OIDCIdentityProviderTestRequestContext)
+ - [TestIdentityProviderRequest](#bytebase-v1-TestIdentityProviderRequest)
+ - [TestIdentityProviderResponse](#bytebase-v1-TestIdentityProviderResponse)
+ - [TestIdentityProviderResponse.ClaimsEntry](#bytebase-v1-TestIdentityProviderResponse-ClaimsEntry)
+ - [TestIdentityProviderResponse.UserInfoEntry](#bytebase-v1-TestIdentityProviderResponse-UserInfoEntry)
+ - [UpdateIdentityProviderRequest](#bytebase-v1-UpdateIdentityProviderRequest)
+
+ - [IdentityProviderType](#bytebase-v1-IdentityProviderType)
+ - [LDAPIdentityProviderConfig.SecurityProtocol](#bytebase-v1-LDAPIdentityProviderConfig-SecurityProtocol)
+ - [OAuth2AuthStyle](#bytebase-v1-OAuth2AuthStyle)
+
+ - [IdentityProviderService](#bytebase-v1-IdentityProviderService)
+
- [v1/rollout_service.proto](#v1_rollout_service-proto)
- [BatchCancelTaskRunsRequest](#bytebase-v1-BatchCancelTaskRunsRequest)
- [BatchCancelTaskRunsResponse](#bytebase-v1-BatchCancelTaskRunsResponse)
@@ -339,10 +366,12 @@
- [v1/auth_service.proto](#v1_auth_service-proto)
- [AuthenticationInfo](#bytebase-v1-AuthenticationInfo)
+ - [AuthorizationRequest](#bytebase-v1-AuthorizationRequest)
- [ExchangeTokenRequest](#bytebase-v1-ExchangeTokenRequest)
- [ExchangeTokenResponse](#bytebase-v1-ExchangeTokenResponse)
- - [GetAuthenticationRestrictionRequest](#bytebase-v1-GetAuthenticationRestrictionRequest)
+ - [GetAuthenticationInfoRequest](#bytebase-v1-GetAuthenticationInfoRequest)
- [IdentityProviderContext](#bytebase-v1-IdentityProviderContext)
+ - [LoginIdentityProvider](#bytebase-v1-LoginIdentityProvider)
- [LoginRequest](#bytebase-v1-LoginRequest)
- [LoginResponse](#bytebase-v1-LoginResponse)
- [LogoutRequest](#bytebase-v1-LogoutRequest)
@@ -551,33 +580,6 @@
- [GroupService](#bytebase-v1-GroupService)
-- [v1/idp_service.proto](#v1_idp_service-proto)
- - [CreateIdentityProviderRequest](#bytebase-v1-CreateIdentityProviderRequest)
- - [DeleteIdentityProviderRequest](#bytebase-v1-DeleteIdentityProviderRequest)
- - [FieldMapping](#bytebase-v1-FieldMapping)
- - [GetIdentityProviderRequest](#bytebase-v1-GetIdentityProviderRequest)
- - [IdentityProvider](#bytebase-v1-IdentityProvider)
- - [IdentityProviderConfig](#bytebase-v1-IdentityProviderConfig)
- - [LDAPIdentityProviderConfig](#bytebase-v1-LDAPIdentityProviderConfig)
- - [LDAPIdentityProviderTestRequestContext](#bytebase-v1-LDAPIdentityProviderTestRequestContext)
- - [ListIdentityProvidersRequest](#bytebase-v1-ListIdentityProvidersRequest)
- - [ListIdentityProvidersResponse](#bytebase-v1-ListIdentityProvidersResponse)
- - [OAuth2IdentityProviderConfig](#bytebase-v1-OAuth2IdentityProviderConfig)
- - [OAuth2IdentityProviderTestRequestContext](#bytebase-v1-OAuth2IdentityProviderTestRequestContext)
- - [OIDCIdentityProviderConfig](#bytebase-v1-OIDCIdentityProviderConfig)
- - [OIDCIdentityProviderTestRequestContext](#bytebase-v1-OIDCIdentityProviderTestRequestContext)
- - [TestIdentityProviderRequest](#bytebase-v1-TestIdentityProviderRequest)
- - [TestIdentityProviderResponse](#bytebase-v1-TestIdentityProviderResponse)
- - [TestIdentityProviderResponse.ClaimsEntry](#bytebase-v1-TestIdentityProviderResponse-ClaimsEntry)
- - [TestIdentityProviderResponse.UserInfoEntry](#bytebase-v1-TestIdentityProviderResponse-UserInfoEntry)
- - [UpdateIdentityProviderRequest](#bytebase-v1-UpdateIdentityProviderRequest)
-
- - [IdentityProviderType](#bytebase-v1-IdentityProviderType)
- - [LDAPIdentityProviderConfig.SecurityProtocol](#bytebase-v1-LDAPIdentityProviderConfig-SecurityProtocol)
- - [OAuth2AuthStyle](#bytebase-v1-OAuth2AuthStyle)
-
- - [IdentityProviderService](#bytebase-v1-IdentityProviderService)
-
- [v1/org_policy_service.proto](#v1_org_policy_service-proto)
- [CreatePolicyRequest](#bytebase-v1-CreatePolicyRequest)
- [DeletePolicyRequest](#bytebase-v1-DeletePolicyRequest)
@@ -2001,1453 +2003,1397 @@ AuditLogService manages audit logs for system activities and API calls.
-<a name="v1_rollout_service-proto"></a>
+<a name="v1_idp_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
-## v1/rollout_service.proto
+## v1/idp_service.proto
-<a name="bytebase-v1-BatchCancelTaskRunsRequest"></a>
+<a name="bytebase-v1-CreateIdentityProviderRequest"></a>
-### BatchCancelTaskRunsRequest
+### CreateIdentityProviderRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | 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. |
-| task_runs | [string](#string) | repeated | The taskRuns to cancel. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |
+| identity_provider | [IdentityProvider](#bytebase-v1-IdentityProvider) | | The identity provider to create. |
+| identity_provider_id | [string](#string) | | The ID to use for the identity provider, which will become the final component of the identity provider&#39;s resource name.
+
+This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
+| validate_only | [bool](#bool) | | If set to true, the request will be validated without actually creating the identity provider. |
-<a name="bytebase-v1-BatchCancelTaskRunsResponse"></a>
+<a name="bytebase-v1-DeleteIdentityProviderRequest"></a>
+
+### DeleteIdentityProviderRequest
-### BatchCancelTaskRunsResponse
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the identity provider to delete. Format: idps/{identity_provider} |
-<a name="bytebase-v1-BatchRunTasksRequest"></a>
-### BatchRunTasksRequest
+<a name="bytebase-v1-FieldMapping"></a>
+### FieldMapping
+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`.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The stage name for the tasks. Format: projects/{project}/plans/{plan}/rollout/stages/{stage} |
-| tasks | [string](#string) | repeated | The tasks to run. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} |
-| run_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | The task run should run after run_time. |
-| skip_prior_backup | [bool](#bool) | | If true, skip prior backup for this run even if the task has prior backup enabled. |
+| identifier | [string](#string) | | Identifier is the field name of the unique identifier in 3rd-party idp user info. Required. |
+| display_name | [string](#string) | | DisplayName is the field name of display name in 3rd-party idp user info. Optional. |
+| phone | [string](#string) | | Phone is the field name of primary phone in 3rd-party idp user info. Optional. |
+| groups | [string](#string) | | 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/ |
-<a name="bytebase-v1-BatchRunTasksResponse"></a>
+<a name="bytebase-v1-GetIdentityProviderRequest"></a>
-### BatchRunTasksResponse
+### GetIdentityProviderRequest
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the identity provider to retrieve. Format: idps/{idp} |
-<a name="bytebase-v1-BatchSkipTasksRequest"></a>
-### BatchSkipTasksRequest
+
+<a name="bytebase-v1-IdentityProvider"></a>
+
+### IdentityProvider
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The stage name for the tasks. Format: projects/{project}/plans/{plan}/rollout/stages/{stage} |
-| tasks | [string](#string) | repeated | The tasks to skip. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} |
-| reason | [string](#string) | | The reason for skipping the tasks. |
+| name | [string](#string) | | The name of the identity provider. Format: idps/{idp} |
+| title | [string](#string) | | The display title of the identity provider. |
+| domain | [string](#string) | | The domain for email matching when using this identity provider. |
+| type | [IdentityProviderType](#bytebase-v1-IdentityProviderType) | | The type of identity provider protocol. |
+| config | [IdentityProviderConfig](#bytebase-v1-IdentityProviderConfig) | | The configuration details for the identity provider. |
-<a name="bytebase-v1-BatchSkipTasksResponse"></a>
+<a name="bytebase-v1-IdentityProviderConfig"></a>
+
+### IdentityProviderConfig
-### BatchSkipTasksResponse
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| oauth2_config | [OAuth2IdentityProviderConfig](#bytebase-v1-OAuth2IdentityProviderConfig) | | OAuth2 protocol configuration. |
+| oidc_config | [OIDCIdentityProviderConfig](#bytebase-v1-OIDCIdentityProviderConfig) | | OIDC protocol configuration. |
+| ldap_config | [LDAPIdentityProviderConfig](#bytebase-v1-LDAPIdentityProviderConfig) | | LDAP protocol configuration. |
-<a name="bytebase-v1-CreateRolloutRequest"></a>
-### CreateRolloutRequest
+<a name="bytebase-v1-LDAPIdentityProviderConfig"></a>
+### LDAPIdentityProviderConfig
+LDAPIdentityProviderConfig is the structure for LDAP identity provider config.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent plan for which this rollout will be created. Format: projects/{project}/plans/{plan} |
-| target | [string](#string) | optional | Create the rollout only for the specified target. Format: environments/{environment} If unspecified, all stages are created. If set to &#34;&#34;, no stages are created. |
+| host | [string](#string) | | Host is the hostname or IP address of the LDAP server, e.g., &#34;ldap.example.com&#34;. |
+| port | [int32](#int32) | | 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. |
+| skip_tls_verify | [bool](#bool) | | SkipTLSVerify controls whether to skip TLS certificate verification. |
+| bind_dn | [string](#string) | | BindDN is the DN of the user to bind as a service account to perform search requests. |
+| bind_password | [string](#string) | | BindPassword is the password of the user to bind as a service account. |
+| base_dn | [string](#string) | | BaseDN is the base DN to search for users, e.g., &#34;ou=users,dc=example,dc=com&#34;. |
+| user_filter | [string](#string) | | UserFilter is the filter to search for users, e.g., &#34;(uid=%s)&#34;. |
+| security_protocol | [LDAPIdentityProviderConfig.SecurityProtocol](#bytebase-v1-LDAPIdentityProviderConfig-SecurityProtocol) | | SecurityProtocol is the security protocol to be used for establishing connections with the LDAP server. |
+| field_mapping | [FieldMapping](#bytebase-v1-FieldMapping) | | FieldMapping is the mapping of the user attributes returned by the LDAP server. |
-<a name="bytebase-v1-GetRolloutRequest"></a>
+<a name="bytebase-v1-LDAPIdentityProviderTestRequestContext"></a>
-### GetRolloutRequest
+### LDAPIdentityProviderTestRequestContext
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | 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 |
+| username | [string](#string) | | The username of a directory user, substituted into the user filter. |
+| password | [string](#string) | | The password of the directory user. |
-<a name="bytebase-v1-GetTaskRunLogRequest"></a>
+<a name="bytebase-v1-ListIdentityProvidersRequest"></a>
-### GetTaskRunLogRequest
+### ListIdentityProvidersRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |
+| parent | [string](#string) | | The parent workspace whose identity providers should be listed. It must be the workspace the caller&#39;s credential belongs to. Format: workspaces/{workspace} |
-<a name="bytebase-v1-GetTaskRunRequest"></a>
+<a name="bytebase-v1-ListIdentityProvidersResponse"></a>
-### GetTaskRunRequest
+### ListIdentityProvidersResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |
-
+| identity_providers | [IdentityProvider](#bytebase-v1-IdentityProvider) | repeated | The identity providers from the specified request. |
-<a name="bytebase-v1-GetTaskRunSessionRequest"></a>
-### GetTaskRunSessionRequest
+<a name="bytebase-v1-OAuth2IdentityProviderConfig"></a>
+### OAuth2IdentityProviderConfig
+OAuth2IdentityProviderConfig is the structure for OAuth2 identity provider config.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |
+| auth_url | [string](#string) | | The authorization endpoint URL for OAuth2 flow. |
+| token_url | [string](#string) | | The token endpoint URL for exchanging authorization code. |
+| user_info_url | [string](#string) | | The user information endpoint URL. |
+| client_id | [string](#string) | | The OAuth2 client identifier. |
+| client_secret | [string](#string) | | The OAuth2 client secret for authentication. |
+| scopes | [string](#string) | repeated | The list of OAuth2 scopes to request. |
+| field_mapping | [FieldMapping](#bytebase-v1-FieldMapping) | | Mapping configuration for user attributes from OAuth2 response. |
+| skip_tls_verify | [bool](#bool) | | Whether to skip TLS certificate verification. |
+| auth_style | [OAuth2AuthStyle](#bytebase-v1-OAuth2AuthStyle) | | The authentication style for client credentials. |
-<a name="bytebase-v1-ListRolloutsRequest"></a>
+<a name="bytebase-v1-OAuth2IdentityProviderTestRequestContext"></a>
-### ListRolloutsRequest
+### OAuth2IdentityProviderTestRequestContext
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent, which owns this collection of rollouts. Format: projects/{project} Use &#34;projects/-&#34; to list all rollouts from all projects. |
-| page_size | [int32](#int32) | | 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. |
-| page_token | [string](#string) | | 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 | [string](#string) | | 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 &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator. - task_type: the task type, support &#34;in&#34; operator, check the Task.Type enum for the values.
-
-For example: update_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34; task_type in [&#34;DATABASE_MIGRATE&#34;, &#34;DATABASE_CREATE&#34;] |
-
+| code | [string](#string) | | Authorize code from website. |
-<a name="bytebase-v1-ListRolloutsResponse"></a>
-### ListRolloutsResponse
+<a name="bytebase-v1-OIDCIdentityProviderConfig"></a>
+### OIDCIdentityProviderConfig
+OIDCIdentityProviderConfig is the structure for OIDC identity provider config.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| rollouts | [Rollout](#bytebase-v1-Rollout) | repeated | The rollouts from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+| issuer | [string](#string) | | The OIDC issuer URL for the identity provider. |
+| client_id | [string](#string) | | The OIDC client identifier. |
+| client_secret | [string](#string) | | The OIDC client secret for authentication. |
+| scopes | [string](#string) | repeated | The scopes that the OIDC provider supports. Should be fetched from the well-known configuration file of the OIDC provider. |
+| field_mapping | [FieldMapping](#bytebase-v1-FieldMapping) | | Mapping configuration for user attributes from OIDC claims. |
+| skip_tls_verify | [bool](#bool) | | Whether to skip TLS certificate verification. |
+| auth_style | [OAuth2AuthStyle](#bytebase-v1-OAuth2AuthStyle) | | The authentication style for client credentials. |
+| auth_endpoint | [string](#string) | | The authorization endpoint of the OIDC provider. Should be fetched from the well-known configuration file of the OIDC provider. |
-<a name="bytebase-v1-ListTaskRunsRequest"></a>
+<a name="bytebase-v1-OIDCIdentityProviderTestRequestContext"></a>
-### ListTaskRunsRequest
+### OIDCIdentityProviderTestRequestContext
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent, which owns this collection of taskRuns. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} Use &#34;projects/{project}/plans/{plan}/rollout/stages/-/tasks/-&#34; to list all taskRuns from a rollout. |
-| page_size | [int32](#int32) | | 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. |
-| page_token | [string](#string) | | 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. |
+| code | [string](#string) | | Authorize code from OIDC provider. |
-<a name="bytebase-v1-ListTaskRunsResponse"></a>
+<a name="bytebase-v1-TestIdentityProviderRequest"></a>
-### ListTaskRunsResponse
+### TestIdentityProviderRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| task_runs | [TaskRun](#bytebase-v1-TaskRun) | repeated | The taskRuns from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+| identity_provider | [IdentityProvider](#bytebase-v1-IdentityProvider) | | The identity provider to test connection including uncreated. |
+| oauth2_context | [OAuth2IdentityProviderTestRequestContext](#bytebase-v1-OAuth2IdentityProviderTestRequestContext) | | |
+| oidc_context | [OIDCIdentityProviderTestRequestContext](#bytebase-v1-OIDCIdentityProviderTestRequestContext) | | OIDC authentication context for test connection. |
+| ldap_context | [LDAPIdentityProviderTestRequestContext](#bytebase-v1-LDAPIdentityProviderTestRequestContext) | | LDAP credentials context for test connection. |
-<a name="bytebase-v1-PreviewTaskRunRollbackRequest"></a>
+<a name="bytebase-v1-TestIdentityProviderResponse"></a>
-### PreviewTaskRunRollbackRequest
+### TestIdentityProviderResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |
+| claims | [TestIdentityProviderResponse.ClaimsEntry](#bytebase-v1-TestIdentityProviderResponse-ClaimsEntry) | repeated | The map of claims returned by the identity provider. |
+| user_info | [TestIdentityProviderResponse.UserInfoEntry](#bytebase-v1-TestIdentityProviderResponse-UserInfoEntry) | repeated | The matched user info from the claims. |
-<a name="bytebase-v1-PreviewTaskRunRollbackResponse"></a>
+<a name="bytebase-v1-TestIdentityProviderResponse-ClaimsEntry"></a>
-### PreviewTaskRunRollbackResponse
+### TestIdentityProviderResponse.ClaimsEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| statement | [string](#string) | | The rollback SQL statement that would undo the task run. |
+| key | [string](#string) | | |
+| value | [string](#string) | | |
-<a name="bytebase-v1-Rollout"></a>
+<a name="bytebase-v1-TestIdentityProviderResponse-UserInfoEntry"></a>
-### Rollout
+### TestIdentityProviderResponse.UserInfoEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The resource name of the rollout. Format: projects/{project}/plans/{plan}/rollout |
-| title | [string](#string) | | The title of the rollout, inherited from the associated plan. This field is output only and cannot be directly set. |
-| stages | [Stage](#bytebase-v1-Stage) | repeated | Stages and thus tasks of the rollout. |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| key | [string](#string) | | |
+| value | [string](#string) | | |
-<a name="bytebase-v1-Stage"></a>
+<a name="bytebase-v1-UpdateIdentityProviderRequest"></a>
-### Stage
+### UpdateIdentityProviderRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage} Use &#34;-&#34; for {stage} when the stage has no environment or deleted environment. |
-| id | [string](#string) | | id is the environment id of the stage. e.g., &#34;prod&#34;. Use &#34;-&#34; when the stage has no environment or deleted environment. |
-| environment | [string](#string) | | environment is the environment of the stage. Format: environments/{environment} for valid environments, or &#34;environments/-&#34; for stages without environment or with deleted environments. |
-| tasks | [Task](#bytebase-v1-Task) | repeated | The tasks within this stage. |
+| identity_provider | [IdentityProvider](#bytebase-v1-IdentityProvider) | | The identity provider to update.
+The identity provider&#39;s `name` field is used to identify the identity provider to update. Format: idps/{identity_provider} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| allow_missing | [bool](#bool) | | 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. |
-<a name="bytebase-v1-Task"></a>
+
-### Task
+<a name="bytebase-v1-IdentityProviderType"></a>
+### IdentityProviderType
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} |
-| spec_id | [string](#string) | | A UUID4 string that uniquely identifies the Spec. |
-| status | [Task.Status](#bytebase-v1-Task-Status) | | Status is the status of the task. |
-| skipped_reason | [string](#string) | | The reason why the task was skipped. |
-| type | [Task.Type](#bytebase-v1-Task-Type) | | |
-| target | [string](#string) | | 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} |
-| database_create | [Task.DatabaseCreate](#bytebase-v1-Task-DatabaseCreate) | | |
-| database_update | [Task.DatabaseUpdate](#bytebase-v1-Task-DatabaseUpdate) | | |
-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | The update_time is the update time of latest task run. If there are no task runs, it will be empty. |
-| run_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | 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. |
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| IDENTITY_PROVIDER_TYPE_UNSPECIFIED | 0 | Unspecified identity provider type. |
+| OAUTH2 | 1 | OAuth 2.0 authentication protocol. |
+| OIDC | 2 | OpenID Connect authentication protocol. |
+| LDAP | 3 | LDAP directory service authentication. |
+<a name="bytebase-v1-LDAPIdentityProviderConfig-SecurityProtocol"></a>
+### LDAPIdentityProviderConfig.SecurityProtocol
-<a name="bytebase-v1-Task-DatabaseCreate"></a>
-### Task.DatabaseCreate
-Payload for creating a new database.
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| SECURITY_PROTOCOL_UNSPECIFIED | 0 | |
+| START_TLS | 1 | StartTLS is the security protocol that starts with an unencrypted connection and then upgrades to TLS. |
+| LDAPS | 2 | LDAPS is the security protocol that uses TLS from the beginning. |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| sheet | [string](#string) | | Format: projects/{project}/sheets/{sheet} |
+
+<a name="bytebase-v1-OAuth2AuthStyle"></a>
+
+### OAuth2AuthStyle
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| OAUTH2_AUTH_STYLE_UNSPECIFIED | 0 | |
+| IN_PARAMS | 1 | IN_PARAMS sends the &#34;client_id&#34; and &#34;client_secret&#34; in the POST body as application/x-www-form-urlencoded parameters. |
+| IN_HEADER | 2 | IN_HEADER sends the client_id and client_password using HTTP Basic Authorization. This is an optional style described in the OAuth2 RFC 6749 section 2.3.1. |
+
+
-<a name="bytebase-v1-Task-DatabaseUpdate"></a>
-### Task.DatabaseUpdate
-Payload for updating a database schema.
+<a name="bytebase-v1-IdentityProviderService"></a>
+### IdentityProviderService
+IdentityProviderService manages external identity providers for SSO authentication.
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| sheet | [string](#string) | | Format: projects/{project}/sheets/{sheet} |
-| release | [string](#string) | | Format: projects/{project}/releases/{release} |
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| GetIdentityProvider | [GetIdentityProviderRequest](#bytebase-v1-GetIdentityProviderRequest) | [IdentityProvider](#bytebase-v1-IdentityProvider) | Gets an identity provider by name. Permissions required: bb.identityProviders.get |
+| ListIdentityProviders | [ListIdentityProvidersRequest](#bytebase-v1-ListIdentityProvidersRequest) | [ListIdentityProvidersResponse](#bytebase-v1-ListIdentityProvidersResponse) | Lists the identity providers configured for the caller&#39;s workspace. The login page reads AuthService.GetAuthenticationInfo instead, which publishes only the fields a browser needs to start an SSO redirect.
+
+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 |
+| CreateIdentityProvider | [CreateIdentityProviderRequest](#bytebase-v1-CreateIdentityProviderRequest) | [IdentityProvider](#bytebase-v1-IdentityProvider) | Creates a new identity provider. Permissions required: bb.identityProviders.create |
+| UpdateIdentityProvider | [UpdateIdentityProviderRequest](#bytebase-v1-UpdateIdentityProviderRequest) | [IdentityProvider](#bytebase-v1-IdentityProvider) | Updates an identity provider. Permissions required: bb.identityProviders.update When allow_missing=true, also requires: bb.identityProviders.create |
+| DeleteIdentityProvider | [DeleteIdentityProviderRequest](#bytebase-v1-DeleteIdentityProviderRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes an identity provider. Permissions required: bb.identityProviders.delete |
+| TestIdentityProvider | [TestIdentityProviderRequest](#bytebase-v1-TestIdentityProviderRequest) | [TestIdentityProviderResponse](#bytebase-v1-TestIdentityProviderResponse) | Tests the connection and configuration of an identity provider. Permissions required: bb.identityProviders.update |
+
+
+<a name="v1_rollout_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/rollout_service.proto
-<a name="bytebase-v1-TaskRun"></a>
-### TaskRun
+<a name="bytebase-v1-BatchCancelTaskRunsRequest"></a>
+
+### BatchCancelTaskRunsRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |
-| creator | [string](#string) | | Format: users/[email protected] |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| status | [TaskRun.Status](#bytebase-v1-TaskRun-Status) | | The current execution status of the task run. |
-| detail | [string](#string) | | Below are the results of a task run. Detailed information about the task run result. |
-| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The time when the task run started execution. |
-| has_prior_backup | [bool](#bool) | | 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. |
-| scheduler_info | [TaskRun.SchedulerInfo](#bytebase-v1-TaskRun-SchedulerInfo) | | Scheduling information about the task run. |
-| run_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | The task run should run after run_time. This can only be set when creating the task run calling BatchRunTasks. |
+| parent | [string](#string) | | 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. |
+| task_runs | [string](#string) | repeated | The taskRuns to cancel. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |
-<a name="bytebase-v1-TaskRun-SchedulerInfo"></a>
+<a name="bytebase-v1-BatchCancelTaskRunsResponse"></a>
-### TaskRun.SchedulerInfo
-Information about task run scheduling.
+### BatchCancelTaskRunsResponse
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| report_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The time when the scheduling info was reported. |
-| waiting_cause | [TaskRun.SchedulerInfo.WaitingCause](#bytebase-v1-TaskRun-SchedulerInfo-WaitingCause) | | The cause for the task run waiting. |
+<a name="bytebase-v1-BatchRunTasksRequest"></a>
-<a name="bytebase-v1-TaskRun-SchedulerInfo-WaitingCause"></a>
+### BatchRunTasksRequest
-### TaskRun.SchedulerInfo.WaitingCause
-Information about why a task run is waiting.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parallel_tasks_limit | [bool](#bool) | | Waiting due to parallel tasks limit. |
-
-
+| parent | [string](#string) | | The stage name for the tasks. Format: projects/{project}/plans/{plan}/rollout/stages/{stage} |
+| tasks | [string](#string) | repeated | The tasks to run. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} |
+| run_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | The task run should run after run_time. |
+| skip_prior_backup | [bool](#bool) | | If true, skip prior backup for this run even if the task has prior backup enabled. |
-<a name="bytebase-v1-TaskRunLog"></a>
-### TaskRunLog
+<a name="bytebase-v1-BatchRunTasksResponse"></a>
+### BatchRunTasksResponse
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/log |
-| entries | [TaskRunLogEntry](#bytebase-v1-TaskRunLogEntry) | repeated | The log entries for this task run. |
-<a name="bytebase-v1-TaskRunLogEntry"></a>
+<a name="bytebase-v1-BatchSkipTasksRequest"></a>
-### TaskRunLogEntry
+### BatchSkipTasksRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| type | [TaskRunLogEntry.Type](#bytebase-v1-TaskRunLogEntry-Type) | | The type of this log entry. |
-| log_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The time when the log was recorded. |
-| replica_id | [string](#string) | | The replica ID for this log entry. |
-| schema_dump | [TaskRunLogEntry.SchemaDump](#bytebase-v1-TaskRunLogEntry-SchemaDump) | | Schema dump details (if type is SCHEMA_DUMP). |
-| command_execute | [TaskRunLogEntry.CommandExecute](#bytebase-v1-TaskRunLogEntry-CommandExecute) | | Command execution details (if type is COMMAND_EXECUTE). |
-| database_sync | [TaskRunLogEntry.DatabaseSync](#bytebase-v1-TaskRunLogEntry-DatabaseSync) | | Database sync details (if type is DATABASE_SYNC). |
-| transaction_control | [TaskRunLogEntry.TransactionControl](#bytebase-v1-TaskRunLogEntry-TransactionControl) | | Transaction control details (if type is TRANSACTION_CONTROL). |
-| prior_backup | [TaskRunLogEntry.PriorBackup](#bytebase-v1-TaskRunLogEntry-PriorBackup) | | Prior backup details (if type is PRIOR_BACKUP). |
-| retry_info | [TaskRunLogEntry.RetryInfo](#bytebase-v1-TaskRunLogEntry-RetryInfo) | | Retry information details (if type is RETRY_INFO). |
-| compute_diff | [TaskRunLogEntry.ComputeDiff](#bytebase-v1-TaskRunLogEntry-ComputeDiff) | | Compute diff details (if type is COMPUTE_DIFF). |
-| release_file_execute | [TaskRunLogEntry.ReleaseFileExecute](#bytebase-v1-TaskRunLogEntry-ReleaseFileExecute) | | Release file execution details (if type is RELEASE_FILE_EXECUTE). |
-| ghost_migration | [TaskRunLogEntry.GhostMigration](#bytebase-v1-TaskRunLogEntry-GhostMigration) | | gh-ost migration details (if type is GHOST_MIGRATION). |
+| parent | [string](#string) | | The stage name for the tasks. Format: projects/{project}/plans/{plan}/rollout/stages/{stage} |
+| tasks | [string](#string) | repeated | The tasks to skip. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} |
+| reason | [string](#string) | | The reason for skipping the tasks. |
-<a name="bytebase-v1-TaskRunLogEntry-CommandExecute"></a>
+<a name="bytebase-v1-BatchSkipTasksResponse"></a>
-### TaskRunLogEntry.CommandExecute
-Command execution details.
+### BatchSkipTasksResponse
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| log_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the command was logged. |
-| range | [Range](#bytebase-v1-Range) | | 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 &#34;SELECT 你好;&#34; in a UTF-8 sheet, range [0, 13) represents all 13 bytes. |
-| statement | [string](#string) | | The executed statement. |
-| response | [TaskRunLogEntry.CommandExecute.CommandResponse](#bytebase-v1-TaskRunLogEntry-CommandExecute-CommandResponse) | | The response from executing the command. |
+<a name="bytebase-v1-CreateRolloutRequest"></a>
-<a name="bytebase-v1-TaskRunLogEntry-CommandExecute-CommandResponse"></a>
+### CreateRolloutRequest
-### TaskRunLogEntry.CommandExecute.CommandResponse
-Command execution response.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| log_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the response was logged. |
-| error | [string](#string) | | Error message if command execution failed. |
-| affected_rows | [int64](#int64) | | Total affected rows. |
-| all_affected_rows | [int64](#int64) | repeated | `all_affected_rows` is the affected rows of each command. `all_affected_rows` may be unavailable if the database driver doesn&#39;t support it. Caller should fallback to `affected_rows` in that case. |
+| parent | [string](#string) | | The parent plan for which this rollout will be created. Format: projects/{project}/plans/{plan} |
+| target | [string](#string) | optional | Create the rollout only for the specified target. Format: environments/{environment} If unspecified, all stages are created. If set to &#34;&#34;, no stages are created. |
-<a name="bytebase-v1-TaskRunLogEntry-ComputeDiff"></a>
+<a name="bytebase-v1-GetRolloutRequest"></a>
+
+### GetRolloutRequest
-### TaskRunLogEntry.ComputeDiff
-Schema diff computation details.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When diff computation started. |
-| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When diff computation ended. |
-| error | [string](#string) | | Error message if computation failed. |
+| name | [string](#string) | | 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 |
-<a name="bytebase-v1-TaskRunLogEntry-DatabaseSync"></a>
+<a name="bytebase-v1-GetTaskRunLogRequest"></a>
+
+### GetTaskRunLogRequest
-### TaskRunLogEntry.DatabaseSync
-Database synchronization details.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the database sync started. |
-| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the database sync ended. |
-| error | [string](#string) | | Error message if sync failed. |
+| parent | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |
-<a name="bytebase-v1-TaskRunLogEntry-GhostMigration"></a>
+<a name="bytebase-v1-GetTaskRunRequest"></a>
+
+### GetTaskRunRequest
-### TaskRunLogEntry.GhostMigration
-gh-ost migration details.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the gh-ost migration started. |
-| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the gh-ost migration ended. |
-| error | [string](#string) | | Error message if the gh-ost migration failed. |
+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |
-<a name="bytebase-v1-TaskRunLogEntry-PriorBackup"></a>
+<a name="bytebase-v1-GetTaskRunSessionRequest"></a>
+
+### GetTaskRunSessionRequest
-### TaskRunLogEntry.PriorBackup
-Prior backup operation details.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the backup started. |
-| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the backup ended. |
-| prior_backup_detail | [TaskRunLogEntry.PriorBackup.PriorBackupDetail](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail) | | The backup details. |
-| error | [string](#string) | | Error message if the backup failed. |
+| parent | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |
-<a name="bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail"></a>
+<a name="bytebase-v1-ListRolloutsRequest"></a>
+
+### ListRolloutsRequest
-### TaskRunLogEntry.PriorBackup.PriorBackupDetail
-Prior backup detail for rollback purposes.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| items | [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item) | repeated | The list of backed up tables. |
+| parent | [string](#string) | | The parent, which owns this collection of rollouts. Format: projects/{project} Use &#34;projects/-&#34; to list all rollouts from all projects. |
+| page_size | [int32](#int32) | | 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. |
+| page_token | [string](#string) | | 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 | [string](#string) | | 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 &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator. - task_type: the task type, support &#34;in&#34; operator, check the Task.Type enum for the values.
+For example: update_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34; task_type in [&#34;DATABASE_MIGRATE&#34;, &#34;DATABASE_CREATE&#34;] |
-<a name="bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item"></a>
-### TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item
-A single backup table mapping.
+
+<a name="bytebase-v1-ListRolloutsResponse"></a>
+
+### ListRolloutsResponse
+
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| source_table | [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table) | | The original table information. |
-| target_table | [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table) | | The target backup table information. |
-| start_position | [Position](#bytebase-v1-Position) | | The start position in the SQL statement. |
-| end_position | [Position](#bytebase-v1-Position) | | The end position in the SQL statement. |
+| rollouts | [Rollout](#bytebase-v1-Rollout) | repeated | The rollouts from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-<a name="bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table"></a>
+<a name="bytebase-v1-ListTaskRunsRequest"></a>
+
+### ListTaskRunsRequest
-### TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table
-Table information.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| database | [string](#string) | | The database information. Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} |
-| schema | [string](#string) | | The schema name. |
-| table | [string](#string) | | The table name. |
+| parent | [string](#string) | | The parent, which owns this collection of taskRuns. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} Use &#34;projects/{project}/plans/{plan}/rollout/stages/-/tasks/-&#34; to list all taskRuns from a rollout. |
+| page_size | [int32](#int32) | | 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. |
+| page_token | [string](#string) | | 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. |
-<a name="bytebase-v1-TaskRunLogEntry-ReleaseFileExecute"></a>
-### TaskRunLogEntry.ReleaseFileExecute
-Release file execution details.
+<a name="bytebase-v1-ListTaskRunsResponse"></a>
+
+### ListTaskRunsResponse
+
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| version | [string](#string) | | The version of the file being executed (e.g., &#34;0001&#34;). |
-| file_path | [string](#string) | | The file path within the release (e.g., &#34;2.2/V0001_create_table.sql&#34;). |
+| task_runs | [TaskRun](#bytebase-v1-TaskRun) | repeated | The taskRuns from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-<a name="bytebase-v1-TaskRunLogEntry-RetryInfo"></a>
+<a name="bytebase-v1-PreviewTaskRunRollbackRequest"></a>
+
+### PreviewTaskRunRollbackRequest
-### TaskRunLogEntry.RetryInfo
-Retry information for failed operations.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| error | [string](#string) | | The error that triggered the retry. |
-| retry_count | [int32](#int32) | | Current retry attempt number. |
-| maximum_retries | [int32](#int32) | | Maximum number of retries allowed. |
+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |
-<a name="bytebase-v1-TaskRunLogEntry-SchemaDump"></a>
+<a name="bytebase-v1-PreviewTaskRunRollbackResponse"></a>
+
+### PreviewTaskRunRollbackResponse
-### TaskRunLogEntry.SchemaDump
-Schema dump operation details.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the schema dump started. |
-| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the schema dump ended. |
-| error | [string](#string) | | Error message if the schema dump failed. |
+| statement | [string](#string) | | The rollback SQL statement that would undo the task run. |
-<a name="bytebase-v1-TaskRunLogEntry-TransactionControl"></a>
+<a name="bytebase-v1-Rollout"></a>
+
+### Rollout
-### TaskRunLogEntry.TransactionControl
-Transaction control operation details.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| type | [TaskRunLogEntry.TransactionControl.Type](#bytebase-v1-TaskRunLogEntry-TransactionControl-Type) | | The type of transaction control. |
-| error | [string](#string) | | Error message if the operation failed. |
+| name | [string](#string) | | The resource name of the rollout. Format: projects/{project}/plans/{plan}/rollout |
+| title | [string](#string) | | The title of the rollout, inherited from the associated plan. This field is output only and cannot be directly set. |
+| stages | [Stage](#bytebase-v1-Stage) | repeated | Stages and thus tasks of the rollout. |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-<a name="bytebase-v1-TaskRunSession"></a>
+<a name="bytebase-v1-Stage"></a>
-### TaskRunSession
+### Stage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/session |
-| postgres | [TaskRunSession.Postgres](#bytebase-v1-TaskRunSession-Postgres) | | PostgreSQL session information. |
+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage} Use &#34;-&#34; for {stage} when the stage has no environment or deleted environment. |
+| id | [string](#string) | | id is the environment id of the stage. e.g., &#34;prod&#34;. Use &#34;-&#34; when the stage has no environment or deleted environment. |
+| environment | [string](#string) | | environment is the environment of the stage. Format: environments/{environment} for valid environments, or &#34;environments/-&#34; for stages without environment or with deleted environments. |
+| tasks | [Task](#bytebase-v1-Task) | repeated | The tasks within this stage. |
-<a name="bytebase-v1-TaskRunSession-Postgres"></a>
+<a name="bytebase-v1-Task"></a>
+
+### Task
-### TaskRunSession.Postgres
-PostgreSQL session information.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| session | [TaskRunSession.Postgres.Session](#bytebase-v1-TaskRunSession-Postgres-Session) | | `session` is the session of the task run executing commands. |
-| blocking_sessions | [TaskRunSession.Postgres.Session](#bytebase-v1-TaskRunSession-Postgres-Session) | repeated | `blocking_sessions` block `session`. |
-| blocked_sessions | [TaskRunSession.Postgres.Session](#bytebase-v1-TaskRunSession-Postgres-Session) | repeated | `blocked_sessions` are blocked by `session`. |
+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} |
+| spec_id | [string](#string) | | A UUID4 string that uniquely identifies the Spec. |
+| status | [Task.Status](#bytebase-v1-Task-Status) | | Status is the status of the task. |
+| skipped_reason | [string](#string) | | The reason why the task was skipped. |
+| type | [Task.Type](#bytebase-v1-Task-Type) | | |
+| target | [string](#string) | | 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} |
+| database_create | [Task.DatabaseCreate](#bytebase-v1-Task-DatabaseCreate) | | |
+| database_update | [Task.DatabaseUpdate](#bytebase-v1-Task-DatabaseUpdate) | | |
+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | The update_time is the update time of latest task run. If there are no task runs, it will be empty. |
+| run_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | 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. |
-<a name="bytebase-v1-TaskRunSession-Postgres-Session"></a>
+<a name="bytebase-v1-Task-DatabaseCreate"></a>
-### TaskRunSession.Postgres.Session
-PostgreSQL session information read from `pg_stat_activity`.
+### Task.DatabaseCreate
+Payload for creating a new database.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| pid | [string](#string) | | Process ID of the session. |
-| blocked_by_pids | [string](#string) | repeated | PIDs of sessions blocking this session. |
-| query | [string](#string) | | Current query being executed. |
-| state | [string](#string) | optional | Session state (active, idle, etc.). |
-| wait_event_type | [string](#string) | optional | Wait event type if session is waiting. |
-| wait_event | [string](#string) | optional | Specific wait event if session is waiting. |
-| datname | [string](#string) | optional | Database name. |
-| usename | [string](#string) | optional | User name. |
-| application_name | [string](#string) | | Application name. |
-| client_addr | [string](#string) | optional | Client IP address. |
-| client_port | [string](#string) | optional | Client port number. |
-| backend_start | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the backend process started. |
-| xact_start | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | When the current transaction started. |
-| query_start | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | When the current query started. |
-
-
-
-
+| sheet | [string](#string) | | Format: projects/{project}/sheets/{sheet} |
-
-<a name="bytebase-v1-Task-Status"></a>
-### Task.Status
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| STATUS_UNSPECIFIED | 0 | Unspecified status. |
-| NOT_STARTED | 1 | Task has not started and is awaiting its turn in the deployment sequence. |
-| PENDING | 2 | Task is ready to run and waiting for approval or scheduled time. |
-| RUNNING | 3 | Task is currently executing. |
-| DONE | 4 | Task completed successfully. |
-| FAILED | 5 | Task execution failed with errors. |
-| CANCELED | 6 | Task execution was canceled by a user. |
-| SKIPPED | 7 | Task was skipped and will not be executed. |
+<a name="bytebase-v1-Task-DatabaseUpdate"></a>
+### Task.DatabaseUpdate
+Payload for updating a database schema.
-<a name="bytebase-v1-Task-Type"></a>
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| sheet | [string](#string) | | Format: projects/{project}/sheets/{sheet} |
+| release | [string](#string) | | Format: projects/{project}/releases/{release} |
-### Task.Type
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | Unspecified task type. |
-| GENERAL | 1 | General task for miscellaneous operations. |
-| DATABASE_CREATE | 2 | Database creation task that creates a new database. Use payload DatabaseCreate. |
-| DATABASE_MIGRATE | 3 | Database migration task that applies versioned schema changes. Use payload DatabaseUpdate. |
-<a name="bytebase-v1-TaskRun-Status"></a>
+<a name="bytebase-v1-TaskRun"></a>
-### TaskRun.Status
+### TaskRun
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| STATUS_UNSPECIFIED | 0 | Unspecified status. |
-| PENDING | 1 | Task run is queued and waiting to start execution. |
-| RUNNING | 2 | Task run is currently executing. |
-| DONE | 3 | Task run completed successfully. |
-| FAILED | 4 | Task run execution failed with errors. |
-| CANCELED | 5 | Task run execution was canceled by a user. |
-| AVAILABLE | 6 | Task run is ready for immediate execution. |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |
+| creator | [string](#string) | | Format: users/[email protected] |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| status | [TaskRun.Status](#bytebase-v1-TaskRun-Status) | | The current execution status of the task run. |
+| detail | [string](#string) | | Below are the results of a task run. Detailed information about the task run result. |
+| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The time when the task run started execution. |
+| has_prior_backup | [bool](#bool) | | 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. |
+| scheduler_info | [TaskRun.SchedulerInfo](#bytebase-v1-TaskRun-SchedulerInfo) | | Scheduling information about the task run. |
+| run_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | The task run should run after run_time. This can only be set when creating the task run calling BatchRunTasks. |
-<a name="bytebase-v1-TaskRunLogEntry-TransactionControl-Type"></a>
-### TaskRunLogEntry.TransactionControl.Type
-Transaction control type.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | Unspecified type. |
-| BEGIN | 1 | Begin transaction. |
-| COMMIT | 2 | Commit transaction. |
-| ROLLBACK | 3 | Rollback transaction. |
+<a name="bytebase-v1-TaskRun-SchedulerInfo"></a>
-<a name="bytebase-v1-TaskRunLogEntry-Type"></a>
+### TaskRun.SchedulerInfo
+Information about task run scheduling.
-### TaskRunLogEntry.Type
-The type of log entry.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | Unspecified type. |
-| SCHEMA_DUMP | 1 | Schema dump operation. |
-| COMMAND_EXECUTE | 2 | Command execution. |
-| DATABASE_SYNC | 3 | Database synchronization. |
-| TRANSACTION_CONTROL | 5 | Transaction control (BEGIN, COMMIT, ROLLBACK). |
-| PRIOR_BACKUP | 6 | Prior backup operation. |
-| RETRY_INFO | 7 | Retry information. |
-| COMPUTE_DIFF | 8 | Schema diff computation. |
-| RELEASE_FILE_EXECUTE | 9 | Release file execution. |
-| GHOST_MIGRATION | 10 | gh-ost online migration. |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| report_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The time when the scheduling info was reported. |
+| waiting_cause | [TaskRun.SchedulerInfo.WaitingCause](#bytebase-v1-TaskRun-SchedulerInfo-WaitingCause) | | The cause for the task run waiting. |
-
-
-<a name="bytebase-v1-RolloutService"></a>
-### RolloutService
-RolloutService manages the execution of deployment plans.
+<a name="bytebase-v1-TaskRun-SchedulerInfo-WaitingCause"></a>
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| GetRollout | [GetRolloutRequest](#bytebase-v1-GetRolloutRequest) | [Rollout](#bytebase-v1-Rollout) | Retrieves a rollout by its plan name. Permissions required: bb.rollouts.get |
-| ListRollouts | [ListRolloutsRequest](#bytebase-v1-ListRolloutsRequest) | [ListRolloutsResponse](#bytebase-v1-ListRolloutsResponse) | Lists rollouts in a project. Permissions required: bb.rollouts.list |
-| CreateRollout | [CreateRolloutRequest](#bytebase-v1-CreateRolloutRequest) | [Rollout](#bytebase-v1-Rollout) | Creates a new rollout for a plan. Permissions required: bb.rollouts.create |
-| ListTaskRuns | [ListTaskRunsRequest](#bytebase-v1-ListTaskRunsRequest) | [ListTaskRunsResponse](#bytebase-v1-ListTaskRunsResponse) | Lists task run executions for a task. Permissions required: bb.taskRuns.list |
-| GetTaskRun | [GetTaskRunRequest](#bytebase-v1-GetTaskRunRequest) | [TaskRun](#bytebase-v1-TaskRun) | Retrieves a task run by name. Permissions required: bb.taskRuns.list |
-| GetTaskRunLog | [GetTaskRunLogRequest](#bytebase-v1-GetTaskRunLogRequest) | [TaskRunLog](#bytebase-v1-TaskRunLog) | Retrieves execution logs for a task run. Permissions required: bb.taskRuns.list |
-| GetTaskRunSession | [GetTaskRunSessionRequest](#bytebase-v1-GetTaskRunSessionRequest) | [TaskRunSession](#bytebase-v1-TaskRunSession) | Retrieves database session information for a running task. Permissions required: bb.taskRuns.list |
-| BatchRunTasks | [BatchRunTasksRequest](#bytebase-v1-BatchRunTasksRequest) | [BatchRunTasksResponse](#bytebase-v1-BatchRunTasksResponse) | Executes multiple tasks in a rollout stage. Permissions required: bb.taskRuns.create (or user with rollout policy role for the environment) |
-| BatchSkipTasks | [BatchSkipTasksRequest](#bytebase-v1-BatchSkipTasksRequest) | [BatchSkipTasksResponse](#bytebase-v1-BatchSkipTasksResponse) | Skips multiple tasks in a rollout stage. Permissions required: bb.taskRuns.create (or user with rollout policy role for the environment) |
-| BatchCancelTaskRuns | [BatchCancelTaskRunsRequest](#bytebase-v1-BatchCancelTaskRunsRequest) | [BatchCancelTaskRunsResponse](#bytebase-v1-BatchCancelTaskRunsResponse) | 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) |
-| PreviewTaskRunRollback | [PreviewTaskRunRollbackRequest](#bytebase-v1-PreviewTaskRunRollbackRequest) | [PreviewTaskRunRollbackResponse](#bytebase-v1-PreviewTaskRunRollbackResponse) | Generates rollback SQL for a completed task run. Permissions required: bb.taskRuns.list |
+### TaskRun.SchedulerInfo.WaitingCause
+Information about why a task run is waiting.
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| parallel_tasks_limit | [bool](#bool) | | Waiting due to parallel tasks limit. |
-<a name="v1_query_history_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/query_history_service.proto
-<a name="bytebase-v1-GetQueryHistoryRequest"></a>
+<a name="bytebase-v1-TaskRunLog"></a>
-### GetQueryHistoryRequest
+### TaskRunLog
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the query history to retrieve. Format: projects/{project}/queryHistories/{id} |
+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/log |
+| entries | [TaskRunLogEntry](#bytebase-v1-TaskRunLogEntry) | repeated | The log entries for this task run. |
-<a name="bytebase-v1-ListQueryHistoriesRequest"></a>
+<a name="bytebase-v1-TaskRunLogEntry"></a>
-### ListQueryHistoriesRequest
+### TaskRunLogEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent project whose query histories are listed. Format: projects/{project} Use &#34;projects/-&#34; to list query histories across all projects (https://google.aip.dev/159); this requires the bb.queryHistories.list permission on the workspace. |
-| page_size | [int32](#int32) | | 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. |
-| page_token | [string](#string) | | A page token, received from a previous `ListQueryHistories` call. Provide this to retrieve the subsequent page. |
-| filter | [string](#string) | | 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 &#34;users/{email}&#34; format, support &#34;==&#34; operator.
-
-For example: creator == &#34;users/{email}&#34; |
-
+| type | [TaskRunLogEntry.Type](#bytebase-v1-TaskRunLogEntry-Type) | | The type of this log entry. |
+| log_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The time when the log was recorded. |
+| replica_id | [string](#string) | | The replica ID for this log entry. |
+| schema_dump | [TaskRunLogEntry.SchemaDump](#bytebase-v1-TaskRunLogEntry-SchemaDump) | | Schema dump details (if type is SCHEMA_DUMP). |
+| command_execute | [TaskRunLogEntry.CommandExecute](#bytebase-v1-TaskRunLogEntry-CommandExecute) | | Command execution details (if type is COMMAND_EXECUTE). |
+| database_sync | [TaskRunLogEntry.DatabaseSync](#bytebase-v1-TaskRunLogEntry-DatabaseSync) | | Database sync details (if type is DATABASE_SYNC). |
+| transaction_control | [TaskRunLogEntry.TransactionControl](#bytebase-v1-TaskRunLogEntry-TransactionControl) | | Transaction control details (if type is TRANSACTION_CONTROL). |
+| prior_backup | [TaskRunLogEntry.PriorBackup](#bytebase-v1-TaskRunLogEntry-PriorBackup) | | Prior backup details (if type is PRIOR_BACKUP). |
+| retry_info | [TaskRunLogEntry.RetryInfo](#bytebase-v1-TaskRunLogEntry-RetryInfo) | | Retry information details (if type is RETRY_INFO). |
+| compute_diff | [TaskRunLogEntry.ComputeDiff](#bytebase-v1-TaskRunLogEntry-ComputeDiff) | | Compute diff details (if type is COMPUTE_DIFF). |
+| release_file_execute | [TaskRunLogEntry.ReleaseFileExecute](#bytebase-v1-TaskRunLogEntry-ReleaseFileExecute) | | Release file execution details (if type is RELEASE_FILE_EXECUTE). |
+| ghost_migration | [TaskRunLogEntry.GhostMigration](#bytebase-v1-TaskRunLogEntry-GhostMigration) | | gh-ost migration details (if type is GHOST_MIGRATION). |
-<a name="bytebase-v1-ListQueryHistoriesResponse"></a>
-### ListQueryHistoriesResponse
+<a name="bytebase-v1-TaskRunLogEntry-CommandExecute"></a>
+### TaskRunLogEntry.CommandExecute
+Command execution details.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| query_histories | [QueryHistory](#bytebase-v1-QueryHistory) | repeated | The list of query histories. |
-| next_page_token | [string](#string) | | 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. |
-
+| log_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the command was logged. |
+| range | [Range](#bytebase-v1-Range) | | 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 &#34;SELECT 你好;&#34; in a UTF-8 sheet, range [0, 13) represents all 13 bytes. |
+| statement | [string](#string) | | The executed statement. |
+| response | [TaskRunLogEntry.CommandExecute.CommandResponse](#bytebase-v1-TaskRunLogEntry-CommandExecute-CommandResponse) | | The response from executing the command. |
-<a name="bytebase-v1-QueryHistory"></a>
-### QueryHistory
+<a name="bytebase-v1-TaskRunLogEntry-CommandExecute-CommandResponse"></a>
+### TaskRunLogEntry.CommandExecute.CommandResponse
+Command execution response.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name for the query history. Format: projects/{project}/queryHistories/{id} |
-| database | [string](#string) | | The database name to execute the query. Format: instances/{instance}/databases/{databaseName} or projects/{project}/instances/{instance}/databases/{databaseName} |
-| creator | [string](#string) | | |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| statement | [string](#string) | | |
-| error | [string](#string) | optional | |
-| duration | [google.protobuf.Duration](#google-protobuf-Duration) | | |
-| type | [QueryHistory.Type](#bytebase-v1-QueryHistory-Type) | | |
-
+| log_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the response was logged. |
+| error | [string](#string) | | Error message if command execution failed. |
+| affected_rows | [int64](#int64) | | Total affected rows. |
+| all_affected_rows | [int64](#int64) | repeated | `all_affected_rows` is the affected rows of each command. `all_affected_rows` may be unavailable if the database driver doesn&#39;t support it. Caller should fallback to `affected_rows` in that case. |
-<a name="bytebase-v1-SearchQueryHistoriesRequest"></a>
-### SearchQueryHistoriesRequest
+<a name="bytebase-v1-TaskRunLogEntry-ComputeDiff"></a>
+### TaskRunLogEntry.ComputeDiff
+Schema diff computation details.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent project to search query histories in. Format: projects/{project} The AIP-159 wildcard &#34;projects/-&#34; is not supported; use ListQueryHistories for cross-project reads. |
-| page_size | [int32](#int32) | | 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. |
-| page_token | [string](#string) | | A page token, received from a previous `ListQueryHistory` call. Provide this to retrieve the subsequent page. |
-| filter | [string](#string) | | 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 &#34;projects/{id}&#34; format, support &#34;==&#34; operator. - database: the database full name in &#34;instances/{id}/databases/{name}&#34; or &#34;projects/{project}/instances/{id}/databases/{name}&#34; format, support &#34;==&#34; operator. - instance: the instance full name in &#34;instances/{id}&#34; or &#34;projects/{project}/instances/{id}&#34; format, support &#34;==&#34; operator. - type: the type, should be &#34;QUERY&#34; or &#34;EXPORT&#34;, support &#34;==&#34; operator. - statement: the SQL statement, support &#34;==&#34; and &#34;.contains()&#34; operators.
-
-For example: project == &#34;projects/{project}&#34; database == &#34;instances/{instance}/databases/{database}&#34; instance == &#34;instances/{instance}&#34; type == &#34;QUERY&#34; type == &#34;EXPORT&#34; statement == &#34;SELECT 1;&#34; statement.contains(&#34;select&#34;) type == &#34;QUERY&#34; &amp;&amp; statement.contains(&#34;select&#34;) |
-
+| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When diff computation started. |
+| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When diff computation ended. |
+| error | [string](#string) | | Error message if computation failed. |
-<a name="bytebase-v1-SearchQueryHistoriesResponse"></a>
-### SearchQueryHistoriesResponse
+<a name="bytebase-v1-TaskRunLogEntry-DatabaseSync"></a>
+### TaskRunLogEntry.DatabaseSync
+Database synchronization details.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| query_histories | [QueryHistory](#bytebase-v1-QueryHistory) | repeated | The list of history. |
-| next_page_token | [string](#string) | | 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. |
-
-
+| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the database sync started. |
+| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the database sync ended. |
+| error | [string](#string) | | Error message if sync failed. |
-
-<a name="bytebase-v1-QueryHistory-Type"></a>
-### QueryHistory.Type
+<a name="bytebase-v1-TaskRunLogEntry-GhostMigration"></a>
+### TaskRunLogEntry.GhostMigration
+gh-ost migration details.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | Unspecified query history type. |
-| QUERY | 1 | Query execution for data retrieval. |
-| EXPORT | 2 | Data export operation to file. |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the gh-ost migration started. |
+| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the gh-ost migration ended. |
+| error | [string](#string) | | Error message if the gh-ost migration failed. |
-
-
-<a name="bytebase-v1-QueryHistoryService"></a>
-### QueryHistoryService
-QueryHistoryService manages query history records of SQL Editor queries and exports.
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| SearchQueryHistories | [SearchQueryHistoriesRequest](#bytebase-v1-SearchQueryHistoriesRequest) | [SearchQueryHistoriesResponse](#bytebase-v1-SearchQueryHistoriesResponse) | SearchQueryHistories searches query histories for the caller. Permissions required: None (only returns caller&#39;s own query histories) |
-| ListQueryHistories | [ListQueryHistoriesRequest](#bytebase-v1-ListQueryHistoriesRequest) | [ListQueryHistoriesResponse](#bytebase-v1-ListQueryHistoriesResponse) | ListQueryHistories lists query histories of all users in a project. Results are ordered by create time descending (newest first). Permissions required: bb.queryHistories.list |
-| GetQueryHistory | [GetQueryHistoryRequest](#bytebase-v1-GetQueryHistoryRequest) | [QueryHistory](#bytebase-v1-QueryHistory) | GetQueryHistory gets a single query history for the caller. Permissions required: None (only returns the caller&#39;s own query history) |
+<a name="bytebase-v1-TaskRunLogEntry-PriorBackup"></a>
-
+### TaskRunLogEntry.PriorBackup
+Prior backup operation details.
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the backup started. |
+| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the backup ended. |
+| prior_backup_detail | [TaskRunLogEntry.PriorBackup.PriorBackupDetail](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail) | | The backup details. |
+| error | [string](#string) | | Error message if the backup failed. |
-<a name="v1_sql_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/sql_service.proto
-<a name="bytebase-v1-AdminExecuteRequest"></a>
-### AdminExecuteRequest
+<a name="bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail"></a>
+### TaskRunLogEntry.PriorBackup.PriorBackupDetail
+Prior backup detail for rollback purposes.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the instance name to execute the query against. Format: instances/{instance}/databases/{databaseName} or projects/{project}/instances/{instance}/databases/{databaseName} |
-| statement | [string](#string) | | The SQL statement to execute. |
-| limit | [int32](#int32) | | The maximum number of rows to return. |
-| schema | [string](#string) | optional | The default schema to execute the statement. Equals to the current schema in Oracle and search path in Postgres. |
-| container | [string](#string) | optional | Container is the container name to execute the query against, used for CosmosDB only. |
-
+| items | [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item) | repeated | The list of backed up tables. |
-<a name="bytebase-v1-AdminExecuteResponse"></a>
-### AdminExecuteResponse
+<a name="bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item"></a>
+### TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item
+A single backup table mapping.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |
-
+| source_table | [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table) | | The original table information. |
+| target_table | [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table) | | The target backup table information. |
+| start_position | [Position](#bytebase-v1-Position) | | The start position in the SQL statement. |
+| end_position | [Position](#bytebase-v1-Position) | | The end position in the SQL statement. |
-<a name="bytebase-v1-Advice"></a>
-### Advice
+<a name="bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table"></a>
+### TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table
+Table information.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| status | [Advice.Level](#bytebase-v1-Advice-Level) | | The advice level. |
-| code | [int32](#int32) | | The advice code. |
-| title | [string](#string) | | The advice title. |
-| content | [string](#string) | | The advice content. |
-| start_position | [Position](#bytebase-v1-Position) | | The start_position is inclusive and the end_position is exclusive. TODO: use range instead |
-| end_position | [Position](#bytebase-v1-Position) | | |
-| rule_type | [Advice.RuleType](#bytebase-v1-Advice-RuleType) | | The type of linting rule that generated this advice. |
-
+| database | [string](#string) | | The database information. Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} |
+| schema | [string](#string) | | The schema name. |
+| table | [string](#string) | | The table name. |
-<a name="bytebase-v1-ExportRequest"></a>
-### ExportRequest
+<a name="bytebase-v1-TaskRunLogEntry-ReleaseFileExecute"></a>
+### TaskRunLogEntry.ReleaseFileExecute
+Release file execution details.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the resource name to execute the export against. Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} |
-| statement | [string](#string) | | The SQL statement to execute. |
-| limit | [int32](#int32) | | The maximum number of rows to return. |
-| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The export format. |
-| admin | [bool](#bool) | | The admin is used for workspace owner and DBA for exporting data from SQL Editor Admin mode. The exported data is not masked. |
-| password | [string](#string) | | The zip password provide by users. |
-| data_source_id | [string](#string) | | 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 | [string](#string) | optional | The default schema to search objects. Equals to the current schema in Oracle and search path in Postgres. |
-| container | [string](#string) | optional | Container is the container name to execute the query against, used for CosmosDB only. |
-
+| version | [string](#string) | | The version of the file being executed (e.g., &#34;0001&#34;). |
+| file_path | [string](#string) | | The file path within the release (e.g., &#34;2.2/V0001_create_table.sql&#34;). |
-<a name="bytebase-v1-ExportResponse"></a>
-### ExportResponse
+<a name="bytebase-v1-TaskRunLogEntry-RetryInfo"></a>
+### TaskRunLogEntry.RetryInfo
+Retry information for failed operations.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| content | [bytes](#bytes) | | The export file content. |
-| applied_access_grant | [string](#string) | | 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. |
-
+| error | [string](#string) | | The error that triggered the retry. |
+| retry_count | [int32](#int32) | | Current retry attempt number. |
+| maximum_retries | [int32](#int32) | | Maximum number of retries allowed. |
-<a name="bytebase-v1-MaskingReason"></a>
-### MaskingReason
+<a name="bytebase-v1-TaskRunLogEntry-SchemaDump"></a>
+### TaskRunLogEntry.SchemaDump
+Schema dump operation details.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| semantic_type_id | [string](#string) | | The semantic type that triggered masking (e.g., &#34;SSN&#34;, &#34;email&#34;, &#34;phone&#34;). |
-| semantic_type_title | [string](#string) | | Human-readable semantic type title. |
-| masking_rule_id | [string](#string) | | The masking rule ID that matched (if applicable). |
-| algorithm | [string](#string) | | The masking algorithm used. |
-| context | [string](#string) | | Additional context (e.g., &#34;Matched global rule: PII Protection&#34;). |
-| classification_level | [int32](#int32) | | The classification level that triggered masking. |
-| semantic_type_icon | [string](#string) | | Icon associated with the semantic type (if any). |
-
+| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the schema dump started. |
+| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the schema dump ended. |
+| error | [string](#string) | | Error message if the schema dump failed. |
-<a name="bytebase-v1-QueryOption"></a>
-### QueryOption
+<a name="bytebase-v1-TaskRunLogEntry-TransactionControl"></a>
+### TaskRunLogEntry.TransactionControl
+Transaction control operation details.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| redis_run_commands_on | [QueryOption.RedisRunCommandsOn](#bytebase-v1-QueryOption-RedisRunCommandsOn) | | |
-| mssql_explain_format | [QueryOption.MSSQLExplainFormat](#bytebase-v1-QueryOption-MSSQLExplainFormat) | | |
+| type | [TaskRunLogEntry.TransactionControl.Type](#bytebase-v1-TaskRunLogEntry-TransactionControl-Type) | | The type of transaction control. |
+| error | [string](#string) | | Error message if the operation failed. |
-<a name="bytebase-v1-QueryRequest"></a>
+<a name="bytebase-v1-TaskRunSession"></a>
-### QueryRequest
+### TaskRunSession
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | 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 | [string](#string) | | The SQL statement to execute. |
-| limit | [int32](#int32) | | The maximum number of rows to return. |
-| data_source_id | [string](#string) | | 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 | [bool](#bool) | | Explain the statement. |
-| schema | [string](#string) | optional | The default schema to search objects. Equals to the current schema in Oracle and search path in Postgres. |
-| query_option | [QueryOption](#bytebase-v1-QueryOption) | | |
-| container | [string](#string) | optional | Container is the container name to execute the query against, used for CosmosDB only. |
-
+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/session |
+| postgres | [TaskRunSession.Postgres](#bytebase-v1-TaskRunSession-Postgres) | | PostgreSQL session information. |
-<a name="bytebase-v1-QueryResponse"></a>
-### QueryResponse
+<a name="bytebase-v1-TaskRunSession-Postgres"></a>
+### TaskRunSession.Postgres
+PostgreSQL session information.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |
-| applied_access_grant | [string](#string) | | 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. |
-
+| session | [TaskRunSession.Postgres.Session](#bytebase-v1-TaskRunSession-Postgres-Session) | | `session` is the session of the task run executing commands. |
+| blocking_sessions | [TaskRunSession.Postgres.Session](#bytebase-v1-TaskRunSession-Postgres-Session) | repeated | `blocking_sessions` block `session`. |
+| blocked_sessions | [TaskRunSession.Postgres.Session](#bytebase-v1-TaskRunSession-Postgres-Session) | repeated | `blocked_sessions` are blocked by `session`. |
-<a name="bytebase-v1-QueryResult"></a>
-### QueryResult
+<a name="bytebase-v1-TaskRunSession-Postgres-Session"></a>
+### TaskRunSession.Postgres.Session
+PostgreSQL session information read from `pg_stat_activity`.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| column_names | [string](#string) | repeated | Column names of the query result. |
-| column_type_names | [string](#string) | repeated | Column types of the query result. The types come from the Golang SQL driver. |
-| rows | [QueryRow](#bytebase-v1-QueryRow) | repeated | Rows of the query result. |
-| rows_count | [int64](#int64) | | |
-| error | [string](#string) | | The error message if the query failed. |
-| latency | [google.protobuf.Duration](#google-protobuf-Duration) | | The time it takes to execute the query. |
-| statement | [string](#string) | | The query statement for the result. |
-| postgres_error | [QueryResult.PostgresError](#bytebase-v1-QueryResult-PostgresError) | | |
-| syntax_error | [QueryResult.SyntaxError](#bytebase-v1-QueryResult-SyntaxError) | | |
-| permission_denied | [PermissionDeniedDetail](#bytebase-v1-PermissionDeniedDetail) | | |
-| command_error | [QueryResult.CommandError](#bytebase-v1-QueryResult-CommandError) | | |
-| messages | [QueryResult.Message](#bytebase-v1-QueryResult-Message) | repeated | Informational or debug messages returned by the database engine during query execution. Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39;s DBMS_OUTPUT.PUT_LINE. |
-| masked | [MaskingReason](#bytebase-v1-MaskingReason) | repeated | Masking reasons for each column (empty for non-masked columns). |
+| pid | [string](#string) | | Process ID of the session. |
+| blocked_by_pids | [string](#string) | repeated | PIDs of sessions blocking this session. |
+| query | [string](#string) | | Current query being executed. |
+| state | [string](#string) | optional | Session state (active, idle, etc.). |
+| wait_event_type | [string](#string) | optional | Wait event type if session is waiting. |
+| wait_event | [string](#string) | optional | Specific wait event if session is waiting. |
+| datname | [string](#string) | optional | Database name. |
+| usename | [string](#string) | optional | User name. |
+| application_name | [string](#string) | | Application name. |
+| client_addr | [string](#string) | optional | Client IP address. |
+| client_port | [string](#string) | optional | Client port number. |
+| backend_start | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the backend process started. |
+| xact_start | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | When the current transaction started. |
+| query_start | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | When the current query started. |
+
-<a name="bytebase-v1-QueryResult-CommandError"></a>
-### QueryResult.CommandError
-Permission denied with resource information or disallowed command_type.
-Either resources or command_type is available.
+<a name="bytebase-v1-Task-Status"></a>
+### Task.Status
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| command_type | [QueryResult.CommandError.Type](#bytebase-v1-QueryResult-CommandError-Type) | | Disallowed command_type. |
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| STATUS_UNSPECIFIED | 0 | Unspecified status. |
+| NOT_STARTED | 1 | Task has not started and is awaiting its turn in the deployment sequence. |
+| PENDING | 2 | Task is ready to run and waiting for approval or scheduled time. |
+| RUNNING | 3 | Task is currently executing. |
+| DONE | 4 | Task completed successfully. |
+| FAILED | 5 | Task execution failed with errors. |
+| CANCELED | 6 | Task execution was canceled by a user. |
+| SKIPPED | 7 | Task was skipped and will not be executed. |
+<a name="bytebase-v1-Task-Type"></a>
+### Task.Type
-<a name="bytebase-v1-QueryResult-Message"></a>
-### QueryResult.Message
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | Unspecified task type. |
+| GENERAL | 1 | General task for miscellaneous operations. |
+| DATABASE_CREATE | 2 | Database creation task that creates a new database. Use payload DatabaseCreate. |
+| DATABASE_MIGRATE | 3 | Database migration task that applies versioned schema changes. Use payload DatabaseUpdate. |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| level | [QueryResult.Message.Level](#bytebase-v1-QueryResult-Message-Level) | | |
-| content | [string](#string) | | |
+<a name="bytebase-v1-TaskRun-Status"></a>
+### TaskRun.Status
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| STATUS_UNSPECIFIED | 0 | Unspecified status. |
+| PENDING | 1 | Task run is queued and waiting to start execution. |
+| RUNNING | 2 | Task run is currently executing. |
+| DONE | 3 | Task run completed successfully. |
+| FAILED | 4 | Task run execution failed with errors. |
+| CANCELED | 5 | Task run execution was canceled by a user. |
+| AVAILABLE | 6 | Task run is ready for immediate execution. |
-<a name="bytebase-v1-QueryResult-PostgresError"></a>
+<a name="bytebase-v1-TaskRunLogEntry-TransactionControl-Type"></a>
-### QueryResult.PostgresError
-refer https://www.postgresql.org/docs/11/protocol-error-fields.html
-for field description.
+### TaskRunLogEntry.TransactionControl.Type
+Transaction control type.
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | Unspecified type. |
+| BEGIN | 1 | Begin transaction. |
+| COMMIT | 2 | Commit transaction. |
+| ROLLBACK | 3 | Rollback transaction. |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| severity | [string](#string) | | |
-| code | [string](#string) | | |
-| message | [string](#string) | | |
-| detail | [string](#string) | | |
-| hint | [string](#string) | | |
-| position | [int32](#int32) | | |
-| internal_position | [int32](#int32) | | |
-| internal_query | [string](#string) | | |
-| where | [string](#string) | | |
-| schema_name | [string](#string) | | |
-| table_name | [string](#string) | | |
-| column_name | [string](#string) | | |
-| data_type_name | [string](#string) | | |
-| constraint_name | [string](#string) | | |
-| file | [string](#string) | | |
-| line | [int32](#int32) | | |
-| routine | [string](#string) | | |
+<a name="bytebase-v1-TaskRunLogEntry-Type"></a>
+### TaskRunLogEntry.Type
+The type of log entry.
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | Unspecified type. |
+| SCHEMA_DUMP | 1 | Schema dump operation. |
+| COMMAND_EXECUTE | 2 | Command execution. |
+| DATABASE_SYNC | 3 | Database synchronization. |
+| TRANSACTION_CONTROL | 5 | Transaction control (BEGIN, COMMIT, ROLLBACK). |
+| PRIOR_BACKUP | 6 | Prior backup operation. |
+| RETRY_INFO | 7 | Retry information. |
+| COMPUTE_DIFF | 8 | Schema diff computation. |
+| RELEASE_FILE_EXECUTE | 9 | Release file execution. |
+| GHOST_MIGRATION | 10 | gh-ost online migration. |
-<a name="bytebase-v1-QueryResult-SyntaxError"></a>
+
-### QueryResult.SyntaxError
-Syntax error with position information for editor highlighting
+
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| start_position | [Position](#bytebase-v1-Position) | | Position information for highlighting in editor |
+<a name="bytebase-v1-RolloutService"></a>
+
+### RolloutService
+RolloutService manages the execution of deployment plans.
+
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| GetRollout | [GetRolloutRequest](#bytebase-v1-GetRolloutRequest) | [Rollout](#bytebase-v1-Rollout) | Retrieves a rollout by its plan name. Permissions required: bb.rollouts.get |
+| ListRollouts | [ListRolloutsRequest](#bytebase-v1-ListRolloutsRequest) | [ListRolloutsResponse](#bytebase-v1-ListRolloutsResponse) | Lists rollouts in a project. Permissions required: bb.rollouts.list |
+| CreateRollout | [CreateRolloutRequest](#bytebase-v1-CreateRolloutRequest) | [Rollout](#bytebase-v1-Rollout) | Creates a new rollout for a plan. Permissions required: bb.rollouts.create |
+| ListTaskRuns | [ListTaskRunsRequest](#bytebase-v1-ListTaskRunsRequest) | [ListTaskRunsResponse](#bytebase-v1-ListTaskRunsResponse) | Lists task run executions for a task. Permissions required: bb.taskRuns.list |
+| GetTaskRun | [GetTaskRunRequest](#bytebase-v1-GetTaskRunRequest) | [TaskRun](#bytebase-v1-TaskRun) | Retrieves a task run by name. Permissions required: bb.taskRuns.list |
+| GetTaskRunLog | [GetTaskRunLogRequest](#bytebase-v1-GetTaskRunLogRequest) | [TaskRunLog](#bytebase-v1-TaskRunLog) | Retrieves execution logs for a task run. Permissions required: bb.taskRuns.list |
+| GetTaskRunSession | [GetTaskRunSessionRequest](#bytebase-v1-GetTaskRunSessionRequest) | [TaskRunSession](#bytebase-v1-TaskRunSession) | Retrieves database session information for a running task. Permissions required: bb.taskRuns.list |
+| BatchRunTasks | [BatchRunTasksRequest](#bytebase-v1-BatchRunTasksRequest) | [BatchRunTasksResponse](#bytebase-v1-BatchRunTasksResponse) | Executes multiple tasks in a rollout stage. Permissions required: bb.taskRuns.create (or user with rollout policy role for the environment) |
+| BatchSkipTasks | [BatchSkipTasksRequest](#bytebase-v1-BatchSkipTasksRequest) | [BatchSkipTasksResponse](#bytebase-v1-BatchSkipTasksResponse) | Skips multiple tasks in a rollout stage. Permissions required: bb.taskRuns.create (or user with rollout policy role for the environment) |
+| BatchCancelTaskRuns | [BatchCancelTaskRunsRequest](#bytebase-v1-BatchCancelTaskRunsRequest) | [BatchCancelTaskRunsResponse](#bytebase-v1-BatchCancelTaskRunsResponse) | 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) |
+| PreviewTaskRunRollback | [PreviewTaskRunRollbackRequest](#bytebase-v1-PreviewTaskRunRollbackRequest) | [PreviewTaskRunRollbackResponse](#bytebase-v1-PreviewTaskRunRollbackResponse) | Generates rollback SQL for a completed task run. Permissions required: bb.taskRuns.list |
+
+
+
+<a name="v1_query_history_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/query_history_service.proto
-<a name="bytebase-v1-QueryRow"></a>
+<a name="bytebase-v1-GetQueryHistoryRequest"></a>
-### QueryRow
+### GetQueryHistoryRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| values | [RowValue](#bytebase-v1-RowValue) | repeated | Row values of the query result. |
+| name | [string](#string) | | The name of the query history to retrieve. Format: projects/{project}/queryHistories/{id} |
-<a name="bytebase-v1-RowValue"></a>
+<a name="bytebase-v1-ListQueryHistoriesRequest"></a>
-### RowValue
+### ListQueryHistoriesRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| null_value | [google.protobuf.NullValue](#google-protobuf-NullValue) | | |
-| bool_value | [bool](#bool) | | |
-| bytes_value | [bytes](#bytes) | | |
-| double_value | [double](#double) | | |
-| float_value | [float](#float) | | |
-| int32_value | [int32](#int32) | | |
-| int64_value | [int64](#int64) | | |
-| string_value | [string](#string) | | |
-| uint32_value | [uint32](#uint32) | | |
-| uint64_value | [uint64](#uint64) | | |
-| value_value | [google.protobuf.Value](#google-protobuf-Value) | | value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only. |
-| timestamp_value | [RowValue.Timestamp](#bytebase-v1-RowValue-Timestamp) | | 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. |
-| timestamp_tz_value | [RowValue.TimestampTZ](#bytebase-v1-RowValue-TimestampTZ) | | timestamp_tz_value is used for the timestamptz data type, which accurately represents the timestamp with location information. |
+| parent | [string](#string) | | The parent project whose query histories are listed. Format: projects/{project} Use &#34;projects/-&#34; to list query histories across all projects (https://google.aip.dev/159); this requires the bb.queryHistories.list permission on the workspace. |
+| page_size | [int32](#int32) | | 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. |
+| page_token | [string](#string) | | A page token, received from a previous `ListQueryHistories` call. Provide this to retrieve the subsequent page. |
+| filter | [string](#string) | | 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 &#34;users/{email}&#34; format, support &#34;==&#34; operator.
+For example: creator == &#34;users/{email}&#34; |
-<a name="bytebase-v1-RowValue-Timestamp"></a>
-### RowValue.Timestamp
+<a name="bytebase-v1-ListQueryHistoriesResponse"></a>
+
+### ListQueryHistoriesResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| google_timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| accuracy | [int32](#int32) | | The accuracy is the number of digits after the decimal point. |
+| query_histories | [QueryHistory](#bytebase-v1-QueryHistory) | repeated | The list of query histories. |
+| next_page_token | [string](#string) | | 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. |
-<a name="bytebase-v1-RowValue-TimestampTZ"></a>
+<a name="bytebase-v1-QueryHistory"></a>
-### RowValue.TimestampTZ
+### QueryHistory
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| google_timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| zone | [string](#string) | | Zone is the time zone abbreviations in timezone database such as &#34;PDT&#34;, &#34;PST&#34;. 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 | [int32](#int32) | | The offset is in seconds east of UTC |
-| accuracy | [int32](#int32) | | |
-
-
-
-
-
-
-
+| name | [string](#string) | | The name for the query history. Format: projects/{project}/queryHistories/{id} |
+| database | [string](#string) | | The database name to execute the query. Format: instances/{instance}/databases/{databaseName} or projects/{project}/instances/{instance}/databases/{databaseName} |
+| creator | [string](#string) | | |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| statement | [string](#string) | | |
+| error | [string](#string) | optional | |
+| duration | [google.protobuf.Duration](#google-protobuf-Duration) | | |
+| type | [QueryHistory.Type](#bytebase-v1-QueryHistory-Type) | | |
-<a name="bytebase-v1-Advice-Level"></a>
-### Advice.Level
-Level represents the severity level of the advice.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| ADVICE_LEVEL_UNSPECIFIED | 0 | Unspecified advice level. |
-| SUCCESS | 1 | Success status indicating the check passed without issues. |
-| WARNING | 2 | Warning status indicating potential issues that should be reviewed. |
-| ERROR | 3 | Error status indicating critical issues that must be addressed. |
-<a name="bytebase-v1-Advice-RuleType"></a>
+<a name="bytebase-v1-SearchQueryHistoriesRequest"></a>
-### Advice.RuleType
-RuleType indicates the source of the linting rule.
+### SearchQueryHistoriesRequest
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| RULE_TYPE_UNSPECIFIED | 0 | Unspecified rule type. |
-| PARSER_BASED | 1 | Parser-based rule enforced by the built-in SQL parser. These are non-configurable, mandatory checks for schema health. |
-| AI_POWERED | 2 | AI-powered rule defined by user in natural language. These are custom, flexible checks powered by AI models. |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| parent | [string](#string) | | The parent project to search query histories in. Format: projects/{project} The AIP-159 wildcard &#34;projects/-&#34; is not supported; use ListQueryHistories for cross-project reads. |
+| page_size | [int32](#int32) | | 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. |
+| page_token | [string](#string) | | A page token, received from a previous `ListQueryHistory` call. Provide this to retrieve the subsequent page. |
+| filter | [string](#string) | | 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
-<a name="bytebase-v1-QueryOption-MSSQLExplainFormat"></a>
+Supported filter: - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator. - database: the database full name in &#34;instances/{id}/databases/{name}&#34; or &#34;projects/{project}/instances/{id}/databases/{name}&#34; format, support &#34;==&#34; operator. - instance: the instance full name in &#34;instances/{id}&#34; or &#34;projects/{project}/instances/{id}&#34; format, support &#34;==&#34; operator. - type: the type, should be &#34;QUERY&#34; or &#34;EXPORT&#34;, support &#34;==&#34; operator. - statement: the SQL statement, support &#34;==&#34; and &#34;.contains()&#34; operators.
-### QueryOption.MSSQLExplainFormat
+For example: project == &#34;projects/{project}&#34; database == &#34;instances/{instance}/databases/{database}&#34; instance == &#34;instances/{instance}&#34; type == &#34;QUERY&#34; type == &#34;EXPORT&#34; statement == &#34;SELECT 1;&#34; statement.contains(&#34;select&#34;) type == &#34;QUERY&#34; &amp;&amp; statement.contains(&#34;select&#34;) |
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| MSSQL_EXPLAIN_FORMAT_UNSPECIFIED | 0 | defaults to SHOWPLAN_ALL |
-| MSSQL_EXPLAIN_FORMAT_ALL | 1 | SHOWPLAN_ALL |
-| MSSQL_EXPLAIN_FORMAT_XML | 2 | SHOWPLAN_XML |
-<a name="bytebase-v1-QueryOption-RedisRunCommandsOn"></a>
-### QueryOption.RedisRunCommandsOn
+<a name="bytebase-v1-SearchQueryHistoriesResponse"></a>
+### SearchQueryHistoriesResponse
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| REDIS_RUN_COMMANDS_ON_UNSPECIFIED | 0 | UNSPECIFIED defaults to SINGLE_NODE. |
-| SINGLE_NODE | 1 | Execute Redis commands on a single node in the cluster. |
-| ALL_NODES | 2 | Execute Redis commands on all nodes in the cluster for cluster-wide operations. |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| query_histories | [QueryHistory](#bytebase-v1-QueryHistory) | repeated | The list of history. |
+| next_page_token | [string](#string) | | 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. |
-<a name="bytebase-v1-QueryResult-CommandError-Type"></a>
-### QueryResult.CommandError.Type
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | |
-| DDL | 1 | |
-| DML | 2 | |
-| NON_READ_ONLY | 3 | |
+
-<a name="bytebase-v1-QueryResult-Message-Level"></a>
+<a name="bytebase-v1-QueryHistory-Type"></a>
-### QueryResult.Message.Level
+### QueryHistory.Type
| Name | Number | Description |
| ---- | ------ | ----------- |
-| LEVEL_UNSPECIFIED | 0 | Unspecified message level. |
-| INFO | 1 | Informational message. |
-| WARNING | 2 | Warning message indicating potential issues. |
-| DEBUG | 3 | Debug message for development and troubleshooting. |
-| LOG | 4 | General log message. |
-| NOTICE | 5 | Notice message for important information. |
-| EXCEPTION | 6 | Exception message indicating error conditions. |
+| TYPE_UNSPECIFIED | 0 | Unspecified query history type. |
+| QUERY | 1 | Query execution for data retrieval. |
+| EXPORT | 2 | Data export operation to file. |
@@ -3455,422 +3401,462 @@ RuleType indicates the source of the linting rule.
-<a name="bytebase-v1-SQLService"></a>
+<a name="bytebase-v1-QueryHistoryService"></a>
-### SQLService
-SQLService executes SQL queries and manages query operations.
+### QueryHistoryService
+QueryHistoryService manages query history records of SQL Editor queries and exports.
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
-| Query | [QueryRequest](#bytebase-v1-QueryRequest) | [QueryResponse](#bytebase-v1-QueryResponse) | Executes a read-only SQL query against a database. Permissions required: bb.databases.get |
-| AdminExecute | [AdminExecuteRequest](#bytebase-v1-AdminExecuteRequest) stream | [AdminExecuteResponse](#bytebase-v1-AdminExecuteResponse) stream | Executes SQL with admin privileges via streaming connection. Permissions required: bb.sql.admin |
-| SearchQueryHistories | [SearchQueryHistoriesRequest](#bytebase-v1-SearchQueryHistoriesRequest) | [SearchQueryHistoriesResponse](#bytebase-v1-SearchQueryHistoriesResponse) | 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&#39;s own query histories) |
-| ListQueryHistories | [ListQueryHistoriesRequest](#bytebase-v1-ListQueryHistoriesRequest) | [ListQueryHistoriesResponse](#bytebase-v1-ListQueryHistoriesResponse) | 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 |
-| GetQueryHistory | [GetQueryHistoryRequest](#bytebase-v1-GetQueryHistoryRequest) | [QueryHistory](#bytebase-v1-QueryHistory) | 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&#39;s own query history) |
-| Export | [ExportRequest](#bytebase-v1-ExportRequest) | [ExportResponse](#bytebase-v1-ExportResponse) | Exports query results to a file format. Permissions required: bb.databases.get |
+| SearchQueryHistories | [SearchQueryHistoriesRequest](#bytebase-v1-SearchQueryHistoriesRequest) | [SearchQueryHistoriesResponse](#bytebase-v1-SearchQueryHistoriesResponse) | SearchQueryHistories searches query histories for the caller. Permissions required: None (only returns caller&#39;s own query histories) |
+| ListQueryHistories | [ListQueryHistoriesRequest](#bytebase-v1-ListQueryHistoriesRequest) | [ListQueryHistoriesResponse](#bytebase-v1-ListQueryHistoriesResponse) | ListQueryHistories lists query histories of all users in a project. Results are ordered by create time descending (newest first). Permissions required: bb.queryHistories.list |
+| GetQueryHistory | [GetQueryHistoryRequest](#bytebase-v1-GetQueryHistoryRequest) | [QueryHistory](#bytebase-v1-QueryHistory) | GetQueryHistory gets a single query history for the caller. Permissions required: None (only returns the caller&#39;s own query history) |
-<a name="v1_plan_service-proto"></a>
+<a name="v1_sql_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
-## v1/plan_service.proto
+## v1/sql_service.proto
-<a name="bytebase-v1-CancelPlanCheckRunRequest"></a>
+<a name="bytebase-v1-AdminExecuteRequest"></a>
-### CancelPlanCheckRunRequest
+### AdminExecuteRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the plan check run to cancel. Format: projects/{project}/plans/{plan}/planCheckRun |
+| name | [string](#string) | | The name is the instance name to execute the query against. Format: instances/{instance}/databases/{databaseName} or projects/{project}/instances/{instance}/databases/{databaseName} |
+| statement | [string](#string) | | The SQL statement to execute. |
+| limit | [int32](#int32) | | The maximum number of rows to return. |
+| schema | [string](#string) | optional | The default schema to execute the statement. Equals to the current schema in Oracle and search path in Postgres. |
+| container | [string](#string) | optional | Container is the container name to execute the query against, used for CosmosDB only. |
-<a name="bytebase-v1-CancelPlanCheckRunResponse"></a>
+<a name="bytebase-v1-AdminExecuteResponse"></a>
-### CancelPlanCheckRunResponse
+### AdminExecuteResponse
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |
-<a name="bytebase-v1-CreatePlanRequest"></a>
-### CreatePlanRequest
+
+<a name="bytebase-v1-Advice"></a>
+
+### Advice
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent project where this plan will be created. Format: projects/{project} |
-| plan | [Plan](#bytebase-v1-Plan) | | The plan to create. |
+| status | [Advice.Level](#bytebase-v1-Advice-Level) | | The advice level. |
+| code | [int32](#int32) | | The advice code. |
+| title | [string](#string) | | The advice title. |
+| content | [string](#string) | | The advice content. |
+| start_position | [Position](#bytebase-v1-Position) | | The start_position is inclusive and the end_position is exclusive. TODO: use range instead |
+| end_position | [Position](#bytebase-v1-Position) | | |
+| rule_type | [Advice.RuleType](#bytebase-v1-Advice-RuleType) | | The type of linting rule that generated this advice. |
-<a name="bytebase-v1-GetPlanCheckRunRequest"></a>
+<a name="bytebase-v1-ExportRequest"></a>
-### GetPlanCheckRunRequest
+### ExportRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the plan check run to retrieve. Format: projects/{project}/plans/{plan}/planCheckRun |
+| name | [string](#string) | | The name is the resource name to execute the export against. Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} |
+| statement | [string](#string) | | The SQL statement to execute. |
+| limit | [int32](#int32) | | The maximum number of rows to return. |
+| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The export format. |
+| admin | [bool](#bool) | | The admin is used for workspace owner and DBA for exporting data from SQL Editor Admin mode. The exported data is not masked. |
+| password | [string](#string) | | The zip password provide by users. |
+| data_source_id | [string](#string) | | 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 | [string](#string) | optional | The default schema to search objects. Equals to the current schema in Oracle and search path in Postgres. |
+| container | [string](#string) | optional | Container is the container name to execute the query against, used for CosmosDB only. |
-<a name="bytebase-v1-GetPlanRequest"></a>
+<a name="bytebase-v1-ExportResponse"></a>
-### GetPlanRequest
+### ExportResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the plan to retrieve. Format: projects/{project}/plans/{plan} |
+| content | [bytes](#bytes) | | The export file content. |
+| applied_access_grant | [string](#string) | | 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. |
-<a name="bytebase-v1-ListPlansRequest"></a>
+<a name="bytebase-v1-MaskingReason"></a>
-### ListPlansRequest
+### MaskingReason
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent, which owns this collection of plans. Format: projects/{project} Use &#34;projects/-&#34; to list all plans from all projects. |
-| page_size | [int32](#int32) | | 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. |
-| page_token | [string](#string) | | 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 | [string](#string) | | 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 &#34;users/{email or id}&#34; format, support &#34;==&#34; operator. - create_time: the plan create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator. - has_rollout: whether the plan has rollout, support &#34;==&#34; operator, the value should be &#34;true&#34; or &#34;false&#34;. - title: the plan title, support &#34;==&#34; operator for exact match and &#34;.contains()&#34; operator for case-insensitive substring match. - spec_type: the plan spec config type, support &#34;==&#34; operator, the value should be &#34;create_database_config&#34; or &#34;change_database_config&#34;. - state: the plan state, support &#34;==&#34; operator, the value should be &#34;ACTIVE&#34; or &#34;DELETED&#34;.
-
-For example: creator == &#34;users/[email protected]&#34; &amp;&amp; create_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34; title == &#34;My Plan&#34; title.contains(&#34;database migration&#34;) spec_type == &#34;change_database_config&#34; state == &#34;ACTIVE&#34; |
+| semantic_type_id | [string](#string) | | The semantic type that triggered masking (e.g., &#34;SSN&#34;, &#34;email&#34;, &#34;phone&#34;). |
+| semantic_type_title | [string](#string) | | Human-readable semantic type title. |
+| masking_rule_id | [string](#string) | | The masking rule ID that matched (if applicable). |
+| algorithm | [string](#string) | | The masking algorithm used. |
+| context | [string](#string) | | Additional context (e.g., &#34;Matched global rule: PII Protection&#34;). |
+| classification_level | [int32](#int32) | | The classification level that triggered masking. |
+| semantic_type_icon | [string](#string) | | Icon associated with the semantic type (if any). |
-<a name="bytebase-v1-ListPlansResponse"></a>
+<a name="bytebase-v1-QueryOption"></a>
-### ListPlansResponse
+### QueryOption
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| plans | [Plan](#bytebase-v1-Plan) | repeated | The plans from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+| redis_run_commands_on | [QueryOption.RedisRunCommandsOn](#bytebase-v1-QueryOption-RedisRunCommandsOn) | | |
+| mssql_explain_format | [QueryOption.MSSQLExplainFormat](#bytebase-v1-QueryOption-MSSQLExplainFormat) | | |
-<a name="bytebase-v1-Plan"></a>
+<a name="bytebase-v1-QueryRequest"></a>
-### Plan
+### QueryRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the plan. `plan` is a system generated ID. Format: projects/{project}/plans/{plan} |
-| state | [State](#bytebase-v1-State) | | The state of the plan. |
-| issue | [string](#string) | | The issue associated with the plan. Can be empty. Format: projects/{project}/issues/{issue} |
-| title | [string](#string) | | The title of the plan. |
-| description | [string](#string) | | The description of the plan. |
-| specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | The deployment specs for the plan. |
-| creator | [string](#string) | | Format: users/[email protected] |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| plan_check_run_status_count | [Plan.PlanCheckRunStatusCountEntry](#bytebase-v1-Plan-PlanCheckRunStatusCountEntry) | repeated | The status count of the latest plan check runs. Keys are: - SUCCESS - WARNING - ERROR - RUNNING |
-| has_rollout | [bool](#bool) | | Whether the plan has started the rollout. |
-| approval_status | [ApprovalStatus](#bytebase-v1-ApprovalStatus) | | The approval status of the linked issue. Unspecified when no linked issue exists or the linked issue is a draft. |
-| rollout_stage_summaries | [Plan.RolloutStageSummary](#bytebase-v1-Plan-RolloutStageSummary) | repeated | Per-stage rollout status summary. Ordered by environment deployment order. Empty when no rollout exists. |
-| issue_status | [IssueStatus](#bytebase-v1-IssueStatus) | | The lifecycle status of the linked issue. Unspecified when no linked issue exists. |
-| last_plan_editor | [string](#string) | | 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. |
+| name | [string](#string) | | 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 | [string](#string) | | The SQL statement to execute. |
+| limit | [int32](#int32) | | The maximum number of rows to return. |
+| data_source_id | [string](#string) | | 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 | [bool](#bool) | | Explain the statement. |
+| schema | [string](#string) | optional | The default schema to search objects. Equals to the current schema in Oracle and search path in Postgres. |
+| query_option | [QueryOption](#bytebase-v1-QueryOption) | | |
+| container | [string](#string) | optional | Container is the container name to execute the query against, used for CosmosDB only. |
-<a name="bytebase-v1-Plan-ChangeDatabaseConfig"></a>
+<a name="bytebase-v1-QueryResponse"></a>
-### Plan.ChangeDatabaseConfig
+### QueryResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| targets | [string](#string) | repeated | The list of targets. Multi-database format: [instances/{instance-id}/databases/{database-name}]. Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. |
-| sheet | [string](#string) | | The resource name of the sheet. Format: projects/{project}/sheets/{sheet} |
-| release | [string](#string) | | The resource name of the release. Format: projects/{project}/releases/{release} |
-| enable_prior_backup | [bool](#bool) | | If set, a backup of the modified data will be created automatically before any changes are applied. |
+| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |
+| applied_access_grant | [string](#string) | | 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. |
-<a name="bytebase-v1-Plan-CreateDatabaseConfig"></a>
+<a name="bytebase-v1-QueryResult"></a>
-### Plan.CreateDatabaseConfig
+### QueryResult
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| target | [string](#string) | | The resource name of the instance on which the database is created. Format: instances/{instance} or projects/{project}/instances/{instance} |
-| database | [string](#string) | | The name of the database to create. |
-| table | [string](#string) | | 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. |
-| character_set | [string](#string) | | character_set is the character set of the database. |
-| collation | [string](#string) | | collation is the collation of the database. |
-| cluster | [string](#string) | | cluster is the cluster of the database. This is only applicable to ClickHouse for &#34;ON CLUSTER &lt;&lt;cluster&gt;&gt;&#34;. |
-| owner | [string](#string) | | owner is the owner of the database. This is only applicable to Postgres for &#34;WITH OWNER &lt;&lt;owner&gt;&gt;&#34;. |
-| environment | [string](#string) | | The environment resource. Format: environments/prod where prod is the environment resource ID. |
-
+| column_names | [string](#string) | repeated | Column names of the query result. |
+| column_type_names | [string](#string) | repeated | Column types of the query result. The types come from the Golang SQL driver. |
+| rows | [QueryRow](#bytebase-v1-QueryRow) | repeated | Rows of the query result. |
+| rows_count | [int64](#int64) | | |
+| error | [string](#string) | | The error message if the query failed. |
+| latency | [google.protobuf.Duration](#google-protobuf-Duration) | | The time it takes to execute the query. |
+| statement | [string](#string) | | The query statement for the result. |
+| postgres_error | [QueryResult.PostgresError](#bytebase-v1-QueryResult-PostgresError) | | |
+| syntax_error | [QueryResult.SyntaxError](#bytebase-v1-QueryResult-SyntaxError) | | |
+| permission_denied | [PermissionDeniedDetail](#bytebase-v1-PermissionDeniedDetail) | | |
+| command_error | [QueryResult.CommandError](#bytebase-v1-QueryResult-CommandError) | | |
+| messages | [QueryResult.Message](#bytebase-v1-QueryResult-Message) | repeated | Informational or debug messages returned by the database engine during query execution. Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39;s DBMS_OUTPUT.PUT_LINE. |
+| masked | [MaskingReason](#bytebase-v1-MaskingReason) | repeated | Masking reasons for each column (empty for non-masked columns). |
-<a name="bytebase-v1-Plan-PlanCheckRunStatusCountEntry"></a>
-### Plan.PlanCheckRunStatusCountEntry
+<a name="bytebase-v1-QueryResult-CommandError"></a>
+### QueryResult.CommandError
+Permission denied with resource information or disallowed command_type.
+Either resources or command_type is available.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [int32](#int32) | | |
+| command_type | [QueryResult.CommandError.Type](#bytebase-v1-QueryResult-CommandError-Type) | | Disallowed command_type. |
-<a name="bytebase-v1-Plan-RolloutStageSummary"></a>
+<a name="bytebase-v1-QueryResult-Message"></a>
-### Plan.RolloutStageSummary
+### QueryResult.Message
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| stage | [string](#string) | | The stage resource name. Format: projects/{project}/plans/{plan}/rollout/stages/{stage} |
-| task_status_counts | [Plan.TaskStatusCount](#bytebase-v1-Plan-TaskStatusCount) | repeated | Task status counts for this stage. |
-
+| level | [QueryResult.Message.Level](#bytebase-v1-QueryResult-Message-Level) | | |
+| content | [string](#string) | | |
-<a name="bytebase-v1-Plan-Spec"></a>
-### Plan.Spec
+<a name="bytebase-v1-QueryResult-PostgresError"></a>
+### QueryResult.PostgresError
+refer https://www.postgresql.org/docs/11/protocol-error-fields.html
+for field description.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| id | [string](#string) | | A UUID4 string that uniquely identifies the Spec. |
-| create_database_config | [Plan.CreateDatabaseConfig](#bytebase-v1-Plan-CreateDatabaseConfig) | | |
-| change_database_config | [Plan.ChangeDatabaseConfig](#bytebase-v1-Plan-ChangeDatabaseConfig) | | |
-
+| severity | [string](#string) | | |
+| code | [string](#string) | | |
+| message | [string](#string) | | |
+| detail | [string](#string) | | |
+| hint | [string](#string) | | |
+| position | [int32](#int32) | | |
+| internal_position | [int32](#int32) | | |
+| internal_query | [string](#string) | | |
+| where | [string](#string) | | |
+| schema_name | [string](#string) | | |
+| table_name | [string](#string) | | |
+| column_name | [string](#string) | | |
+| data_type_name | [string](#string) | | |
+| constraint_name | [string](#string) | | |
+| file | [string](#string) | | |
+| line | [int32](#int32) | | |
+| routine | [string](#string) | | |
-<a name="bytebase-v1-Plan-TaskStatusCount"></a>
-### Plan.TaskStatusCount
+<a name="bytebase-v1-QueryResult-SyntaxError"></a>
+### QueryResult.SyntaxError
+Syntax error with position information for editor highlighting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| status | [Task.Status](#bytebase-v1-Task-Status) | | The task status. |
-| count | [int32](#int32) | | The number of tasks in the status. |
+| start_position | [Position](#bytebase-v1-Position) | | Position information for highlighting in editor |
-<a name="bytebase-v1-PlanCheckRun"></a>
+<a name="bytebase-v1-QueryRow"></a>
-### PlanCheckRun
+### QueryRow
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/planCheckRun |
-| status | [PlanCheckRun.Status](#bytebase-v1-PlanCheckRun-Status) | | |
-| results | [PlanCheckRun.Result](#bytebase-v1-PlanCheckRun-Result) | repeated | |
-| error | [string](#string) | | error is set if the Status is FAILED. |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| values | [RowValue](#bytebase-v1-RowValue) | repeated | Row values of the query result. |
-<a name="bytebase-v1-PlanCheckRun-Result"></a>
+<a name="bytebase-v1-RowValue"></a>
-### PlanCheckRun.Result
+### RowValue
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| status | [Advice.Level](#bytebase-v1-Advice-Level) | | |
-| title | [string](#string) | | |
-| content | [string](#string) | | |
-| code | [int32](#int32) | | |
-| target | [string](#string) | | Target identification for consolidated results. Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} |
-| type | [PlanCheckRun.Result.Type](#bytebase-v1-PlanCheckRun-Result-Type) | | |
-| sql_summary_report | [PlanCheckRun.Result.SqlSummaryReport](#bytebase-v1-PlanCheckRun-Result-SqlSummaryReport) | | |
-| sql_review_report | [PlanCheckRun.Result.SqlReviewReport](#bytebase-v1-PlanCheckRun-Result-SqlReviewReport) | | |
+| null_value | [google.protobuf.NullValue](#google-protobuf-NullValue) | | |
+| bool_value | [bool](#bool) | | |
+| bytes_value | [bytes](#bytes) | | |
+| double_value | [double](#double) | | |
+| float_value | [float](#float) | | |
+| int32_value | [int32](#int32) | | |
+| int64_value | [int64](#int64) | | |
+| string_value | [string](#string) | | |
+| uint32_value | [uint32](#uint32) | | |
+| uint64_value | [uint64](#uint64) | | |
+| value_value | [google.protobuf.Value](#google-protobuf-Value) | | value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only. |
+| timestamp_value | [RowValue.Timestamp](#bytebase-v1-RowValue-Timestamp) | | 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. |
+| timestamp_tz_value | [RowValue.TimestampTZ](#bytebase-v1-RowValue-TimestampTZ) | | timestamp_tz_value is used for the timestamptz data type, which accurately represents the timestamp with location information. |
-<a name="bytebase-v1-PlanCheckRun-Result-SqlReviewReport"></a>
+<a name="bytebase-v1-RowValue-Timestamp"></a>
-### PlanCheckRun.Result.SqlReviewReport
+### RowValue.Timestamp
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| start_position | [Position](#bytebase-v1-Position) | | Position of the SQL statement. |
-| end_position | [Position](#bytebase-v1-Position) | | |
+| google_timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| accuracy | [int32](#int32) | | The accuracy is the number of digits after the decimal point. |
-<a name="bytebase-v1-PlanCheckRun-Result-SqlSummaryReport"></a>
+<a name="bytebase-v1-RowValue-TimestampTZ"></a>
-### PlanCheckRun.Result.SqlSummaryReport
+### RowValue.TimestampTZ
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| statement_types | [StatementType](#bytebase-v1-StatementType) | repeated | statement_types are the types of statements that are found in the sql. |
-| affected_rows | [int64](#int64) | | |
+| google_timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| zone | [string](#string) | | Zone is the time zone abbreviations in timezone database such as &#34;PDT&#34;, &#34;PST&#34;. 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 | [int32](#int32) | | The offset is in seconds east of UTC |
+| accuracy | [int32](#int32) | | |
+
-<a name="bytebase-v1-RunPlanChecksRequest"></a>
-### RunPlanChecksRequest
+<a name="bytebase-v1-Advice-Level"></a>
+### Advice.Level
+Level represents the severity level of the advice.
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| ADVICE_LEVEL_UNSPECIFIED | 0 | Unspecified advice level. |
+| SUCCESS | 1 | Success status indicating the check passed without issues. |
+| WARNING | 2 | Warning status indicating potential issues that should be reviewed. |
+| ERROR | 3 | Error status indicating critical issues that must be addressed. |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The plan to run plan checks. Format: projects/{project}/plans/{plan} |
-| spec_id | [string](#string) | optional | 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. |
-
-
-
-
-
-
-<a name="bytebase-v1-RunPlanChecksResponse"></a>
-
-### RunPlanChecksResponse
+<a name="bytebase-v1-Advice-RuleType"></a>
+### Advice.RuleType
+RuleType indicates the source of the linting rule.
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| RULE_TYPE_UNSPECIFIED | 0 | Unspecified rule type. |
+| PARSER_BASED | 1 | Parser-based rule enforced by the built-in SQL parser. These are non-configurable, mandatory checks for schema health. |
+| AI_POWERED | 2 | AI-powered rule defined by user in natural language. These are custom, flexible checks powered by AI models. |
-<a name="bytebase-v1-UpdatePlanRequest"></a>
+<a name="bytebase-v1-QueryOption-MSSQLExplainFormat"></a>
-### UpdatePlanRequest
+### QueryOption.MSSQLExplainFormat
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| MSSQL_EXPLAIN_FORMAT_UNSPECIFIED | 0 | defaults to SHOWPLAN_ALL |
+| MSSQL_EXPLAIN_FORMAT_ALL | 1 | SHOWPLAN_ALL |
+| MSSQL_EXPLAIN_FORMAT_XML | 2 | SHOWPLAN_XML |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| plan | [Plan](#bytebase-v1-Plan) | | The plan to update.
-The plan&#39;s `name` field is used to identify the plan to update. Format: projects/{project}/plans/{plan} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| allow_missing | [bool](#bool) | | If set to true, and the plan is not found, a new plan will be created. In this situation, `update_mask` is ignored. |
+<a name="bytebase-v1-QueryOption-RedisRunCommandsOn"></a>
+### QueryOption.RedisRunCommandsOn
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| REDIS_RUN_COMMANDS_ON_UNSPECIFIED | 0 | UNSPECIFIED defaults to SINGLE_NODE. |
+| SINGLE_NODE | 1 | Execute Redis commands on a single node in the cluster. |
+| ALL_NODES | 2 | Execute Redis commands on all nodes in the cluster for cluster-wide operations. |
-
-<a name="bytebase-v1-PlanCheckRun-Result-Type"></a>
+<a name="bytebase-v1-QueryResult-CommandError-Type"></a>
-### PlanCheckRun.Result.Type
+### QueryResult.CommandError.Type
| Name | Number | Description |
| ---- | ------ | ----------- |
| TYPE_UNSPECIFIED | 0 | |
-| STATEMENT_ADVISE | 1 | |
-| STATEMENT_SUMMARY_REPORT | 2 | |
-| GHOST_SYNC | 3 | |
+| DDL | 1 | |
+| DML | 2 | |
+| NON_READ_ONLY | 3 | |
-<a name="bytebase-v1-PlanCheckRun-Status"></a>
+<a name="bytebase-v1-QueryResult-Message-Level"></a>
-### PlanCheckRun.Status
+### QueryResult.Message.Level
| Name | Number | Description |
| ---- | ------ | ----------- |
-| STATUS_UNSPECIFIED | 0 | |
-| RUNNING | 1 | |
-| DONE | 2 | |
-| FAILED | 3 | |
-| CANCELED | 4 | |
+| LEVEL_UNSPECIFIED | 0 | Unspecified message level. |
+| INFO | 1 | Informational message. |
+| WARNING | 2 | Warning message indicating potential issues. |
+| DEBUG | 3 | Debug message for development and troubleshooting. |
+| LOG | 4 | General log message. |
+| NOTICE | 5 | Notice message for important information. |
+| EXCEPTION | 6 | Exception message indicating error conditions. |
@@ -3878,2389 +3864,2392 @@ The plan&#39;s `name` field is used to identify the plan to update. Format: proj
-<a name="bytebase-v1-PlanService"></a>
+<a name="bytebase-v1-SQLService"></a>
-### PlanService
-PlanService manages deployment plans for database changes.
+### SQLService
+SQLService executes SQL queries and manages query operations.
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
-| GetPlan | [GetPlanRequest](#bytebase-v1-GetPlanRequest) | [Plan](#bytebase-v1-Plan) | Retrieves a deployment plan by name. Permissions required: bb.plans.get |
-| ListPlans | [ListPlansRequest](#bytebase-v1-ListPlansRequest) | [ListPlansResponse](#bytebase-v1-ListPlansResponse) | Lists deployment plans in a project. Permissions required: bb.plans.list |
-| CreatePlan | [CreatePlanRequest](#bytebase-v1-CreatePlanRequest) | [Plan](#bytebase-v1-Plan) | Creates a new deployment plan. Permissions required: bb.plans.create |
-| UpdatePlan | [UpdatePlanRequest](#bytebase-v1-UpdatePlanRequest) | [Plan](#bytebase-v1-Plan) | 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) |
-| GetPlanCheckRun | [GetPlanCheckRunRequest](#bytebase-v1-GetPlanCheckRunRequest) | [PlanCheckRun](#bytebase-v1-PlanCheckRun) | Gets the plan check run for a deployment plan. Permissions required: bb.planCheckRuns.get |
-| RunPlanChecks | [RunPlanChecksRequest](#bytebase-v1-RunPlanChecksRequest) | [RunPlanChecksResponse](#bytebase-v1-RunPlanChecksResponse) | Executes validation checks on a deployment plan. Permissions required: bb.planCheckRuns.run |
-| CancelPlanCheckRun | [CancelPlanCheckRunRequest](#bytebase-v1-CancelPlanCheckRunRequest) | [CancelPlanCheckRunResponse](#bytebase-v1-CancelPlanCheckRunResponse) | Cancels the plan check run for a deployment plan. Permissions required: bb.planCheckRuns.run |
+| Query | [QueryRequest](#bytebase-v1-QueryRequest) | [QueryResponse](#bytebase-v1-QueryResponse) | Executes a read-only SQL query against a database. Permissions required: bb.databases.get |
+| AdminExecute | [AdminExecuteRequest](#bytebase-v1-AdminExecuteRequest) stream | [AdminExecuteResponse](#bytebase-v1-AdminExecuteResponse) stream | Executes SQL with admin privileges via streaming connection. Permissions required: bb.sql.admin |
+| SearchQueryHistories | [SearchQueryHistoriesRequest](#bytebase-v1-SearchQueryHistoriesRequest) | [SearchQueryHistoriesResponse](#bytebase-v1-SearchQueryHistoriesResponse) | 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&#39;s own query histories) |
+| ListQueryHistories | [ListQueryHistoriesRequest](#bytebase-v1-ListQueryHistoriesRequest) | [ListQueryHistoriesResponse](#bytebase-v1-ListQueryHistoriesResponse) | 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 |
+| GetQueryHistory | [GetQueryHistoryRequest](#bytebase-v1-GetQueryHistoryRequest) | [QueryHistory](#bytebase-v1-QueryHistory) | 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&#39;s own query history) |
+| Export | [ExportRequest](#bytebase-v1-ExportRequest) | [ExportResponse](#bytebase-v1-ExportResponse) | Exports query results to a file format. Permissions required: bb.databases.get |
-<a name="v1_issue_service-proto"></a>
+<a name="v1_plan_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
-## v1/issue_service.proto
+## v1/plan_service.proto
-<a name="bytebase-v1-ApprovalFlow"></a>
+<a name="bytebase-v1-CancelPlanCheckRunRequest"></a>
-### ApprovalFlow
+### CancelPlanCheckRunRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| roles | [string](#string) | repeated | The roles required for approval in order. |
-
-
+| name | [string](#string) | | The name of the plan check run to cancel. Format: projects/{project}/plans/{plan}/planCheckRun |
-<a name="bytebase-v1-ApprovalTemplate"></a>
-### ApprovalTemplate
+<a name="bytebase-v1-CancelPlanCheckRunResponse"></a>
+### CancelPlanCheckRunResponse
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| flow | [ApprovalFlow](#bytebase-v1-ApprovalFlow) | | The approval flow definition. |
-| title | [string](#string) | | The title of the approval template. |
-| description | [string](#string) | | The description of the approval template. |
-<a name="bytebase-v1-ApproveIssueRequest"></a>
+<a name="bytebase-v1-CreatePlanRequest"></a>
-### ApproveIssueRequest
+### CreatePlanRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the issue to add an approver. Format: projects/{project}/issues/{issue} |
-| comment | [string](#string) | | The comment explaining the approval decision. |
+| parent | [string](#string) | | The parent project where this plan will be created. Format: projects/{project} |
+| plan | [Plan](#bytebase-v1-Plan) | | The plan to create. |
-<a name="bytebase-v1-BatchUpdateIssuesStatusRequest"></a>
+<a name="bytebase-v1-GetPlanCheckRunRequest"></a>
-### BatchUpdateIssuesStatusRequest
+### GetPlanCheckRunRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | 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 | [string](#string) | repeated | The list of issues to update. Format: projects/{project}/issues/{issue} |
-| status | [IssueStatus](#bytebase-v1-IssueStatus) | | The new status. |
-| reason | [string](#string) | | The reason for the status change. |
-
-
-
-
-
-
-<a name="bytebase-v1-BatchUpdateIssuesStatusResponse"></a>
-
-### BatchUpdateIssuesStatusResponse
-
+| name | [string](#string) | | The name of the plan check run to retrieve. Format: projects/{project}/plans/{plan}/planCheckRun |
-<a name="bytebase-v1-CreateIssueCommentRequest"></a>
+<a name="bytebase-v1-GetPlanRequest"></a>
-### CreateIssueCommentRequest
+### GetPlanRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The issue name Format: projects/{project}/issues/{issue} |
-| issue_comment | [IssueComment](#bytebase-v1-IssueComment) | | The comment to create. |
+| name | [string](#string) | | The name of the plan to retrieve. Format: projects/{project}/plans/{plan} |
-<a name="bytebase-v1-CreateIssueRequest"></a>
+<a name="bytebase-v1-ListPlansRequest"></a>
-### CreateIssueRequest
+### ListPlansRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent, which owns this collection of issues. Format: projects/{project} |
-| issue | [Issue](#bytebase-v1-Issue) | | The issue to create. |
+| parent | [string](#string) | | The parent, which owns this collection of plans. Format: projects/{project} Use &#34;projects/-&#34; to list all plans from all projects. |
+| page_size | [int32](#int32) | | 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. |
+| page_token | [string](#string) | | 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 | [string](#string) | | 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 &#34;users/{email or id}&#34; format, support &#34;==&#34; operator. - create_time: the plan create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator. - has_rollout: whether the plan has rollout, support &#34;==&#34; operator, the value should be &#34;true&#34; or &#34;false&#34;. - title: the plan title, support &#34;==&#34; operator for exact match and &#34;.contains()&#34; operator for case-insensitive substring match. - spec_type: the plan spec config type, support &#34;==&#34; operator, the value should be &#34;create_database_config&#34; or &#34;change_database_config&#34;. - state: the plan state, support &#34;==&#34; operator, the value should be &#34;ACTIVE&#34; or &#34;DELETED&#34;.
+For example: creator == &#34;users/[email protected]&#34; &amp;&amp; create_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34; title == &#34;My Plan&#34; title.contains(&#34;database migration&#34;) spec_type == &#34;change_database_config&#34; state == &#34;ACTIVE&#34; |
-<a name="bytebase-v1-GetIssueRequest"></a>
-### GetIssueRequest
+
+
+<a name="bytebase-v1-ListPlansResponse"></a>
+
+### ListPlansResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the issue to retrieve. Format: projects/{project}/issues/{issue} |
-| force | [bool](#bool) | | If set to true, bypass cache and fetch the latest data. |
+| plans | [Plan](#bytebase-v1-Plan) | repeated | The plans from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-<a name="bytebase-v1-Issue"></a>
+<a name="bytebase-v1-Plan"></a>
-### Issue
+### Plan
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the issue. Format: projects/{project}/issues/{issue} |
-| title | [string](#string) | | The title of the issue. |
-| description | [string](#string) | | The description of the issue. |
-| type | [Issue.Type](#bytebase-v1-Issue-Type) | | |
-| status | [IssueStatus](#bytebase-v1-IssueStatus) | | The status of the issue. |
-| approvers | [Issue.Approver](#bytebase-v1-Issue-Approver) | repeated | |
-| approval_template | [ApprovalTemplate](#bytebase-v1-ApprovalTemplate) | | The approval template for the issue. |
+| name | [string](#string) | | The name of the plan. `plan` is a system generated ID. Format: projects/{project}/plans/{plan} |
+| state | [State](#bytebase-v1-State) | | The state of the plan. |
+| issue | [string](#string) | | The issue associated with the plan. Can be empty. Format: projects/{project}/issues/{issue} |
+| title | [string](#string) | | The title of the plan. |
+| description | [string](#string) | | The description of the plan. |
+| specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | The deployment specs for the plan. |
| creator | [string](#string) | | Format: users/[email protected] |
| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| plan | [string](#string) | | The plan associated with the issue. Can be empty. Format: projects/{project}/plans/{plan} |
-| role_grant | [RoleGrant](#bytebase-v1-RoleGrant) | | Used if the issue type is ROLE_GRANT. |
-| risk_level | [RiskLevel](#bytebase-v1-RiskLevel) | | The risk level of the issue. |
-| labels | [string](#string) | repeated | Labels attached to the issue for categorization and filtering. |
-| approval_status | [ApprovalStatus](#bytebase-v1-ApprovalStatus) | | The overall approval status for the issue. |
-| access_grant | [string](#string) | | The access grant associated with this issue. Format: projects/{project}/accessGrants/{access_grant} |
-| draft | [bool](#bool) | | Whether this issue is a Draft Review Issue. |
+| plan_check_run_status_count | [Plan.PlanCheckRunStatusCountEntry](#bytebase-v1-Plan-PlanCheckRunStatusCountEntry) | repeated | The status count of the latest plan check runs. Keys are: - SUCCESS - WARNING - ERROR - RUNNING |
+| has_rollout | [bool](#bool) | | Whether the plan has started the rollout. |
+| approval_status | [ApprovalStatus](#bytebase-v1-ApprovalStatus) | | The approval status of the linked issue. Unspecified when no linked issue exists or the linked issue is a draft. |
+| rollout_stage_summaries | [Plan.RolloutStageSummary](#bytebase-v1-Plan-RolloutStageSummary) | repeated | Per-stage rollout status summary. Ordered by environment deployment order. Empty when no rollout exists. |
+| issue_status | [IssueStatus](#bytebase-v1-IssueStatus) | | The lifecycle status of the linked issue. Unspecified when no linked issue exists. |
+| last_plan_editor | [string](#string) | | 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. |
-<a name="bytebase-v1-Issue-Approver"></a>
+<a name="bytebase-v1-Plan-ChangeDatabaseConfig"></a>
+
+### Plan.ChangeDatabaseConfig
-### Issue.Approver
-Approvers and their approval status for the issue.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| status | [Issue.Approver.Status](#bytebase-v1-Issue-Approver-Status) | | The new status. |
-| principal | [string](#string) | | Format: users/[email protected] |
+| targets | [string](#string) | repeated | The list of targets. Multi-database format: [instances/{instance-id}/databases/{database-name}]. Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. |
+| sheet | [string](#string) | | The resource name of the sheet. Format: projects/{project}/sheets/{sheet} |
+| release | [string](#string) | | The resource name of the release. Format: projects/{project}/releases/{release} |
+| enable_prior_backup | [bool](#bool) | | If set, a backup of the modified data will be created automatically before any changes are applied. |
-<a name="bytebase-v1-IssueComment"></a>
+<a name="bytebase-v1-Plan-CreateDatabaseConfig"></a>
+
+### Plan.CreateDatabaseConfig
-### IssueComment
-A comment on an issue.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: projects/{project}/issues/{issue}/issueComments/{issueComment-uid} |
-| comment | [string](#string) | | The text content of the comment. |
-| payload | [string](#string) | | TODO: use struct message instead. |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| creator | [string](#string) | | Format: users/{email} |
-| approval | [IssueComment.Approval](#bytebase-v1-IssueComment-Approval) | | Approval event. |
-| issue_update | [IssueComment.IssueUpdate](#bytebase-v1-IssueComment-IssueUpdate) | | Issue update event. |
-| plan_update | [IssueComment.PlanUpdate](#bytebase-v1-IssueComment-PlanUpdate) | | Plan update event. |
-| review_submission | [IssueComment.ReviewSubmission](#bytebase-v1-IssueComment-ReviewSubmission) | | Review submission event. |
+| target | [string](#string) | | The resource name of the instance on which the database is created. Format: instances/{instance} or projects/{project}/instances/{instance} |
+| database | [string](#string) | | The name of the database to create. |
+| table | [string](#string) | | 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. |
+| character_set | [string](#string) | | character_set is the character set of the database. |
+| collation | [string](#string) | | collation is the collation of the database. |
+| cluster | [string](#string) | | cluster is the cluster of the database. This is only applicable to ClickHouse for &#34;ON CLUSTER &lt;&lt;cluster&gt;&gt;&#34;. |
+| owner | [string](#string) | | owner is the owner of the database. This is only applicable to Postgres for &#34;WITH OWNER &lt;&lt;owner&gt;&gt;&#34;. |
+| environment | [string](#string) | | The environment resource. Format: environments/prod where prod is the environment resource ID. |
-<a name="bytebase-v1-IssueComment-Approval"></a>
+<a name="bytebase-v1-Plan-PlanCheckRunStatusCountEntry"></a>
+
+### Plan.PlanCheckRunStatusCountEntry
-### IssueComment.Approval
-Approval event information.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| status | [IssueComment.Approval.Status](#bytebase-v1-IssueComment-Approval-Status) | | The approval status. |
+| key | [string](#string) | | |
+| value | [int32](#int32) | | |
-<a name="bytebase-v1-IssueComment-IssueUpdate"></a>
+<a name="bytebase-v1-Plan-RolloutStageSummary"></a>
+
+### Plan.RolloutStageSummary
-### IssueComment.IssueUpdate
-Issue update event information.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| from_title | [string](#string) | optional | |
-| to_title | [string](#string) | optional | |
-| from_description | [string](#string) | optional | |
-| to_description | [string](#string) | optional | |
-| from_status | [IssueStatus](#bytebase-v1-IssueStatus) | optional | |
-| to_status | [IssueStatus](#bytebase-v1-IssueStatus) | optional | |
-| from_labels | [string](#string) | repeated | |
-| to_labels | [string](#string) | repeated | |
+| stage | [string](#string) | | The stage resource name. Format: projects/{project}/plans/{plan}/rollout/stages/{stage} |
+| task_status_counts | [Plan.TaskStatusCount](#bytebase-v1-Plan-TaskStatusCount) | repeated | Task status counts for this stage. |
-<a name="bytebase-v1-IssueComment-PlanUpdate"></a>
+<a name="bytebase-v1-Plan-Spec"></a>
+
+### Plan.Spec
-### IssueComment.PlanUpdate
-Plan update event information (snapshot of plan.config.specs before
-and after a PlanService.UpdatePlan call that mutated specs).
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| from_specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | |
-| to_specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | |
+| id | [string](#string) | | A UUID4 string that uniquely identifies the Spec. |
+| create_database_config | [Plan.CreateDatabaseConfig](#bytebase-v1-Plan-CreateDatabaseConfig) | | |
+| change_database_config | [Plan.ChangeDatabaseConfig](#bytebase-v1-Plan-ChangeDatabaseConfig) | | |
-<a name="bytebase-v1-IssueComment-ReviewSubmission"></a>
+<a name="bytebase-v1-Plan-TaskStatusCount"></a>
-### IssueComment.ReviewSubmission
-Review submission event information.
+### Plan.TaskStatusCount
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| status | [Task.Status](#bytebase-v1-Task-Status) | | The task status. |
+| count | [int32](#int32) | | The number of tasks in the status. |
-<a name="bytebase-v1-ListIssueCommentsRequest"></a>
+<a name="bytebase-v1-PlanCheckRun"></a>
-### ListIssueCommentsRequest
+### PlanCheckRun
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | Format: projects/{projects}/issues/{issue} |
-| page_size | [int32](#int32) | | 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. |
-| page_token | [string](#string) | | 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. |
+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/planCheckRun |
+| status | [PlanCheckRun.Status](#bytebase-v1-PlanCheckRun-Status) | | |
+| results | [PlanCheckRun.Result](#bytebase-v1-PlanCheckRun-Result) | repeated | |
+| error | [string](#string) | | error is set if the Status is FAILED. |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-<a name="bytebase-v1-ListIssueCommentsResponse"></a>
+<a name="bytebase-v1-PlanCheckRun-Result"></a>
-### ListIssueCommentsResponse
+### PlanCheckRun.Result
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| issue_comments | [IssueComment](#bytebase-v1-IssueComment) | repeated | The issue comments from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+| status | [Advice.Level](#bytebase-v1-Advice-Level) | | |
+| title | [string](#string) | | |
+| content | [string](#string) | | |
+| code | [int32](#int32) | | |
+| target | [string](#string) | | Target identification for consolidated results. Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} |
+| type | [PlanCheckRun.Result.Type](#bytebase-v1-PlanCheckRun-Result-Type) | | |
+| sql_summary_report | [PlanCheckRun.Result.SqlSummaryReport](#bytebase-v1-PlanCheckRun-Result-SqlSummaryReport) | | |
+| sql_review_report | [PlanCheckRun.Result.SqlReviewReport](#bytebase-v1-PlanCheckRun-Result-SqlReviewReport) | | |
-<a name="bytebase-v1-ListIssuesRequest"></a>
+<a name="bytebase-v1-PlanCheckRun-Result-SqlReviewReport"></a>
-### ListIssuesRequest
+### PlanCheckRun.Result.SqlReviewReport
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent, which owns this collection of issues. Format: projects/{project} |
-| page_size | [int32](#int32) | | 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. |
-| page_token | [string](#string) | | 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 | [string](#string) | | 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 &#34;users/{email or id}&#34; format, support &#34;==&#34; operator. - status: the issue status, support &#34;==&#34; and &#34;in&#34; operator, check the IssueStatus enum for the values. - create_time: issue create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator. - type: the issue type, support &#34;==&#34; and &#34;in&#34; operator, check the Type enum in the Issue message for the values. - labels: the issue labels, support &#34;==&#34; and &#34;in&#34; operator. - risk_level: the issue risk level, support &#34;in&#34; operator, check the RiskLevel enum for the values. - approval_status: issue approval status, support &#34;==&#34; operator. - current_approver: the issue approver, should in &#34;users/{email} format&#34;, support &#34;==&#34; operator.
-
-For example: creator == &#34;users/[email protected]&#34; &amp;&amp; status in [&#34;OPEN&#34;, &#34;DONE&#34;] status == &#34;CANCELED&#34; &amp;&amp; type == &#34;DATABASE_CHANGE&#34; labels in [&#34;label1&#34;, &#34;label2&#34;] risk_level in [&#34;HIGH&#34;, &#34;MODERATE&#34;] create_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34; |
-| query | [string](#string) | | Query is the query statement. |
-| order_by | [string](#string) | | The order by of issues. Support: - create_time - update_time The default sorting order is ascending. For example: - order_by = &#34;create_time desc&#34; - order_by = &#34;update_time asc&#34; |
+| start_position | [Position](#bytebase-v1-Position) | | Position of the SQL statement. |
+| end_position | [Position](#bytebase-v1-Position) | | |
-<a name="bytebase-v1-ListIssuesResponse"></a>
+<a name="bytebase-v1-PlanCheckRun-Result-SqlSummaryReport"></a>
-### ListIssuesResponse
+### PlanCheckRun.Result.SqlSummaryReport
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| issues | [Issue](#bytebase-v1-Issue) | repeated | The issues from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+| statement_types | [StatementType](#bytebase-v1-StatementType) | repeated | statement_types are the types of statements that are found in the sql. |
+| affected_rows | [int64](#int64) | | |
-<a name="bytebase-v1-RejectIssueRequest"></a>
+<a name="bytebase-v1-RunPlanChecksRequest"></a>
-### RejectIssueRequest
+### RunPlanChecksRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the issue to add a rejection. Format: projects/{project}/issues/{issue} |
-| comment | [string](#string) | | The comment explaining the rejection decision. |
+| name | [string](#string) | | The plan to run plan checks. Format: projects/{project}/plans/{plan} |
+| spec_id | [string](#string) | optional | 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. |
-<a name="bytebase-v1-RequestIssueRequest"></a>
+<a name="bytebase-v1-RunPlanChecksResponse"></a>
-### RequestIssueRequest
+### RunPlanChecksResponse
+
+
+
+
+
+
+
+<a name="bytebase-v1-UpdatePlanRequest"></a>
+
+### UpdatePlanRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the issue to request a issue. Format: projects/{project}/issues/{issue} |
-| comment | [string](#string) | | The comment explaining the request. |
+| plan | [Plan](#bytebase-v1-Plan) | | The plan to update.
+The plan&#39;s `name` field is used to identify the plan to update. Format: projects/{project}/plans/{plan} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| allow_missing | [bool](#bool) | | If set to true, and the plan is not found, a new plan will be created. In this situation, `update_mask` is ignored. |
-<a name="bytebase-v1-RetryIssueApprovalRequest"></a>
+
-### RetryIssueApprovalRequest
+<a name="bytebase-v1-PlanCheckRun-Result-Type"></a>
+### PlanCheckRun.Result.Type
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the issue whose approval-finding should be retried. Format: projects/{project}/issues/{issue} |
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | |
+| STATEMENT_ADVISE | 1 | |
+| STATEMENT_SUMMARY_REPORT | 2 | |
+| GHOST_SYNC | 3 | |
+<a name="bytebase-v1-PlanCheckRun-Status"></a>
+### PlanCheckRun.Status
-<a name="bytebase-v1-ReviewRun"></a>
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| STATUS_UNSPECIFIED | 0 | |
+| RUNNING | 1 | |
+| DONE | 2 | |
+| FAILED | 3 | |
+| CANCELED | 4 | |
-### ReviewRun
+
+
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun} The {reviewRun} id is the reviewer: &#34;rule&#34; or &#34;guideline&#34;. The name addresses a slot, not an execution. |
-| type | [ReviewRun.Type](#bytebase-v1-ReviewRun-Type) | | Derived from the name. |
-| status | [ReviewRun.Status](#bytebase-v1-ReviewRun-Status) | | |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the current run was triggered. Reset on every re-run. |
-| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the run reached a terminal status. Unset while AVAILABLE or RUNNING. |
-| error | [string](#string) | | 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). |
+
+<a name="bytebase-v1-PlanService"></a>
+
+### PlanService
+PlanService manages deployment plans for database changes.
+
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| GetPlan | [GetPlanRequest](#bytebase-v1-GetPlanRequest) | [Plan](#bytebase-v1-Plan) | Retrieves a deployment plan by name. Permissions required: bb.plans.get |
+| ListPlans | [ListPlansRequest](#bytebase-v1-ListPlansRequest) | [ListPlansResponse](#bytebase-v1-ListPlansResponse) | Lists deployment plans in a project. Permissions required: bb.plans.list |
+| CreatePlan | [CreatePlanRequest](#bytebase-v1-CreatePlanRequest) | [Plan](#bytebase-v1-Plan) | Creates a new deployment plan. Permissions required: bb.plans.create |
+| UpdatePlan | [UpdatePlanRequest](#bytebase-v1-UpdatePlanRequest) | [Plan](#bytebase-v1-Plan) | 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) |
+| GetPlanCheckRun | [GetPlanCheckRunRequest](#bytebase-v1-GetPlanCheckRunRequest) | [PlanCheckRun](#bytebase-v1-PlanCheckRun) | Gets the plan check run for a deployment plan. Permissions required: bb.planCheckRuns.get |
+| RunPlanChecks | [RunPlanChecksRequest](#bytebase-v1-RunPlanChecksRequest) | [RunPlanChecksResponse](#bytebase-v1-RunPlanChecksResponse) | Executes validation checks on a deployment plan. Permissions required: bb.planCheckRuns.run |
+| CancelPlanCheckRun | [CancelPlanCheckRunRequest](#bytebase-v1-CancelPlanCheckRunRequest) | [CancelPlanCheckRunResponse](#bytebase-v1-CancelPlanCheckRunResponse) | Cancels the plan check run for a deployment plan. Permissions required: bb.planCheckRuns.run |
+
+
+<a name="v1_issue_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/issue_service.proto
-<a name="bytebase-v1-RoleGrant"></a>
-### RoleGrant
+<a name="bytebase-v1-ApprovalFlow"></a>
+
+### ApprovalFlow
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| role | [string](#string) | | The requested role. Format: roles/EXPORTER. |
-| user | [string](#string) | | The user to be granted. Format: users/{email}. |
-| condition | [google.type.Expr](#google-type-Expr) | | The condition for the role. Same as the condition in IAM Binding message. |
-| expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for which the grant is valid. |
+| roles | [string](#string) | repeated | The roles required for approval in order. |
-<a name="bytebase-v1-RunReviewRequest"></a>
+<a name="bytebase-v1-ApprovalTemplate"></a>
-### RunReviewRequest
+### ApprovalTemplate
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun} |
+| flow | [ApprovalFlow](#bytebase-v1-ApprovalFlow) | | The approval flow definition. |
+| title | [string](#string) | | The title of the approval template. |
+| description | [string](#string) | | The description of the approval template. |
-<a name="bytebase-v1-SearchIssuesRequest"></a>
+<a name="bytebase-v1-ApproveIssueRequest"></a>
-### SearchIssuesRequest
+### ApproveIssueRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent, which owns this collection of issues. Format: projects/{project} Use the wildcard &#34;projects/-&#34; 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. |
-| page_size | [int32](#int32) | | 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. |
-| page_token | [string](#string) | | 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 | [string](#string) | | Filter is used to filter issues returned in the list. Check the filter field in the ListIssuesRequest message. |
-| query | [string](#string) | | Query is the query statement. |
-| order_by | [string](#string) | | The order by of issues. Support: - create_time - update_time The default sorting order is ascending. For example: - order_by = &#34;create_time desc&#34; - order_by = &#34;update_time asc&#34; |
+| name | [string](#string) | | The name of the issue to add an approver. Format: projects/{project}/issues/{issue} |
+| comment | [string](#string) | | The comment explaining the approval decision. |
-<a name="bytebase-v1-SearchIssuesResponse"></a>
+<a name="bytebase-v1-BatchUpdateIssuesStatusRequest"></a>
-### SearchIssuesResponse
+### BatchUpdateIssuesStatusRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| issues | [Issue](#bytebase-v1-Issue) | repeated | The issues from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+| parent | [string](#string) | | 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 | [string](#string) | repeated | The list of issues to update. Format: projects/{project}/issues/{issue} |
+| status | [IssueStatus](#bytebase-v1-IssueStatus) | | The new status. |
+| reason | [string](#string) | | The reason for the status change. |
-<a name="bytebase-v1-UpdateIssueCommentRequest"></a>
+<a name="bytebase-v1-BatchUpdateIssuesStatusResponse"></a>
+
+### BatchUpdateIssuesStatusResponse
+
+
+
-### UpdateIssueCommentRequest
+
+
+
+<a name="bytebase-v1-CreateIssueCommentRequest"></a>
+
+### CreateIssueCommentRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| parent | [string](#string) | | The issue name Format: projects/{project}/issues/{issue} |
-| issue_comment | [IssueComment](#bytebase-v1-IssueComment) | | The comment to update. |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| allow_missing | [bool](#bool) | | 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. |
+| issue_comment | [IssueComment](#bytebase-v1-IssueComment) | | The comment to create. |
-<a name="bytebase-v1-UpdateIssueRequest"></a>
+<a name="bytebase-v1-CreateIssueRequest"></a>
-### UpdateIssueRequest
+### CreateIssueRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| issue | [Issue](#bytebase-v1-Issue) | | The issue to update.
+| parent | [string](#string) | | The parent, which owns this collection of issues. Format: projects/{project} |
+| issue | [Issue](#bytebase-v1-Issue) | | The issue to create. |
-The issue&#39;s `name` field is used to identify the issue to update. Format: projects/{project}/issues/{issue} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| allow_missing | [bool](#bool) | | If set to true, and the issue is not found, a new issue will be created. In this situation, `update_mask` is ignored. |
-
+<a name="bytebase-v1-GetIssueRequest"></a>
+### GetIssueRequest
-<a name="bytebase-v1-Issue-Approver-Status"></a>
-### Issue.Approver.Status
-The approval status of an approver.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| STATUS_UNSPECIFIED | 0 | Unspecified status. |
-| PENDING | 1 | Awaiting approval. |
-| APPROVED | 2 | Approved. |
-| REJECTED | 3 | Rejected. |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the issue to retrieve. Format: projects/{project}/issues/{issue} |
+| force | [bool](#bool) | | If set to true, bypass cache and fetch the latest data. |
-<a name="bytebase-v1-Issue-Type"></a>
-### Issue.Type
-The type of issue.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | Unspecified issue type. |
-| DATABASE_CHANGE | 1 | Database schema or data change. |
-| ROLE_GRANT | 2 | Role grant request. |
-| ACCESS_GRANT | 4 | Temporary access grant request. |
+<a name="bytebase-v1-Issue"></a>
+### Issue
-<a name="bytebase-v1-IssueComment-Approval-Status"></a>
-
-### IssueComment.Approval.Status
-Approval status values.
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| STATUS_UNSPECIFIED | 0 | Unspecified status. |
-| PENDING | 1 | Approval pending. |
-| APPROVED | 2 | Approved. |
-| REJECTED | 3 | Rejected. |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the issue. Format: projects/{project}/issues/{issue} |
+| title | [string](#string) | | The title of the issue. |
+| description | [string](#string) | | The description of the issue. |
+| type | [Issue.Type](#bytebase-v1-Issue-Type) | | |
+| status | [IssueStatus](#bytebase-v1-IssueStatus) | | The status of the issue. |
+| approvers | [Issue.Approver](#bytebase-v1-Issue-Approver) | repeated | |
+| approval_template | [ApprovalTemplate](#bytebase-v1-ApprovalTemplate) | | The approval template for the issue. |
+| creator | [string](#string) | | Format: users/[email protected] |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| plan | [string](#string) | | The plan associated with the issue. Can be empty. Format: projects/{project}/plans/{plan} |
+| role_grant | [RoleGrant](#bytebase-v1-RoleGrant) | | Used if the issue type is ROLE_GRANT. |
+| risk_level | [RiskLevel](#bytebase-v1-RiskLevel) | | The risk level of the issue. |
+| labels | [string](#string) | repeated | Labels attached to the issue for categorization and filtering. |
+| approval_status | [ApprovalStatus](#bytebase-v1-ApprovalStatus) | | The overall approval status for the issue. |
+| access_grant | [string](#string) | | The access grant associated with this issue. Format: projects/{project}/accessGrants/{access_grant} |
+| draft | [bool](#bool) | | Whether this issue is a Draft Review Issue. |
-<a name="bytebase-v1-ReviewRun-Status"></a>
-
-### ReviewRun.Status
-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).
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| STATUS_UNSPECIFIED | 0 | |
-| AVAILABLE | 1 | Created and claimable by any replica. |
-| RUNNING | 2 | |
-| DONE | 3 | Every (spec, target) unit was evaluated. DONE does not mean the review passed: whether problems remain is judged from open comments. |
-| FAILED | 4 | At least one unit was not evaluated; the cause is in `error`. |
-<a name="bytebase-v1-ReviewRun-Type"></a>
-### ReviewRun.Type
+<a name="bytebase-v1-Issue-Approver"></a>
+### Issue.Approver
+Approvers and their approval status for the issue.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | |
-| RULE | 1 | Review against the standard rules. |
-| GUIDELINE | 2 | Review against natural-language guidelines, performed by AI. |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| status | [Issue.Approver.Status](#bytebase-v1-Issue-Approver-Status) | | The new status. |
+| principal | [string](#string) | | Format: users/[email protected] |
-
-
-<a name="bytebase-v1-IssueService"></a>
-### IssueService
-IssueService manages issues for tracking database changes and tasks.
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| GetIssue | [GetIssueRequest](#bytebase-v1-GetIssueRequest) | [Issue](#bytebase-v1-Issue) | Retrieves an issue by name. Permissions required: bb.issues.get |
-| CreateIssue | [CreateIssueRequest](#bytebase-v1-CreateIssueRequest) | [Issue](#bytebase-v1-Issue) | Creates a new issue for database changes or tasks. Permissions required: bb.issues.create |
-| ListIssues | [ListIssuesRequest](#bytebase-v1-ListIssuesRequest) | [ListIssuesResponse](#bytebase-v1-ListIssuesResponse) | Lists issues in a project. Permissions required: bb.issues.list |
-| SearchIssues | [SearchIssuesRequest](#bytebase-v1-SearchIssuesRequest) | [SearchIssuesResponse](#bytebase-v1-SearchIssuesResponse) | Search for issues that the caller has the bb.issues.get permission on and also satisfy the specified filter &amp; query. Permissions required: bb.issues.get |
-| UpdateIssue | [UpdateIssueRequest](#bytebase-v1-UpdateIssueRequest) | [Issue](#bytebase-v1-Issue) | Updates an issue&#39;s properties such as title, description, or labels. Permissions required: bb.issues.update |
-| ListIssueComments | [ListIssueCommentsRequest](#bytebase-v1-ListIssueCommentsRequest) | [ListIssueCommentsResponse](#bytebase-v1-ListIssueCommentsResponse) | Lists comments on an issue. Permissions required: bb.issueComments.list |
-| CreateIssueComment | [CreateIssueCommentRequest](#bytebase-v1-CreateIssueCommentRequest) | [IssueComment](#bytebase-v1-IssueComment) | Adds a comment to an issue. Permissions required: bb.issueComments.create |
-| UpdateIssueComment | [UpdateIssueCommentRequest](#bytebase-v1-UpdateIssueCommentRequest) | [IssueComment](#bytebase-v1-IssueComment) | Updates an existing issue comment. Permissions required: bb.issueComments.update |
-| BatchUpdateIssuesStatus | [BatchUpdateIssuesStatusRequest](#bytebase-v1-BatchUpdateIssuesStatusRequest) | [BatchUpdateIssuesStatusResponse](#bytebase-v1-BatchUpdateIssuesStatusResponse) | Updates the status of multiple issues in a single operation. Permissions required: bb.issues.update |
-| ApproveIssue | [ApproveIssueRequest](#bytebase-v1-ApproveIssueRequest) | [Issue](#bytebase-v1-Issue) | 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) |
-| RejectIssue | [RejectIssueRequest](#bytebase-v1-RejectIssueRequest) | [Issue](#bytebase-v1-Issue) | 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) |
-| RequestIssue | [RequestIssueRequest](#bytebase-v1-RequestIssueRequest) | [Issue](#bytebase-v1-Issue) | 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) |
-| RetryIssueApproval | [RetryIssueApprovalRequest](#bytebase-v1-RetryIssueApprovalRequest) | [Issue](#bytebase-v1-Issue) | 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&#39;s authorization model). |
-| RunReview | [RunReviewRequest](#bytebase-v1-RunReviewRequest) | [ReviewRun](#bytebase-v1-ReviewRun) | 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 and have no read RPC yet: findings will surface as issue comments once the review comment integration lands. The returned run carries execution status only. The audit log is the only record of who triggered a run. Permissions required: bb.reviewRuns.run |
+<a name="bytebase-v1-IssueComment"></a>
-
+### IssueComment
+A comment on an issue.
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | Format: projects/{project}/issues/{issue}/issueComments/{issueComment-uid} |
+| comment | [string](#string) | | The text content of the comment. |
+| payload | [string](#string) | | TODO: use struct message instead. |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| creator | [string](#string) | | Format: users/{email} |
+| approval | [IssueComment.Approval](#bytebase-v1-IssueComment-Approval) | | Approval event. |
+| issue_update | [IssueComment.IssueUpdate](#bytebase-v1-IssueComment-IssueUpdate) | | Issue update event. |
+| plan_update | [IssueComment.PlanUpdate](#bytebase-v1-IssueComment-PlanUpdate) | | Plan update event. |
+| review_submission | [IssueComment.ReviewSubmission](#bytebase-v1-IssueComment-ReviewSubmission) | | Review submission event. |
-<a name="v1_setting_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/setting_service.proto
-<a name="bytebase-v1-AISetting"></a>
-### AISetting
+<a name="bytebase-v1-IssueComment-Approval"></a>
+### IssueComment.Approval
+Approval event information.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| enabled | [bool](#bool) | | |
-| provider | [AISetting.Provider](#bytebase-v1-AISetting-Provider) | | |
-| endpoint | [string](#string) | | |
-| api_key | [string](#string) | | |
-| model | [string](#string) | | |
-| version | [string](#string) | | |
-
+| status | [IssueComment.Approval.Status](#bytebase-v1-IssueComment-Approval-Status) | | The approval status. |
-<a name="bytebase-v1-Algorithm"></a>
-### Algorithm
+<a name="bytebase-v1-IssueComment-IssueUpdate"></a>
+### IssueComment.IssueUpdate
+Issue update event information.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| full_mask | [Algorithm.FullMask](#bytebase-v1-Algorithm-FullMask) | | |
-| range_mask | [Algorithm.RangeMask](#bytebase-v1-Algorithm-RangeMask) | | |
-| md5_mask | [Algorithm.MD5Mask](#bytebase-v1-Algorithm-MD5Mask) | | |
-| inner_outer_mask | [Algorithm.InnerOuterMask](#bytebase-v1-Algorithm-InnerOuterMask) | | |
-
+| from_title | [string](#string) | optional | |
+| to_title | [string](#string) | optional | |
+| from_description | [string](#string) | optional | |
+| to_description | [string](#string) | optional | |
+| from_status | [IssueStatus](#bytebase-v1-IssueStatus) | optional | |
+| to_status | [IssueStatus](#bytebase-v1-IssueStatus) | optional | |
+| from_labels | [string](#string) | repeated | |
+| to_labels | [string](#string) | repeated | |
-<a name="bytebase-v1-Algorithm-FullMask"></a>
-### Algorithm.FullMask
+<a name="bytebase-v1-IssueComment-PlanUpdate"></a>
+### IssueComment.PlanUpdate
+Plan update event information (snapshot of plan.config.specs before
+and after a PlanService.UpdatePlan call that mutated specs).
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| substitution | [string](#string) | | substitution is the string used to replace the original value, the max length of the string is 16 bytes. |
-
-
-
+| from_specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | |
+| to_specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | |
-<a name="bytebase-v1-Algorithm-InnerOuterMask"></a>
-### Algorithm.InnerOuterMask
+<a name="bytebase-v1-IssueComment-ReviewSubmission"></a>
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| prefix_len | [int32](#int32) | | |
-| suffix_len | [int32](#int32) | | |
-| type | [Algorithm.InnerOuterMask.MaskType](#bytebase-v1-Algorithm-InnerOuterMask-MaskType) | | |
-| substitution | [string](#string) | | |
+### IssueComment.ReviewSubmission
+Review submission event information.
-<a name="bytebase-v1-Algorithm-MD5Mask"></a>
+<a name="bytebase-v1-ListIssueCommentsRequest"></a>
-### Algorithm.MD5Mask
+### ListIssueCommentsRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| salt | [string](#string) | | salt is the salt value to generate a different hash that with the word alone. |
+| parent | [string](#string) | | Format: projects/{projects}/issues/{issue} |
+| page_size | [int32](#int32) | | 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. |
+| page_token | [string](#string) | | 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. |
-<a name="bytebase-v1-Algorithm-RangeMask"></a>
-### Algorithm.RangeMask
+<a name="bytebase-v1-ListIssueCommentsResponse"></a>
+
+### ListIssueCommentsResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| slices | [Algorithm.RangeMask.Slice](#bytebase-v1-Algorithm-RangeMask-Slice) | repeated | 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. |
+| issue_comments | [IssueComment](#bytebase-v1-IssueComment) | repeated | The issue comments from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-<a name="bytebase-v1-Algorithm-RangeMask-Slice"></a>
+<a name="bytebase-v1-ListIssuesRequest"></a>
-### Algorithm.RangeMask.Slice
+### ListIssuesRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| start | [int32](#int32) | | 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 &#34;你好world&#34;, character index 2 refers to &#39;w&#39; (the 3rd character). |
-| end | [int32](#int32) | | end is the end character index (exclusive) of the original value. Uses character indices (not byte offsets) for display-oriented masking. |
-| substitution | [string](#string) | | substitution is the string used to replace the OriginalValue[start:end). |
+| parent | [string](#string) | | The parent, which owns this collection of issues. Format: projects/{project} |
+| page_size | [int32](#int32) | | 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. |
+| page_token | [string](#string) | | 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 | [string](#string) | | 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 &#34;users/{email or id}&#34; format, support &#34;==&#34; operator. - status: the issue status, support &#34;==&#34; and &#34;in&#34; operator, check the IssueStatus enum for the values. - create_time: issue create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator. - type: the issue type, support &#34;==&#34; and &#34;in&#34; operator, check the Type enum in the Issue message for the values. - labels: the issue labels, support &#34;==&#34; and &#34;in&#34; operator. - risk_level: the issue risk level, support &#34;in&#34; operator, check the RiskLevel enum for the values. - approval_status: issue approval status, support &#34;==&#34; operator. - current_approver: the issue approver, should in &#34;users/{email} format&#34;, support &#34;==&#34; operator.
+For example: creator == &#34;users/[email protected]&#34; &amp;&amp; status in [&#34;OPEN&#34;, &#34;DONE&#34;] status == &#34;CANCELED&#34; &amp;&amp; type == &#34;DATABASE_CHANGE&#34; labels in [&#34;label1&#34;, &#34;label2&#34;] risk_level in [&#34;HIGH&#34;, &#34;MODERATE&#34;] create_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34; |
+| query | [string](#string) | | Query is the query statement. |
+| order_by | [string](#string) | | The order by of issues. Support: - create_time - update_time The default sorting order is ascending. For example: - order_by = &#34;create_time desc&#34; - order_by = &#34;update_time asc&#34; |
-<a name="bytebase-v1-Announcement"></a>
-### Announcement
+
+
+<a name="bytebase-v1-ListIssuesResponse"></a>
+
+### ListIssuesResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| text | [string](#string) | | The text of announcement |
-| link | [string](#string) | | The optional link, user can follow the link to check extra details |
-| theme | [Announcement.AnnouncementTheme](#bytebase-v1-Announcement-AnnouncementTheme) | | Banner colors. Built-in presets (info/warning/critical) are a frontend-only concept that seeds these colors; the store only holds them. |
+| issues | [Issue](#bytebase-v1-Issue) | repeated | The issues from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-<a name="bytebase-v1-Announcement-AnnouncementTheme"></a>
+<a name="bytebase-v1-RejectIssueRequest"></a>
-### Announcement.AnnouncementTheme
+### RejectIssueRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| background | [google.type.Color](#google-type-Color) | | |
-| text | [google.type.Color](#google-type-Color) | | |
+| name | [string](#string) | | The name of the issue to add a rejection. Format: projects/{project}/issues/{issue} |
+| comment | [string](#string) | | The comment explaining the rejection decision. |
-<a name="bytebase-v1-AppIMSetting"></a>
+<a name="bytebase-v1-RequestIssueRequest"></a>
-### AppIMSetting
+### RequestIssueRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| settings | [AppIMSetting.IMSetting](#bytebase-v1-AppIMSetting-IMSetting) | repeated | |
+| name | [string](#string) | | The name of the issue to request a issue. Format: projects/{project}/issues/{issue} |
+| comment | [string](#string) | | The comment explaining the request. |
-<a name="bytebase-v1-AppIMSetting-DingTalk"></a>
+<a name="bytebase-v1-RetryIssueApprovalRequest"></a>
-### AppIMSetting.DingTalk
+### RetryIssueApprovalRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| client_id | [string](#string) | | |
-| client_secret | [string](#string) | | |
-| robot_code | [string](#string) | | |
+| name | [string](#string) | | The name of the issue whose approval-finding should be retried. Format: projects/{project}/issues/{issue} |
-<a name="bytebase-v1-AppIMSetting-Feishu"></a>
+<a name="bytebase-v1-ReviewRun"></a>
-### AppIMSetting.Feishu
+### ReviewRun
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| app_id | [string](#string) | | |
-| app_secret | [string](#string) | | |
+| name | [string](#string) | | Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun} The {reviewRun} id is the reviewer: &#34;rule&#34; or &#34;guideline&#34;. The name addresses a slot, not an execution. |
+| type | [ReviewRun.Type](#bytebase-v1-ReviewRun-Type) | | Derived from the name. |
+| status | [ReviewRun.Status](#bytebase-v1-ReviewRun-Status) | | |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the current run was triggered. Reset on every re-run. |
+| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the run reached a terminal status. Unset while AVAILABLE or RUNNING. |
+| error | [string](#string) | | 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). |
-<a name="bytebase-v1-AppIMSetting-IMSetting"></a>
+<a name="bytebase-v1-RoleGrant"></a>
-### AppIMSetting.IMSetting
+### RoleGrant
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| type | [WebhookType](#bytebase-v1-WebhookType) | | |
-| slack | [AppIMSetting.Slack](#bytebase-v1-AppIMSetting-Slack) | | |
-| feishu | [AppIMSetting.Feishu](#bytebase-v1-AppIMSetting-Feishu) | | |
-| wecom | [AppIMSetting.Wecom](#bytebase-v1-AppIMSetting-Wecom) | | |
-| lark | [AppIMSetting.Lark](#bytebase-v1-AppIMSetting-Lark) | | |
-| dingtalk | [AppIMSetting.DingTalk](#bytebase-v1-AppIMSetting-DingTalk) | | |
-| teams | [AppIMSetting.Teams](#bytebase-v1-AppIMSetting-Teams) | | |
+| role | [string](#string) | | The requested role. Format: roles/EXPORTER. |
+| user | [string](#string) | | The user to be granted. Format: users/{email}. |
+| condition | [google.type.Expr](#google-type-Expr) | | The condition for the role. Same as the condition in IAM Binding message. |
+| expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for which the grant is valid. |
-<a name="bytebase-v1-AppIMSetting-Lark"></a>
+<a name="bytebase-v1-RunReviewRequest"></a>
-### AppIMSetting.Lark
+### RunReviewRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| app_id | [string](#string) | | |
-| app_secret | [string](#string) | | |
+| name | [string](#string) | | Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun} |
-<a name="bytebase-v1-AppIMSetting-Slack"></a>
+<a name="bytebase-v1-SearchIssuesRequest"></a>
-### AppIMSetting.Slack
+### SearchIssuesRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| token | [string](#string) | | |
+| parent | [string](#string) | | The parent, which owns this collection of issues. Format: projects/{project} Use the wildcard &#34;projects/-&#34; 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. |
+| page_size | [int32](#int32) | | 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. |
+| page_token | [string](#string) | | 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 | [string](#string) | | Filter is used to filter issues returned in the list. Check the filter field in the ListIssuesRequest message. |
+| query | [string](#string) | | Query is the query statement. |
+| order_by | [string](#string) | | The order by of issues. Support: - create_time - update_time The default sorting order is ascending. For example: - order_by = &#34;create_time desc&#34; - order_by = &#34;update_time asc&#34; |
-<a name="bytebase-v1-AppIMSetting-Teams"></a>
+<a name="bytebase-v1-SearchIssuesResponse"></a>
-### AppIMSetting.Teams
+### SearchIssuesResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| tenant_id | [string](#string) | | Azure AD tenant ID (Directory ID). |
-| client_id | [string](#string) | | Azure AD application (client) ID. |
-| client_secret | [string](#string) | | Azure AD client secret. |
+| issues | [Issue](#bytebase-v1-Issue) | repeated | The issues from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-<a name="bytebase-v1-AppIMSetting-Wecom"></a>
+<a name="bytebase-v1-UpdateIssueCommentRequest"></a>
-### AppIMSetting.Wecom
+### UpdateIssueCommentRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| corp_id | [string](#string) | | |
-| agent_id | [string](#string) | | |
-| secret | [string](#string) | | |
+| parent | [string](#string) | | The issue name Format: projects/{project}/issues/{issue} |
+| issue_comment | [IssueComment](#bytebase-v1-IssueComment) | | The comment to update. |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| allow_missing | [bool](#bool) | | 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. |
-<a name="bytebase-v1-DataClassificationSetting"></a>
+<a name="bytebase-v1-UpdateIssueRequest"></a>
-### DataClassificationSetting
+### UpdateIssueRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| configs | [DataClassificationSetting.DataClassificationConfig](#bytebase-v1-DataClassificationSetting-DataClassificationConfig) | repeated | |
+| issue | [Issue](#bytebase-v1-Issue) | | The issue to update.
+The issue&#39;s `name` field is used to identify the issue to update. Format: projects/{project}/issues/{issue} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| allow_missing | [bool](#bool) | | If set to true, and the issue is not found, a new issue will be created. In this situation, `update_mask` is ignored. |
-<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig"></a>
+
-### DataClassificationSetting.DataClassificationConfig
+<a name="bytebase-v1-Issue-Approver-Status"></a>
+### Issue.Approver.Status
+The approval status of an approver.
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| id | [string](#string) | | id is the uuid for classification. Each project can chose one classification config. |
-| title | [string](#string) | | |
-| levels | [DataClassificationSetting.DataClassificationConfig.Level](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-Level) | repeated | levels is user defined level list for classification. |
-| classification | [DataClassificationSetting.DataClassificationConfig.ClassificationEntry](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-ClassificationEntry) | repeated | classification is the id - DataClassification map. The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. |
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| STATUS_UNSPECIFIED | 0 | Unspecified status. |
+| PENDING | 1 | Awaiting approval. |
+| APPROVED | 2 | Approved. |
+| REJECTED | 3 | Rejected. |
+<a name="bytebase-v1-Issue-Type"></a>
+### Issue.Type
+The type of issue.
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | Unspecified issue type. |
+| DATABASE_CHANGE | 1 | Database schema or data change. |
+| ROLE_GRANT | 2 | Role grant request. |
+| ACCESS_GRANT | 4 | Temporary access grant request. |
-<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-ClassificationEntry"></a>
-### DataClassificationSetting.DataClassificationConfig.ClassificationEntry
+<a name="bytebase-v1-IssueComment-Approval-Status"></a>
+### IssueComment.Approval.Status
+Approval status values.
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [DataClassificationSetting.DataClassificationConfig.DataClassification](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-DataClassification) | | |
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| STATUS_UNSPECIFIED | 0 | Unspecified status. |
+| PENDING | 1 | Approval pending. |
+| APPROVED | 2 | Approved. |
+| REJECTED | 3 | Rejected. |
+<a name="bytebase-v1-ReviewRun-Status"></a>
+### ReviewRun.Status
+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).
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| STATUS_UNSPECIFIED | 0 | |
+| AVAILABLE | 1 | Created and claimable by any replica. |
+| RUNNING | 2 | |
+| DONE | 3 | Every (spec, target) unit was evaluated. DONE does not mean the review passed: whether problems remain is judged from open comments. |
+| FAILED | 4 | At least one unit was not evaluated; the cause is in `error`. |
-<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-DataClassification"></a>
-### DataClassificationSetting.DataClassificationConfig.DataClassification
+<a name="bytebase-v1-ReviewRun-Type"></a>
+### ReviewRun.Type
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| id | [string](#string) | | id is the classification id in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. |
-| title | [string](#string) | | |
-| level | [int32](#int32) | optional | The sensitivity level. Maps to Level.level. |
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | |
+| RULE | 1 | Review against the standard rules. |
+| GUIDELINE | 2 | Review against natural-language guidelines, performed by AI. |
+
+
-<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-Level"></a>
+<a name="bytebase-v1-IssueService"></a>
-### DataClassificationSetting.DataClassificationConfig.Level
+### IssueService
+IssueService manages issues for tracking database changes and tasks.
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| GetIssue | [GetIssueRequest](#bytebase-v1-GetIssueRequest) | [Issue](#bytebase-v1-Issue) | Retrieves an issue by name. Permissions required: bb.issues.get |
+| CreateIssue | [CreateIssueRequest](#bytebase-v1-CreateIssueRequest) | [Issue](#bytebase-v1-Issue) | Creates a new issue for database changes or tasks. Permissions required: bb.issues.create |
+| ListIssues | [ListIssuesRequest](#bytebase-v1-ListIssuesRequest) | [ListIssuesResponse](#bytebase-v1-ListIssuesResponse) | Lists issues in a project. Permissions required: bb.issues.list |
+| SearchIssues | [SearchIssuesRequest](#bytebase-v1-SearchIssuesRequest) | [SearchIssuesResponse](#bytebase-v1-SearchIssuesResponse) | Search for issues that the caller has the bb.issues.get permission on and also satisfy the specified filter &amp; query. Permissions required: bb.issues.get |
+| UpdateIssue | [UpdateIssueRequest](#bytebase-v1-UpdateIssueRequest) | [Issue](#bytebase-v1-Issue) | Updates an issue&#39;s properties such as title, description, or labels. Permissions required: bb.issues.update |
+| ListIssueComments | [ListIssueCommentsRequest](#bytebase-v1-ListIssueCommentsRequest) | [ListIssueCommentsResponse](#bytebase-v1-ListIssueCommentsResponse) | Lists comments on an issue. Permissions required: bb.issueComments.list |
+| CreateIssueComment | [CreateIssueCommentRequest](#bytebase-v1-CreateIssueCommentRequest) | [IssueComment](#bytebase-v1-IssueComment) | Adds a comment to an issue. Permissions required: bb.issueComments.create |
+| UpdateIssueComment | [UpdateIssueCommentRequest](#bytebase-v1-UpdateIssueCommentRequest) | [IssueComment](#bytebase-v1-IssueComment) | Updates an existing issue comment. Permissions required: bb.issueComments.update |
+| BatchUpdateIssuesStatus | [BatchUpdateIssuesStatusRequest](#bytebase-v1-BatchUpdateIssuesStatusRequest) | [BatchUpdateIssuesStatusResponse](#bytebase-v1-BatchUpdateIssuesStatusResponse) | Updates the status of multiple issues in a single operation. Permissions required: bb.issues.update |
+| ApproveIssue | [ApproveIssueRequest](#bytebase-v1-ApproveIssueRequest) | [Issue](#bytebase-v1-Issue) | 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) |
+| RejectIssue | [RejectIssueRequest](#bytebase-v1-RejectIssueRequest) | [Issue](#bytebase-v1-Issue) | 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) |
+| RequestIssue | [RequestIssueRequest](#bytebase-v1-RequestIssueRequest) | [Issue](#bytebase-v1-Issue) | 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) |
+| RetryIssueApproval | [RetryIssueApprovalRequest](#bytebase-v1-RetryIssueApprovalRequest) | [Issue](#bytebase-v1-Issue) | 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&#39;s authorization model). |
+| RunReview | [RunReviewRequest](#bytebase-v1-RunReviewRequest) | [ReviewRun](#bytebase-v1-ReviewRun) | 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 and have no read RPC yet: findings will surface as issue comments once the review comment integration lands. The returned run carries execution status only. The audit log is the only record of who triggered a run. Permissions required: bb.reviewRuns.run |
+
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| title | [string](#string) | | |
-| level | [int32](#int32) | | The numeric level for ordering. Higher = more sensitive. |
+<a name="v1_setting_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/setting_service.proto
-<a name="bytebase-v1-EmailSetting"></a>
+<a name="bytebase-v1-AISetting"></a>
-### EmailSetting
+### AISetting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| from | [string](#string) | | |
-| from_name | [string](#string) | | |
-| type | [EmailSetting.Type](#bytebase-v1-EmailSetting-Type) | | |
-| smtp | [EmailSetting.SMTPConfig](#bytebase-v1-EmailSetting-SMTPConfig) | | |
+| enabled | [bool](#bool) | | |
+| provider | [AISetting.Provider](#bytebase-v1-AISetting-Provider) | | |
+| endpoint | [string](#string) | | |
+| api_key | [string](#string) | | |
+| model | [string](#string) | | |
+| version | [string](#string) | | |
-<a name="bytebase-v1-EmailSetting-SMTPConfig"></a>
+<a name="bytebase-v1-Algorithm"></a>
-### EmailSetting.SMTPConfig
+### Algorithm
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| host | [string](#string) | | |
-| port | [int32](#int32) | | |
-| username | [string](#string) | | |
-| password | [string](#string) | | |
-| encryption | [EmailSetting.SMTPConfig.Encryption](#bytebase-v1-EmailSetting-SMTPConfig-Encryption) | | |
-| authentication | [EmailSetting.SMTPConfig.Authentication](#bytebase-v1-EmailSetting-SMTPConfig-Authentication) | | |
+| full_mask | [Algorithm.FullMask](#bytebase-v1-Algorithm-FullMask) | | |
+| range_mask | [Algorithm.RangeMask](#bytebase-v1-Algorithm-RangeMask) | | |
+| md5_mask | [Algorithm.MD5Mask](#bytebase-v1-Algorithm-MD5Mask) | | |
+| inner_outer_mask | [Algorithm.InnerOuterMask](#bytebase-v1-Algorithm-InnerOuterMask) | | |
-<a name="bytebase-v1-EnvironmentSetting"></a>
+<a name="bytebase-v1-Algorithm-FullMask"></a>
-### EnvironmentSetting
+### Algorithm.FullMask
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| environments | [EnvironmentSetting.Environment](#bytebase-v1-EnvironmentSetting-Environment) | repeated | |
+| substitution | [string](#string) | | substitution is the string used to replace the original value, the max length of the string is 16 bytes. |
-<a name="bytebase-v1-EnvironmentSetting-Environment"></a>
+<a name="bytebase-v1-Algorithm-InnerOuterMask"></a>
-### EnvironmentSetting.Environment
+### Algorithm.InnerOuterMask
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The resource name of the environment. Format: environments/{environment}. Output only. |
-| id | [string](#string) | | The resource id of the environment. This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
-| title | [string](#string) | | The display name of the environment. |
-| tags | [EnvironmentSetting.Environment.TagsEntry](#bytebase-v1-EnvironmentSetting-Environment-TagsEntry) | repeated | |
-| color | [google.type.Color](#google-type-Color) | | |
+| prefix_len | [int32](#int32) | | |
+| suffix_len | [int32](#int32) | | |
+| type | [Algorithm.InnerOuterMask.MaskType](#bytebase-v1-Algorithm-InnerOuterMask-MaskType) | | |
+| substitution | [string](#string) | | |
-<a name="bytebase-v1-EnvironmentSetting-Environment-TagsEntry"></a>
+<a name="bytebase-v1-Algorithm-MD5Mask"></a>
-### EnvironmentSetting.Environment.TagsEntry
+### Algorithm.MD5Mask
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [string](#string) | | |
+| salt | [string](#string) | | salt is the salt value to generate a different hash that with the word alone. |
-<a name="bytebase-v1-GetSettingRequest"></a>
+<a name="bytebase-v1-Algorithm-RangeMask"></a>
+
+### Algorithm.RangeMask
-### GetSettingRequest
-The request message for getting a setting.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The resource name of the setting. |
+| slices | [Algorithm.RangeMask.Slice](#bytebase-v1-Algorithm-RangeMask-Slice) | repeated | 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. |
-<a name="bytebase-v1-GetSettingResponse"></a>
+<a name="bytebase-v1-Algorithm-RangeMask-Slice"></a>
+
+### Algorithm.RangeMask.Slice
-### GetSettingResponse
-The response message for getting a setting.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| setting | [Setting](#bytebase-v1-Setting) | | |
+| start | [int32](#int32) | | 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 &#34;你好world&#34;, character index 2 refers to &#39;w&#39; (the 3rd character). |
+| end | [int32](#int32) | | end is the end character index (exclusive) of the original value. Uses character indices (not byte offsets) for display-oriented masking. |
+| substitution | [string](#string) | | substitution is the string used to replace the OriginalValue[start:end). |
-<a name="bytebase-v1-ListSettingsRequest"></a>
+<a name="bytebase-v1-Announcement"></a>
+
+### Announcement
-### ListSettingsRequest
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| text | [string](#string) | | The text of announcement |
+| link | [string](#string) | | The optional link, user can follow the link to check extra details |
+| theme | [Announcement.AnnouncementTheme](#bytebase-v1-Announcement-AnnouncementTheme) | | Banner colors. Built-in presets (info/warning/critical) are a frontend-only concept that seeds these colors; the store only holds them. |
+
-<a name="bytebase-v1-ListSettingsResponse"></a>
+<a name="bytebase-v1-Announcement-AnnouncementTheme"></a>
-### ListSettingsResponse
+### Announcement.AnnouncementTheme
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| settings | [Setting](#bytebase-v1-Setting) | repeated | The settings from the specified request. |
+| background | [google.type.Color](#google-type-Color) | | |
+| text | [google.type.Color](#google-type-Color) | | |
-<a name="bytebase-v1-MCPSetting"></a>
+<a name="bytebase-v1-AppIMSetting"></a>
+
+### AppIMSetting
-### MCPSetting
-MCPSetting is what an MCP (Model Context Protocol) session may do in this
-workspace.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| capability | [MCPSetting.Capability](#bytebase-v1-MCPSetting-Capability) | | 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. |
-| ignore_masking_exemptions | [bool](#bool) | | Whether a request that arrived over MCP stops applying the caller&#39;s own unmasking provisioning. Two mechanisms let a user see a real value and this suppresses both: the masking exemptions granted to them, and the unmask carried by an access grant. The same user in the console is untouched.
-
-It cannot force masking where there is none. Masking substitutes values in query results, so this does not reach data copied into a column carrying no masking policy, and it does nothing on the engines Bytebase does not mask. It narrows what an agent reads through the paths Bytebase masks; it is not a confidentiality boundary. |
+| settings | [AppIMSetting.IMSetting](#bytebase-v1-AppIMSetting-IMSetting) | repeated | |
-<a name="bytebase-v1-SQLEditorThemeSetting"></a>
+<a name="bytebase-v1-AppIMSetting-DingTalk"></a>
-### SQLEditorThemeSetting
+### AppIMSetting.DingTalk
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| id | [string](#string) | | |
-| name | [string](#string) | | |
-| monaco_base | [string](#string) | | |
-| tokens | [SQLEditorThemeSetting.TokensEntry](#bytebase-v1-SQLEditorThemeSetting-TokensEntry) | repeated | CSS token colors. |
+| client_id | [string](#string) | | |
+| client_secret | [string](#string) | | |
+| robot_code | [string](#string) | | |
-<a name="bytebase-v1-SQLEditorThemeSetting-TokensEntry"></a>
+<a name="bytebase-v1-AppIMSetting-Feishu"></a>
-### SQLEditorThemeSetting.TokensEntry
+### AppIMSetting.Feishu
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [google.type.Color](#google-type-Color) | | |
+| app_id | [string](#string) | | |
+| app_secret | [string](#string) | | |
-<a name="bytebase-v1-SemanticTypeSetting"></a>
+<a name="bytebase-v1-AppIMSetting-IMSetting"></a>
-### SemanticTypeSetting
+### AppIMSetting.IMSetting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| types | [SemanticTypeSetting.SemanticType](#bytebase-v1-SemanticTypeSetting-SemanticType) | repeated | |
+| type | [WebhookType](#bytebase-v1-WebhookType) | | |
+| slack | [AppIMSetting.Slack](#bytebase-v1-AppIMSetting-Slack) | | |
+| feishu | [AppIMSetting.Feishu](#bytebase-v1-AppIMSetting-Feishu) | | |
+| wecom | [AppIMSetting.Wecom](#bytebase-v1-AppIMSetting-Wecom) | | |
+| lark | [AppIMSetting.Lark](#bytebase-v1-AppIMSetting-Lark) | | |
+| dingtalk | [AppIMSetting.DingTalk](#bytebase-v1-AppIMSetting-DingTalk) | | |
+| teams | [AppIMSetting.Teams](#bytebase-v1-AppIMSetting-Teams) | | |
-<a name="bytebase-v1-SemanticTypeSetting-SemanticType"></a>
+<a name="bytebase-v1-AppIMSetting-Lark"></a>
-### SemanticTypeSetting.SemanticType
+### AppIMSetting.Lark
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| id | [string](#string) | | id is the uuid for semantic type. |
-| title | [string](#string) | | the title of the semantic type, it should not be empty. |
-| description | [string](#string) | | the description of the semantic type, it can be empty. |
-| algorithm | [Algorithm](#bytebase-v1-Algorithm) | | |
-| icon | [string](#string) | | icon is the icon for semantic type, it can be emoji or base64 encoded image. |
+| app_id | [string](#string) | | |
+| app_secret | [string](#string) | | |
-<a name="bytebase-v1-Setting"></a>
+<a name="bytebase-v1-AppIMSetting-Slack"></a>
+
+### AppIMSetting.Slack
-### Setting
-The schema of setting.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The resource name of the setting. Format: settings/{setting} Example: &#34;settings/SEMANTIC_TYPES&#34; |
-| value | [SettingValue](#bytebase-v1-SettingValue) | | The configuration value of the setting. |
+| token | [string](#string) | | |
-<a name="bytebase-v1-SettingValue"></a>
+<a name="bytebase-v1-AppIMSetting-Teams"></a>
+
+### AppIMSetting.Teams
-### SettingValue
-The data in setting value.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| app_im | [AppIMSetting](#bytebase-v1-AppIMSetting) | | |
-| workspace_profile | [WorkspaceProfileSetting](#bytebase-v1-WorkspaceProfileSetting) | | |
-| workspace_approval | [WorkspaceApprovalSetting](#bytebase-v1-WorkspaceApprovalSetting) | | |
-| data_classification | [DataClassificationSetting](#bytebase-v1-DataClassificationSetting) | | |
-| semantic_type | [SemanticTypeSetting](#bytebase-v1-SemanticTypeSetting) | | |
-| ai | [AISetting](#bytebase-v1-AISetting) | | |
-| environment | [EnvironmentSetting](#bytebase-v1-EnvironmentSetting) | | |
-| email | [EmailSetting](#bytebase-v1-EmailSetting) | | |
-| mcp | [MCPSetting](#bytebase-v1-MCPSetting) | | |
+| tenant_id | [string](#string) | | Azure AD tenant ID (Directory ID). |
+| client_id | [string](#string) | | Azure AD application (client) ID. |
+| client_secret | [string](#string) | | Azure AD client secret. |
-<a name="bytebase-v1-TestEmailSettingRequest"></a>
+<a name="bytebase-v1-AppIMSetting-Wecom"></a>
-### TestEmailSettingRequest
+### AppIMSetting.Wecom
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | |
-| email_setting | [EmailSetting](#bytebase-v1-EmailSetting) | | |
-| to | [string](#string) | | |
+| corp_id | [string](#string) | | |
+| agent_id | [string](#string) | | |
+| secret | [string](#string) | | |
-<a name="bytebase-v1-TestEmailSettingResponse"></a>
+<a name="bytebase-v1-DataClassificationSetting"></a>
-### TestEmailSettingResponse
+### DataClassificationSetting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| success | [bool](#bool) | | |
-| error | [string](#string) | | |
+| configs | [DataClassificationSetting.DataClassificationConfig](#bytebase-v1-DataClassificationSetting-DataClassificationConfig) | repeated | |
-<a name="bytebase-v1-UpdateSettingRequest"></a>
+<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig"></a>
+
+### DataClassificationSetting.DataClassificationConfig
-### UpdateSettingRequest
-The request message for updating or creating a setting.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| setting | [Setting](#bytebase-v1-Setting) | | The setting to update. |
-| validate_only | [bool](#bool) | | validate_only is a flag to indicate whether to validate the setting value, server would not persist the setting value if it is true. |
-| allow_missing | [bool](#bool) | | |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | |
+| id | [string](#string) | | id is the uuid for classification. Each project can chose one classification config. |
+| title | [string](#string) | | |
+| levels | [DataClassificationSetting.DataClassificationConfig.Level](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-Level) | repeated | levels is user defined level list for classification. |
+| classification | [DataClassificationSetting.DataClassificationConfig.ClassificationEntry](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-ClassificationEntry) | repeated | classification is the id - DataClassification map. The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. |
-<a name="bytebase-v1-WorkspaceApprovalSetting"></a>
+<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-ClassificationEntry"></a>
-### WorkspaceApprovalSetting
+### DataClassificationSetting.DataClassificationConfig.ClassificationEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| rules | [WorkspaceApprovalSetting.Rule](#bytebase-v1-WorkspaceApprovalSetting-Rule) | repeated | |
+| key | [string](#string) | | |
+| value | [DataClassificationSetting.DataClassificationConfig.DataClassification](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-DataClassification) | | |
-<a name="bytebase-v1-WorkspaceApprovalSetting-Rule"></a>
+<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-DataClassification"></a>
-### WorkspaceApprovalSetting.Rule
+### DataClassificationSetting.DataClassificationConfig.DataClassification
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| template | [ApprovalTemplate](#bytebase-v1-ApprovalTemplate) | | |
-| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with the rule. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+| id | [string](#string) | | id is the classification id in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. |
+| title | [string](#string) | | |
+| level | [int32](#int32) | optional | The sensitivity level. Maps to Level.level. |
-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 &#34;==&#34;, &#34;!=&#34;, &#34;&lt;&#34;, &#34;&lt;=&#34;, &#34;&gt;&#34;, &#34;&gt;=&#34; operations. statement.table_rows: table row count number, support &#34;==&#34;, &#34;!=&#34;, &#34;&lt;&#34;, &#34;&lt;=&#34;, &#34;&gt;&#34;, &#34;&gt;=&#34; operations. resource.environment_id: the environment resource id, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operations. resource.project_id: the project resource id, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations. resource.db_engine: the database engine type, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operations. Check the Engine enum for values. statement.sql_type: the SQL type, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operations. resource.database_name: the database name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations. resource.schema_name: the schema name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations. resource.table_name: the table name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations. statement.text: the SQL statement, support &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations. request.expiration_days: the role expiration days for the request, support &#34;==&#34;, &#34;!=&#34;, &#34;&lt;&#34;, &#34;&lt;=&#34;, &#34;&gt;&#34;, &#34;&gt;=&#34; operations. request.role: the request role full name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; 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 == &#34;prod&#34; &amp;&amp; statement.affected_rows &gt;= 100 resource.table_name.matches(&#34;sensitive_.*&#34;) &amp;&amp; resource.db_engine == &#34;MYSQL&#34; |
-| source | [WorkspaceApprovalSetting.Rule.Source](#bytebase-v1-WorkspaceApprovalSetting-Rule-Source) | | |
+<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-Level"></a>
+### DataClassificationSetting.DataClassificationConfig.Level
-<a name="bytebase-v1-WorkspaceProfileSetting"></a>
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| title | [string](#string) | | |
+| level | [int32](#int32) | | The numeric level for ordering. Higher = more sensitive. |
-### WorkspaceProfileSetting
+
+
+
+
+
+<a name="bytebase-v1-EmailSetting"></a>
+
+### EmailSetting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| external_url | [string](#string) | | The external URL is used for sso authentication callback. |
-| disallow_signup | [bool](#bool) | | Disallow self-service signup, users can only be invited by the owner. |
-| require_mfa | [bool](#bool) | | Require MFA for all users. |
-| refresh_token_duration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for refresh token. Default is 7 days. |
-| announcement | [Announcement](#bytebase-v1-Announcement) | | The setting of custom announcement |
-| maximum_request_expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The max expiration duration for data access requests. |
-| domains | [string](#string) | repeated | The workspace domain, e.g., bytebase.com. |
-| enforce_identity_domain | [bool](#bool) | | Only user and group from the domains can be created and login. |
-| database_change_mode | [DatabaseChangeMode](#bytebase-v1-DatabaseChangeMode) | | The workspace database change mode. |
-| disallow_password_signin | [bool](#bool) | | Whether password sign-in is disabled for all end users. |
-| enable_metric_collection | [bool](#bool) | | Whether to enable metric collection for the workspace. |
-| inactive_session_timeout | [google.protobuf.Duration](#google-protobuf-Duration) | | The session expiration time if not activity detected for the user. Value &lt;= 0 means no limit. |
-| enable_audit_log_stdout | [bool](#bool) | | Whether to enable audit logging to stdout in structured JSON format. Requires TEAM or ENTERPRISE license. |
-| watermark | [bool](#bool) | | Whether to display watermark on pages. Requires ENTERPRISE license. |
-| password_restriction | [WorkspaceProfileSetting.PasswordRestriction](#bytebase-v1-WorkspaceProfileSetting-PasswordRestriction) | | Password restriction settings. |
-| access_token_duration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for access token. Default is 1 hour. |
-| enable_debug | [bool](#bool) | | Whether debug mode is enabled. |
-| sql_result_size | [int64](#int64) | | 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 &lt;= 0. |
-| query_timeout | [google.protobuf.Duration](#google-protobuf-Duration) | | The query timeout duration for query and export, works for the SQL Editor and Export Center. |
-| allow_email_code_signin | [bool](#bool) | | Allow signin/signup using email &#43; a 6-digit one-time verification code. Requires the EMAIL setting to be configured on the workspace. |
-| sql_editor_theme_id | [string](#string) | | Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id OR a custom theme&#39;s uuid. Empty ⇒ default light. |
-| sql_editor_custom_theme | [SQLEditorThemeSetting](#bytebase-v1-SQLEditorThemeSetting) | | The enforced CUSTOM theme&#39;s full definition — present ONLY when sql_editor_theme_id is a custom uuid. tokens is always complete. |
-| maximum_role_expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The max expiration duration for request role. Deprecated: use just-in-time access request flows instead. |
-| directory_sync_token_configured | [bool](#bool) | | 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 &#34;generate&#34; and &#34;regenerate&#34;. |
+| from | [string](#string) | | |
+| from_name | [string](#string) | | |
+| type | [EmailSetting.Type](#bytebase-v1-EmailSetting-Type) | | |
+| smtp | [EmailSetting.SMTPConfig](#bytebase-v1-EmailSetting-SMTPConfig) | | |
-<a name="bytebase-v1-WorkspaceProfileSetting-PasswordRestriction"></a>
+<a name="bytebase-v1-EmailSetting-SMTPConfig"></a>
-### WorkspaceProfileSetting.PasswordRestriction
+### EmailSetting.SMTPConfig
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| min_length | [int32](#int32) | | min_length is the minimum length for password, should no less than 8. |
-| require_number | [bool](#bool) | | require_number requires the password must contains at least one number. |
-| require_letter | [bool](#bool) | | require_letter requires the password must contains at least one letter, regardless of upper case or lower case |
-| require_uppercase_letter | [bool](#bool) | | require_uppercase_letter requires the password must contains at least one upper case letter. |
-| require_special_character | [bool](#bool) | | require_special_character requires the password must contains at least one special character. |
-| require_reset_password_for_first_login | [bool](#bool) | | require_reset_password_for_first_login requires users to reset their password after the 1st login. |
-| password_rotation | [google.protobuf.Duration](#google-protobuf-Duration) | | password_rotation requires users to reset their password after the duration. |
+| host | [string](#string) | | |
+| port | [int32](#int32) | | |
+| username | [string](#string) | | |
+| password | [string](#string) | | |
+| encryption | [EmailSetting.SMTPConfig.Encryption](#bytebase-v1-EmailSetting-SMTPConfig-Encryption) | | |
+| authentication | [EmailSetting.SMTPConfig.Authentication](#bytebase-v1-EmailSetting-SMTPConfig-Authentication) | | |
-
+<a name="bytebase-v1-EnvironmentSetting"></a>
-<a name="bytebase-v1-AISetting-Provider"></a>
+### EnvironmentSetting
-### AISetting.Provider
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| PROVIDER_UNSPECIFIED | 0 | |
-| OPEN_AI | 1 | |
-| CLAUDE | 2 | |
-| GEMINI | 3 | |
-| AZURE_OPENAI | 4 | |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| environments | [EnvironmentSetting.Environment](#bytebase-v1-EnvironmentSetting-Environment) | repeated | |
-<a name="bytebase-v1-Algorithm-InnerOuterMask-MaskType"></a>
-### Algorithm.InnerOuterMask.MaskType
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| MASK_TYPE_UNSPECIFIED | 0 | |
-| INNER | 1 | |
-| OUTER | 2 | |
+<a name="bytebase-v1-EnvironmentSetting-Environment"></a>
+### EnvironmentSetting.Environment
-<a name="bytebase-v1-DatabaseChangeMode"></a>
-### DatabaseChangeMode
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The resource name of the environment. Format: environments/{environment}. Output only. |
+| id | [string](#string) | | The resource id of the environment. This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
+| title | [string](#string) | | The display name of the environment. |
+| tags | [EnvironmentSetting.Environment.TagsEntry](#bytebase-v1-EnvironmentSetting-Environment-TagsEntry) | repeated | |
+| color | [google.type.Color](#google-type-Color) | | |
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| DATABASE_CHANGE_MODE_UNSPECIFIED | 0 | |
-| PIPELINE | 1 | A more advanced database change process, including custom approval workflows and other advanced features. Default to this mode. |
-| EDITOR | 2 | A simple database change process in SQL editor. Users can execute SQL directly. |
-<a name="bytebase-v1-EmailSetting-SMTPConfig-Authentication"></a>
-### EmailSetting.SMTPConfig.Authentication
+<a name="bytebase-v1-EnvironmentSetting-Environment-TagsEntry"></a>
+### EnvironmentSetting.Environment.TagsEntry
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| AUTHENTICATION_UNSPECIFIED | 0 | |
-| AUTHENTICATION_NONE | 1 | |
-| PLAIN | 2 | |
-| LOGIN | 3 | |
-| CRAM_MD5 | 4 | |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| key | [string](#string) | | |
+| value | [string](#string) | | |
-<a name="bytebase-v1-EmailSetting-SMTPConfig-Encryption"></a>
-### EmailSetting.SMTPConfig.Encryption
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| ENCRYPTION_UNSPECIFIED | 0 | |
-| ENCRYPTION_NONE | 1 | |
-| STARTTLS | 2 | |
-| SSL_TLS | 3 | |
+<a name="bytebase-v1-GetSettingRequest"></a>
-<a name="bytebase-v1-EmailSetting-Type"></a>
+### GetSettingRequest
+The request message for getting a setting.
-### EmailSetting.Type
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The resource name of the setting. |
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | |
-| SMTP | 1 | |
-<a name="bytebase-v1-MCPSetting-Capability"></a>
-### MCPSetting.Capability
-Capability is the ceiling: a session runs at this level or lower.
-Writing CAPABILITY_UNSPECIFIED explicitly is rejected; omit the update mask
-path to leave the current ceiling unchanged.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| CAPABILITY_UNSPECIFIED | 0 | |
-| DISABLED | 1 | MCP connections are rejected. |
-| READ_ONLY | 3 | MCP may inspect metadata and run read-only queries. A session opens, and what it may do is decided per method by the capability gate and per statement by the SQL clamp: a request holding a statement that is not a read is refused whole, and where the engine&#39;s driver has one the database session is opened read-only as well. |
-| READ_WRITE | 4 | MCP may perform mutations, still bounded by the user&#39;s RBAC. |
+<a name="bytebase-v1-GetSettingResponse"></a>
+### GetSettingResponse
+The response message for getting a setting.
-<a name="bytebase-v1-Setting-SettingName"></a>
-
-### Setting.SettingName
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| setting | [Setting](#bytebase-v1-Setting) | | |
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| SETTING_NAME_UNSPECIFIED | 0 | |
-| WORKSPACE_PROFILE | 1 | |
-| WORKSPACE_APPROVAL | 2 | |
-| APP_IM | 3 | |
-| AI | 4 | |
-| DATA_CLASSIFICATION | 5 | |
-| SEMANTIC_TYPES | 6 | |
-| ENVIRONMENT | 7 | |
-| EMAIL | 8 | |
-| MCP | 9 | |
-<a name="bytebase-v1-WorkspaceApprovalSetting-Rule-Source"></a>
-### WorkspaceApprovalSetting.Rule.Source
+<a name="bytebase-v1-ListSettingsRequest"></a>
+### ListSettingsRequest
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| SOURCE_UNSPECIFIED | 0 | |
-| CHANGE_DATABASE | 1 | |
-| CREATE_DATABASE | 2 | |
-| REQUEST_ROLE | 4 | |
-| REQUEST_ACCESS | 5 | |
-
-
-<a name="bytebase-v1-SettingService"></a>
-### SettingService
-SettingService manages workspace-level settings and configurations.
+<a name="bytebase-v1-ListSettingsResponse"></a>
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| ListSettings | [ListSettingsRequest](#bytebase-v1-ListSettingsRequest) | [ListSettingsResponse](#bytebase-v1-ListSettingsResponse) | Lists all workspace settings. Permissions required: bb.settings.list |
-| GetSetting | [GetSettingRequest](#bytebase-v1-GetSettingRequest) | [Setting](#bytebase-v1-Setting) | Retrieves a workspace setting by name. Permissions required: bb.settings.get |
-| UpdateSetting | [UpdateSettingRequest](#bytebase-v1-UpdateSettingRequest) | [Setting](#bytebase-v1-Setting) | Updates a workspace setting. Permissions required: bb.settings.set |
-| TestEmailSetting | [TestEmailSettingRequest](#bytebase-v1-TestEmailSettingRequest) | [TestEmailSettingResponse](#bytebase-v1-TestEmailSettingResponse) | Sends a test email using the provided config (without persisting). Permissions required: bb.settings.set |
+### ListSettingsResponse
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| settings | [Setting](#bytebase-v1-Setting) | repeated | The settings from the specified request. |
-<a name="v1_user_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/user_service.proto
-<a name="bytebase-v1-BatchGetUsersRequest"></a>
-### BatchGetUsersRequest
+<a name="bytebase-v1-MCPSetting"></a>
+### MCPSetting
+MCPSetting is what an MCP (Model Context Protocol) session may do in this
+workspace.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| names | [string](#string) | repeated | The user names to retrieve. Format: users/{email} |
+| capability | [MCPSetting.Capability](#bytebase-v1-MCPSetting-Capability) | | 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. |
+| ignore_masking_exemptions | [bool](#bool) | | Whether a request that arrived over MCP stops applying the caller&#39;s own unmasking provisioning. Two mechanisms let a user see a real value and this suppresses both: the masking exemptions granted to them, and the unmask carried by an access grant. The same user in the console is untouched.
+It cannot force masking where there is none. Masking substitutes values in query results, so this does not reach data copied into a column carrying no masking policy, and it does nothing on the engines Bytebase does not mask. It narrows what an agent reads through the paths Bytebase masks; it is not a confidentiality boundary. |
-<a name="bytebase-v1-BatchGetUsersResponse"></a>
-### BatchGetUsersResponse
+<a name="bytebase-v1-SQLEditorThemeSetting"></a>
+
+### SQLEditorThemeSetting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| users | [User](#bytebase-v1-User) | repeated | One user per requested name, in the same order as `names`. |
+| id | [string](#string) | | |
+| name | [string](#string) | | |
+| monaco_base | [string](#string) | | |
+| tokens | [SQLEditorThemeSetting.TokensEntry](#bytebase-v1-SQLEditorThemeSetting-TokensEntry) | repeated | CSS token colors. |
-<a name="bytebase-v1-ChangePasswordRequest"></a>
+<a name="bytebase-v1-SQLEditorThemeSetting-TokensEntry"></a>
-### ChangePasswordRequest
+### SQLEditorThemeSetting.TokensEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: users/{email}. Must be the caller&#39;s own name. |
-| new_password | [string](#string) | | |
-| credential | [CredentialProof](#bytebase-v1-CredentialProof) | | |
+| key | [string](#string) | | |
+| value | [google.type.Color](#google-type-Color) | | |
-<a name="bytebase-v1-ConfirmRecoveryCodesRequest"></a>
+<a name="bytebase-v1-SemanticTypeSetting"></a>
-### ConfirmRecoveryCodesRequest
+### SemanticTypeSetting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: users/{email}. Must be the caller&#39;s own name. |
-| pending_version | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The pending_version of the codes being confirmed. Confirming promotes exactly the set this version identifies, or nothing. |
-| credential | [CredentialProof](#bytebase-v1-CredentialProof) | | |
-| otp_code | [string](#string) | | Required for first-time enrollment, rejected otherwise. A *fresh* code, not the one EnableMFA took. |
+| types | [SemanticTypeSetting.SemanticType](#bytebase-v1-SemanticTypeSetting-SemanticType) | repeated | |
-<a name="bytebase-v1-CreateUserRequest"></a>
+<a name="bytebase-v1-SemanticTypeSetting-SemanticType"></a>
-### CreateUserRequest
+### SemanticTypeSetting.SemanticType
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| user | [User](#bytebase-v1-User) | | The user to create. |
+| id | [string](#string) | | id is the uuid for semantic type. |
+| title | [string](#string) | | the title of the semantic type, it should not be empty. |
+| description | [string](#string) | | the description of the semantic type, it can be empty. |
+| algorithm | [Algorithm](#bytebase-v1-Algorithm) | | |
+| icon | [string](#string) | | icon is the icon for semantic type, it can be emoji or base64 encoded image. |
-<a name="bytebase-v1-CredentialProof"></a>
+<a name="bytebase-v1-Setting"></a>
-### CredentialProof
-One proof that the caller currently controls a credential on the account.
-Exactly one field must be set; enforced in the handler.
+### Setting
+The schema of setting.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| current_password | [string](#string) | | The account&#39;s current password. Refused by a factor-touching method while a live MFA factor exists. |
-| otp_code | [string](#string) | | A live code from the account&#39;s enrolled TOTP authenticator. |
-| recovery_code | [string](#string) | | A single-use MFA recovery code. |
-| email_code | [string](#string) | | A one-time code from RequestReauthCode. Bytebase Cloud only, and only while the account has no live MFA factor. |
-
+| name | [string](#string) | | The resource name of the setting. Format: settings/{setting} Example: &#34;settings/SEMANTIC_TYPES&#34; |
+| value | [SettingValue](#bytebase-v1-SettingValue) | | The configuration value of the setting. |
-<a name="bytebase-v1-DeleteUserRequest"></a>
-### DeleteUserRequest
+<a name="bytebase-v1-SettingValue"></a>
+### SettingValue
+The data in setting value.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the user to delete. Format: users/{email} |
+| app_im | [AppIMSetting](#bytebase-v1-AppIMSetting) | | |
+| workspace_profile | [WorkspaceProfileSetting](#bytebase-v1-WorkspaceProfileSetting) | | |
+| workspace_approval | [WorkspaceApprovalSetting](#bytebase-v1-WorkspaceApprovalSetting) | | |
+| data_classification | [DataClassificationSetting](#bytebase-v1-DataClassificationSetting) | | |
+| semantic_type | [SemanticTypeSetting](#bytebase-v1-SemanticTypeSetting) | | |
+| ai | [AISetting](#bytebase-v1-AISetting) | | |
+| environment | [EnvironmentSetting](#bytebase-v1-EnvironmentSetting) | | |
+| email | [EmailSetting](#bytebase-v1-EmailSetting) | | |
+| mcp | [MCPSetting](#bytebase-v1-MCPSetting) | | |
-<a name="bytebase-v1-DisableMFARequest"></a>
+<a name="bytebase-v1-TestEmailSettingRequest"></a>
-### DisableMFARequest
+### TestEmailSettingRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: users/{email}. The caller&#39;s own, or another user&#39;s with bb.users.update. |
-| credential | [CredentialProof](#bytebase-v1-CredentialProof) | | Required for a self-service call against a live factor, and then only otp_code or recovery_code. Unused on an admin-assisted call. |
+| parent | [string](#string) | | |
+| email_setting | [EmailSetting](#bytebase-v1-EmailSetting) | | |
+| to | [string](#string) | | |
-<a name="bytebase-v1-EnableMFARequest"></a>
+<a name="bytebase-v1-TestEmailSettingResponse"></a>
-### EnableMFARequest
+### TestEmailSettingResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: users/{email}. Must be the caller&#39;s own name. |
-| otp_code | [string](#string) | | A code from the authenticator the pending secret was just added to. |
-| pending_version | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The pending_version this enrollment was minted with. |
-| credential | [CredentialProof](#bytebase-v1-CredentialProof) | | 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. |
-
+| success | [bool](#bool) | | |
+| error | [string](#string) | | |
-<a name="bytebase-v1-GetUserRequest"></a>
-### GetUserRequest
+<a name="bytebase-v1-UpdateSettingRequest"></a>
+### UpdateSettingRequest
+The request message for updating or creating a setting.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the user to retrieve. Format: users/{email} |
+| setting | [Setting](#bytebase-v1-Setting) | | The setting to update. |
+| validate_only | [bool](#bool) | | validate_only is a flag to indicate whether to validate the setting value, server would not persist the setting value if it is true. |
+| allow_missing | [bool](#bool) | | |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | |
-<a name="bytebase-v1-ListUsersRequest"></a>
+<a name="bytebase-v1-WorkspaceApprovalSetting"></a>
-### ListUsersRequest
+### WorkspaceApprovalSetting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| page_size | [int32](#int32) | | 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. |
-| page_token | [string](#string) | | A page token, received from a previous `ListUsers` call. Provide this to retrieve the subsequent page.
+| rules | [WorkspaceApprovalSetting.Rule](#bytebase-v1-WorkspaceApprovalSetting-Rule) | repeated | |
-When paginating, all other parameters provided to `ListUsers` must match the call that provided the page token. |
-| show_deleted | [bool](#bool) | | Show deleted users if specified. |
-| filter | [string](#string) | | 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 &#34;==&#34; and &#34;.contains()&#34; operator. - email: the user email, support &#34;==&#34; and &#34;.contains()&#34; operator. - state: check State enum for values, support &#34;==&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
-For example: name == &#34;ed&#34; name.contains(&#34;ed&#34;) email == &#34;[email protected]&#34; email.contains(&#34;ed&#34;) state == &#34;DELETED&#34; project == &#34;projects/sample-project&#34; You can combine filter conditions like: name.contains(&#34;ed&#34;) &amp;&amp; project == &#34;projects/sample-project&#34; (name == &#34;ed&#34; || email == &#34;[email protected]&#34;) &amp;&amp; project == &#34;projects/sample-project&#34; |
+<a name="bytebase-v1-WorkspaceApprovalSetting-Rule"></a>
+### WorkspaceApprovalSetting.Rule
-<a name="bytebase-v1-ListUsersResponse"></a>
-### ListUsersResponse
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| template | [ApprovalTemplate](#bytebase-v1-ApprovalTemplate) | | |
+| condition | [google.type.Expr](#google-type-Expr) | | 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 &#34;==&#34;, &#34;!=&#34;, &#34;&lt;&#34;, &#34;&lt;=&#34;, &#34;&gt;&#34;, &#34;&gt;=&#34; operations. statement.table_rows: table row count number, support &#34;==&#34;, &#34;!=&#34;, &#34;&lt;&#34;, &#34;&lt;=&#34;, &#34;&gt;&#34;, &#34;&gt;=&#34; operations. resource.environment_id: the environment resource id, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operations. resource.project_id: the project resource id, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations. resource.db_engine: the database engine type, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operations. Check the Engine enum for values. statement.sql_type: the SQL type, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operations. resource.database_name: the database name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations. resource.schema_name: the schema name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations. resource.table_name: the table name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations. statement.text: the SQL statement, support &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations. request.expiration_days: the role expiration days for the request, support &#34;==&#34;, &#34;!=&#34;, &#34;&lt;&#34;, &#34;&lt;=&#34;, &#34;&gt;&#34;, &#34;&gt;=&#34; operations. request.role: the request role full name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| users | [User](#bytebase-v1-User) | repeated | The users from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+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 == &#34;prod&#34; &amp;&amp; statement.affected_rows &gt;= 100 resource.table_name.matches(&#34;sensitive_.*&#34;) &amp;&amp; resource.db_engine == &#34;MYSQL&#34; |
+| source | [WorkspaceApprovalSetting.Rule.Source](#bytebase-v1-WorkspaceApprovalSetting-Rule-Source) | | |
-<a name="bytebase-v1-RegenerateRecoveryCodesRequest"></a>
-### RegenerateRecoveryCodesRequest
+<a name="bytebase-v1-WorkspaceProfileSetting"></a>
+
+### WorkspaceProfileSetting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: users/{email}. Must be the caller&#39;s own name. |
+| external_url | [string](#string) | | The external URL is used for sso authentication callback. |
+| disallow_signup | [bool](#bool) | | Disallow self-service signup, users can only be invited by the owner. |
+| require_mfa | [bool](#bool) | | Require MFA for all users. |
+| refresh_token_duration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for refresh token. Default is 7 days. |
+| announcement | [Announcement](#bytebase-v1-Announcement) | | The setting of custom announcement |
+| maximum_request_expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The max expiration duration for data access requests. |
+| domains | [string](#string) | repeated | The workspace domain, e.g., bytebase.com. |
+| enforce_identity_domain | [bool](#bool) | | Only user and group from the domains can be created and login. |
+| database_change_mode | [DatabaseChangeMode](#bytebase-v1-DatabaseChangeMode) | | The workspace database change mode. |
+| disallow_password_signin | [bool](#bool) | | Whether password sign-in is disabled for all end users. |
+| enable_metric_collection | [bool](#bool) | | Whether to enable metric collection for the workspace. |
+| inactive_session_timeout | [google.protobuf.Duration](#google-protobuf-Duration) | | The session expiration time if not activity detected for the user. Value &lt;= 0 means no limit. |
+| enable_audit_log_stdout | [bool](#bool) | | Whether to enable audit logging to stdout in structured JSON format. Requires TEAM or ENTERPRISE license. |
+| watermark | [bool](#bool) | | Whether to display watermark on pages. Requires ENTERPRISE license. |
+| password_restriction | [WorkspaceProfileSetting.PasswordRestriction](#bytebase-v1-WorkspaceProfileSetting-PasswordRestriction) | | Password restriction settings. |
+| access_token_duration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for access token. Default is 1 hour. |
+| enable_debug | [bool](#bool) | | Whether debug mode is enabled. |
+| sql_result_size | [int64](#int64) | | 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 &lt;= 0. |
+| query_timeout | [google.protobuf.Duration](#google-protobuf-Duration) | | The query timeout duration for query and export, works for the SQL Editor and Export Center. |
+| allow_email_code_signin | [bool](#bool) | | Allow signin/signup using email &#43; a 6-digit one-time verification code. Requires the EMAIL setting to be configured on the workspace. |
+| sql_editor_theme_id | [string](#string) | | Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id OR a custom theme&#39;s uuid. Empty ⇒ default light. |
+| sql_editor_custom_theme | [SQLEditorThemeSetting](#bytebase-v1-SQLEditorThemeSetting) | | The enforced CUSTOM theme&#39;s full definition — present ONLY when sql_editor_theme_id is a custom uuid. tokens is always complete. |
+| maximum_role_expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The max expiration duration for request role. Deprecated: use just-in-time access request flows instead. |
+| directory_sync_token_configured | [bool](#bool) | | 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 &#34;generate&#34; and &#34;regenerate&#34;. |
-<a name="bytebase-v1-RegenerateRecoveryCodesResponse"></a>
+<a name="bytebase-v1-WorkspaceProfileSetting-PasswordRestriction"></a>
-### RegenerateRecoveryCodesResponse
+### WorkspaceProfileSetting.PasswordRestriction
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| recovery_codes | [string](#string) | repeated | The pending recovery codes, shown once for the caller to save. |
-| pending_version | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Identifies this mint; see StartMFAEnrollmentResponse.pending_version. |
-
-
-
+| min_length | [int32](#int32) | | min_length is the minimum length for password, should no less than 8. |
+| require_number | [bool](#bool) | | require_number requires the password must contains at least one number. |
+| require_letter | [bool](#bool) | | require_letter requires the password must contains at least one letter, regardless of upper case or lower case |
+| require_uppercase_letter | [bool](#bool) | | require_uppercase_letter requires the password must contains at least one upper case letter. |
+| require_special_character | [bool](#bool) | | require_special_character requires the password must contains at least one special character. |
+| require_reset_password_for_first_login | [bool](#bool) | | require_reset_password_for_first_login requires users to reset their password after the 1st login. |
+| password_rotation | [google.protobuf.Duration](#google-protobuf-Duration) | | password_rotation requires users to reset their password after the duration. |
-<a name="bytebase-v1-RequestReauthCodeRequest"></a>
-### RequestReauthCodeRequest
+
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: users/{email}. Must be the caller&#39;s own name. |
+<a name="bytebase-v1-AISetting-Provider"></a>
+### AISetting.Provider
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| PROVIDER_UNSPECIFIED | 0 | |
+| OPEN_AI | 1 | |
+| CLAUDE | 2 | |
+| GEMINI | 3 | |
+| AZURE_OPENAI | 4 | |
-<a name="bytebase-v1-StartMFAEnrollmentRequest"></a>
+<a name="bytebase-v1-Algorithm-InnerOuterMask-MaskType"></a>
-### StartMFAEnrollmentRequest
+### Algorithm.InnerOuterMask.MaskType
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| MASK_TYPE_UNSPECIFIED | 0 | |
+| INNER | 1 | |
+| OUTER | 2 | |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: users/{email}. Must be the caller&#39;s own name. |
+<a name="bytebase-v1-DatabaseChangeMode"></a>
+### DatabaseChangeMode
-
-<a name="bytebase-v1-StartMFAEnrollmentResponse"></a>
-
-### StartMFAEnrollmentResponse
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| DATABASE_CHANGE_MODE_UNSPECIFIED | 0 | |
+| PIPELINE | 1 | A more advanced database change process, including custom approval workflows and other advanced features. Default to this mode. |
+| EDITOR | 2 | A simple database change process in SQL editor. Users can execute SQL directly. |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| otp_secret | [string](#string) | | The pending TOTP secret. The only response that carries it — it is never readable from the User resource. |
-| recovery_codes | [string](#string) | repeated | The pending recovery codes, shown once for the caller to save. |
-| expire_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When this enrollment stops being confirmable. |
-| pending_version | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | 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. |
+<a name="bytebase-v1-EmailSetting-SMTPConfig-Authentication"></a>
+### EmailSetting.SMTPConfig.Authentication
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| AUTHENTICATION_UNSPECIFIED | 0 | |
+| AUTHENTICATION_NONE | 1 | |
+| PLAIN | 2 | |
+| LOGIN | 3 | |
+| CRAM_MD5 | 4 | |
-<a name="bytebase-v1-UndeleteUserRequest"></a>
+<a name="bytebase-v1-EmailSetting-SMTPConfig-Encryption"></a>
-### UndeleteUserRequest
+### EmailSetting.SMTPConfig.Encryption
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| ENCRYPTION_UNSPECIFIED | 0 | |
+| ENCRYPTION_NONE | 1 | |
+| STARTTLS | 2 | |
+| SSL_TLS | 3 | |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the deleted user. Format: users/{email} |
+<a name="bytebase-v1-EmailSetting-Type"></a>
+### EmailSetting.Type
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | |
+| SMTP | 1 | |
-<a name="bytebase-v1-UpdateEmailRequest"></a>
-### UpdateEmailRequest
+<a name="bytebase-v1-MCPSetting-Capability"></a>
+### MCPSetting.Capability
+Capability is the ceiling: a session runs at this level or lower.
+Writing CAPABILITY_UNSPECIFIED explicitly is rejected; omit the update mask
+path to leave the current ceiling unchanged.
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | 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 &#39;email&#39; field. |
-| email | [string](#string) | | The new email address. |
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| CAPABILITY_UNSPECIFIED | 0 | |
+| DISABLED | 1 | MCP connections are rejected. |
+| READ_ONLY | 3 | MCP may inspect metadata and run read-only queries. A session opens, and what it may do is decided per method by the capability gate and per statement by the SQL clamp: a request holding a statement that is not a read is refused whole, and where the engine&#39;s driver has one the database session is opened read-only as well. |
+| READ_WRITE | 4 | MCP may perform mutations, still bounded by the user&#39;s RBAC. |
+<a name="bytebase-v1-Setting-SettingName"></a>
+### Setting.SettingName
-<a name="bytebase-v1-UpdateUserRequest"></a>
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| SETTING_NAME_UNSPECIFIED | 0 | |
+| WORKSPACE_PROFILE | 1 | |
+| WORKSPACE_APPROVAL | 2 | |
+| APP_IM | 3 | |
+| AI | 4 | |
+| DATA_CLASSIFICATION | 5 | |
+| SEMANTIC_TYPES | 6 | |
+| ENVIRONMENT | 7 | |
+| EMAIL | 8 | |
+| MCP | 9 | |
-### UpdateUserRequest
+<a name="bytebase-v1-WorkspaceApprovalSetting-Rule-Source"></a>
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| user | [User](#bytebase-v1-User) | | The user to update.
+### WorkspaceApprovalSetting.Rule.Source
-The user&#39;s `name` field is used to identify the user to update. Format: users/{email} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| allow_missing | [bool](#bool) | | If set to true, and the user is not found, a new user will be created. In this situation, `update_mask` is ignored. |
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| SOURCE_UNSPECIFIED | 0 | |
+| CHANGE_DATABASE | 1 | |
+| CREATE_DATABASE | 2 | |
+| REQUEST_ROLE | 4 | |
+| REQUEST_ACCESS | 5 | |
+
+
-<a name="bytebase-v1-User"></a>
+<a name="bytebase-v1-SettingService"></a>
-### User
+### SettingService
+SettingService manages workspace-level settings and configurations.
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| ListSettings | [ListSettingsRequest](#bytebase-v1-ListSettingsRequest) | [ListSettingsResponse](#bytebase-v1-ListSettingsResponse) | Lists all workspace settings. Permissions required: bb.settings.list |
+| GetSetting | [GetSettingRequest](#bytebase-v1-GetSettingRequest) | [Setting](#bytebase-v1-Setting) | Retrieves a workspace setting by name. Permissions required: bb.settings.get |
+| UpdateSetting | [UpdateSettingRequest](#bytebase-v1-UpdateSettingRequest) | [Setting](#bytebase-v1-Setting) | Updates a workspace setting. Permissions required: bb.settings.set |
+| TestEmailSetting | [TestEmailSettingRequest](#bytebase-v1-TestEmailSettingRequest) | [TestEmailSettingResponse](#bytebase-v1-TestEmailSettingResponse) | Sends a test email using the provided config (without persisting). Permissions required: bb.settings.set |
+
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the user. Format: users/{email} |
-| state | [State](#bytebase-v1-State) | | The lifecycle state of the user account. |
-| email | [string](#string) | | The email address of the user, used for login and notifications. |
-| title | [string](#string) | | The display title or full name of the user. |
-| password | [string](#string) | | The password for authentication. Only used during user creation or password updates. |
-| mfa_enabled | [bool](#bool) | | Whether the user has a live MFA factor. Set by ConfirmRecoveryCodes and DisableMFA, never by an update. |
-| phone | [string](#string) | | Should be a valid E.164 compliant phone number. Could be empty. |
-| profile | [User.Profile](#bytebase-v1-User-Profile) | | User profile metadata. |
-| groups | [string](#string) | repeated | The groups for the user. Format: groups/{email} |
-| workspace | [string](#string) | | The current workspace. Format: workspaces/{id} |
+<a name="v1_user_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/user_service.proto
-<a name="bytebase-v1-User-Profile"></a>
+<a name="bytebase-v1-BatchGetUsersRequest"></a>
-### User.Profile
+### BatchGetUsersRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| last_login_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time the user successfully logged in. |
-| last_change_password_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time the user changed their password. |
-| source | [string](#string) | | source means where the user comes from. For now we support Entra ID SCIM sync, so the source could be Entra ID. |
-
-
-
+| names | [string](#string) | repeated | The user names to retrieve. Format: users/{email} |
-
-
-
-<a name="bytebase-v1-UserService"></a>
+<a name="bytebase-v1-BatchGetUsersResponse"></a>
-### UserService
-UserService manages user accounts and authentication.
+### BatchGetUsersResponse
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| GetUser | [GetUserRequest](#bytebase-v1-GetUserRequest) | [User](#bytebase-v1-User) | Get the user. Any authenticated user can get the user. Permissions required: bb.users.get |
-| BatchGetUsers | [BatchGetUsersRequest](#bytebase-v1-BatchGetUsersRequest) | [BatchGetUsersResponse](#bytebase-v1-BatchGetUsersResponse) | 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 |
-| GetCurrentUser | [.google.protobuf.Empty](#google-protobuf-Empty) | [User](#bytebase-v1-User) | Get the current authenticated user. Permissions required: None |
-| ListUsers | [ListUsersRequest](#bytebase-v1-ListUsersRequest) | [ListUsersResponse](#bytebase-v1-ListUsersResponse) | List all users. Any authenticated user can list users. Permissions required: bb.users.list |
-| CreateUser | [CreateUserRequest](#bytebase-v1-CreateUserRequest) | [User](#bytebase-v1-User) | Creates a user in the caller&#39;s workspace (admin action, self-hosted only). In SaaS mode, admins should add users via workspace IAM policy instead. Permissions required: bb.users.create |
-| UpdateUser | [UpdateUserRequest](#bytebase-v1-UpdateUserRequest) | [User](#bytebase-v1-User) | 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) |
-| DeleteUser | [DeleteUserRequest](#bytebase-v1-DeleteUserRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a user. Requires bb.users.delete permission with additional validation: the last remaining workspace admin cannot be deleted. Permissions required: bb.users.delete |
-| UndeleteUser | [UndeleteUserRequest](#bytebase-v1-UndeleteUserRequest) | [User](#bytebase-v1-User) | Restores a deleted user. Permissions required: bb.users.undelete |
-| UpdateEmail | [UpdateEmailRequest](#bytebase-v1-UpdateEmailRequest) | [User](#bytebase-v1-User) | Updates a user&#39;s email address. Permissions required: bb.users.updateEmail |
-| RequestReauthCode | [RequestReauthCodeRequest](#bytebase-v1-RequestReauthCodeRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Sends a one-time code to the caller&#39;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`. |
-| ChangePassword | [ChangePasswordRequest](#bytebase-v1-ChangePasswordRequest) | [User](#bytebase-v1-User) | Changes the caller&#39;s own password. An administrator resetting someone else&#39;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`. |
-| StartMFAEnrollment | [StartMFAEnrollmentRequest](#bytebase-v1-StartMFAEnrollmentRequest) | [StartMFAEnrollmentResponse](#bytebase-v1-StartMFAEnrollmentResponse) | Mints a pending TOTP secret and recovery codes for the caller&#39;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`. |
-| EnableMFA | [EnableMFARequest](#bytebase-v1-EnableMFARequest) | [User](#bytebase-v1-User) | 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. |
-| DisableMFA | [DisableMFARequest](#bytebase-v1-DisableMFARequest) | [User](#bytebase-v1-User) | Turns MFA off, clearing the entire MFA config — live and pending state alike. Callers may disable their own; an administrator may disable another user&#39;s with bb.users.update, which is how a locked-out user is recovered. Permissions required: bb.users.update, unless `name` is the caller&#39;s own. |
-| RegenerateRecoveryCodes | [RegenerateRecoveryCodesRequest](#bytebase-v1-RegenerateRecoveryCodesRequest) | [RegenerateRecoveryCodesResponse](#bytebase-v1-RegenerateRecoveryCodesResponse) | 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`. |
-| ConfirmRecoveryCodes | [ConfirmRecoveryCodesRequest](#bytebase-v1-ConfirmRecoveryCodesRequest) | [User](#bytebase-v1-User) | 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`. |
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| users | [User](#bytebase-v1-User) | repeated | One user per requested name, in the same order as `names`. |
-<a name="v1_auth_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/auth_service.proto
-<a name="bytebase-v1-AuthenticationInfo"></a>
+<a name="bytebase-v1-ChangePasswordRequest"></a>
-### AuthenticationInfo
+### ChangePasswordRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| workspace | [string](#string) | | The workspace used for authentication, when one can be resolved. Format: workspaces/{workspace} |
-| restriction | [Restriction](#bytebase-v1-Restriction) | | The effective authentication restrictions. |
+| name | [string](#string) | | Format: users/{email}. Must be the caller&#39;s own name. |
+| new_password | [string](#string) | | |
+| credential | [CredentialProof](#bytebase-v1-CredentialProof) | | |
-<a name="bytebase-v1-ExchangeTokenRequest"></a>
+<a name="bytebase-v1-ConfirmRecoveryCodesRequest"></a>
-### ExchangeTokenRequest
+### ConfirmRecoveryCodesRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| token | [string](#string) | | External OIDC token (JWT) from CI/CD platform. |
-| email | [string](#string) | | Workload Identity email for identifying which identity to authenticate as. Format: {name}@workload.bytebase.com |
+| name | [string](#string) | | Format: users/{email}. Must be the caller&#39;s own name. |
+| pending_version | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The pending_version of the codes being confirmed. Confirming promotes exactly the set this version identifies, or nothing. |
+| credential | [CredentialProof](#bytebase-v1-CredentialProof) | | |
+| otp_code | [string](#string) | | Required for first-time enrollment, rejected otherwise. A *fresh* code, not the one EnableMFA took. |
-<a name="bytebase-v1-ExchangeTokenResponse"></a>
+<a name="bytebase-v1-CreateUserRequest"></a>
-### ExchangeTokenResponse
+### CreateUserRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| access_token | [string](#string) | | Bytebase access token. |
-
+| user | [User](#bytebase-v1-User) | | The user to create. |
-<a name="bytebase-v1-GetAuthenticationRestrictionRequest"></a>
-### GetAuthenticationRestrictionRequest
+<a name="bytebase-v1-CredentialProof"></a>
+### CredentialProof
+One proof that the caller currently controls a credential on the account.
+Exactly one field must be set; enforced in the handler.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| workspace | [string](#string) | | 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. |
+| current_password | [string](#string) | | The account&#39;s current password. Refused by a factor-touching method while a live MFA factor exists. |
+| otp_code | [string](#string) | | A live code from the account&#39;s enrolled TOTP authenticator. |
+| recovery_code | [string](#string) | | A single-use MFA recovery code. |
+| email_code | [string](#string) | | A one-time code from RequestReauthCode. Bytebase Cloud only, and only while the account has no live MFA factor. |
-<a name="bytebase-v1-IdentityProviderContext"></a>
+<a name="bytebase-v1-DeleteUserRequest"></a>
+
+### DeleteUserRequest
-### IdentityProviderContext
-Context for identity provider authentication.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| oauth2_context | [OAuth2IdentityProviderContext](#bytebase-v1-OAuth2IdentityProviderContext) | | OAuth2 authentication context. |
-| oidc_context | [OIDCIdentityProviderContext](#bytebase-v1-OIDCIdentityProviderContext) | | OpenID Connect authentication context. |
+| name | [string](#string) | | The name of the user to delete. Format: users/{email} |
-<a name="bytebase-v1-LoginRequest"></a>
+<a name="bytebase-v1-DisableMFARequest"></a>
-### LoginRequest
+### DisableMFARequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| email | [string](#string) | | User&#39;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 | [string](#string) | | User&#39;s password for authentication. Bounded for abuse only: LDAP directories may accept passwords beyond bcrypt&#39;s 72-byte limit, and the local-password path rejects longer inputs itself. |
-| web | [bool](#bool) | | 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. |
-| idp_name | [string](#string) | | The name of the identity provider. Format: idps/{idp} |
-| idp_context | [IdentityProviderContext](#bytebase-v1-IdentityProviderContext) | | The idp_context is used to get the user information from identity provider. |
-| otp_code | [string](#string) | optional | The otp_code is used to verify the user&#39;s identity by MFA. |
-| recovery_code | [string](#string) | optional | The recovery_code is used to recovery the user&#39;s identity with MFA. |
-| mfa_temp_token | [string](#string) | optional | The mfa_temp_token is used to verify the user&#39;s identity by MFA. |
-| email_code | [string](#string) | optional | 6-digit code from email for passwordless login/signup. Pairs with `email`. Mutually exclusive with `password` and `idp_name`. |
-| workspace | [string](#string) | optional | 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} |
+| name | [string](#string) | | Format: users/{email}. The caller&#39;s own, or another user&#39;s with bb.users.update. |
+| credential | [CredentialProof](#bytebase-v1-CredentialProof) | | Required for a self-service call against a live factor, and then only otp_code or recovery_code. Unused on an admin-assisted call. |
-<a name="bytebase-v1-LoginResponse"></a>
+<a name="bytebase-v1-EnableMFARequest"></a>
-### LoginResponse
+### EnableMFARequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| token | [string](#string) | | Access token for authenticated requests. Only returned when web=false. For web=true, the token is set as an HTTP-only cookie. |
-| mfa_temp_token | [string](#string) | optional | Temporary token for MFA verification. |
-| require_reset_password | [bool](#bool) | | Whether user must reset password before continuing. |
-| user | [User](#bytebase-v1-User) | | The user from the successful login. |
+| name | [string](#string) | | Format: users/{email}. Must be the caller&#39;s own name. |
+| otp_code | [string](#string) | | A code from the authenticator the pending secret was just added to. |
+| pending_version | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The pending_version this enrollment was minted with. |
+| credential | [CredentialProof](#bytebase-v1-CredentialProof) | | 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. |
-<a name="bytebase-v1-LogoutRequest"></a>
+<a name="bytebase-v1-GetUserRequest"></a>
-### LogoutRequest
-Request to logout current user session.
+### GetUserRequest
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the user to retrieve. Format: users/{email} |
-<a name="bytebase-v1-OAuth2IdentityProviderContext"></a>
-### OAuth2IdentityProviderContext
-OAuth2 authentication context.
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| code | [string](#string) | | Authorization code from OAuth2 provider. |
+<a name="bytebase-v1-ListUsersRequest"></a>
+### ListUsersRequest
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| page_size | [int32](#int32) | | 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. |
+| page_token | [string](#string) | | 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. |
+| show_deleted | [bool](#bool) | | Show deleted users if specified. |
+| filter | [string](#string) | | 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
-<a name="bytebase-v1-OIDCIdentityProviderContext"></a>
-
-### OIDCIdentityProviderContext
-OpenID Connect authentication context.
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| code | [string](#string) | | Authorization code from OIDC provider. |
-
-
-
+Supported filter: - name: the user name, support &#34;==&#34; and &#34;.contains()&#34; operator. - email: the user email, support &#34;==&#34; and &#34;.contains()&#34; operator. - state: check State enum for values, support &#34;==&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
+For example: name == &#34;ed&#34; name.contains(&#34;ed&#34;) email == &#34;[email protected]&#34; email.contains(&#34;ed&#34;) state == &#34;DELETED&#34; project == &#34;projects/sample-project&#34; You can combine filter conditions like: name.contains(&#34;ed&#34;) &amp;&amp; project == &#34;projects/sample-project&#34; (name == &#34;ed&#34; || email == &#34;[email protected]&#34;) &amp;&amp; project == &#34;projects/sample-project&#34; |
-<a name="bytebase-v1-RefreshRequest"></a>
-### RefreshRequest
-Request to refresh the access token.
+<a name="bytebase-v1-ListUsersResponse"></a>
+### ListUsersResponse
-<a name="bytebase-v1-RefreshResponse"></a>
-### RefreshResponse
-Response from refreshing the access token.
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| users | [User](#bytebase-v1-User) | repeated | The users from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-<a name="bytebase-v1-RequestPasswordResetRequest"></a>
+<a name="bytebase-v1-RegenerateRecoveryCodesRequest"></a>
-### RequestPasswordResetRequest
+### RegenerateRecoveryCodesRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| email | [string](#string) | | 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 | [string](#string) | optional | 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} |
+| name | [string](#string) | | Format: users/{email}. Must be the caller&#39;s own name. |
-<a name="bytebase-v1-ResetPasswordRequest"></a>
+<a name="bytebase-v1-RegenerateRecoveryCodesResponse"></a>
-### ResetPasswordRequest
+### RegenerateRecoveryCodesResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| email | [string](#string) | | 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 | [string](#string) | | The 6-digit code from the reset email. |
-| new_password | [string](#string) | | The new password to set. |
+| recovery_codes | [string](#string) | repeated | The pending recovery codes, shown once for the caller to save. |
+| pending_version | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Identifies this mint; see StartMFAEnrollmentResponse.pending_version. |
-<a name="bytebase-v1-Restriction"></a>
+<a name="bytebase-v1-RequestReauthCodeRequest"></a>
-### Restriction
+### RequestReauthCodeRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| disallow_signup | [bool](#bool) | | Whether self-service user signup is disabled. |
-| disallow_password_signin | [bool](#bool) | | Whether password sign-in is disabled for all end users. |
-| password_restriction | [WorkspaceProfileSetting.PasswordRestriction](#bytebase-v1-WorkspaceProfileSetting-PasswordRestriction) | | Password complexity and restriction requirements. |
-| allow_email_code_signin | [bool](#bool) | | Whether email &#43; 6-digit code signin is enabled for this workspace. |
-| password_reset_enabled | [bool](#bool) | | Whether password reset via email is available for this workspace. True when the workspace (or deployment) has an email setting configured. |
+| name | [string](#string) | | Format: users/{email}. Must be the caller&#39;s own name. |
-<a name="bytebase-v1-SendEmailLoginCodeRequest"></a>
+<a name="bytebase-v1-StartMFAEnrollmentRequest"></a>
-### SendEmailLoginCodeRequest
+### StartMFAEnrollmentRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| email | [string](#string) | | 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 | [string](#string) | optional | 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} |
+| name | [string](#string) | | Format: users/{email}. Must be the caller&#39;s own name. |
-<a name="bytebase-v1-SignupRequest"></a>
+<a name="bytebase-v1-StartMFAEnrollmentResponse"></a>
-### SignupRequest
+### StartMFAEnrollmentResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| email | [string](#string) | | 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 | [string](#string) | | The password for the new account. |
-| title | [string](#string) | | The display name of the user. |
+| otp_secret | [string](#string) | | The pending TOTP secret. The only response that carries it — it is never readable from the User resource. |
+| recovery_codes | [string](#string) | repeated | The pending recovery codes, shown once for the caller to save. |
+| expire_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When this enrollment stops being confirmable. |
+| pending_version | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | 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. |
-<a name="bytebase-v1-SwitchWorkspaceRequest"></a>
+<a name="bytebase-v1-UndeleteUserRequest"></a>
-### SwitchWorkspaceRequest
+### UndeleteUserRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| workspace | [string](#string) | | The target workspace to switch to. Format: workspaces/{workspace} |
-| web | [bool](#bool) | | If true, sets tokens as HTTP-only cookies (browser clients). |
-| otp_code | [string](#string) | optional | OTP code for MFA verification. Required if the target workspace enforces MFA. |
-| recovery_code | [string](#string) | optional | Recovery code for MFA verification (alternative to otp_code). |
-| mfa_temp_token | [string](#string) | optional | Temporary MFA token from a previous SwitchWorkspace call that returned mfa_temp_token. |
-
-
+| name | [string](#string) | | The name of the deleted user. Format: users/{email} |
-
-
-
+<a name="bytebase-v1-UpdateEmailRequest"></a>
-<a name="bytebase-v1-AuthService"></a>
+### UpdateEmailRequest
-### AuthService
-AuthService handles user authentication operations.
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| GetAuthenticationRestriction | [GetAuthenticationRestrictionRequest](#bytebase-v1-GetAuthenticationRestrictionRequest) | [AuthenticationInfo](#bytebase-v1-AuthenticationInfo) | Gets the effective restrictions needed to render authentication flows. Permissions required: None |
-| Login | [LoginRequest](#bytebase-v1-LoginRequest) | [LoginResponse](#bytebase-v1-LoginResponse) | Authenticates a user and returns access tokens. Permissions required: None |
-| Logout | [LogoutRequest](#bytebase-v1-LogoutRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Logs out the current user session. Permissions required: None |
-| ExchangeToken | [ExchangeTokenRequest](#bytebase-v1-ExchangeTokenRequest) | [ExchangeTokenResponse](#bytebase-v1-ExchangeTokenResponse) | 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) |
-| Signup | [SignupRequest](#bytebase-v1-SignupRequest) | [LoginResponse](#bytebase-v1-LoginResponse) | Registers a new user account. Creates a principal and assigns a workspace: - If the user&#39;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. |
-| Refresh | [RefreshRequest](#bytebase-v1-RefreshRequest) | [RefreshResponse](#bytebase-v1-RefreshResponse) | Refreshes the access token using the refresh token cookie. Permissions required: None (validates via refresh token cookie) |
-| SwitchWorkspace | [SwitchWorkspaceRequest](#bytebase-v1-SwitchWorkspaceRequest) | [LoginResponse](#bytebase-v1-LoginResponse) | Switches the current user&#39;s active workspace and issues new tokens. The user must be a member of the target workspace. |
-| RequestPasswordReset | [RequestPasswordResetRequest](#bytebase-v1-RequestPasswordResetRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Requests a password reset email for the given email address. Always returns success to avoid leaking whether the email exists. Requires the workspace&#39;s SMTP mail delivery setting; without it the recovery route is an admin password reset. Permissions required: None |
-| ResetPassword | [ResetPasswordRequest](#bytebase-v1-ResetPasswordRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Resets the user&#39;s password using a password reset token from email. Permissions required: None (validates via token) |
-| SendEmailLoginCode | [SendEmailLoginCodeRequest](#bytebase-v1-SendEmailLoginCodeRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | 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 |
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | 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 &#39;email&#39; field. |
+| email | [string](#string) | | The new email address. |
-<a name="v1_cel_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/cel_service.proto
+<a name="bytebase-v1-UpdateUserRequest"></a>
-<a name="bytebase-v1-BatchDeparseRequest"></a>
+### UpdateUserRequest
-### BatchDeparseRequest
-Request message for batch deparsing CEL expressions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| expressions | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | repeated | The CEL expression ASTs to deparse. |
-
-
-
-
-
-
-<a name="bytebase-v1-BatchDeparseResponse"></a>
-
-### BatchDeparseResponse
-Response message for batch deparsing CEL expressions.
+| user | [User](#bytebase-v1-User) | | The user to update.
+The user&#39;s `name` field is used to identify the user to update. Format: users/{email} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| allow_missing | [bool](#bool) | | If set to true, and the user is not found, a new user will be created. In this situation, `update_mask` is ignored. |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| expressions | [string](#string) | repeated | The deparsed CEL expressions as strings. |
+<a name="bytebase-v1-User"></a>
-<a name="bytebase-v1-BatchParseRequest"></a>
+### User
-### BatchParseRequest
-Request message for batch parsing CEL expressions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| expressions | [string](#string) | repeated | The CEL expression strings to parse. |
+| name | [string](#string) | | The name of the user. Format: users/{email} |
+| state | [State](#bytebase-v1-State) | | The lifecycle state of the user account. |
+| email | [string](#string) | | The email address of the user, used for login and notifications. |
+| title | [string](#string) | | The display title or full name of the user. |
+| password | [string](#string) | | The password for authentication. Only used during user creation or password updates. |
+| mfa_enabled | [bool](#bool) | | Whether the user has a live MFA factor. Set by ConfirmRecoveryCodes and DisableMFA, never by an update. |
+| phone | [string](#string) | | Should be a valid E.164 compliant phone number. Could be empty. |
+| profile | [User.Profile](#bytebase-v1-User-Profile) | | User profile metadata. |
+| groups | [string](#string) | repeated | The groups for the user. Format: groups/{email} |
+| workspace | [string](#string) | | The current workspace. Format: workspaces/{id} |
-<a name="bytebase-v1-BatchParseResponse"></a>
+<a name="bytebase-v1-User-Profile"></a>
+
+### User.Profile
-### BatchParseResponse
-Response message for batch parsing CEL expressions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| expressions | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | repeated | The parsed CEL expressions as AST. |
+| last_login_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time the user successfully logged in. |
+| last_change_password_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time the user changed their password. |
+| source | [string](#string) | | source means where the user comes from. For now we support Entra ID SCIM sync, so the source could be Entra ID. |
@@ -6273,530 +6262,558 @@ Response message for batch parsing CEL expressions.
-<a name="bytebase-v1-CelService"></a>
+<a name="bytebase-v1-UserService"></a>
-### CelService
-CelService manages CEL (Common Expression Language) parsing and formatting operations.
+### UserService
+UserService manages user accounts and authentication.
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
-| BatchParse | [BatchParseRequest](#bytebase-v1-BatchParseRequest) | [BatchParseResponse](#bytebase-v1-BatchParseResponse) | Parses multiple CEL expression strings into AST representations. Permissions required: None |
-| BatchDeparse | [BatchDeparseRequest](#bytebase-v1-BatchDeparseRequest) | [BatchDeparseResponse](#bytebase-v1-BatchDeparseResponse) | Converts multiple CEL AST representations back into expression strings. Permissions required: None |
+| GetUser | [GetUserRequest](#bytebase-v1-GetUserRequest) | [User](#bytebase-v1-User) | Get the user. Any authenticated user can get the user. Permissions required: bb.users.get |
+| BatchGetUsers | [BatchGetUsersRequest](#bytebase-v1-BatchGetUsersRequest) | [BatchGetUsersResponse](#bytebase-v1-BatchGetUsersResponse) | 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 |
+| GetCurrentUser | [.google.protobuf.Empty](#google-protobuf-Empty) | [User](#bytebase-v1-User) | Get the current authenticated user. Permissions required: None |
+| ListUsers | [ListUsersRequest](#bytebase-v1-ListUsersRequest) | [ListUsersResponse](#bytebase-v1-ListUsersResponse) | List all users. Any authenticated user can list users. Permissions required: bb.users.list |
+| CreateUser | [CreateUserRequest](#bytebase-v1-CreateUserRequest) | [User](#bytebase-v1-User) | Creates a user in the caller&#39;s workspace (admin action, self-hosted only). In SaaS mode, admins should add users via workspace IAM policy instead. Permissions required: bb.users.create |
+| UpdateUser | [UpdateUserRequest](#bytebase-v1-UpdateUserRequest) | [User](#bytebase-v1-User) | 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) |
+| DeleteUser | [DeleteUserRequest](#bytebase-v1-DeleteUserRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a user. Requires bb.users.delete permission with additional validation: the last remaining workspace admin cannot be deleted. Permissions required: bb.users.delete |
+| UndeleteUser | [UndeleteUserRequest](#bytebase-v1-UndeleteUserRequest) | [User](#bytebase-v1-User) | Restores a deleted user. Permissions required: bb.users.undelete |
+| UpdateEmail | [UpdateEmailRequest](#bytebase-v1-UpdateEmailRequest) | [User](#bytebase-v1-User) | Updates a user&#39;s email address. Permissions required: bb.users.updateEmail |
+| RequestReauthCode | [RequestReauthCodeRequest](#bytebase-v1-RequestReauthCodeRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Sends a one-time code to the caller&#39;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`. |
+| ChangePassword | [ChangePasswordRequest](#bytebase-v1-ChangePasswordRequest) | [User](#bytebase-v1-User) | Changes the caller&#39;s own password. An administrator resetting someone else&#39;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`. |
+| StartMFAEnrollment | [StartMFAEnrollmentRequest](#bytebase-v1-StartMFAEnrollmentRequest) | [StartMFAEnrollmentResponse](#bytebase-v1-StartMFAEnrollmentResponse) | Mints a pending TOTP secret and recovery codes for the caller&#39;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`. |
+| EnableMFA | [EnableMFARequest](#bytebase-v1-EnableMFARequest) | [User](#bytebase-v1-User) | 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. |
+| DisableMFA | [DisableMFARequest](#bytebase-v1-DisableMFARequest) | [User](#bytebase-v1-User) | Turns MFA off, clearing the entire MFA config — live and pending state alike. Callers may disable their own; an administrator may disable another user&#39;s with bb.users.update, which is how a locked-out user is recovered. Permissions required: bb.users.update, unless `name` is the caller&#39;s own. |
+| RegenerateRecoveryCodes | [RegenerateRecoveryCodesRequest](#bytebase-v1-RegenerateRecoveryCodesRequest) | [RegenerateRecoveryCodesResponse](#bytebase-v1-RegenerateRecoveryCodesResponse) | 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`. |
+| ConfirmRecoveryCodes | [ConfirmRecoveryCodesRequest](#bytebase-v1-ConfirmRecoveryCodesRequest) | [User](#bytebase-v1-User) | 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`. |
-<a name="v1_changelog_service-proto"></a>
+<a name="v1_auth_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
-## v1/changelog_service.proto
+## v1/auth_service.proto
-<a name="bytebase-v1-Changelog"></a>
+<a name="bytebase-v1-AuthenticationInfo"></a>
-### Changelog
+### AuthenticationInfo
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog} |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| status | [Changelog.Status](#bytebase-v1-Changelog-Status) | | |
-| schema | [string](#string) | | |
-| schema_size | [int64](#int64) | | |
-| task_run | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |
-| plan_title | [string](#string) | | The title of the plan associated with this changelog&#39;s task run. This field is populated by deriving the plan from task_run for display purposes. |
-
+| workspace | [string](#string) | | The workspace used for authentication, when one can be resolved. Format: workspaces/{workspace} |
+| restriction | [Restriction](#bytebase-v1-Restriction) | | The effective authentication restrictions. |
+| identity_providers | [LoginIdentityProvider](#bytebase-v1-LoginIdentityProvider) | repeated | The identity providers the login page renders, in display order. |
-<a name="bytebase-v1-GetChangelogRequest"></a>
-### GetChangelogRequest
+<a name="bytebase-v1-AuthorizationRequest"></a>
+### AuthorizationRequest
+AuthorizationRequest is what a browser needs to start an SSO redirect.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the changelog to retrieve. Format: instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog} |
-| view | [ChangelogView](#bytebase-v1-ChangelogView) | | |
+| endpoint | [string](#string) | | The OAuth2 auth_url, or the authorization endpoint from the OIDC issuer&#39;s discovery document. |
+| client_id | [string](#string) | | The OAuth2 or OIDC client identifier. |
+| scopes | [string](#string) | repeated | The scopes to request. |
-<a name="bytebase-v1-ListChangelogsRequest"></a>
+<a name="bytebase-v1-ExchangeTokenRequest"></a>
-### ListChangelogsRequest
+### ExchangeTokenRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent of the changelogs. Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} |
-| page_size | [int32](#int32) | | 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. |
-| page_token | [string](#string) | | 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 | [ChangelogView](#bytebase-v1-ChangelogView) | | |
-| filter | [string](#string) | | 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 &#34;==&#34; operation. check Changelog.Status for available values. - has_schema_snapshot: filters to changelogs with a schema snapshot; only &#34;has_schema_snapshot == true&#34; is supported. - create_time: the changelog create time in RFC 3339 format, supports &#34;&gt;=&#34;, &#34;&lt;=&#34;, or &#34;&lt;&#34; operator.
-
-Example: status == &#34;DONE&#34; status == &#34;FAILED&#34; has_schema_snapshot == true &amp;&amp; create_time &lt; &#34;2024-01-02T00:00:00Z&#34; |
+| token | [string](#string) | | External OIDC token (JWT) from CI/CD platform. |
+| email | [string](#string) | | Workload Identity email for identifying which identity to authenticate as. Format: {name}@workload.bytebase.com |
-<a name="bytebase-v1-ListChangelogsResponse"></a>
+<a name="bytebase-v1-ExchangeTokenResponse"></a>
-### ListChangelogsResponse
+### ExchangeTokenResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| changelogs | [Changelog](#bytebase-v1-Changelog) | repeated | The list of changelogs. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-
+| access_token | [string](#string) | | Bytebase access token. |
-
-<a name="bytebase-v1-Changelog-Status"></a>
+<a name="bytebase-v1-GetAuthenticationInfoRequest"></a>
-### Changelog.Status
+### GetAuthenticationInfoRequest
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| STATUS_UNSPECIFIED | 0 | |
-| PENDING | 1 | |
-| DONE | 2 | |
-| FAILED | 3 | |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| workspace | [string](#string) | | 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. |
-<a name="bytebase-v1-ChangelogView"></a>
-### ChangelogView
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| CHANGELOG_VIEW_UNSPECIFIED | 0 | The default / unset value. The API will default to the BASIC view. |
-| CHANGELOG_VIEW_BASIC | 1 | |
-| CHANGELOG_VIEW_FULL | 2 | |
+<a name="bytebase-v1-IdentityProviderContext"></a>
-
+### IdentityProviderContext
+Context for identity provider authentication.
-
-
-
-<a name="bytebase-v1-ChangelogService"></a>
-
-### ChangelogService
-ChangelogService manages database migration history.
-
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| ListChangelogs | [ListChangelogsRequest](#bytebase-v1-ListChangelogsRequest) | [ListChangelogsResponse](#bytebase-v1-ListChangelogsResponse) | Lists migration history for a database. Permissions required: bb.changelogs.list |
-| GetChangelog | [GetChangelogRequest](#bytebase-v1-GetChangelogRequest) | [Changelog](#bytebase-v1-Changelog) | Retrieves a specific changelog entry. Permissions required: bb.changelogs.get |
-
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| oauth2_context | [OAuth2IdentityProviderContext](#bytebase-v1-OAuth2IdentityProviderContext) | | OAuth2 authentication context. |
+| oidc_context | [OIDCIdentityProviderContext](#bytebase-v1-OIDCIdentityProviderContext) | | OpenID Connect authentication context. |
-<a name="v1_database_catalog_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/database_catalog_service.proto
-<a name="bytebase-v1-ColumnCatalog"></a>
+<a name="bytebase-v1-LoginIdentityProvider"></a>
-### ColumnCatalog
-Column metadata within a table.
+### LoginIdentityProvider
+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.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The column name. |
-| semantic_type | [string](#string) | | The semantic type describing the data purpose. |
-| labels | [ColumnCatalog.LabelsEntry](#bytebase-v1-ColumnCatalog-LabelsEntry) | repeated | User-defined labels for this column. |
-| classification | [string](#string) | | The data classification level for this column. |
-| object_schema | [ObjectSchema](#bytebase-v1-ObjectSchema) | optional | Object schema for complex column types like JSON. |
+| name | [string](#string) | | The name of the identity provider. Format: idps/{idp} |
+| type | [IdentityProviderType](#bytebase-v1-IdentityProviderType) | | The type of identity provider protocol. |
+| title | [string](#string) | | The display title of the identity provider. |
+| authorization_request | [AuthorizationRequest](#bytebase-v1-AuthorizationRequest) | | The parameters the browser needs to start the authorization redirect. Set for OAUTH2 and OIDC, absent for LDAP, whose bind happens server-side. |
-<a name="bytebase-v1-ColumnCatalog-LabelsEntry"></a>
+<a name="bytebase-v1-LoginRequest"></a>
-### ColumnCatalog.LabelsEntry
+### LoginRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [string](#string) | | |
+| email | [string](#string) | | User&#39;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 | [string](#string) | | User&#39;s password for authentication. Bounded for abuse only: LDAP directories may accept passwords beyond bcrypt&#39;s 72-byte limit, and the local-password path rejects longer inputs itself. |
+| web | [bool](#bool) | | 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. |
+| idp_name | [string](#string) | | The name of the identity provider. Format: idps/{idp} |
+| idp_context | [IdentityProviderContext](#bytebase-v1-IdentityProviderContext) | | The idp_context is used to get the user information from identity provider. |
+| otp_code | [string](#string) | optional | The otp_code is used to verify the user&#39;s identity by MFA. |
+| recovery_code | [string](#string) | optional | The recovery_code is used to recovery the user&#39;s identity with MFA. |
+| mfa_temp_token | [string](#string) | optional | The mfa_temp_token is used to verify the user&#39;s identity by MFA. |
+| email_code | [string](#string) | optional | 6-digit code from email for passwordless login/signup. Pairs with `email`. Mutually exclusive with `password` and `idp_name`. |
+| workspace | [string](#string) | optional | 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} |
-<a name="bytebase-v1-DatabaseCatalog"></a>
+<a name="bytebase-v1-LoginResponse"></a>
+
+### LoginResponse
-### DatabaseCatalog
-Catalog metadata for a database including schemas, tables, and columns.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database catalog. Format: instances/{instance}/databases/{database}/catalog or projects/{project}/instances/{instance}/databases/{database}/catalog |
-| schemas | [SchemaCatalog](#bytebase-v1-SchemaCatalog) | repeated | The schemas in the database. |
-
-
+| token | [string](#string) | | Access token for authenticated requests. Only returned when web=false. For web=true, the token is set as an HTTP-only cookie. |
+| mfa_temp_token | [string](#string) | optional | Temporary token for MFA verification. |
+| require_reset_password | [bool](#bool) | | Whether user must reset password before continuing. |
+| user | [User](#bytebase-v1-User) | | The user from the successful login. |
-<a name="bytebase-v1-GetDatabaseCatalogRequest"></a>
-### GetDatabaseCatalogRequest
-Request message for getting a database catalog.
+<a name="bytebase-v1-LogoutRequest"></a>
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database catalog to retrieve. Format: instances/{instance}/databases/{database}/catalog or projects/{project}/instances/{instance}/databases/{database}/catalog |
+### LogoutRequest
+Request to logout current user session.
-<a name="bytebase-v1-ObjectSchema"></a>
+<a name="bytebase-v1-OAuth2IdentityProviderContext"></a>
-### ObjectSchema
-Schema definition for object-type columns.
+### OAuth2IdentityProviderContext
+OAuth2 authentication context.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| type | [ObjectSchema.Type](#bytebase-v1-ObjectSchema-Type) | | The data type of this object. |
-| struct_kind | [ObjectSchema.StructKind](#bytebase-v1-ObjectSchema-StructKind) | | Struct schema. |
-| array_kind | [ObjectSchema.ArrayKind](#bytebase-v1-ObjectSchema-ArrayKind) | | Array schema. |
-| semantic_type | [string](#string) | | The semantic type of this object. |
+| code | [string](#string) | | Authorization code from OAuth2 provider. |
-<a name="bytebase-v1-ObjectSchema-ArrayKind"></a>
+<a name="bytebase-v1-OIDCIdentityProviderContext"></a>
-### ObjectSchema.ArrayKind
-Array type with element schema.
+### OIDCIdentityProviderContext
+OpenID Connect authentication context.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| kind | [ObjectSchema](#bytebase-v1-ObjectSchema) | | The schema of array elements. |
+| code | [string](#string) | | Authorization code from OIDC provider. |
-<a name="bytebase-v1-ObjectSchema-StructKind"></a>
+<a name="bytebase-v1-RefreshRequest"></a>
-### ObjectSchema.StructKind
-Structure type with named properties.
+### RefreshRequest
+Request to refresh the access token.
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| properties | [ObjectSchema.StructKind.PropertiesEntry](#bytebase-v1-ObjectSchema-StructKind-PropertiesEntry) | repeated | Properties of the struct. |
+<a name="bytebase-v1-RefreshResponse"></a>
+
+### RefreshResponse
+Response from refreshing the access token.
-<a name="bytebase-v1-ObjectSchema-StructKind-PropertiesEntry"></a>
-### ObjectSchema.StructKind.PropertiesEntry
+
+
+
+<a name="bytebase-v1-RequestPasswordResetRequest"></a>
+
+### RequestPasswordResetRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [ObjectSchema](#bytebase-v1-ObjectSchema) | | |
+| email | [string](#string) | | 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 | [string](#string) | optional | 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} |
-<a name="bytebase-v1-SchemaCatalog"></a>
+<a name="bytebase-v1-ResetPasswordRequest"></a>
+
+### ResetPasswordRequest
-### SchemaCatalog
-Schema metadata within a database.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The schema name. |
-| tables | [TableCatalog](#bytebase-v1-TableCatalog) | repeated | The tables in the schema. |
+| email | [string](#string) | | 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 | [string](#string) | | The 6-digit code from the reset email. |
+| new_password | [string](#string) | | The new password to set. |
-<a name="bytebase-v1-TableCatalog"></a>
+<a name="bytebase-v1-Restriction"></a>
+
+### Restriction
-### TableCatalog
-Table metadata within a schema.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The table name. |
-| columns | [TableCatalog.Columns](#bytebase-v1-TableCatalog-Columns) | | Regular table columns. |
-| object_schema | [ObjectSchema](#bytebase-v1-ObjectSchema) | | Object schema for JSON/XML columns. |
-| classification | [string](#string) | | The data classification level for this table. |
+| disallow_signup | [bool](#bool) | | Whether self-service user signup is disabled. |
+| disallow_password_signin | [bool](#bool) | | Whether password sign-in is disabled for all end users. |
+| password_restriction | [WorkspaceProfileSetting.PasswordRestriction](#bytebase-v1-WorkspaceProfileSetting-PasswordRestriction) | | Password complexity and restriction requirements. |
+| allow_email_code_signin | [bool](#bool) | | Whether email &#43; 6-digit code signin is enabled for this workspace. |
+| password_reset_enabled | [bool](#bool) | | Whether password reset via email is available for this workspace. True when the workspace (or deployment) has an email setting configured. |
-<a name="bytebase-v1-TableCatalog-Columns"></a>
+<a name="bytebase-v1-SendEmailLoginCodeRequest"></a>
+
+### SendEmailLoginCodeRequest
-### TableCatalog.Columns
-Column list for regular tables.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| columns | [ColumnCatalog](#bytebase-v1-ColumnCatalog) | repeated | The columns in the table. |
+| email | [string](#string) | | 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 | [string](#string) | optional | 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} |
-<a name="bytebase-v1-UpdateDatabaseCatalogRequest"></a>
+<a name="bytebase-v1-SignupRequest"></a>
+
+### SignupRequest
-### UpdateDatabaseCatalogRequest
-Request message for updating a database catalog.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| catalog | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | | The database catalog to update, identified by its `name` field. Format: instances/{instance}/databases/{database}/catalog or projects/{project}/instances/{instance}/databases/{database}/catalog
+| email | [string](#string) | | 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 | [string](#string) | | The password for the new account. |
+| title | [string](#string) | | The display name of the user. |
-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. |
-
+<a name="bytebase-v1-SwitchWorkspaceRequest"></a>
+### SwitchWorkspaceRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| workspace | [string](#string) | | The target workspace to switch to. Format: workspaces/{workspace} |
+| web | [bool](#bool) | | If true, sets tokens as HTTP-only cookies (browser clients). |
+| otp_code | [string](#string) | optional | OTP code for MFA verification. Required if the target workspace enforces MFA. |
+| recovery_code | [string](#string) | optional | Recovery code for MFA verification (alternative to otp_code). |
+| mfa_temp_token | [string](#string) | optional | Temporary MFA token from a previous SwitchWorkspace call that returned mfa_temp_token. |
-<a name="bytebase-v1-ObjectSchema-Type"></a>
-### ObjectSchema.Type
-Object schema data types.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | Unspecified type. |
-| STRING | 1 | String type. |
-| NUMBER | 2 | Number type. |
-| BOOLEAN | 3 | Boolean type. |
-| OBJECT | 4 | Object/struct type. |
-| ARRAY | 5 | Array type. |
+
-<a name="bytebase-v1-DatabaseCatalogService"></a>
-### DatabaseCatalogService
-DatabaseCatalogService manages database schema metadata and classification.
+<a name="bytebase-v1-AuthService"></a>
+
+### AuthService
+AuthService handles user authentication operations.
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
-| GetDatabaseCatalog | [GetDatabaseCatalogRequest](#bytebase-v1-GetDatabaseCatalogRequest) | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | Gets the catalog metadata for a database. Permissions required: bb.databaseCatalogs.get |
-| UpdateDatabaseCatalog | [UpdateDatabaseCatalogRequest](#bytebase-v1-UpdateDatabaseCatalogRequest) | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | Updates catalog metadata such as classifications and labels. Permissions required: bb.databaseCatalogs.update |
+| GetAuthenticationInfo | [GetAuthenticationInfoRequest](#bytebase-v1-GetAuthenticationInfoRequest) | [AuthenticationInfo](#bytebase-v1-AuthenticationInfo) | Gets everything the login page renders: the sign-in restrictions and the identity providers it offers. Permissions required: None |
+| Login | [LoginRequest](#bytebase-v1-LoginRequest) | [LoginResponse](#bytebase-v1-LoginResponse) | Authenticates a user and returns access tokens. Permissions required: None |
+| Logout | [LogoutRequest](#bytebase-v1-LogoutRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Logs out the current user session. Permissions required: None |
+| ExchangeToken | [ExchangeTokenRequest](#bytebase-v1-ExchangeTokenRequest) | [ExchangeTokenResponse](#bytebase-v1-ExchangeTokenResponse) | 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) |
+| Signup | [SignupRequest](#bytebase-v1-SignupRequest) | [LoginResponse](#bytebase-v1-LoginResponse) | Registers a new user account. Creates a principal and assigns a workspace: - If the user&#39;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. |
+| Refresh | [RefreshRequest](#bytebase-v1-RefreshRequest) | [RefreshResponse](#bytebase-v1-RefreshResponse) | Refreshes the access token using the refresh token cookie. Permissions required: None (validates via refresh token cookie) |
+| SwitchWorkspace | [SwitchWorkspaceRequest](#bytebase-v1-SwitchWorkspaceRequest) | [LoginResponse](#bytebase-v1-LoginResponse) | Switches the current user&#39;s active workspace and issues new tokens. The user must be a member of the target workspace. |
+| RequestPasswordReset | [RequestPasswordResetRequest](#bytebase-v1-RequestPasswordResetRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Requests a password reset email for the given email address. Always returns success to avoid leaking whether the email exists. Requires the workspace&#39;s SMTP mail delivery setting; without it the recovery route is an admin password reset. Permissions required: None |
+| ResetPassword | [ResetPasswordRequest](#bytebase-v1-ResetPasswordRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Resets the user&#39;s password using a password reset token from email. Permissions required: None (validates via token) |
+| SendEmailLoginCode | [SendEmailLoginCodeRequest](#bytebase-v1-SendEmailLoginCodeRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | 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 |
-<a name="v1_database_group_service-proto"></a>
+<a name="v1_cel_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
-## v1/database_group_service.proto
+## v1/cel_service.proto
-<a name="bytebase-v1-CreateDatabaseGroupRequest"></a>
+<a name="bytebase-v1-BatchDeparseRequest"></a>
-### CreateDatabaseGroupRequest
-Request message for creating a database group.
+### BatchDeparseRequest
+Request message for batch deparsing CEL expressions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent resource where this database group will be created. Format: projects/{project} |
-| database_group | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | | The database group to create. |
-| database_group_id | [string](#string) | | The ID to use for the database group, which will become the final component of the database group&#39;s resource name.
-
-This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
-| validate_only | [bool](#bool) | | If set, validate the create request and preview the full database group response, but do not actually create it. |
+| expressions | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | repeated | The CEL expression ASTs to deparse. |
-<a name="bytebase-v1-DatabaseGroup"></a>
+<a name="bytebase-v1-BatchDeparseResponse"></a>
-### DatabaseGroup
-A group of databases matched by expressions.
+### BatchDeparseResponse
+Response message for batch deparsing CEL expressions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database group. Format: projects/{project}/databaseGroups/{databaseGroup} |
-| title | [string](#string) | | The short name used in actual databases specified by users. |
-| database_expr | [google.type.Expr](#google-type-Expr) | | 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 &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34; operations. resource.instance_id: the instance resource id. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34;, &#34;contains&#34;, &#34;matches&#34;, &#34;startsWith&#34;, &#34;endsWith&#34; operations. resource.database_name: the database name. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34;, &#34;contains&#34;, &#34;matches&#34;, &#34;startsWith&#34;, &#34;endsWith&#34; operations. resource.database_labels: the database labels. Support map access operations. All variables should join with &#34;&amp;&amp;&#34; condition.
-
-For example: resource.environment_id == &#34;test&#34; &amp;&amp; resource.database_name.startsWith(&#34;sample_&#34;) resource.database_labels[&#34;tenant&#34;] == &#34;tenant1&#34; |
-| matched_databases | [DatabaseGroup.Database](#bytebase-v1-DatabaseGroup-Database) | repeated | The list of databases that match the database group condition. |
+| expressions | [string](#string) | repeated | The deparsed CEL expressions as strings. |
-<a name="bytebase-v1-DatabaseGroup-Database"></a>
+<a name="bytebase-v1-BatchParseRequest"></a>
-### DatabaseGroup.Database
-A database within a database group.
+### BatchParseRequest
+Request message for batch parsing CEL expressions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The resource name of the database. Format: instances/{instance}/databases/{database} |
+| expressions | [string](#string) | repeated | The CEL expression strings to parse. |
-<a name="bytebase-v1-DeleteDatabaseGroupRequest"></a>
+<a name="bytebase-v1-BatchParseResponse"></a>
-### DeleteDatabaseGroupRequest
-Request message for deleting a database group.
+### BatchParseResponse
+Response message for batch parsing CEL expressions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database group to delete. Format: projects/{project}/databaseGroups/{databaseGroup} |
+| expressions | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | repeated | The parsed CEL expressions as AST. |
+
+
+
+
+
+
+
+<a name="bytebase-v1-CelService"></a>
+
+### CelService
+CelService manages CEL (Common Expression Language) parsing and formatting operations.
+
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| BatchParse | [BatchParseRequest](#bytebase-v1-BatchParseRequest) | [BatchParseResponse](#bytebase-v1-BatchParseResponse) | Parses multiple CEL expression strings into AST representations. Permissions required: None |
+| BatchDeparse | [BatchDeparseRequest](#bytebase-v1-BatchDeparseRequest) | [BatchDeparseResponse](#bytebase-v1-BatchDeparseResponse) | Converts multiple CEL AST representations back into expression strings. Permissions required: None |
+
+
-<a name="bytebase-v1-GetDatabaseGroupRequest"></a>
-### GetDatabaseGroupRequest
-Request message for getting a database group.
+
+<a name="v1_changelog_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+
+## v1/changelog_service.proto
+
+
+
+<a name="bytebase-v1-Changelog"></a>
+
+### Changelog
+
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database group to retrieve. Format: projects/{project}/databaseGroups/{databaseGroup} |
-| view | [DatabaseGroupView](#bytebase-v1-DatabaseGroupView) | | The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. |
+| name | [string](#string) | | Format: instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog} |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| status | [Changelog.Status](#bytebase-v1-Changelog-Status) | | |
+| schema | [string](#string) | | |
+| schema_size | [int64](#int64) | | |
+| task_run | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |
+| plan_title | [string](#string) | | The title of the plan associated with this changelog&#39;s task run. This field is populated by deriving the plan from task_run for display purposes. |
-<a name="bytebase-v1-ListDatabaseGroupsRequest"></a>
+<a name="bytebase-v1-GetChangelogRequest"></a>
+
+### GetChangelogRequest
-### ListDatabaseGroupsRequest
-Request message for listing database groups.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent resource whose database groups are to be listed. Format: projects/{project} |
-| view | [DatabaseGroupView](#bytebase-v1-DatabaseGroupView) | | The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. |
+| name | [string](#string) | | The name of the changelog to retrieve. Format: instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog} |
+| view | [ChangelogView](#bytebase-v1-ChangelogView) | | |
-<a name="bytebase-v1-ListDatabaseGroupsResponse"></a>
+<a name="bytebase-v1-ListChangelogsRequest"></a>
+
+### ListChangelogsRequest
-### ListDatabaseGroupsResponse
-Response message for listing database groups.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| database_groups | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | repeated | The database groups from the specified request. |
+| parent | [string](#string) | | The parent of the changelogs. Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} |
+| page_size | [int32](#int32) | | 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. |
+| page_token | [string](#string) | | 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 | [ChangelogView](#bytebase-v1-ChangelogView) | | |
+| filter | [string](#string) | | 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 &#34;==&#34; operation. check Changelog.Status for available values. - has_schema_snapshot: filters to changelogs with a schema snapshot; only &#34;has_schema_snapshot == true&#34; is supported. - create_time: the changelog create time in RFC 3339 format, supports &#34;&gt;=&#34;, &#34;&lt;=&#34;, or &#34;&lt;&#34; operator.
+Example: status == &#34;DONE&#34; status == &#34;FAILED&#34; has_schema_snapshot == true &amp;&amp; create_time &lt; &#34;2024-01-02T00:00:00Z&#34; |
-<a name="bytebase-v1-UpdateDatabaseGroupRequest"></a>
-### UpdateDatabaseGroupRequest
-Request message for updating a database group.
+
+
+<a name="bytebase-v1-ListChangelogsResponse"></a>
+
+### ListChangelogsResponse
+
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| database_group | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | | The database group to update.
-
-The database group&#39;s `name` field is used to identify the database group to update. Format: projects/{project}/databaseGroups/{databaseGroup} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| allow_missing | [bool](#bool) | | 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. |
+| changelogs | [Changelog](#bytebase-v1-Changelog) | repeated | The list of changelogs. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
@@ -6805,16 +6822,30 @@ The database group&#39;s `name` field is used to identify the database group to
-<a name="bytebase-v1-DatabaseGroupView"></a>
+<a name="bytebase-v1-Changelog-Status"></a>
+
+### Changelog.Status
-### DatabaseGroupView
-View options for database group responses.
| Name | Number | Description |
| ---- | ------ | ----------- |
-| DATABASE_GROUP_VIEW_UNSPECIFIED | 0 | The default / unset value. The API will default to the BASIC view. |
-| DATABASE_GROUP_VIEW_BASIC | 1 | Include basic information about the database group, but exclude the list of matched databases and unmatched databases. |
-| DATABASE_GROUP_VIEW_FULL | 2 | Include everything. |
+| STATUS_UNSPECIFIED | 0 | |
+| PENDING | 1 | |
+| DONE | 2 | |
+| FAILED | 3 | |
+
+
+
+<a name="bytebase-v1-ChangelogView"></a>
+
+### ChangelogView
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| CHANGELOG_VIEW_UNSPECIFIED | 0 | The default / unset value. The API will default to the BASIC view. |
+| CHANGELOG_VIEW_BASIC | 1 | |
+| CHANGELOG_VIEW_FULL | 2 | |
@@ -6822,2775 +6853,2787 @@ View options for database group responses.
-<a name="bytebase-v1-DatabaseGroupService"></a>
+<a name="bytebase-v1-ChangelogService"></a>
-### DatabaseGroupService
-DatabaseGroupService manages database groups for organizing databases by criteria.
+### ChangelogService
+ChangelogService manages database migration history.
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
-| ListDatabaseGroups | [ListDatabaseGroupsRequest](#bytebase-v1-ListDatabaseGroupsRequest) | [ListDatabaseGroupsResponse](#bytebase-v1-ListDatabaseGroupsResponse) | Lists database groups in a project. Permissions required: bb.databaseGroups.list |
-| GetDatabaseGroup | [GetDatabaseGroupRequest](#bytebase-v1-GetDatabaseGroupRequest) | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | Gets a database group by name. Permissions required: bb.databaseGroups.get |
-| CreateDatabaseGroup | [CreateDatabaseGroupRequest](#bytebase-v1-CreateDatabaseGroupRequest) | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | Creates a new database group. Permissions required: bb.databaseGroups.create |
-| UpdateDatabaseGroup | [UpdateDatabaseGroupRequest](#bytebase-v1-UpdateDatabaseGroupRequest) | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | Updates a database group. Permissions required: bb.databaseGroups.update When allow_missing=true, also requires: bb.databaseGroups.create |
-| DeleteDatabaseGroup | [DeleteDatabaseGroupRequest](#bytebase-v1-DeleteDatabaseGroupRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a database group. Permissions required: bb.databaseGroups.delete |
+| ListChangelogs | [ListChangelogsRequest](#bytebase-v1-ListChangelogsRequest) | [ListChangelogsResponse](#bytebase-v1-ListChangelogsResponse) | Lists migration history for a database. Permissions required: bb.changelogs.list |
+| GetChangelog | [GetChangelogRequest](#bytebase-v1-GetChangelogRequest) | [Changelog](#bytebase-v1-Changelog) | Retrieves a specific changelog entry. Permissions required: bb.changelogs.get |
-<a name="v1_instance_role_service-proto"></a>
+<a name="v1_database_catalog_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
-## v1/instance_role_service.proto
+## v1/database_catalog_service.proto
-<a name="bytebase-v1-InstanceRole"></a>
+<a name="bytebase-v1-ColumnCatalog"></a>
-### InstanceRole
-InstanceRole is the API message for instance role.
+### ColumnCatalog
+Column metadata within a table.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | 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. |
-| role_name | [string](#string) | | The role name. It&#39;s unique within the instance. |
-| password | [string](#string) | optional | The role password. |
-| connection_limit | [int32](#int32) | optional | The connection count limit for this role. |
-| valid_until | [string](#string) | optional | The expiration for the role&#39;s password. |
-| attribute | [string](#string) | optional | 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&#39;s the global privileges as GRANT statements, which means it only contains &#34;GRANT ... ON *.* TO ...&#34;. Docs: https://dev.mysql.com/doc/refman/8.0/en/grant.html |
+| name | [string](#string) | | The column name. |
+| semantic_type | [string](#string) | | The semantic type describing the data purpose. |
+| labels | [ColumnCatalog.LabelsEntry](#bytebase-v1-ColumnCatalog-LabelsEntry) | repeated | User-defined labels for this column. |
+| classification | [string](#string) | | The data classification level for this column. |
+| object_schema | [ObjectSchema](#bytebase-v1-ObjectSchema) | optional | Object schema for complex column types like JSON. |
-<a name="bytebase-v1-ListInstanceRolesRequest"></a>
+<a name="bytebase-v1-ColumnCatalog-LabelsEntry"></a>
-### ListInstanceRolesRequest
+### ColumnCatalog.LabelsEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent, which owns this collection of roles. Format: instances/{instance} or projects/{project}/instances/{instance} |
-| page_size | [int32](#int32) | | 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. |
-| page_token | [string](#string) | | 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 | [bool](#bool) | | Refresh will refresh and return the latest data. |
-
+| key | [string](#string) | | |
+| value | [string](#string) | | |
-<a name="bytebase-v1-ListInstanceRolesResponse"></a>
-### ListInstanceRolesResponse
+<a name="bytebase-v1-DatabaseCatalog"></a>
+### DatabaseCatalog
+Catalog metadata for a database including schemas, tables, and columns.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| roles | [InstanceRole](#bytebase-v1-InstanceRole) | repeated | The roles from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+| name | [string](#string) | | The name of the database catalog. Format: instances/{instance}/databases/{database}/catalog or projects/{project}/instances/{instance}/databases/{database}/catalog |
+| schemas | [SchemaCatalog](#bytebase-v1-SchemaCatalog) | repeated | The schemas in the database. |
-
-
+<a name="bytebase-v1-GetDatabaseCatalogRequest"></a>
-
+### GetDatabaseCatalogRequest
+Request message for getting a database catalog.
-<a name="bytebase-v1-InstanceRoleService"></a>
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the database catalog to retrieve. Format: instances/{instance}/databases/{database}/catalog or projects/{project}/instances/{instance}/databases/{database}/catalog |
-### InstanceRoleService
-InstanceRoleService manages database roles within instances.
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| ListInstanceRoles | [ListInstanceRolesRequest](#bytebase-v1-ListInstanceRolesRequest) | [ListInstanceRolesResponse](#bytebase-v1-ListInstanceRolesResponse) | Lists all database roles in an instance. Permissions required: bb.instanceRoles.list |
-
-<a name="v1_instance_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
+<a name="bytebase-v1-ObjectSchema"></a>
-## v1/instance_service.proto
+### ObjectSchema
+Schema definition for object-type columns.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| type | [ObjectSchema.Type](#bytebase-v1-ObjectSchema-Type) | | The data type of this object. |
+| struct_kind | [ObjectSchema.StructKind](#bytebase-v1-ObjectSchema-StructKind) | | Struct schema. |
+| array_kind | [ObjectSchema.ArrayKind](#bytebase-v1-ObjectSchema-ArrayKind) | | Array schema. |
+| semantic_type | [string](#string) | | The semantic type of this object. |
-<a name="bytebase-v1-AddDataSourceRequest"></a>
-### AddDataSourceRequest
+<a name="bytebase-v1-ObjectSchema-ArrayKind"></a>
+
+### ObjectSchema.ArrayKind
+Array type with element schema.
+
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the instance to add a data source to. Format: instances/{instance} or projects/{project}/instances/{instance} |
-| data_source | [DataSource](#bytebase-v1-DataSource) | | Identified by data source ID. Only READ_ONLY data source can be added. |
-| validate_only | [bool](#bool) | | Validate only also tests the data source connection. |
-
+| kind | [ObjectSchema](#bytebase-v1-ObjectSchema) | | The schema of array elements. |
-<a name="bytebase-v1-BatchSyncInstancesRequest"></a>
-### BatchSyncInstancesRequest
+<a name="bytebase-v1-ObjectSchema-StructKind"></a>
+### ObjectSchema.StructKind
+Structure type with named properties.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | optional | 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 | [SyncInstanceRequest](#bytebase-v1-SyncInstanceRequest) | repeated | The request message specifying the instances to sync. A maximum of 1000 instances can be synced in a batch. |
+| properties | [ObjectSchema.StructKind.PropertiesEntry](#bytebase-v1-ObjectSchema-StructKind-PropertiesEntry) | repeated | Properties of the struct. |
-<a name="bytebase-v1-BatchSyncInstancesResponse"></a>
+<a name="bytebase-v1-ObjectSchema-StructKind-PropertiesEntry"></a>
-### BatchSyncInstancesResponse
+### ObjectSchema.StructKind.PropertiesEntry
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| key | [string](#string) | | |
+| value | [ObjectSchema](#bytebase-v1-ObjectSchema) | | |
+
-<a name="bytebase-v1-BatchUpdateInstancesRequest"></a>
-### BatchUpdateInstancesRequest
+<a name="bytebase-v1-SchemaCatalog"></a>
+### SchemaCatalog
+Schema metadata within a database.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | optional | 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 | [UpdateInstanceRequest](#bytebase-v1-UpdateInstanceRequest) | repeated | The request message specifying the resources to update. |
-
+| name | [string](#string) | | The schema name. |
+| tables | [TableCatalog](#bytebase-v1-TableCatalog) | repeated | The tables in the schema. |
-<a name="bytebase-v1-BatchUpdateInstancesResponse"></a>
-### BatchUpdateInstancesResponse
+<a name="bytebase-v1-TableCatalog"></a>
+### TableCatalog
+Table metadata within a schema.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| instances | [Instance](#bytebase-v1-Instance) | repeated | |
-
+| name | [string](#string) | | The table name. |
+| columns | [TableCatalog.Columns](#bytebase-v1-TableCatalog-Columns) | | Regular table columns. |
+| object_schema | [ObjectSchema](#bytebase-v1-ObjectSchema) | | Object schema for JSON/XML columns. |
+| classification | [string](#string) | | The data classification level for this table. |
-<a name="bytebase-v1-CreateInstanceRequest"></a>
-### CreateInstanceRequest
+<a name="bytebase-v1-TableCatalog-Columns"></a>
+### TableCatalog.Columns
+Column list for regular tables.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | optional | The parent, which owns this collection of instances. Format: projects/{project}. If omitted, the instance is created in the workspace collection. |
-| instance | [Instance](#bytebase-v1-Instance) | | The instance to create. |
-| instance_id | [string](#string) | | The ID to use for the instance, which will become the final component of the instance&#39;s resource name.
+| columns | [ColumnCatalog](#bytebase-v1-ColumnCatalog) | repeated | The columns in the table. |
-This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
-| validate_only | [bool](#bool) | | Validate only also tests the data source connection. |
+<a name="bytebase-v1-UpdateDatabaseCatalogRequest"></a>
-<a name="bytebase-v1-DataSource"></a>
-
-### DataSource
-
+### UpdateDatabaseCatalogRequest
+Request message for updating a database catalog.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| id | [string](#string) | | The unique identifier for this data source. |
-| type | [DataSourceType](#bytebase-v1-DataSourceType) | | The type of data source (ADMIN or READ_ONLY). |
-| username | [string](#string) | | The username for database authentication. |
-| password | [string](#string) | | The password for database authentication. |
-| use_ssl | [bool](#bool) | | Use SSL to connect to the data source. By default, we use system default SSL configuration. |
-| ssl_ca | [string](#string) | | The SSL certificate authority certificate. |
-| ssl_cert | [string](#string) | | The SSL client certificate. |
-| ssl_key | [string](#string) | | The SSL client private key. |
-| ssl_ca_path | [string](#string) | | The local filesystem path to the SSL certificate authority certificate. |
-| ssl_cert_path | [string](#string) | | The local filesystem path to the SSL client certificate. |
-| ssl_key_path | [string](#string) | | The local filesystem path to the SSL client private key. |
-| ssl_ca_set | [bool](#bool) | | Whether an SSL certificate authority certificate has been configured. |
-| ssl_cert_set | [bool](#bool) | | Whether an SSL client certificate has been configured. |
-| ssl_key_set | [bool](#bool) | | Whether an SSL client private key has been configured. |
-| ssl_ca_path_set | [bool](#bool) | | Whether an SSL certificate authority path has been configured. |
-| ssl_cert_path_set | [bool](#bool) | | Whether an SSL client certificate path has been configured. |
-| ssl_key_path_set | [bool](#bool) | | Whether an SSL client private key path has been configured. |
-| verify_tls_certificate | [bool](#bool) | | 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 | [string](#string) | | The hostname or IP address of the database server. |
-| port | [string](#string) | | The port number of the database server. |
-| database | [string](#string) | | The name of the database to connect to. |
-| srv | [bool](#bool) | | 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. |
-| authentication_database | [string](#string) | | authentication_database is the database name to authenticate against, which stores the user credentials. |
-| replica_set | [string](#string) | | replica_set is used for MongoDB replica set. |
-| sid | [string](#string) | | sid and service_name are used for Oracle. |
-| service_name | [string](#string) | | |
-| ssh_host | [string](#string) | | Connection over SSH. The hostname of the SSH server agent. Required. |
-| ssh_port | [string](#string) | | The port of the SSH server agent. It&#39;s 22 typically. Required. |
-| ssh_user | [string](#string) | | The user to login the server. Required. |
-| ssh_password | [string](#string) | | The password to login the server. If it&#39;s empty string, no password is required. |
-| ssh_private_key | [string](#string) | | The private key to login the server. If it&#39;s empty string, we will use the system default private key from os.Getenv(&#34;SSH_AUTH_SOCK&#34;). |
-| authentication_private_key | [string](#string) | | PKCS#8 private key in PEM format. If it&#39;s empty string, no private key is required. Used for authentication when connecting to the data source. |
-| authentication_private_key_passphrase | [string](#string) | | Passphrase for the encrypted PKCS#8 private key. Only used when the private key is encrypted. |
-| external_secret | [DataSourceExternalSecret](#bytebase-v1-DataSourceExternalSecret) | | |
-| authentication_type | [DataSource.AuthenticationType](#bytebase-v1-DataSource-AuthenticationType) | | |
-| cloud_sql_ip_type | [DataSource.CloudSQLIPType](#bytebase-v1-DataSource-CloudSQLIPType) | | 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. |
-| azure_credential | [DataSource.AzureCredential](#bytebase-v1-DataSource-AzureCredential) | | |
-| aws_credential | [DataSource.AWSCredential](#bytebase-v1-DataSource-AWSCredential) | | |
-| gcp_credential | [DataSource.GCPCredential](#bytebase-v1-DataSource-GCPCredential) | | |
-| sasl_config | [SASLConfig](#bytebase-v1-SASLConfig) | | |
-| additional_addresses | [DataSource.Address](#bytebase-v1-DataSource-Address) | repeated | additional_addresses is used for MongoDB replica set. |
-| direct_connection | [bool](#bool) | | direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string. |
-| region | [string](#string) | | region is the location of where the DB is, works for AWS RDS. For example, us-east-1. |
-| warehouse_id | [string](#string) | | warehouse_id is used by Databricks. |
-| master_name | [string](#string) | | master_name is the master name used by connecting redis-master via redis sentinel. |
-| master_username | [string](#string) | | master_username and master_password are master credentials used by redis sentinel mode. |
-| master_password | [string](#string) | | |
-| redis_type | [DataSource.RedisType](#bytebase-v1-DataSource-RedisType) | | |
-| extra_connection_parameters | [DataSource.ExtraConnectionParametersEntry](#bytebase-v1-DataSource-ExtraConnectionParametersEntry) | repeated | Extra connection parameters for the database connection. For PostgreSQL HA, this can be used to set target_session_attrs=read-write |
-| project_id | [string](#string) | | 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). |
-| instance_id | [string](#string) | | |
-
-
+| catalog | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | | 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. |
-<a name="bytebase-v1-DataSource-AWSCredential"></a>
-### DataSource.AWSCredential
+
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| access_key_id | [string](#string) | | |
-| secret_access_key | [string](#string) | | |
-| session_token | [string](#string) | | |
-| role_arn | [string](#string) | | ARN of IAM role to assume for cross-account access. See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html |
-| external_id | [string](#string) | | 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 |
+<a name="bytebase-v1-ObjectSchema-Type"></a>
+### ObjectSchema.Type
+Object schema data types.
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | Unspecified type. |
+| STRING | 1 | String type. |
+| NUMBER | 2 | Number type. |
+| BOOLEAN | 3 | Boolean type. |
+| OBJECT | 4 | Object/struct type. |
+| ARRAY | 5 | Array type. |
+
+
-<a name="bytebase-v1-DataSource-Address"></a>
-### DataSource.Address
+<a name="bytebase-v1-DatabaseCatalogService"></a>
+### DatabaseCatalogService
+DatabaseCatalogService manages database schema metadata and classification.
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| GetDatabaseCatalog | [GetDatabaseCatalogRequest](#bytebase-v1-GetDatabaseCatalogRequest) | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | Gets the catalog metadata for a database. Permissions required: bb.databaseCatalogs.get |
+| UpdateDatabaseCatalog | [UpdateDatabaseCatalogRequest](#bytebase-v1-UpdateDatabaseCatalogRequest) | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | Updates catalog metadata such as classifications and labels. Permissions required: bb.databaseCatalogs.update |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| host | [string](#string) | | |
-| port | [string](#string) | | |
+
+<a name="v1_database_group_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/database_group_service.proto
-<a name="bytebase-v1-DataSource-AzureCredential"></a>
-### DataSource.AzureCredential
+<a name="bytebase-v1-CreateDatabaseGroupRequest"></a>
+### CreateDatabaseGroupRequest
+Request message for creating a database group.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| tenant_id | [string](#string) | | |
-| client_id | [string](#string) | | |
-| client_secret | [string](#string) | | |
+| parent | [string](#string) | | The parent resource where this database group will be created. Format: projects/{project} |
+| database_group | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | | The database group to create. |
+| database_group_id | [string](#string) | | The ID to use for the database group, which will become the final component of the database group&#39;s resource name.
+This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
+| validate_only | [bool](#bool) | | If set, validate the create request and preview the full database group response, but do not actually create it. |
-<a name="bytebase-v1-DataSource-ExtraConnectionParametersEntry"></a>
-### DataSource.ExtraConnectionParametersEntry
+<a name="bytebase-v1-DatabaseGroup"></a>
+### DatabaseGroup
+A group of databases matched by expressions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [string](#string) | | |
+| name | [string](#string) | | The name of the database group. Format: projects/{project}/databaseGroups/{databaseGroup} |
+| title | [string](#string) | | The short name used in actual databases specified by users. |
+| database_expr | [google.type.Expr](#google-type-Expr) | | 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 &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34; operations. resource.instance_id: the instance resource id. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34;, &#34;contains&#34;, &#34;matches&#34;, &#34;startsWith&#34;, &#34;endsWith&#34; operations. resource.database_name: the database name. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34;, &#34;contains&#34;, &#34;matches&#34;, &#34;startsWith&#34;, &#34;endsWith&#34; operations. resource.database_labels: the database labels. Support map access operations. All variables should join with &#34;&amp;&amp;&#34; condition.
+For example: resource.environment_id == &#34;test&#34; &amp;&amp; resource.database_name.startsWith(&#34;sample_&#34;) resource.database_labels[&#34;tenant&#34;] == &#34;tenant1&#34; |
+| matched_databases | [DatabaseGroup.Database](#bytebase-v1-DatabaseGroup-Database) | repeated | The list of databases that match the database group condition. |
-<a name="bytebase-v1-DataSource-GCPCredential"></a>
-### DataSource.GCPCredential
+<a name="bytebase-v1-DatabaseGroup-Database"></a>
+
+### DatabaseGroup.Database
+A database within a database group.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| content | [string](#string) | | |
-
+| name | [string](#string) | | The resource name of the database. Format: instances/{instance}/databases/{database} |
-<a name="bytebase-v1-DataSourceExternalSecret"></a>
-### DataSourceExternalSecret
+<a name="bytebase-v1-DeleteDatabaseGroupRequest"></a>
+### DeleteDatabaseGroupRequest
+Request message for deleting a database group.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| secret_type | [DataSourceExternalSecret.SecretType](#bytebase-v1-DataSourceExternalSecret-SecretType) | | The type of external secret store. |
-| url | [string](#string) | | The URL of the external secret store. |
-| auth_type | [DataSourceExternalSecret.AuthType](#bytebase-v1-DataSourceExternalSecret-AuthType) | | The authentication method for accessing the secret store. |
-| app_role | [DataSourceExternalSecret.AppRoleAuthOption](#bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption) | | AppRole authentication configuration. |
-| token | [string](#string) | | Token for direct authentication. Interpreted according to token_type: the literal token (PLAIN), an environment variable name (ENVIRONMENT), or a file path (FILE). |
-| token_type | [DataSourceExternalSecret.TokenType](#bytebase-v1-DataSourceExternalSecret-TokenType) | | How to interpret the token field when auth_type is TOKEN. |
-| engine_name | [string](#string) | | engine name is the name for secret engine. |
-| secret_name | [string](#string) | | the secret name in the engine to store the password. |
-| password_key_name | [string](#string) | | the key name for the password. |
-| skip_vault_tls_verification | [bool](#bool) | | 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. |
-| vault_ssl_ca | [string](#string) | | CA certificate for Vault server verification. |
-| vault_ssl_cert | [string](#string) | | Client certificate for mutual TLS authentication with Vault. |
-| vault_ssl_key | [string](#string) | | Client private key for mutual TLS authentication with Vault. |
-
+| name | [string](#string) | | The name of the database group to delete. Format: projects/{project}/databaseGroups/{databaseGroup} |
-<a name="bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption"></a>
-### DataSourceExternalSecret.AppRoleAuthOption
+<a name="bytebase-v1-GetDatabaseGroupRequest"></a>
+### GetDatabaseGroupRequest
+Request message for getting a database group.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| role_id | [string](#string) | | The role ID for Vault AppRole authentication. |
-| secret_id | [string](#string) | | the secret id for the role without ttl. |
-| type | [DataSourceExternalSecret.AppRoleAuthOption.SecretType](#bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption-SecretType) | | The type of secret for AppRole authentication. |
-| mount_path | [string](#string) | | The path where the approle auth method is mounted. |
-
+| name | [string](#string) | | The name of the database group to retrieve. Format: projects/{project}/databaseGroups/{databaseGroup} |
+| view | [DatabaseGroupView](#bytebase-v1-DatabaseGroupView) | | The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. |
-<a name="bytebase-v1-DeleteInstanceRequest"></a>
-### DeleteInstanceRequest
+<a name="bytebase-v1-ListDatabaseGroupsRequest"></a>
+### ListDatabaseGroupsRequest
+Request message for listing database groups.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the instance to delete. Format: instances/{instance} or projects/{project}/instances/{instance} |
-| force | [bool](#bool) | | If set to true, a workspace instance&#39;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 | [bool](#bool) | | 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. |
-
+| parent | [string](#string) | | The parent resource whose database groups are to be listed. Format: projects/{project} |
+| view | [DatabaseGroupView](#bytebase-v1-DatabaseGroupView) | | The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. |
-<a name="bytebase-v1-GetInstanceRequest"></a>
-### GetInstanceRequest
+<a name="bytebase-v1-ListDatabaseGroupsResponse"></a>
+### ListDatabaseGroupsResponse
+Response message for listing database groups.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the instance to retrieve. Format: instances/{instance} or projects/{project}/instances/{instance} |
-
+| database_groups | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | repeated | The database groups from the specified request. |
-<a name="bytebase-v1-Instance"></a>
-### Instance
+<a name="bytebase-v1-UpdateDatabaseGroupRequest"></a>
+### UpdateDatabaseGroupRequest
+Request message for updating a database group.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the instance. Format: instances/{instance} or projects/{project}/instances/{instance} |
-| state | [State](#bytebase-v1-State) | | The lifecycle state of the instance. |
-| title | [string](#string) | | The display title of the instance. |
-| engine | [Engine](#bytebase-v1-Engine) | | The database engine type. |
-| engine_version | [string](#string) | | The version of the database engine. |
-| external_link | [string](#string) | | External URL to the database instance console. |
-| data_sources | [DataSource](#bytebase-v1-DataSource) | repeated | Data source configurations for connecting to the instance. |
-| environment | [string](#string) | optional | The environment resource. Format: environments/prod where prod is the environment resource ID. |
-| activation | [bool](#bool) | | Whether the instance is activated for use. |
-| roles | [InstanceRole](#bytebase-v1-InstanceRole) | repeated | Database roles available in this instance. |
-| sync_interval | [google.protobuf.Duration](#google-protobuf-Duration) | | How often the instance is synced. |
-| sync_databases | [SyncDatabases](#bytebase-v1-SyncDatabases) | | Enable sync for following databases. Not set means sync all schemas &amp; databases. |
-| last_sync_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time the instance was synced. |
-| labels | [Instance.LabelsEntry](#bytebase-v1-Instance-LabelsEntry) | repeated | Labels are key-value pairs that can be attached to the instance. For example, { &#34;org_group&#34;: &#34;infrastructure&#34;, &#34;environment&#34;: &#34;production&#34; } |
-
-
+| database_group | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | | The database group to update.
+The database group&#39;s `name` field is used to identify the database group to update. Format: projects/{project}/databaseGroups/{databaseGroup} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| allow_missing | [bool](#bool) | | 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. |
-<a name="bytebase-v1-Instance-LabelsEntry"></a>
-### Instance.LabelsEntry
+
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [string](#string) | | |
+<a name="bytebase-v1-DatabaseGroupView"></a>
+### DatabaseGroupView
+View options for database group responses.
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| DATABASE_GROUP_VIEW_UNSPECIFIED | 0 | The default / unset value. The API will default to the BASIC view. |
+| DATABASE_GROUP_VIEW_BASIC | 1 | Include basic information about the database group, but exclude the list of matched databases and unmatched databases. |
+| DATABASE_GROUP_VIEW_FULL | 2 | Include everything. |
+
+
-<a name="bytebase-v1-InstanceResource"></a>
-### InstanceResource
+<a name="bytebase-v1-DatabaseGroupService"></a>
+### DatabaseGroupService
+DatabaseGroupService manages database groups for organizing databases by criteria.
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| ListDatabaseGroups | [ListDatabaseGroupsRequest](#bytebase-v1-ListDatabaseGroupsRequest) | [ListDatabaseGroupsResponse](#bytebase-v1-ListDatabaseGroupsResponse) | Lists database groups in a project. Permissions required: bb.databaseGroups.list |
+| GetDatabaseGroup | [GetDatabaseGroupRequest](#bytebase-v1-GetDatabaseGroupRequest) | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | Gets a database group by name. Permissions required: bb.databaseGroups.get |
+| CreateDatabaseGroup | [CreateDatabaseGroupRequest](#bytebase-v1-CreateDatabaseGroupRequest) | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | Creates a new database group. Permissions required: bb.databaseGroups.create |
+| UpdateDatabaseGroup | [UpdateDatabaseGroupRequest](#bytebase-v1-UpdateDatabaseGroupRequest) | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | Updates a database group. Permissions required: bb.databaseGroups.update When allow_missing=true, also requires: bb.databaseGroups.create |
+| DeleteDatabaseGroup | [DeleteDatabaseGroupRequest](#bytebase-v1-DeleteDatabaseGroupRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a database group. Permissions required: bb.databaseGroups.delete |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| title | [string](#string) | | The display title of the instance. |
-| engine | [Engine](#bytebase-v1-Engine) | | The database engine type. |
-| engine_version | [string](#string) | | The version of the database engine. |
-| data_sources | [DataSource](#bytebase-v1-DataSource) | repeated | Data source configurations for the instance. |
-| activation | [bool](#bool) | | Whether the instance is activated. |
-| name | [string](#string) | | The name of the instance. Format: instances/{instance} or projects/{project}/instances/{instance} |
-| environment | [string](#string) | optional | The environment resource. Format: environments/prod where prod is the environment resource ID. |
+
+<a name="v1_instance_role_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/instance_role_service.proto
-<a name="bytebase-v1-KerberosConfig"></a>
-### KerberosConfig
+<a name="bytebase-v1-InstanceRole"></a>
+### InstanceRole
+InstanceRole is the API message for instance role.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| primary | [string](#string) | | The primary component of the Kerberos principal. |
-| instance | [string](#string) | | The instance component of the Kerberos principal. |
-| realm | [string](#string) | | The Kerberos realm. |
-| keytab | [bytes](#bytes) | | The keytab file contents for authentication. |
-| kdc_host | [string](#string) | | The hostname of the Key Distribution Center (KDC). |
-| kdc_port | [string](#string) | | The port of the Key Distribution Center (KDC). |
-| kdc_transport_protocol | [string](#string) | | The transport protocol for KDC communication (tcp or udp). |
+| name | [string](#string) | | 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. |
+| role_name | [string](#string) | | The role name. It&#39;s unique within the instance. |
+| password | [string](#string) | optional | The role password. |
+| connection_limit | [int32](#int32) | optional | The connection count limit for this role. |
+| valid_until | [string](#string) | optional | The expiration for the role&#39;s password. |
+| attribute | [string](#string) | optional | 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&#39;s the global privileges as GRANT statements, which means it only contains &#34;GRANT ... ON *.* TO ...&#34;. Docs: https://dev.mysql.com/doc/refman/8.0/en/grant.html |
-<a name="bytebase-v1-ListInstanceDatabaseRequest"></a>
+<a name="bytebase-v1-ListInstanceRolesRequest"></a>
-### ListInstanceDatabaseRequest
+### ListInstanceRolesRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the instance. Format: instances/{instance} or projects/{project}/instances/{instance} |
-| instance | [Instance](#bytebase-v1-Instance) | optional | The target instance. We need to set this field if the target instance is not created yet. |
+| parent | [string](#string) | | The parent, which owns this collection of roles. Format: instances/{instance} or projects/{project}/instances/{instance} |
+| page_size | [int32](#int32) | | 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. |
+| page_token | [string](#string) | | 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 | [bool](#bool) | | Refresh will refresh and return the latest data. |
-<a name="bytebase-v1-ListInstanceDatabaseResponse"></a>
-### ListInstanceDatabaseResponse
+<a name="bytebase-v1-ListInstanceRolesResponse"></a>
+
+### ListInstanceRolesResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| databases | [string](#string) | repeated | All database name list in the instance. |
+| roles | [InstanceRole](#bytebase-v1-InstanceRole) | repeated | The roles from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+
-<a name="bytebase-v1-ListInstancesRequest"></a>
+
-### ListInstancesRequest
+
+<a name="bytebase-v1-InstanceRoleService"></a>
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | optional | 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. |
-| page_size | [int32](#int32) | | 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. |
-| page_token | [string](#string) | | A page token, received from a previous `ListInstances` call. Provide this to retrieve the subsequent page.
+### InstanceRoleService
+InstanceRoleService manages database roles within instances.
-When paginating, all other parameters provided to `ListInstances` must match the call that provided the page token. |
-| show_deleted | [bool](#bool) | | Show deleted instances if specified. |
-| filter | [string](#string) | | Filter the instance. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| ListInstanceRoles | [ListInstanceRolesRequest](#bytebase-v1-ListInstanceRolesRequest) | [ListInstanceRolesResponse](#bytebase-v1-ListInstanceRolesResponse) | Lists all database roles in an instance. Permissions required: bb.instanceRoles.list |
-Supported filters: - name: the instance name, support &#34;==&#34; and &#34;.contains()&#34; operator. - resource_id: the instance id, support &#34;==&#34; and &#34;.contains()&#34; operator. - environment: the environment full name in &#34;environments/{id}&#34; format, support &#34;==&#34; operator. - state: the instance state, check State enum for values, support &#34;==&#34; operator. - engine: the instance engine, check Engine enum for values. Support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator. - host: the instance host, support &#34;==&#34; and &#34;.contains()&#34; operator. - port: the instance port, support &#34;==&#34; and &#34;.contains()&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator. - labels.{key}: the instance label, support &#34;==&#34; and &#34;in&#34; operators.
+
-For example: name == &#34;sample instance&#34; name.contains(&#34;sample&#34;) resource_id == &#34;sample-instance&#34; resource_id.contains(&#34;sample&#34;) state == &#34;DELETED&#34; environment == &#34;environments/test&#34; environment == &#34;&#34; (find instances which environment is not set) engine == &#34;MYSQL&#34; engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;] !(engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;]) host == &#34;127.0.0.1&#34; host.contains(&#34;127.0&#34;) port == &#34;54321&#34; port.contains(&#34;543&#34;) labels.org_group == &#34;infrastructure&#34; labels.environment in [&#34;prod&#34;, &#34;production&#34;] project == &#34;projects/sample-project&#34; You can combine filter conditions like: name.contains(&#34;sample&#34;) &amp;&amp; environment == &#34;environments/test&#34; host == &#34;127.0.0.1&#34; &amp;&amp; port == &#34;54321&#34; |
-| order_by | [string](#string) | | The order by of instances. Support title, environment. The default sorting order is ascending. For example: - order_by = &#34;title&#34; - order_by = &#34;title desc&#34; - order_by = &#34;title desc, environment asc&#34; |
+<a name="v1_instance_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/instance_service.proto
-<a name="bytebase-v1-ListInstancesResponse"></a>
+<a name="bytebase-v1-AddDataSourceRequest"></a>
-### ListInstancesResponse
+### AddDataSourceRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| instances | [Instance](#bytebase-v1-Instance) | repeated | The instances from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+| name | [string](#string) | | The name of the instance to add a data source to. Format: instances/{instance} or projects/{project}/instances/{instance} |
+| data_source | [DataSource](#bytebase-v1-DataSource) | | Identified by data source ID. Only READ_ONLY data source can be added. |
+| validate_only | [bool](#bool) | | Validate only also tests the data source connection. |
-<a name="bytebase-v1-PrepareSampleProjectInstanceRequest"></a>
+<a name="bytebase-v1-BatchSyncInstancesRequest"></a>
-### PrepareSampleProjectInstanceRequest
+### BatchSyncInstancesRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The project that owns the sample instance. Format: projects/{project} |
+| parent | [string](#string) | optional | 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 | [SyncInstanceRequest](#bytebase-v1-SyncInstanceRequest) | repeated | The request message specifying the instances to sync. A maximum of 1000 instances can be synced in a batch. |
-<a name="bytebase-v1-RemoveDataSourceRequest"></a>
+<a name="bytebase-v1-BatchSyncInstancesResponse"></a>
+
+### BatchSyncInstancesResponse
+
+
-### RemoveDataSourceRequest
+
+
+
+
+<a name="bytebase-v1-BatchUpdateInstancesRequest"></a>
+
+### BatchUpdateInstancesRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the instance to remove a data source from. Format: instances/{instance} or projects/{project}/instances/{instance} |
-| data_source | [DataSource](#bytebase-v1-DataSource) | | Identified by data source ID. Only READ_ONLY data source can be removed. |
+| parent | [string](#string) | optional | 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 | [UpdateInstanceRequest](#bytebase-v1-UpdateInstanceRequest) | repeated | The request message specifying the resources to update. |
-<a name="bytebase-v1-SASLConfig"></a>
+<a name="bytebase-v1-BatchUpdateInstancesResponse"></a>
-### SASLConfig
+### BatchUpdateInstancesResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| krb_config | [KerberosConfig](#bytebase-v1-KerberosConfig) | | Kerberos authentication configuration. |
+| instances | [Instance](#bytebase-v1-Instance) | repeated | |
-<a name="bytebase-v1-SyncDatabases"></a>
+<a name="bytebase-v1-CreateInstanceRequest"></a>
-### SyncDatabases
+### CreateInstanceRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| databases | [string](#string) | repeated | |
+| parent | [string](#string) | optional | The parent, which owns this collection of instances. Format: projects/{project}. If omitted, the instance is created in the workspace collection. |
+| instance | [Instance](#bytebase-v1-Instance) | | The instance to create. |
+| instance_id | [string](#string) | | The ID to use for the instance, which will become the final component of the instance&#39;s resource name.
+This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
+| validate_only | [bool](#bool) | | Validate only also tests the data source connection. |
-<a name="bytebase-v1-SyncInstanceRequest"></a>
-### SyncInstanceRequest
+<a name="bytebase-v1-DataSource"></a>
+
+### DataSource
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of instance. Format: instances/{instance} or projects/{project}/instances/{instance} |
-| enable_full_sync | [bool](#bool) | | 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. |
+| id | [string](#string) | | The unique identifier for this data source. |
+| type | [DataSourceType](#bytebase-v1-DataSourceType) | | The type of data source (ADMIN or READ_ONLY). |
+| username | [string](#string) | | The username for database authentication. |
+| password | [string](#string) | | The password for database authentication. |
+| use_ssl | [bool](#bool) | | Use SSL to connect to the data source. By default, we use system default SSL configuration. |
+| ssl_ca | [string](#string) | | The SSL certificate authority certificate. |
+| ssl_cert | [string](#string) | | The SSL client certificate. |
+| ssl_key | [string](#string) | | The SSL client private key. |
+| ssl_ca_path | [string](#string) | | The local filesystem path to the SSL certificate authority certificate. |
+| ssl_cert_path | [string](#string) | | The local filesystem path to the SSL client certificate. |
+| ssl_key_path | [string](#string) | | The local filesystem path to the SSL client private key. |
+| ssl_ca_set | [bool](#bool) | | Whether an SSL certificate authority certificate has been configured. |
+| ssl_cert_set | [bool](#bool) | | Whether an SSL client certificate has been configured. |
+| ssl_key_set | [bool](#bool) | | Whether an SSL client private key has been configured. |
+| ssl_ca_path_set | [bool](#bool) | | Whether an SSL certificate authority path has been configured. |
+| ssl_cert_path_set | [bool](#bool) | | Whether an SSL client certificate path has been configured. |
+| ssl_key_path_set | [bool](#bool) | | Whether an SSL client private key path has been configured. |
+| verify_tls_certificate | [bool](#bool) | | 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 | [string](#string) | | The hostname or IP address of the database server. |
+| port | [string](#string) | | The port number of the database server. |
+| database | [string](#string) | | The name of the database to connect to. |
+| srv | [bool](#bool) | | 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. |
+| authentication_database | [string](#string) | | authentication_database is the database name to authenticate against, which stores the user credentials. |
+| replica_set | [string](#string) | | replica_set is used for MongoDB replica set. |
+| sid | [string](#string) | | sid and service_name are used for Oracle. |
+| service_name | [string](#string) | | |
+| ssh_host | [string](#string) | | Connection over SSH. The hostname of the SSH server agent. Required. |
+| ssh_port | [string](#string) | | The port of the SSH server agent. It&#39;s 22 typically. Required. |
+| ssh_user | [string](#string) | | The user to login the server. Required. |
+| ssh_password | [string](#string) | | The password to login the server. If it&#39;s empty string, no password is required. |
+| ssh_private_key | [string](#string) | | The private key to login the server. If it&#39;s empty string, we will use the system default private key from os.Getenv(&#34;SSH_AUTH_SOCK&#34;). |
+| authentication_private_key | [string](#string) | | PKCS#8 private key in PEM format. If it&#39;s empty string, no private key is required. Used for authentication when connecting to the data source. |
+| authentication_private_key_passphrase | [string](#string) | | Passphrase for the encrypted PKCS#8 private key. Only used when the private key is encrypted. |
+| external_secret | [DataSourceExternalSecret](#bytebase-v1-DataSourceExternalSecret) | | |
+| authentication_type | [DataSource.AuthenticationType](#bytebase-v1-DataSource-AuthenticationType) | | |
+| cloud_sql_ip_type | [DataSource.CloudSQLIPType](#bytebase-v1-DataSource-CloudSQLIPType) | | 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. |
+| azure_credential | [DataSource.AzureCredential](#bytebase-v1-DataSource-AzureCredential) | | |
+| aws_credential | [DataSource.AWSCredential](#bytebase-v1-DataSource-AWSCredential) | | |
+| gcp_credential | [DataSource.GCPCredential](#bytebase-v1-DataSource-GCPCredential) | | |
+| sasl_config | [SASLConfig](#bytebase-v1-SASLConfig) | | |
+| additional_addresses | [DataSource.Address](#bytebase-v1-DataSource-Address) | repeated | additional_addresses is used for MongoDB replica set. |
+| direct_connection | [bool](#bool) | | direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string. |
+| region | [string](#string) | | region is the location of where the DB is, works for AWS RDS. For example, us-east-1. |
+| warehouse_id | [string](#string) | | warehouse_id is used by Databricks. |
+| master_name | [string](#string) | | master_name is the master name used by connecting redis-master via redis sentinel. |
+| master_username | [string](#string) | | master_username and master_password are master credentials used by redis sentinel mode. |
+| master_password | [string](#string) | | |
+| redis_type | [DataSource.RedisType](#bytebase-v1-DataSource-RedisType) | | |
+| extra_connection_parameters | [DataSource.ExtraConnectionParametersEntry](#bytebase-v1-DataSource-ExtraConnectionParametersEntry) | repeated | Extra connection parameters for the database connection. For PostgreSQL HA, this can be used to set target_session_attrs=read-write |
+| project_id | [string](#string) | | 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). |
+| instance_id | [string](#string) | | |
-<a name="bytebase-v1-SyncInstanceResponse"></a>
+<a name="bytebase-v1-DataSource-AWSCredential"></a>
-### SyncInstanceResponse
+### DataSource.AWSCredential
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| databases | [string](#string) | repeated | All database name list in the instance. |
+| access_key_id | [string](#string) | | |
+| secret_access_key | [string](#string) | | |
+| session_token | [string](#string) | | |
+| role_arn | [string](#string) | | ARN of IAM role to assume for cross-account access. See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html |
+| external_id | [string](#string) | | 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 |
-<a name="bytebase-v1-UndeleteInstanceRequest"></a>
+<a name="bytebase-v1-DataSource-Address"></a>
-### UndeleteInstanceRequest
+### DataSource.Address
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the deleted instance. Format: instances/{instance} or projects/{project}/instances/{instance} |
+| host | [string](#string) | | |
+| port | [string](#string) | | |
-<a name="bytebase-v1-UpdateDataSourceRequest"></a>
+<a name="bytebase-v1-DataSource-AzureCredential"></a>
-### UpdateDataSourceRequest
+### DataSource.AzureCredential
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the instance to update a data source. Format: instances/{instance} or projects/{project}/instances/{instance} |
-| data_source | [DataSource](#bytebase-v1-DataSource) | | Identified by data source ID. |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| validate_only | [bool](#bool) | | Validate only also tests the data source connection. |
-| allow_missing | [bool](#bool) | | 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. |
+| tenant_id | [string](#string) | | |
+| client_id | [string](#string) | | |
+| client_secret | [string](#string) | | |
-<a name="bytebase-v1-UpdateInstanceRequest"></a>
+<a name="bytebase-v1-DataSource-ExtraConnectionParametersEntry"></a>
-### UpdateInstanceRequest
+### DataSource.ExtraConnectionParametersEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| instance | [Instance](#bytebase-v1-Instance) | | The instance to update.
+| key | [string](#string) | | |
+| value | [string](#string) | | |
-The instance&#39;s `name` field is used to identify the instance to update. Format: instances/{instance} or projects/{project}/instances/{instance} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| allow_missing | [bool](#bool) | | 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. |
-
+<a name="bytebase-v1-DataSource-GCPCredential"></a>
+### DataSource.GCPCredential
-<a name="bytebase-v1-DataSource-AuthenticationType"></a>
-### DataSource.AuthenticationType
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| content | [string](#string) | | |
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| AUTHENTICATION_UNSPECIFIED | 0 | |
-| PASSWORD | 1 | |
-| GOOGLE_CLOUD_SQL_IAM | 2 | |
-| AWS_RDS_IAM | 3 | |
-| AZURE_IAM | 4 | |
-<a name="bytebase-v1-DataSource-CloudSQLIPType"></a>
-### DataSource.CloudSQLIPType
-CloudSQLIPType selects which Cloud SQL IP to dial for Google Cloud SQL IAM connections.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| CLOUD_SQL_IP_TYPE_UNSPECIFIED | 0 | |
-| PUBLIC | 1 | |
-| PRIVATE | 2 | |
-| PSC | 3 | |
+<a name="bytebase-v1-DataSourceExternalSecret"></a>
+### DataSourceExternalSecret
-<a name="bytebase-v1-DataSource-RedisType"></a>
-### DataSource.RedisType
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| secret_type | [DataSourceExternalSecret.SecretType](#bytebase-v1-DataSourceExternalSecret-SecretType) | | The type of external secret store. |
+| url | [string](#string) | | The URL of the external secret store. |
+| auth_type | [DataSourceExternalSecret.AuthType](#bytebase-v1-DataSourceExternalSecret-AuthType) | | The authentication method for accessing the secret store. |
+| app_role | [DataSourceExternalSecret.AppRoleAuthOption](#bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption) | | AppRole authentication configuration. |
+| token | [string](#string) | | Token for direct authentication. Interpreted according to token_type: the literal token (PLAIN), an environment variable name (ENVIRONMENT), or a file path (FILE). |
+| token_type | [DataSourceExternalSecret.TokenType](#bytebase-v1-DataSourceExternalSecret-TokenType) | | How to interpret the token field when auth_type is TOKEN. |
+| engine_name | [string](#string) | | engine name is the name for secret engine. |
+| secret_name | [string](#string) | | the secret name in the engine to store the password. |
+| password_key_name | [string](#string) | | the key name for the password. |
+| skip_vault_tls_verification | [bool](#bool) | | 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. |
+| vault_ssl_ca | [string](#string) | | CA certificate for Vault server verification. |
+| vault_ssl_cert | [string](#string) | | Client certificate for mutual TLS authentication with Vault. |
+| vault_ssl_key | [string](#string) | | Client private key for mutual TLS authentication with Vault. |
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| REDIS_TYPE_UNSPECIFIED | 0 | |
-| STANDALONE | 1 | |
-| SENTINEL | 2 | |
-| CLUSTER | 3 | |
-<a name="bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption-SecretType"></a>
-### DataSourceExternalSecret.AppRoleAuthOption.SecretType
+<a name="bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption"></a>
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| SECRET_TYPE_UNSPECIFIED | 0 | Unspecified secret type. |
-| PLAIN | 1 | Plain text secret. |
-| ENVIRONMENT | 2 | Secret from environment variable. |
+### DataSourceExternalSecret.AppRoleAuthOption
-<a name="bytebase-v1-DataSourceExternalSecret-AuthType"></a>
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| role_id | [string](#string) | | The role ID for Vault AppRole authentication. |
+| secret_id | [string](#string) | | the secret id for the role without ttl. |
+| type | [DataSourceExternalSecret.AppRoleAuthOption.SecretType](#bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption-SecretType) | | The type of secret for AppRole authentication. |
+| mount_path | [string](#string) | | The path where the approle auth method is mounted. |
-### DataSourceExternalSecret.AuthType
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| AUTH_TYPE_UNSPECIFIED | 0 | Unspecified authentication type. |
-| TOKEN | 1 | ref: https://developer.hashicorp.com/vault/docs/auth/token |
-| VAULT_APP_ROLE | 2 | ref: https://developer.hashicorp.com/vault/docs/auth/approle |
-<a name="bytebase-v1-DataSourceExternalSecret-SecretType"></a>
+<a name="bytebase-v1-DeleteInstanceRequest"></a>
-### DataSourceExternalSecret.SecretType
+### DeleteInstanceRequest
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| SECRET_TYPE_UNSPECIFIED | 0 | Unspecified secret type. |
-| VAULT_KV_V2 | 1 | ref: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2 |
-| AWS_SECRETS_MANAGER | 2 | ref: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html |
-| GCP_SECRET_MANAGER | 3 | ref: https://cloud.google.com/secret-manager/docs |
-| AZURE_KEY_VAULT | 4 | ref: https://learn.microsoft.com/en-us/azure/key-vault/secrets/about-secrets |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the instance to delete. Format: instances/{instance} or projects/{project}/instances/{instance} |
+| force | [bool](#bool) | | If set to true, a workspace instance&#39;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 | [bool](#bool) | | 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. |
-<a name="bytebase-v1-DataSourceExternalSecret-TokenType"></a>
-### DataSourceExternalSecret.TokenType
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TOKEN_TYPE_UNSPECIFIED | 0 | Unspecified token type, treated as PLAIN for backward compatibility. |
-| PLAIN | 1 | The token field holds the literal token value. |
-| ENVIRONMENT | 2 | The token field holds the name of an environment variable on the Bytebase server that holds the token value. |
-| FILE | 3 | The token field holds a path to a file on the Bytebase server that holds the token value. |
+<a name="bytebase-v1-GetInstanceRequest"></a>
+### GetInstanceRequest
-<a name="bytebase-v1-DataSourceType"></a>
-### DataSourceType
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the instance to retrieve. Format: instances/{instance} or projects/{project}/instances/{instance} |
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| DATA_SOURCE_UNSPECIFIED | 0 | Unspecified data source type. |
-| ADMIN | 1 | Admin data source with write permissions. |
-| READ_ONLY | 2 | Read-only data source for query operations. |
-
-
-<a name="bytebase-v1-InstanceService"></a>
+<a name="bytebase-v1-Instance"></a>
-### InstanceService
-InstanceService manages database instances and their connections.
+### Instance
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| GetInstance | [GetInstanceRequest](#bytebase-v1-GetInstanceRequest) | [Instance](#bytebase-v1-Instance) | Gets a database instance by name. Permissions required: bb.instances.get |
-| ListInstances | [ListInstancesRequest](#bytebase-v1-ListInstancesRequest) | [ListInstancesResponse](#bytebase-v1-ListInstancesResponse) | Lists database instances, optionally within a project. Permissions required: bb.instances.list |
-| CreateInstance | [CreateInstanceRequest](#bytebase-v1-CreateInstanceRequest) | [Instance](#bytebase-v1-Instance) | Creates a new database instance. Permissions required: bb.instances.create |
-| PrepareSampleProjectInstance | [PrepareSampleProjectInstanceRequest](#bytebase-v1-PrepareSampleProjectInstanceRequest) | [Instance](#bytebase-v1-Instance) | Prepares a Sample Project Instance for a project. Permissions required: bb.instances.create |
-| UpdateInstance | [UpdateInstanceRequest](#bytebase-v1-UpdateInstanceRequest) | [Instance](#bytebase-v1-Instance) | Updates a database instance. Permissions required: bb.instances.update |
-| DeleteInstance | [DeleteInstanceRequest](#bytebase-v1-DeleteInstanceRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | 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 |
-| UndeleteInstance | [UndeleteInstanceRequest](#bytebase-v1-UndeleteInstanceRequest) | [Instance](#bytebase-v1-Instance) | 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 |
-| SyncInstance | [SyncInstanceRequest](#bytebase-v1-SyncInstanceRequest) | [SyncInstanceResponse](#bytebase-v1-SyncInstanceResponse) | Syncs database schemas and metadata from an instance. Permissions required: bb.instances.sync |
-| ListInstanceDatabase | [ListInstanceDatabaseRequest](#bytebase-v1-ListInstanceDatabaseRequest) | [ListInstanceDatabaseResponse](#bytebase-v1-ListInstanceDatabaseResponse) | Lists all databases within an instance without creating them. Permissions required: bb.instances.get |
-| BatchSyncInstances | [BatchSyncInstancesRequest](#bytebase-v1-BatchSyncInstancesRequest) | [BatchSyncInstancesResponse](#bytebase-v1-BatchSyncInstancesResponse) | Syncs multiple instances in a single request. Permissions required: bb.instances.sync |
-| BatchUpdateInstances | [BatchUpdateInstancesRequest](#bytebase-v1-BatchUpdateInstancesRequest) | [BatchUpdateInstancesResponse](#bytebase-v1-BatchUpdateInstancesResponse) | Updates multiple instances in a single request. Permissions required: bb.instances.update |
-| AddDataSource | [AddDataSourceRequest](#bytebase-v1-AddDataSourceRequest) | [Instance](#bytebase-v1-Instance) | Adds a read-only data source to an instance. Permissions required: bb.instances.update |
-| RemoveDataSource | [RemoveDataSourceRequest](#bytebase-v1-RemoveDataSourceRequest) | [Instance](#bytebase-v1-Instance) | Removes a read-only data source from an instance. Permissions required: bb.instances.update |
-| UpdateDataSource | [UpdateDataSourceRequest](#bytebase-v1-UpdateDataSourceRequest) | [Instance](#bytebase-v1-Instance) | Updates a data source configuration. Permissions required: bb.instances.update |
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the instance. Format: instances/{instance} or projects/{project}/instances/{instance} |
+| state | [State](#bytebase-v1-State) | | The lifecycle state of the instance. |
+| title | [string](#string) | | The display title of the instance. |
+| engine | [Engine](#bytebase-v1-Engine) | | The database engine type. |
+| engine_version | [string](#string) | | The version of the database engine. |
+| external_link | [string](#string) | | External URL to the database instance console. |
+| data_sources | [DataSource](#bytebase-v1-DataSource) | repeated | Data source configurations for connecting to the instance. |
+| environment | [string](#string) | optional | The environment resource. Format: environments/prod where prod is the environment resource ID. |
+| activation | [bool](#bool) | | Whether the instance is activated for use. |
+| roles | [InstanceRole](#bytebase-v1-InstanceRole) | repeated | Database roles available in this instance. |
+| sync_interval | [google.protobuf.Duration](#google-protobuf-Duration) | | How often the instance is synced. |
+| sync_databases | [SyncDatabases](#bytebase-v1-SyncDatabases) | | Enable sync for following databases. Not set means sync all schemas &amp; databases. |
+| last_sync_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time the instance was synced. |
+| labels | [Instance.LabelsEntry](#bytebase-v1-Instance-LabelsEntry) | repeated | Labels are key-value pairs that can be attached to the instance. For example, { &#34;org_group&#34;: &#34;infrastructure&#34;, &#34;environment&#34;: &#34;production&#34; } |
-<a name="v1_database_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/database_service.proto
-<a name="bytebase-v1-BatchGetDatabasesRequest"></a>
+<a name="bytebase-v1-Instance-LabelsEntry"></a>
-### BatchGetDatabasesRequest
+### Instance.LabelsEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | 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 &#34;-&#34; as wildcard to batch get databases across parent. |
-| names | [string](#string) | repeated | The list of database names to retrieve. |
+| key | [string](#string) | | |
+| value | [string](#string) | | |
-<a name="bytebase-v1-BatchGetDatabasesResponse"></a>
+<a name="bytebase-v1-InstanceResource"></a>
-### BatchGetDatabasesResponse
+### InstanceResource
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| databases | [Database](#bytebase-v1-Database) | repeated | One database per requested name, in the same order as `names`. |
+| title | [string](#string) | | The display title of the instance. |
+| engine | [Engine](#bytebase-v1-Engine) | | The database engine type. |
+| engine_version | [string](#string) | | The version of the database engine. |
+| data_sources | [DataSource](#bytebase-v1-DataSource) | repeated | Data source configurations for the instance. |
+| activation | [bool](#bool) | | Whether the instance is activated. |
+| name | [string](#string) | | The name of the instance. Format: instances/{instance} or projects/{project}/instances/{instance} |
+| environment | [string](#string) | optional | The environment resource. Format: environments/prod where prod is the environment resource ID. |
-<a name="bytebase-v1-BatchSyncDatabasesRequest"></a>
+<a name="bytebase-v1-KerberosConfig"></a>
-### BatchSyncDatabasesRequest
+### KerberosConfig
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | 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 | [string](#string) | repeated | The list of database names to sync. |
+| primary | [string](#string) | | The primary component of the Kerberos principal. |
+| instance | [string](#string) | | The instance component of the Kerberos principal. |
+| realm | [string](#string) | | The Kerberos realm. |
+| keytab | [bytes](#bytes) | | The keytab file contents for authentication. |
+| kdc_host | [string](#string) | | The hostname of the Key Distribution Center (KDC). |
+| kdc_port | [string](#string) | | The port of the Key Distribution Center (KDC). |
+| kdc_transport_protocol | [string](#string) | | The transport protocol for KDC communication (tcp or udp). |
-<a name="bytebase-v1-BatchSyncDatabasesResponse"></a>
+<a name="bytebase-v1-ListInstanceDatabaseRequest"></a>
-### BatchSyncDatabasesResponse
+### ListInstanceDatabaseRequest
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the instance. Format: instances/{instance} or projects/{project}/instances/{instance} |
+| instance | [Instance](#bytebase-v1-Instance) | optional | The target instance. We need to set this field if the target instance is not created yet. |
-<a name="bytebase-v1-BatchUpdateDatabasesRequest"></a>
-### BatchUpdateDatabasesRequest
+
+<a name="bytebase-v1-ListInstanceDatabaseResponse"></a>
+
+### ListInstanceDatabaseResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | 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 | [UpdateDatabaseRequest](#bytebase-v1-UpdateDatabaseRequest) | repeated | The request message specifying the resources to update. A maximum of 1000 databases can be modified in a batch. |
+| databases | [string](#string) | repeated | All database name list in the instance. |
-<a name="bytebase-v1-BatchUpdateDatabasesResponse"></a>
+<a name="bytebase-v1-ListInstancesRequest"></a>
-### BatchUpdateDatabasesResponse
+### ListInstancesRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| databases | [Database](#bytebase-v1-Database) | repeated | Databases updated. |
+| parent | [string](#string) | optional | 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. |
+| page_size | [int32](#int32) | | 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. |
+| page_token | [string](#string) | | 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. |
+| show_deleted | [bool](#bool) | | Show deleted instances if specified. |
+| filter | [string](#string) | | 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 &#34;==&#34; and &#34;.contains()&#34; operator. - resource_id: the instance id, support &#34;==&#34; and &#34;.contains()&#34; operator. - environment: the environment full name in &#34;environments/{id}&#34; format, support &#34;==&#34; operator. - state: the instance state, check State enum for values, support &#34;==&#34; operator. - engine: the instance engine, check Engine enum for values. Support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator. - host: the instance host, support &#34;==&#34; and &#34;.contains()&#34; operator. - port: the instance port, support &#34;==&#34; and &#34;.contains()&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator. - labels.{key}: the instance label, support &#34;==&#34; and &#34;in&#34; operators.
+For example: name == &#34;sample instance&#34; name.contains(&#34;sample&#34;) resource_id == &#34;sample-instance&#34; resource_id.contains(&#34;sample&#34;) state == &#34;DELETED&#34; environment == &#34;environments/test&#34; environment == &#34;&#34; (find instances which environment is not set) engine == &#34;MYSQL&#34; engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;] !(engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;]) host == &#34;127.0.0.1&#34; host.contains(&#34;127.0&#34;) port == &#34;54321&#34; port.contains(&#34;543&#34;) labels.org_group == &#34;infrastructure&#34; labels.environment in [&#34;prod&#34;, &#34;production&#34;] project == &#34;projects/sample-project&#34; You can combine filter conditions like: name.contains(&#34;sample&#34;) &amp;&amp; environment == &#34;environments/test&#34; host == &#34;127.0.0.1&#34; &amp;&amp; port == &#34;54321&#34; |
+| order_by | [string](#string) | | The order by of instances. Support title, environment. The default sorting order is ascending. For example: - order_by = &#34;title&#34; - order_by = &#34;title desc&#34; - order_by = &#34;title desc, environment asc&#34; |
-<a name="bytebase-v1-BoundingBox"></a>
-### BoundingBox
-BoundingBox defines the spatial bounds for GEOMETRY spatial indexes.
+<a name="bytebase-v1-ListInstancesResponse"></a>
+
+### ListInstancesResponse
+
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| xmin | [double](#double) | | Minimum X coordinate |
-| ymin | [double](#double) | | Minimum Y coordinate |
-| xmax | [double](#double) | | Maximum X coordinate |
-| ymax | [double](#double) | | Maximum Y coordinate |
+| instances | [Instance](#bytebase-v1-Instance) | repeated | The instances from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-<a name="bytebase-v1-CheckConstraintMetadata"></a>
+<a name="bytebase-v1-PrepareSampleProjectInstanceRequest"></a>
+
+### PrepareSampleProjectInstanceRequest
-### CheckConstraintMetadata
-CheckConstraintMetadata is the metadata for check constraints.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a check constraint. |
-| expression | [string](#string) | | The expression is the expression of a check constraint. |
+| parent | [string](#string) | | The project that owns the sample instance. Format: projects/{project} |
-<a name="bytebase-v1-ColumnMetadata"></a>
+<a name="bytebase-v1-RemoveDataSourceRequest"></a>
+
+### RemoveDataSourceRequest
-### ColumnMetadata
-ColumnMetadata is the metadata for columns.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a column. |
-| position | [int32](#int32) | | The position is the position in columns. |
-| has_default | [bool](#bool) | | |
-| default | [string](#string) | | The default value of column. |
-| default_on_null | [bool](#bool) | | Oracle specific metadata. The default_on_null is the default on null of a column. |
-| on_update | [string](#string) | | The on_update is the on update action of a column. For MySQL like databases, it&#39;s only supported for TIMESTAMP columns with CURRENT_TIMESTAMP as on update value. |
-| nullable | [bool](#bool) | | The nullable is the nullable of a column. |
-| type | [string](#string) | | The type is the type of a column. |
-| character_set | [string](#string) | | The character_set is the character_set of a column. |
-| collation | [string](#string) | | The collation is the collation of a column. |
-| comment | [string](#string) | | The comment is the comment of a column. |
-| generation | [GenerationMetadata](#bytebase-v1-GenerationMetadata) | | The generation is the generation of a column. |
-| is_identity | [bool](#bool) | | |
-| identity_generation | [ColumnMetadata.IdentityGeneration](#bytebase-v1-ColumnMetadata-IdentityGeneration) | | The identity_generation is for identity columns, PG only. |
-| identity_seed | [int64](#int64) | | The identity_seed is for identity columns, MSSQL only. |
-| identity_increment | [int64](#int64) | | The identity_increment is for identity columns, MSSQL only. |
-| default_constraint_name | [string](#string) | | 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&#39;s default value, you must reference the constraint by name. This field stores the actual constraint name from the database.
+| name | [string](#string) | | The name of the instance to remove a data source from. Format: instances/{instance} or projects/{project}/instances/{instance} |
+| data_source | [DataSource](#bytebase-v1-DataSource) | | Identified by data source ID. Only READ_ONLY data source can be removed. |
-Example: A column definition like: CREATE TABLE employees ( status NVARCHAR(20) DEFAULT &#39;active&#39; )
-Will create a constraint with an auto-generated name like &#39;DF__employees__statu__3B75D760&#39; or a user-defined name if specified: ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT &#39;active&#39; 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 &#39;inactive&#39; 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 | [uint32](#uint32) | optional | 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). |
-| is_invisible | [bool](#bool) | | Whether the column is invisible (hidden from SELECT *), MySQL 8.0.23&#43; only. |
+<a name="bytebase-v1-SASLConfig"></a>
+### SASLConfig
-<a name="bytebase-v1-CompositeTypeAttribute"></a>
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| krb_config | [KerberosConfig](#bytebase-v1-KerberosConfig) | | Kerberos authentication configuration. |
-### CompositeTypeAttribute
+
+
+
+
+
+<a name="bytebase-v1-SyncDatabases"></a>
+
+### SyncDatabases
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the attribute. |
-| type | [string](#string) | | The attribute type. User-defined types are always schema-qualified. |
-| collation | [string](#string) | | 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. `&#34;C&#34;` or `locale.en_us`. |
-| comment | [string](#string) | | The comment describing the attribute. |
+| databases | [string](#string) | repeated | |
-<a name="bytebase-v1-CompositeTypeMetadata"></a>
+<a name="bytebase-v1-SyncInstanceRequest"></a>
-### CompositeTypeMetadata
+### SyncInstanceRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the composite type. |
-| attributes | [CompositeTypeAttribute](#bytebase-v1-CompositeTypeAttribute) | repeated | The ordered attributes of the composite type. |
-| comment | [string](#string) | | The comment describing the composite type. |
+| name | [string](#string) | | The name of instance. Format: instances/{instance} or projects/{project}/instances/{instance} |
+| enable_full_sync | [bool](#bool) | | 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. |
-<a name="bytebase-v1-Database"></a>
+<a name="bytebase-v1-SyncInstanceResponse"></a>
-### Database
+### SyncInstanceResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | 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 | [State](#bytebase-v1-State) | | The existence of a database. |
-| successful_sync_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The latest synchronization time. |
-| project | [string](#string) | | The project for a database. Format: projects/{project} |
-| release | [string](#string) | | The release that was last applied to this database. Format: projects/{project}/releases/{release_id} Example: projects/my-project/releases/release_20260115-RC00 |
-| environment | [string](#string) | optional | The environment resource. Format: environments/prod where prod is the environment resource ID. |
-| effective_environment | [string](#string) | optional | 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. |
-| labels | [Database.LabelsEntry](#bytebase-v1-Database-LabelsEntry) | repeated | Labels will be used for deployment and policy control. |
-| instance_resource | [InstanceResource](#bytebase-v1-InstanceResource) | | The instance resource. |
-| backup_available | [bool](#bool) | | The database is available for DML prior backup. |
-| sync_status | [SyncStatus](#bytebase-v1-SyncStatus) | | The sync status of the database. |
-| sync_error | [string](#string) | | The error message if sync failed. |
+| databases | [string](#string) | repeated | All database name list in the instance. |
-<a name="bytebase-v1-Database-LabelsEntry"></a>
+<a name="bytebase-v1-UndeleteInstanceRequest"></a>
-### Database.LabelsEntry
+### UndeleteInstanceRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [string](#string) | | |
+| name | [string](#string) | | The name of the deleted instance. Format: instances/{instance} or projects/{project}/instances/{instance} |
-<a name="bytebase-v1-DatabaseMetadata"></a>
+<a name="bytebase-v1-UpdateDataSourceRequest"></a>
+
+### UpdateDataSourceRequest
-### DatabaseMetadata
-DatabaseMetadata is the metadata for databases.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The database metadata name.
+| name | [string](#string) | | The name of the instance to update a data source. Format: instances/{instance} or projects/{project}/instances/{instance} |
+| data_source | [DataSource](#bytebase-v1-DataSource) | | Identified by data source ID. |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| validate_only | [bool](#bool) | | Validate only also tests the data source connection. |
+| allow_missing | [bool](#bool) | | 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. |
-Format: instances/{instance}/databases/{database}/metadata or projects/{project}/instances/{instance}/databases/{database}/metadata |
-| schemas | [SchemaMetadata](#bytebase-v1-SchemaMetadata) | repeated | The schemas is the list of schemas in a database. |
-| character_set | [string](#string) | | The character_set is the character set of a database. |
-| collation | [string](#string) | | The collation is the collation of a database. |
-| extensions | [ExtensionMetadata](#bytebase-v1-ExtensionMetadata) | repeated | The extensions is the list of extensions in a database. |
-| owner | [string](#string) | | The owner of the database. |
-| search_path | [string](#string) | | The search_path is the search path of a PostgreSQL database. |
+<a name="bytebase-v1-UpdateInstanceRequest"></a>
-<a name="bytebase-v1-DatabaseSDLSchema"></a>
+### UpdateInstanceRequest
-### DatabaseSDLSchema
-DatabaseSDLSchema contains the schema in SDL format.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| schema | [bytes](#bytes) | | 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. |
-| content_type | [string](#string) | | The MIME type of the schema content. Indicates how the client should interpret the schema field. Examples: - &#34;text/plain; charset=utf-8&#34; for SINGLE_FILE format - &#34;application/zip&#34; for MULTI_FILE format |
+| instance | [Instance](#bytebase-v1-Instance) | | The instance to update.
+The instance&#39;s `name` field is used to identify the instance to update. Format: instances/{instance} or projects/{project}/instances/{instance} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| allow_missing | [bool](#bool) | | 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. |
-<a name="bytebase-v1-DatabaseSchema"></a>
+
-### DatabaseSchema
-DatabaseSchema is the metadata for databases.
+<a name="bytebase-v1-DataSource-AuthenticationType"></a>
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| schema | [string](#string) | | The schema dump from database. |
+### DataSource.AuthenticationType
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| AUTHENTICATION_UNSPECIFIED | 0 | |
+| PASSWORD | 1 | |
+| GOOGLE_CLOUD_SQL_IAM | 2 | |
+| AWS_RDS_IAM | 3 | |
+| AZURE_IAM | 4 | |
+<a name="bytebase-v1-DataSource-CloudSQLIPType"></a>
-<a name="bytebase-v1-DependencyColumn"></a>
+### DataSource.CloudSQLIPType
+CloudSQLIPType selects which Cloud SQL IP to dial for Google Cloud SQL IAM connections.
-### DependencyColumn
-DependencyColumn is the metadata for dependency columns.
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| CLOUD_SQL_IP_TYPE_UNSPECIFIED | 0 | |
+| PUBLIC | 1 | |
+| PRIVATE | 2 | |
+| PSC | 3 | |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| schema | [string](#string) | | The schema is the schema of a reference column. |
-| table | [string](#string) | | The table is the table of a reference column. |
-| column | [string](#string) | | The column is the name of a reference column. |
+<a name="bytebase-v1-DataSource-RedisType"></a>
+### DataSource.RedisType
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| REDIS_TYPE_UNSPECIFIED | 0 | |
+| STANDALONE | 1 | |
+| SENTINEL | 2 | |
+| CLUSTER | 3 | |
-<a name="bytebase-v1-DependencyTable"></a>
-### DependencyTable
+<a name="bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption-SecretType"></a>
+### DataSourceExternalSecret.AppRoleAuthOption.SecretType
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| schema | [string](#string) | | The schema is the schema of a reference table. |
-| table | [string](#string) | | The table is the name of a reference table. |
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| SECRET_TYPE_UNSPECIFIED | 0 | Unspecified secret type. |
+| PLAIN | 1 | Plain text secret. |
+| ENVIRONMENT | 2 | Secret from environment variable. |
+<a name="bytebase-v1-DataSourceExternalSecret-AuthType"></a>
+### DataSourceExternalSecret.AuthType
-<a name="bytebase-v1-DiffMetadataRequest"></a>
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| AUTH_TYPE_UNSPECIFIED | 0 | Unspecified authentication type. |
+| TOKEN | 1 | ref: https://developer.hashicorp.com/vault/docs/auth/token |
+| VAULT_APP_ROLE | 2 | ref: https://developer.hashicorp.com/vault/docs/auth/approle |
-### DiffMetadataRequest
+<a name="bytebase-v1-DataSourceExternalSecret-SecretType"></a>
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The database whose current schema is the diff source. Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} |
-| target_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | 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. |
+### DataSourceExternalSecret.SecretType
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| SECRET_TYPE_UNSPECIFIED | 0 | Unspecified secret type. |
+| VAULT_KV_V2 | 1 | ref: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2 |
+| AWS_SECRETS_MANAGER | 2 | ref: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html |
+| GCP_SECRET_MANAGER | 3 | ref: https://cloud.google.com/secret-manager/docs |
+| AZURE_KEY_VAULT | 4 | ref: https://learn.microsoft.com/en-us/azure/key-vault/secrets/about-secrets |
+
+<a name="bytebase-v1-DataSourceExternalSecret-TokenType"></a>
+### DataSourceExternalSecret.TokenType
-<a name="bytebase-v1-DiffMetadataResponse"></a>
-### DiffMetadataResponse
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TOKEN_TYPE_UNSPECIFIED | 0 | Unspecified token type, treated as PLAIN for backward compatibility. |
+| PLAIN | 1 | The token field holds the literal token value. |
+| ENVIRONMENT | 2 | The token field holds the name of an environment variable on the Bytebase server that holds the token value. |
+| FILE | 3 | The token field holds a path to a file on the Bytebase server that holds the token value. |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| diff | [string](#string) | | The generated migration statements. |
+<a name="bytebase-v1-DataSourceType"></a>
+### DataSourceType
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| DATA_SOURCE_UNSPECIFIED | 0 | Unspecified data source type. |
+| ADMIN | 1 | Admin data source with write permissions. |
+| READ_ONLY | 2 | Read-only data source for query operations. |
+
-<a name="bytebase-v1-DiffSchemaRequest"></a>
+
-### DiffSchemaRequest
+<a name="bytebase-v1-InstanceService"></a>
+### InstanceService
+InstanceService manages database instances and their connections.
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | 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} |
-| schema | [string](#string) | | The target schema. |
-| changelog | [string](#string) | | The resource name of the changelog Format: instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog} |
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| GetInstance | [GetInstanceRequest](#bytebase-v1-GetInstanceRequest) | [Instance](#bytebase-v1-Instance) | Gets a database instance by name. Permissions required: bb.instances.get |
+| ListInstances | [ListInstancesRequest](#bytebase-v1-ListInstancesRequest) | [ListInstancesResponse](#bytebase-v1-ListInstancesResponse) | Lists database instances, optionally within a project. Permissions required: bb.instances.list |
+| CreateInstance | [CreateInstanceRequest](#bytebase-v1-CreateInstanceRequest) | [Instance](#bytebase-v1-Instance) | Creates a new database instance. Permissions required: bb.instances.create |
+| PrepareSampleProjectInstance | [PrepareSampleProjectInstanceRequest](#bytebase-v1-PrepareSampleProjectInstanceRequest) | [Instance](#bytebase-v1-Instance) | Prepares a Sample Project Instance for a project. Permissions required: bb.instances.create |
+| UpdateInstance | [UpdateInstanceRequest](#bytebase-v1-UpdateInstanceRequest) | [Instance](#bytebase-v1-Instance) | Updates a database instance. Permissions required: bb.instances.update |
+| DeleteInstance | [DeleteInstanceRequest](#bytebase-v1-DeleteInstanceRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | 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 |
+| UndeleteInstance | [UndeleteInstanceRequest](#bytebase-v1-UndeleteInstanceRequest) | [Instance](#bytebase-v1-Instance) | 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 |
+| SyncInstance | [SyncInstanceRequest](#bytebase-v1-SyncInstanceRequest) | [SyncInstanceResponse](#bytebase-v1-SyncInstanceResponse) | Syncs database schemas and metadata from an instance. Permissions required: bb.instances.sync |
+| ListInstanceDatabase | [ListInstanceDatabaseRequest](#bytebase-v1-ListInstanceDatabaseRequest) | [ListInstanceDatabaseResponse](#bytebase-v1-ListInstanceDatabaseResponse) | Lists all databases within an instance without creating them. Permissions required: bb.instances.get |
+| BatchSyncInstances | [BatchSyncInstancesRequest](#bytebase-v1-BatchSyncInstancesRequest) | [BatchSyncInstancesResponse](#bytebase-v1-BatchSyncInstancesResponse) | Syncs multiple instances in a single request. Permissions required: bb.instances.sync |
+| BatchUpdateInstances | [BatchUpdateInstancesRequest](#bytebase-v1-BatchUpdateInstancesRequest) | [BatchUpdateInstancesResponse](#bytebase-v1-BatchUpdateInstancesResponse) | Updates multiple instances in a single request. Permissions required: bb.instances.update |
+| AddDataSource | [AddDataSourceRequest](#bytebase-v1-AddDataSourceRequest) | [Instance](#bytebase-v1-Instance) | Adds a read-only data source to an instance. Permissions required: bb.instances.update |
+| RemoveDataSource | [RemoveDataSourceRequest](#bytebase-v1-RemoveDataSourceRequest) | [Instance](#bytebase-v1-Instance) | Removes a read-only data source from an instance. Permissions required: bb.instances.update |
+| UpdateDataSource | [UpdateDataSourceRequest](#bytebase-v1-UpdateDataSourceRequest) | [Instance](#bytebase-v1-Instance) | Updates a data source configuration. Permissions required: bb.instances.update |
+
+<a name="v1_database_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/database_service.proto
-<a name="bytebase-v1-DiffSchemaResponse"></a>
-### DiffSchemaResponse
+
+<a name="bytebase-v1-BatchGetDatabasesRequest"></a>
+
+### BatchGetDatabasesRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| diff | [string](#string) | | |
+| parent | [string](#string) | | 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 &#34;-&#34; as wildcard to batch get databases across parent. |
+| names | [string](#string) | repeated | The list of database names to retrieve. |
-<a name="bytebase-v1-DimensionConstraint"></a>
+<a name="bytebase-v1-BatchGetDatabasesResponse"></a>
+
+### BatchGetDatabasesResponse
-### DimensionConstraint
-DimensionConstraint defines constraints for a spatial dimension.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| dimension | [string](#string) | | Dimension name/type (X, Y, Z, M, etc.) |
-| min_value | [double](#double) | | Minimum value for this dimension |
-| max_value | [double](#double) | | Maximum value for this dimension |
-| tolerance | [double](#double) | | Tolerance for this dimension |
+| databases | [Database](#bytebase-v1-Database) | repeated | One database per requested name, in the same order as `names`. |
-<a name="bytebase-v1-DimensionalConfig"></a>
+<a name="bytebase-v1-BatchSyncDatabasesRequest"></a>
+
+### BatchSyncDatabasesRequest
-### DimensionalConfig
-DimensionalConfig defines dimensional and constraint parameters for spatial indexes.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| dimensions | [int32](#int32) | | Number of dimensions (2-4, default 2) |
-| data_type | [string](#string) | | Spatial data type (GEOMETRY, GEOGRAPHY, POINT, POLYGON, etc.) |
-| srid | [int32](#int32) | | Spatial reference system identifier (SRID) |
-| constraints | [DimensionConstraint](#bytebase-v1-DimensionConstraint) | repeated | Coordinate system constraints |
-
-
+| parent | [string](#string) | | 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 | [string](#string) | repeated | The list of database names to sync. |
-<a name="bytebase-v1-EnumTypeMetadata"></a>
-### EnumTypeMetadata
+<a name="bytebase-v1-BatchSyncDatabasesResponse"></a>
+### BatchSyncDatabasesResponse
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of a type. |
-| values | [string](#string) | repeated | The enum values of a type. |
-| comment | [string](#string) | | The comment describing the enum type. |
-| skip_dump | [bool](#bool) | | Whether to skip this enum type during schema dump operations. |
-<a name="bytebase-v1-EventMetadata"></a>
+<a name="bytebase-v1-BatchUpdateDatabasesRequest"></a>
-### EventMetadata
+### BatchUpdateDatabasesRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the event. |
-| definition | [string](#string) | | The schedule of the event. |
-| time_zone | [string](#string) | | The time zone of the event. |
-| sql_mode | [string](#string) | | The SQL mode setting for the event. |
-| character_set_client | [string](#string) | | The character set used by the client creating the event. |
-| collation_connection | [string](#string) | | The collation used for the connection when creating the event. |
-| comment | [string](#string) | | The comment is the comment of an event. |
+| parent | [string](#string) | | 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 | [UpdateDatabaseRequest](#bytebase-v1-UpdateDatabaseRequest) | repeated | The request message specifying the resources to update. A maximum of 1000 databases can be modified in a batch. |
-<a name="bytebase-v1-ExtensionMetadata"></a>
+<a name="bytebase-v1-BatchUpdateDatabasesResponse"></a>
+
+### BatchUpdateDatabasesResponse
-### ExtensionMetadata
-ExtensionMetadata is the metadata for extensions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of an extension. |
-| schema | [string](#string) | | The schema is the extension that is installed to. But the extension usage is not limited to the schema. |
-| version | [string](#string) | | The version is the version of an extension. |
-| description | [string](#string) | | The description is the description of an extension. |
-
+| databases | [Database](#bytebase-v1-Database) | repeated | Databases updated. |
-<a name="bytebase-v1-ExternalTableMetadata"></a>
-### ExternalTableMetadata
+<a name="bytebase-v1-BoundingBox"></a>
+### BoundingBox
+BoundingBox defines the spatial bounds for GEOMETRY spatial indexes.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a external table. |
-| external_server_name | [string](#string) | | The external_server_name is the name of the external server. |
-| external_database_name | [string](#string) | | The external_database_name is the name of the external database. |
-| columns | [ColumnMetadata](#bytebase-v1-ColumnMetadata) | repeated | The columns is the ordered list of columns in a foreign table. |
+| xmin | [double](#double) | | Minimum X coordinate |
+| ymin | [double](#double) | | Minimum Y coordinate |
+| xmax | [double](#double) | | Maximum X coordinate |
+| ymax | [double](#double) | | Maximum Y coordinate |
-<a name="bytebase-v1-ForeignKeyMetadata"></a>
+<a name="bytebase-v1-CheckConstraintMetadata"></a>
-### ForeignKeyMetadata
-ForeignKeyMetadata is the metadata for foreign keys.
+### CheckConstraintMetadata
+CheckConstraintMetadata is the metadata for check constraints.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a foreign key. |
-| columns | [string](#string) | repeated | The columns are the ordered referencing columns of a foreign key. |
-| referenced_schema | [string](#string) | | 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. |
-| referenced_table | [string](#string) | | The referenced_table is the referenced table name of a foreign key. |
-| referenced_columns | [string](#string) | repeated | The referenced_columns are the ordered referenced columns of a foreign key. |
-| on_delete | [string](#string) | | The on_delete is the on delete action of a foreign key. |
-| on_update | [string](#string) | | The on_update is the on update action of a foreign key. |
-| match_type | [string](#string) | | The match_type is the match type of a foreign key. The match_type is the PostgreSQL specific field. It&#39;s empty string for other databases. |
+| name | [string](#string) | | The name is the name of a check constraint. |
+| expression | [string](#string) | | The expression is the expression of a check constraint. |
-<a name="bytebase-v1-FunctionMetadata"></a>
+<a name="bytebase-v1-ColumnMetadata"></a>
-### FunctionMetadata
-FunctionMetadata is the metadata for functions.
+### ColumnMetadata
+ColumnMetadata is the metadata for columns.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a function. |
-| definition | [string](#string) | | The definition is the definition of a function. |
-| signature | [string](#string) | | The signature is the name with the number and type of input arguments the function takes. |
-| character_set_client | [string](#string) | | MySQL specific metadata. |
-| collation_connection | [string](#string) | | |
-| database_collation | [string](#string) | | |
-| sql_mode | [string](#string) | | |
-| comment | [string](#string) | | |
-| dependency_tables | [DependencyTable](#bytebase-v1-DependencyTable) | repeated | The dependency_tables is the list of dependency tables of a function. For PostgreSQL, it&#39;s the list of tables that the function depends on the return type definition. |
-| skip_dump | [bool](#bool) | | |
+| name | [string](#string) | | The name is the name of a column. |
+| position | [int32](#int32) | | The position is the position in columns. |
+| has_default | [bool](#bool) | | |
+| default | [string](#string) | | The default value of column. |
+| default_on_null | [bool](#bool) | | Oracle specific metadata. The default_on_null is the default on null of a column. |
+| on_update | [string](#string) | | The on_update is the on update action of a column. For MySQL like databases, it&#39;s only supported for TIMESTAMP columns with CURRENT_TIMESTAMP as on update value. |
+| nullable | [bool](#bool) | | The nullable is the nullable of a column. |
+| type | [string](#string) | | The type is the type of a column. |
+| character_set | [string](#string) | | The character_set is the character_set of a column. |
+| collation | [string](#string) | | The collation is the collation of a column. |
+| comment | [string](#string) | | The comment is the comment of a column. |
+| generation | [GenerationMetadata](#bytebase-v1-GenerationMetadata) | | The generation is the generation of a column. |
+| is_identity | [bool](#bool) | | |
+| identity_generation | [ColumnMetadata.IdentityGeneration](#bytebase-v1-ColumnMetadata-IdentityGeneration) | | The identity_generation is for identity columns, PG only. |
+| identity_seed | [int64](#int64) | | The identity_seed is for identity columns, MSSQL only. |
+| identity_increment | [int64](#int64) | | The identity_increment is for identity columns, MSSQL only. |
+| default_constraint_name | [string](#string) | | 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&#39;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 &#39;active&#39; )
+Will create a constraint with an auto-generated name like &#39;DF__employees__statu__3B75D760&#39; or a user-defined name if specified: ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT &#39;active&#39; 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 &#39;inactive&#39; 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 | [uint32](#uint32) | optional | 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). |
+| is_invisible | [bool](#bool) | | Whether the column is invisible (hidden from SELECT *), MySQL 8.0.23&#43; only. |
-<a name="bytebase-v1-GenerationMetadata"></a>
-### GenerationMetadata
+
+
+
+<a name="bytebase-v1-CompositeTypeAttribute"></a>
+
+### CompositeTypeAttribute
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| type | [GenerationMetadata.Type](#bytebase-v1-GenerationMetadata-Type) | | |
-| expression | [string](#string) | | |
+| name | [string](#string) | | The name of the attribute. |
+| type | [string](#string) | | The attribute type. User-defined types are always schema-qualified. |
+| collation | [string](#string) | | 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. `&#34;C&#34;` or `locale.en_us`. |
+| comment | [string](#string) | | The comment describing the attribute. |
-<a name="bytebase-v1-GetDatabaseMetadataRequest"></a>
+<a name="bytebase-v1-CompositeTypeMetadata"></a>
-### GetDatabaseMetadataRequest
+### CompositeTypeMetadata
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database to retrieve metadata. Format: instances/{instance}/databases/{database}/metadata or projects/{project}/instances/{instance}/databases/{database}/metadata |
-| filter | [string](#string) | | 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 &#34;==&#34; operator. - table: the table name, support &#34;==&#34; and &#34;.contains()&#34; operator.
-
-For example: schema == &#34;schema-a&#34; table == &#34;table-a&#34; table.contains(&#34;table-a&#34;) schema == &#34;schema-a&#34; &amp;&amp; table.contains(&#34;sample&#34;) The filter is used to search for tables containing &#34;sample&#34; in the schema &#34;schemas/schema-a&#34;. The column masking level will only be returned when a table filter is used. |
-| limit | [int32](#int32) | | 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. |
+| name | [string](#string) | | The name of the composite type. |
+| attributes | [CompositeTypeAttribute](#bytebase-v1-CompositeTypeAttribute) | repeated | The ordered attributes of the composite type. |
+| comment | [string](#string) | | The comment describing the composite type. |
-<a name="bytebase-v1-GetDatabaseRequest"></a>
+<a name="bytebase-v1-Database"></a>
-### GetDatabaseRequest
+### Database
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database to retrieve. Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} |
+| name | [string](#string) | | 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 | [State](#bytebase-v1-State) | | The existence of a database. |
+| successful_sync_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The latest synchronization time. |
+| project | [string](#string) | | The project for a database. Format: projects/{project} |
+| release | [string](#string) | | The release that was last applied to this database. Format: projects/{project}/releases/{release_id} Example: projects/my-project/releases/release_20260115-RC00 |
+| environment | [string](#string) | optional | The environment resource. Format: environments/prod where prod is the environment resource ID. |
+| effective_environment | [string](#string) | optional | 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. |
+| labels | [Database.LabelsEntry](#bytebase-v1-Database-LabelsEntry) | repeated | Labels will be used for deployment and policy control. |
+| instance_resource | [InstanceResource](#bytebase-v1-InstanceResource) | | The instance resource. |
+| backup_available | [bool](#bool) | | The database is available for DML prior backup. |
+| sync_status | [SyncStatus](#bytebase-v1-SyncStatus) | | The sync status of the database. |
+| sync_error | [string](#string) | | The error message if sync failed. |
-<a name="bytebase-v1-GetDatabaseSDLSchemaRequest"></a>
+<a name="bytebase-v1-Database-LabelsEntry"></a>
-### GetDatabaseSDLSchemaRequest
+### Database.LabelsEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database to retrieve SDL schema. Format: instances/{instance}/databases/{database}/sdlSchema or projects/{project}/instances/{instance}/databases/{database}/sdlSchema |
-| format | [GetDatabaseSDLSchemaRequest.SDLFormat](#bytebase-v1-GetDatabaseSDLSchemaRequest-SDLFormat) | | The format of the SDL schema output. |
-
+| key | [string](#string) | | |
+| value | [string](#string) | | |
-<a name="bytebase-v1-GetDatabaseSchemaRequest"></a>
-### GetDatabaseSchemaRequest
+<a name="bytebase-v1-DatabaseMetadata"></a>
+### DatabaseMetadata
+DatabaseMetadata is the metadata for databases.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database to retrieve schema. Format: instances/{instance}/databases/{database}/schema or projects/{project}/instances/{instance}/databases/{database}/schema |
+| name | [string](#string) | | The database metadata name.
+Format: instances/{instance}/databases/{database}/metadata or projects/{project}/instances/{instance}/databases/{database}/metadata |
+| schemas | [SchemaMetadata](#bytebase-v1-SchemaMetadata) | repeated | The schemas is the list of schemas in a database. |
+| character_set | [string](#string) | | The character_set is the character set of a database. |
+| collation | [string](#string) | | The collation is the collation of a database. |
+| extensions | [ExtensionMetadata](#bytebase-v1-ExtensionMetadata) | repeated | The extensions is the list of extensions in a database. |
+| owner | [string](#string) | | The owner of the database. |
+| search_path | [string](#string) | | The search_path is the search path of a PostgreSQL database. |
-<a name="bytebase-v1-GetSchemaStringRequest"></a>
-### GetSchemaStringRequest
+<a name="bytebase-v1-DatabaseSDLSchema"></a>
+### DatabaseSDLSchema
+DatabaseSDLSchema contains the schema in SDL format.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database. Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} |
-| type | [GetSchemaStringRequest.ObjectType](#bytebase-v1-GetSchemaStringRequest-ObjectType) | | |
-| schema | [string](#string) | | It&#39;s empty for DATABASE. |
-| object | [string](#string) | | It&#39;s empty for DATABASE and SCHEMA. |
-| metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | If use the metadata to generate the schema string, the type is OBJECT_TYPE_UNSPECIFIED. Also the schema and object are empty. |
-
+| schema | [bytes](#bytes) | | 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. |
+| content_type | [string](#string) | | The MIME type of the schema content. Indicates how the client should interpret the schema field. Examples: - &#34;text/plain; charset=utf-8&#34; for SINGLE_FILE format - &#34;application/zip&#34; for MULTI_FILE format |
-<a name="bytebase-v1-GetSchemaStringResponse"></a>
-### GetSchemaStringResponse
+<a name="bytebase-v1-DatabaseSchema"></a>
+### DatabaseSchema
+DatabaseSchema is the metadata for databases.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| schema_string | [string](#string) | | |
+| schema | [string](#string) | | The schema dump from database. |
-<a name="bytebase-v1-GridLevel"></a>
+<a name="bytebase-v1-DependencyColumn"></a>
-### GridLevel
-GridLevel defines a tessellation grid level with its density.
+### DependencyColumn
+DependencyColumn is the metadata for dependency columns.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| level | [int32](#int32) | | Grid level number (1-4 for SQL Server) |
-| density | [string](#string) | | Grid density (LOW, MEDIUM, HIGH) |
+| schema | [string](#string) | | The schema is the schema of a reference column. |
+| table | [string](#string) | | The table is the table of a reference column. |
+| column | [string](#string) | | The column is the name of a reference column. |
-<a name="bytebase-v1-IndexMetadata"></a>
+<a name="bytebase-v1-DependencyTable"></a>
+
+### DependencyTable
-### IndexMetadata
-IndexMetadata is the metadata for indexes.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of an index. |
-| expressions | [string](#string) | repeated | The expressions are the ordered columns or expressions of an index. This could refer to a column or an expression. |
-| key_length | [int64](#int64) | repeated | The key_lengths are the ordered key lengths of an index. If the key length is not specified, it&#39;s -1. |
-| descending | [bool](#bool) | repeated | The descending is the ordered descending of an index. |
-| type | [string](#string) | | The type is the type of an index. |
-| unique | [bool](#bool) | | The unique is whether the index is unique. |
-| primary | [bool](#bool) | | The primary is whether the index is a primary key index. |
-| visible | [bool](#bool) | | The visible is whether the index is visible. |
-| comment | [string](#string) | | The comment is the comment of an index. |
-| definition | [string](#string) | | The definition of an index. |
-| parent_index_schema | [string](#string) | | The schema name of the parent index. |
-| parent_index_name | [string](#string) | | The index name of the parent index. |
-| granularity | [int64](#int64) | | The number of granules in the block. It&#39;s a ClickHouse specific field. |
-| is_constraint | [bool](#bool) | | It&#39;s a PostgreSQL specific field. The unique constraint and unique index are not the same thing in PostgreSQL. |
-| spatial_config | [SpatialIndexConfig](#bytebase-v1-SpatialIndexConfig) | | Spatial index configuration for spatial databases like SQL Server, PostgreSQL with PostGIS, etc. |
-| opclass_names | [string](#string) | repeated | https://www.postgresql.org/docs/current/catalog-pg-opclass.html Name of the operator class for each column. (PostgreSQL specific). |
-| opclass_defaults | [bool](#bool) | repeated | True if the operator class is the default. (PostgreSQL specific). |
+| schema | [string](#string) | | The schema is the schema of a reference table. |
+| table | [string](#string) | | The table is the name of a reference table. |
-<a name="bytebase-v1-ListDatabasesRequest"></a>
+<a name="bytebase-v1-DiffMetadataRequest"></a>
-### ListDatabasesRequest
+### DiffMetadataRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | - projects/{project}: list databases in a project, require &#34;bb.projects.get&#34; permission. - workspaces/{id}: list databases in the workspace, require &#34;bb.databases.list&#34; permission. - instances/{instance}: list databases in an instance, require &#34;bb.instances.get&#34; permission. - projects/{project}/instances/{instance}: list databases in a project instance, require &#34;bb.instances.get&#34; permission. |
-| page_size | [int32](#int32) | | 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. |
-| page_token | [string](#string) | | 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 | [string](#string) | | 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 &#34;environments/{id}&#34; format, support &#34;==&#34; operator. - name: the database name, support &#34;.contains()&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator. - instance: the instance full name in &#34;instances/{id}&#34; or &#34;projects/{project}/instances/{id}&#34; format, support &#34;==&#34; operator. - engine: the database engine, check Engine enum for values. Support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator. - exclude_unassigned: should be &#34;true&#34; or &#34;false&#34;, will not show unassigned databases if it&#39;s true, support &#34;==&#34; operator. - table: filter by the database table, support &#34;==&#34; and &#34;.contains()&#34; operator. - labels.{key}: the database label, support &#34;==&#34; and &#34;in&#34; operators.
-
-For example: environment == &#34;environments/{environment resource id}&#34; environment == &#34;&#34; (find databases which environment is not set) project == &#34;projects/{project resource id}&#34; instance == &#34;instances/{instance resource id}&#34; instance == &#34;projects/{project resource id}/instances/{instance resource id}&#34; name.contains(&#34;database name&#34;) engine == &#34;MYSQL&#34; engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;] !(engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;]) exclude_unassigned == true table == &#34;sample&#34; table.contains(&#34;sam&#34;) labels.environment == &#34;production&#34; labels.region == &#34;asia&#34; labels.region in [&#34;asia&#34;, &#34;europe&#34;]
-
-You can combine filter conditions like: environment == &#34;environments/prod&#34; &amp;&amp; name.contains(&#34;employee&#34;) |
-| show_deleted | [bool](#bool) | | Show deleted database if specified. |
-| order_by | [string](#string) | | The order by of databases. Support name, project, instance. The default sorting order is ascending. For example: - order_by = &#34;name&#34; - order by name ascending - order_by = &#34;name desc&#34; - order_by = &#34;name desc, project asc&#34; |
+| name | [string](#string) | | The database whose current schema is the diff source. Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} |
+| target_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | 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. |
-<a name="bytebase-v1-ListDatabasesResponse"></a>
+<a name="bytebase-v1-DiffMetadataResponse"></a>
-### ListDatabasesResponse
+### DiffMetadataResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| databases | [Database](#bytebase-v1-Database) | repeated | The databases from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+| diff | [string](#string) | | The generated migration statements. |
-<a name="bytebase-v1-MaterializedViewMetadata"></a>
+<a name="bytebase-v1-DiffSchemaRequest"></a>
+
+### DiffSchemaRequest
-### MaterializedViewMetadata
-MaterializedViewMetadata is the metadata for materialized views.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a materialized view. |
-| definition | [string](#string) | | The definition is the definition of a materialized view. |
-| comment | [string](#string) | | The comment is the comment of a materialized view. |
-| dependency_columns | [DependencyColumn](#bytebase-v1-DependencyColumn) | repeated | The dependency_columns is the list of dependency columns of a materialized view. |
-| triggers | [TriggerMetadata](#bytebase-v1-TriggerMetadata) | repeated | The columns is the ordered list of columns in a table. |
-| indexes | [IndexMetadata](#bytebase-v1-IndexMetadata) | repeated | The indexes is the list of indexes in a table. |
-| skip_dump | [bool](#bool) | | |
+| name | [string](#string) | | 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} |
+| schema | [string](#string) | | The target schema. |
+| changelog | [string](#string) | | The resource name of the changelog Format: instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog} |
-<a name="bytebase-v1-PackageMetadata"></a>
+<a name="bytebase-v1-DiffSchemaResponse"></a>
+
+### DiffSchemaResponse
-### PackageMetadata
-PackageMetadata is the metadata for packages.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a package. |
-| definition | [string](#string) | | The definition is the definition of a package. |
+| diff | [string](#string) | | |
-<a name="bytebase-v1-ProcedureMetadata"></a>
+<a name="bytebase-v1-DimensionConstraint"></a>
-### ProcedureMetadata
-ProcedureMetadata is the metadata for procedures.
+### DimensionConstraint
+DimensionConstraint defines constraints for a spatial dimension.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a procedure. |
-| definition | [string](#string) | | The definition is the definition of a procedure. |
-| signature | [string](#string) | | The signature is the name with the number and type of input arguments the procedure takes. |
-| character_set_client | [string](#string) | | MySQL specific metadata. |
-| collation_connection | [string](#string) | | |
-| database_collation | [string](#string) | | |
-| sql_mode | [string](#string) | | |
-| comment | [string](#string) | | The comment is the comment of a procedure. |
-| skip_dump | [bool](#bool) | | |
-
+| dimension | [string](#string) | | Dimension name/type (X, Y, Z, M, etc.) |
+| min_value | [double](#double) | | Minimum value for this dimension |
+| max_value | [double](#double) | | Maximum value for this dimension |
+| tolerance | [double](#double) | | Tolerance for this dimension |
-<a name="bytebase-v1-SchemaMetadata"></a>
-### SchemaMetadata
-SchemaMetadata is the metadata for schemas.
-This is the concept of schema in Postgres, but it&#39;s a no-op for MySQL.
+<a name="bytebase-v1-DimensionalConfig"></a>
+
+### DimensionalConfig
+DimensionalConfig defines dimensional and constraint parameters for spatial indexes.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the schema name. It is an empty string for databases without such concept such as MySQL. |
-| tables | [TableMetadata](#bytebase-v1-TableMetadata) | repeated | The tables is the list of tables in a schema. |
-| external_tables | [ExternalTableMetadata](#bytebase-v1-ExternalTableMetadata) | repeated | The external_tables is the list of external tables in a schema. |
-| views | [ViewMetadata](#bytebase-v1-ViewMetadata) | repeated | The views is the list of views in a schema. |
-| functions | [FunctionMetadata](#bytebase-v1-FunctionMetadata) | repeated | The functions is the list of functions in a schema. |
-| procedures | [ProcedureMetadata](#bytebase-v1-ProcedureMetadata) | repeated | The procedures is the list of procedures in a schema. |
-| streams | [StreamMetadata](#bytebase-v1-StreamMetadata) | repeated | The streams is the list of streams in a schema, currently, only used for Snowflake. |
-| tasks | [TaskMetadata](#bytebase-v1-TaskMetadata) | repeated | The routines is the list of routines in a schema, currently, only used for Snowflake. |
-| materialized_views | [MaterializedViewMetadata](#bytebase-v1-MaterializedViewMetadata) | repeated | The materialized_views is the list of materialized views in a schema. |
-| packages | [PackageMetadata](#bytebase-v1-PackageMetadata) | repeated | The packages is the list of packages in a schema. |
-| owner | [string](#string) | | The owner of the schema. |
-| sequences | [SequenceMetadata](#bytebase-v1-SequenceMetadata) | repeated | The sequences is the list of sequences in a schema, sorted by name. |
-| events | [EventMetadata](#bytebase-v1-EventMetadata) | repeated | The events is the list of scheduled events in a schema. |
-| enum_types | [EnumTypeMetadata](#bytebase-v1-EnumTypeMetadata) | repeated | The enum_types is the list of user-defined enum types in a schema. |
-| skip_dump | [bool](#bool) | | Whether to skip this schema during schema dump operations. |
-| comment | [string](#string) | | The comment is the comment of a schema. |
-| composite_types | [CompositeTypeMetadata](#bytebase-v1-CompositeTypeMetadata) | repeated | 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. |
+| dimensions | [int32](#int32) | | Number of dimensions (2-4, default 2) |
+| data_type | [string](#string) | | Spatial data type (GEOMETRY, GEOGRAPHY, POINT, POLYGON, etc.) |
+| srid | [int32](#int32) | | Spatial reference system identifier (SRID) |
+| constraints | [DimensionConstraint](#bytebase-v1-DimensionConstraint) | repeated | Coordinate system constraints |
-<a name="bytebase-v1-SequenceMetadata"></a>
+<a name="bytebase-v1-EnumTypeMetadata"></a>
-### SequenceMetadata
+### EnumTypeMetadata
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of a sequence. |
-| data_type | [string](#string) | | The data type of a sequence. |
-| start | [string](#string) | | The start value of a sequence. |
-| min_value | [string](#string) | | The minimum value of a sequence. |
-| max_value | [string](#string) | | The maximum value of a sequence. |
-| increment | [string](#string) | | Increment value of a sequence. |
-| cycle | [bool](#bool) | | Cycle is whether the sequence cycles. |
-| cache_size | [string](#string) | | Cache size of a sequence. |
-| last_value | [string](#string) | | Last value of a sequence. |
-| owner_table | [string](#string) | | The owner table of the sequence. |
-| owner_column | [string](#string) | | The owner column of the sequence. |
-| comment | [string](#string) | | The comment describing the sequence. |
-| skip_dump | [bool](#bool) | | Whether to skip this sequence during schema dump operations. |
+| name | [string](#string) | | The name of a type. |
+| values | [string](#string) | repeated | The enum values of a type. |
+| comment | [string](#string) | | The comment describing the enum type. |
+| skip_dump | [bool](#bool) | | Whether to skip this enum type during schema dump operations. |
-<a name="bytebase-v1-SpatialIndexConfig"></a>
+<a name="bytebase-v1-EventMetadata"></a>
+
+### EventMetadata
-### SpatialIndexConfig
-SpatialIndexConfig defines the spatial index configuration for spatial databases.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| method | [string](#string) | | Spatial indexing method (e.g., &#34;SPATIAL&#34;, &#34;R-TREE&#34;, &#34;GIST&#34;) |
-| tessellation | [TessellationConfig](#bytebase-v1-TessellationConfig) | | Tessellation configuration for grid-based spatial indexes |
-| storage | [StorageConfig](#bytebase-v1-StorageConfig) | | Storage and performance configuration |
-| dimensional | [DimensionalConfig](#bytebase-v1-DimensionalConfig) | | Dimensional configuration |
+| name | [string](#string) | | The name of the event. |
+| definition | [string](#string) | | The schedule of the event. |
+| time_zone | [string](#string) | | The time zone of the event. |
+| sql_mode | [string](#string) | | The SQL mode setting for the event. |
+| character_set_client | [string](#string) | | The character set used by the client creating the event. |
+| collation_connection | [string](#string) | | The collation used for the connection when creating the event. |
+| comment | [string](#string) | | The comment is the comment of an event. |
-<a name="bytebase-v1-StorageConfig"></a>
+<a name="bytebase-v1-ExtensionMetadata"></a>
-### StorageConfig
-StorageConfig defines storage and performance parameters for spatial indexes.
+### ExtensionMetadata
+ExtensionMetadata is the metadata for extensions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| fillfactor | [int32](#int32) | | Fill factor percentage (1-100) |
-| buffering | [string](#string) | | Buffering mode for PostgreSQL (auto, on, off) |
-| tablespace | [string](#string) | | Tablespace configuration for Oracle |
-| work_tablespace | [string](#string) | | |
-| sdo_level | [int32](#int32) | | |
-| commit_interval | [int32](#int32) | | |
-| pad_index | [bool](#bool) | | SQL Server specific parameters |
-| sort_in_tempdb | [string](#string) | | ON, OFF |
-| drop_existing | [bool](#bool) | | |
-| online | [bool](#bool) | | |
-| allow_row_locks | [bool](#bool) | | |
-| allow_page_locks | [bool](#bool) | | |
-| maxdop | [int32](#int32) | | |
-| data_compression | [string](#string) | | NONE, ROW, PAGE |
+| name | [string](#string) | | The name is the name of an extension. |
+| schema | [string](#string) | | The schema is the extension that is installed to. But the extension usage is not limited to the schema. |
+| version | [string](#string) | | The version is the version of an extension. |
+| description | [string](#string) | | The description is the description of an extension. |
-<a name="bytebase-v1-StreamMetadata"></a>
+<a name="bytebase-v1-ExternalTableMetadata"></a>
-### StreamMetadata
+### ExternalTableMetadata
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a stream. |
-| table_name | [string](#string) | | The table_name is the name of the table/view that the stream is created on. |
-| owner | [string](#string) | | The owner of the stream. |
-| comment | [string](#string) | | The comment of the stream. |
-| type | [StreamMetadata.Type](#bytebase-v1-StreamMetadata-Type) | | The type of the stream. |
-| stale | [bool](#bool) | | Indicates whether the stream was last read before the `stale_after` time. |
-| mode | [StreamMetadata.Mode](#bytebase-v1-StreamMetadata-Mode) | | The mode of the stream. |
-| definition | [string](#string) | | The definition of the stream. |
-
+| name | [string](#string) | | The name is the name of a external table. |
+| external_server_name | [string](#string) | | The external_server_name is the name of the external server. |
+| external_database_name | [string](#string) | | The external_database_name is the name of the external database. |
+| columns | [ColumnMetadata](#bytebase-v1-ColumnMetadata) | repeated | The columns is the ordered list of columns in a foreign table. |
-<a name="bytebase-v1-SyncDatabaseRequest"></a>
-### SyncDatabaseRequest
+<a name="bytebase-v1-ForeignKeyMetadata"></a>
+### ForeignKeyMetadata
+ForeignKeyMetadata is the metadata for foreign keys.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database to sync. Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} |
+| name | [string](#string) | | The name is the name of a foreign key. |
+| columns | [string](#string) | repeated | The columns are the ordered referencing columns of a foreign key. |
+| referenced_schema | [string](#string) | | 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. |
+| referenced_table | [string](#string) | | The referenced_table is the referenced table name of a foreign key. |
+| referenced_columns | [string](#string) | repeated | The referenced_columns are the ordered referenced columns of a foreign key. |
+| on_delete | [string](#string) | | The on_delete is the on delete action of a foreign key. |
+| on_update | [string](#string) | | The on_update is the on update action of a foreign key. |
+| match_type | [string](#string) | | The match_type is the match type of a foreign key. The match_type is the PostgreSQL specific field. It&#39;s empty string for other databases. |
-<a name="bytebase-v1-SyncDatabaseResponse"></a>
+<a name="bytebase-v1-FunctionMetadata"></a>
-### SyncDatabaseResponse
+### FunctionMetadata
+FunctionMetadata is the metadata for functions.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name is the name of a function. |
+| definition | [string](#string) | | The definition is the definition of a function. |
+| signature | [string](#string) | | The signature is the name with the number and type of input arguments the function takes. |
+| character_set_client | [string](#string) | | MySQL specific metadata. |
+| collation_connection | [string](#string) | | |
+| database_collation | [string](#string) | | |
+| sql_mode | [string](#string) | | |
+| comment | [string](#string) | | |
+| dependency_tables | [DependencyTable](#bytebase-v1-DependencyTable) | repeated | The dependency_tables is the list of dependency tables of a function. For PostgreSQL, it&#39;s the list of tables that the function depends on the return type definition. |
+| skip_dump | [bool](#bool) | | |
+<a name="bytebase-v1-GenerationMetadata"></a>
-<a name="bytebase-v1-TableMetadata"></a>
+### GenerationMetadata
-### TableMetadata
-TableMetadata is the metadata for tables.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a table. |
-| columns | [ColumnMetadata](#bytebase-v1-ColumnMetadata) | repeated | The columns is the ordered list of columns in a table. |
-| indexes | [IndexMetadata](#bytebase-v1-IndexMetadata) | repeated | The indexes is the list of indexes in a table. |
-| engine | [string](#string) | | The engine is the engine of a table. |
-| collation | [string](#string) | | The collation is the collation of a table. |
-| charset | [string](#string) | | The character set of table. |
-| row_count | [int64](#int64) | | The row_count is the estimated number of rows of a table. |
-| data_size | [int64](#int64) | | The data_size is the estimated data size of a table. |
-| index_size | [int64](#int64) | | The index_size is the estimated index size of a table. |
-| data_free | [int64](#int64) | | The data_free is the estimated free data size of a table. |
-| create_options | [string](#string) | | The create_options is the create option of a table. |
-| comment | [string](#string) | | The comment is the comment of a table. |
-| foreign_keys | [ForeignKeyMetadata](#bytebase-v1-ForeignKeyMetadata) | repeated | The foreign_keys is the list of foreign keys in a table. |
-| partitions | [TablePartitionMetadata](#bytebase-v1-TablePartitionMetadata) | repeated | The partitions is the list of partitions in a table. |
-| check_constraints | [CheckConstraintMetadata](#bytebase-v1-CheckConstraintMetadata) | repeated | The check_constraints is the list of check constraints in a table. |
-| owner | [string](#string) | | The owner of the table. |
-| sorting_keys | [string](#string) | repeated | 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 | [TriggerMetadata](#bytebase-v1-TriggerMetadata) | repeated | The triggers is the list of triggers associated with the table. |
-| skip_dump | [bool](#bool) | | Whether to skip this table during schema dump operations. |
-| sharding_info | [string](#string) | | https://docs.pingcap.com/tidb/stable/information-schema-tables/ |
-| primary_key_type | [string](#string) | | https://docs.pingcap.com/tidb/stable/clustered-indexes/#clustered-indexes CLUSTERED or NONCLUSTERED. |
+| type | [GenerationMetadata.Type](#bytebase-v1-GenerationMetadata-Type) | | |
+| expression | [string](#string) | | |
-<a name="bytebase-v1-TablePartitionMetadata"></a>
+<a name="bytebase-v1-GetDatabaseMetadataRequest"></a>
+
+### GetDatabaseMetadataRequest
-### TablePartitionMetadata
-TablePartitionMetadata is the metadata for table partitions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a table partition. |
-| type | [TablePartitionMetadata.Type](#bytebase-v1-TablePartitionMetadata-Type) | | The type of a table partition. |
-| expression | [string](#string) | | 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 | [string](#string) | | 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&#39;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&#39;s VALUES IN clause, which is a list of comma-separated integer values. - For others, it&#39;s an empty string. |
-| use_default | [string](#string) | | The use_default is whether the users use the default partition, it stores the different value for different database engines. For MySQL, it&#39;s [INT] type, 0 means not use default partition, otherwise, it&#39;s equals to number in syntax [SUB]PARTITION {number}. |
-| subpartitions | [TablePartitionMetadata](#bytebase-v1-TablePartitionMetadata) | repeated | The subpartitions is the list of subpartitions in a table partition. |
-| indexes | [IndexMetadata](#bytebase-v1-IndexMetadata) | repeated | |
-| check_constraints | [CheckConstraintMetadata](#bytebase-v1-CheckConstraintMetadata) | repeated | |
+| name | [string](#string) | | The name of the database to retrieve metadata. Format: instances/{instance}/databases/{database}/metadata or projects/{project}/instances/{instance}/databases/{database}/metadata |
+| filter | [string](#string) | | 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 &#34;==&#34; operator. - table: the table name, support &#34;==&#34; and &#34;.contains()&#34; operator.
+For example: schema == &#34;schema-a&#34; table == &#34;table-a&#34; table.contains(&#34;table-a&#34;) schema == &#34;schema-a&#34; &amp;&amp; table.contains(&#34;sample&#34;) The filter is used to search for tables containing &#34;sample&#34; in the schema &#34;schemas/schema-a&#34;. The column masking level will only be returned when a table filter is used. |
+| limit | [int32](#int32) | | 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. |
-<a name="bytebase-v1-TaskMetadata"></a>
-### TaskMetadata
+
+<a name="bytebase-v1-GetDatabaseRequest"></a>
+
+### GetDatabaseRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a task. |
-| id | [string](#string) | | The id is the snowflake-generated id of a task. Example: 01ad32a0-1bb6-5e93-0000-000000000001 |
-| owner | [string](#string) | | The owner of the task. |
-| comment | [string](#string) | | The comment of the task. |
-| warehouse | [string](#string) | | The warehouse of the task. |
-| schedule | [string](#string) | | The schedule interval of the task. |
-| predecessors | [string](#string) | repeated | The predecessor tasks of the task. |
-| state | [TaskMetadata.State](#bytebase-v1-TaskMetadata-State) | | The state of the task. |
-| condition | [string](#string) | | The condition of the task. |
-| definition | [string](#string) | | The definition of the task. |
+| name | [string](#string) | | The name of the database to retrieve. Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} |
-<a name="bytebase-v1-TessellationConfig"></a>
+<a name="bytebase-v1-GetDatabaseSDLSchemaRequest"></a>
+
+### GetDatabaseSDLSchemaRequest
-### TessellationConfig
-TessellationConfig defines tessellation parameters for spatial indexes.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| scheme | [string](#string) | | Tessellation scheme (e.g., &#34;GEOMETRY_GRID&#34;, &#34;GEOGRAPHY_GRID&#34;, &#34;GEOMETRY_AUTO_GRID&#34;) |
-| grid_levels | [GridLevel](#bytebase-v1-GridLevel) | repeated | Grid levels and densities for multi-level tessellation |
-| cells_per_object | [int32](#int32) | | Number of cells per object (1-8192 for SQL Server) |
-| bounding_box | [BoundingBox](#bytebase-v1-BoundingBox) | | Bounding box for GEOMETRY tessellation (not used for GEOGRAPHY) |
+| name | [string](#string) | | The name of the database to retrieve SDL schema. Format: instances/{instance}/databases/{database}/sdlSchema or projects/{project}/instances/{instance}/databases/{database}/sdlSchema |
+| format | [GetDatabaseSDLSchemaRequest.SDLFormat](#bytebase-v1-GetDatabaseSDLSchemaRequest-SDLFormat) | | The format of the SDL schema output. |
-<a name="bytebase-v1-TriggerMetadata"></a>
+<a name="bytebase-v1-GetDatabaseSchemaRequest"></a>
-### TriggerMetadata
+### GetDatabaseSchemaRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of the trigger. |
-| event | [string](#string) | | The event is the event of the trigger, such as INSERT, UPDATE, DELETE, TRUNCATE. |
-| timing | [string](#string) | | The timing is the timing of the trigger, such as BEFORE, AFTER. |
-| body | [string](#string) | | The body is the body of the trigger. |
-| sql_mode | [string](#string) | | The SQL mode setting for the trigger. |
-| character_set_client | [string](#string) | | The character set used by the client creating the trigger. |
-| collation_connection | [string](#string) | | The collation used for the connection when creating the trigger. |
-| comment | [string](#string) | | The comment describing the trigger. |
-| skip_dump | [bool](#bool) | | Whether to skip this trigger during schema dump operations. |
+| name | [string](#string) | | The name of the database to retrieve schema. Format: instances/{instance}/databases/{database}/schema or projects/{project}/instances/{instance}/databases/{database}/schema |
-<a name="bytebase-v1-UpdateDatabaseRequest"></a>
+<a name="bytebase-v1-GetSchemaStringRequest"></a>
-### UpdateDatabaseRequest
+### GetSchemaStringRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| database | [Database](#bytebase-v1-Database) | | The database to update.
+| name | [string](#string) | | The name of the database. Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} |
+| type | [GetSchemaStringRequest.ObjectType](#bytebase-v1-GetSchemaStringRequest-ObjectType) | | |
+| schema | [string](#string) | | It&#39;s empty for DATABASE. |
+| object | [string](#string) | | It&#39;s empty for DATABASE and SCHEMA. |
+| metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | If use the metadata to generate the schema string, the type is OBJECT_TYPE_UNSPECIFIED. Also the schema and object are empty. |
-The database&#39;s `name` field is used to identify the database to update. Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+<a name="bytebase-v1-GetSchemaStringResponse"></a>
-<a name="bytebase-v1-ViewMetadata"></a>
+### GetSchemaStringResponse
-### ViewMetadata
-ViewMetadata is the metadata for views.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a view. |
-| definition | [string](#string) | | The definition is the definition of a view. |
-| comment | [string](#string) | | The comment is the comment of a view. |
-| dependency_columns | [DependencyColumn](#bytebase-v1-DependencyColumn) | repeated | The dependency_columns is the list of dependency columns of a view. |
-| columns | [ColumnMetadata](#bytebase-v1-ColumnMetadata) | repeated | The columns is the ordered list of columns in a table. |
-| triggers | [TriggerMetadata](#bytebase-v1-TriggerMetadata) | repeated | The triggers is the list of triggers in a view. |
-| skip_dump | [bool](#bool) | | |
+| schema_string | [string](#string) | | |
-
+<a name="bytebase-v1-GridLevel"></a>
-<a name="bytebase-v1-ColumnMetadata-IdentityGeneration"></a>
+### GridLevel
+GridLevel defines a tessellation grid level with its density.
-### ColumnMetadata.IdentityGeneration
-
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| IDENTITY_GENERATION_UNSPECIFIED | 0 | |
-| ALWAYS | 1 | |
-| BY_DEFAULT | 2 | |
-
-
-
-<a name="bytebase-v1-GenerationMetadata-Type"></a>
-
-### GenerationMetadata.Type
-
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | |
-| VIRTUAL | 1 | |
-| STORED | 2 | |
-
-
-
-<a name="bytebase-v1-GetDatabaseSDLSchemaRequest-SDLFormat"></a>
-
-### GetDatabaseSDLSchemaRequest.SDLFormat
-SDLFormat specifies the output format for SDL schema.
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| SDL_FORMAT_UNSPECIFIED | 0 | Unspecified format. Defaults to SINGLE_FILE. |
-| SINGLE_FILE | 1 | Single file format: returns the complete SDL schema as a single file. |
-| MULTI_FILE | 2 | Multi-file format: returns the SDL schema as a ZIP archive containing multiple files organized by schema objects (tables, views, functions, etc.). |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| level | [int32](#int32) | | Grid level number (1-4 for SQL Server) |
+| density | [string](#string) | | Grid density (LOW, MEDIUM, HIGH) |
-<a name="bytebase-v1-GetSchemaStringRequest-ObjectType"></a>
-### GetSchemaStringRequest.ObjectType
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| OBJECT_TYPE_UNSPECIFIED | 0 | |
-| DATABASE | 1 | |
-| SCHEMA | 2 | |
-| TABLE | 3 | |
-| VIEW | 4 | |
-| MATERIALIZED_VIEW | 5 | |
-| FUNCTION | 6 | |
-| PROCEDURE | 7 | |
-| SEQUENCE | 8 | |
+<a name="bytebase-v1-IndexMetadata"></a>
+### IndexMetadata
+IndexMetadata is the metadata for indexes.
-<a name="bytebase-v1-StreamMetadata-Mode"></a>
-### StreamMetadata.Mode
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name is the name of an index. |
+| expressions | [string](#string) | repeated | The expressions are the ordered columns or expressions of an index. This could refer to a column or an expression. |
+| key_length | [int64](#int64) | repeated | The key_lengths are the ordered key lengths of an index. If the key length is not specified, it&#39;s -1. |
+| descending | [bool](#bool) | repeated | The descending is the ordered descending of an index. |
+| type | [string](#string) | | The type is the type of an index. |
+| unique | [bool](#bool) | | The unique is whether the index is unique. |
+| primary | [bool](#bool) | | The primary is whether the index is a primary key index. |
+| visible | [bool](#bool) | | The visible is whether the index is visible. |
+| comment | [string](#string) | | The comment is the comment of an index. |
+| definition | [string](#string) | | The definition of an index. |
+| parent_index_schema | [string](#string) | | The schema name of the parent index. |
+| parent_index_name | [string](#string) | | The index name of the parent index. |
+| granularity | [int64](#int64) | | The number of granules in the block. It&#39;s a ClickHouse specific field. |
+| is_constraint | [bool](#bool) | | It&#39;s a PostgreSQL specific field. The unique constraint and unique index are not the same thing in PostgreSQL. |
+| spatial_config | [SpatialIndexConfig](#bytebase-v1-SpatialIndexConfig) | | Spatial index configuration for spatial databases like SQL Server, PostgreSQL with PostGIS, etc. |
+| opclass_names | [string](#string) | repeated | https://www.postgresql.org/docs/current/catalog-pg-opclass.html Name of the operator class for each column. (PostgreSQL specific). |
+| opclass_defaults | [bool](#bool) | repeated | True if the operator class is the default. (PostgreSQL specific). |
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| MODE_UNSPECIFIED | 0 | |
-| DEFAULT | 1 | |
-| APPEND_ONLY | 2 | |
-| INSERT_ONLY | 3 | |
-<a name="bytebase-v1-StreamMetadata-Type"></a>
-### StreamMetadata.Type
+<a name="bytebase-v1-ListDatabasesRequest"></a>
+### ListDatabasesRequest
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | |
-| DELTA | 1 | |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| parent | [string](#string) | | - projects/{project}: list databases in a project, require &#34;bb.projects.get&#34; permission. - workspaces/{id}: list databases in the workspace, require &#34;bb.databases.list&#34; permission. - instances/{instance}: list databases in an instance, require &#34;bb.instances.get&#34; permission. - projects/{project}/instances/{instance}: list databases in a project instance, require &#34;bb.instances.get&#34; permission. |
+| page_size | [int32](#int32) | | 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. |
+| page_token | [string](#string) | | A page token, received from a previous `ListDatabases` call. Provide this to retrieve the subsequent page.
-<a name="bytebase-v1-SyncStatus"></a>
+When paginating, all other parameters provided to `ListDatabases` must match the call that provided the page token. |
+| filter | [string](#string) | | 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
-### SyncStatus
-SyncStatus is the status of the database sync operation.
+Supported filter: - environment: the environment full name in &#34;environments/{id}&#34; format, support &#34;==&#34; operator. - name: the database name, support &#34;.contains()&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator. - instance: the instance full name in &#34;instances/{id}&#34; or &#34;projects/{project}/instances/{id}&#34; format, support &#34;==&#34; operator. - engine: the database engine, check Engine enum for values. Support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator. - exclude_unassigned: should be &#34;true&#34; or &#34;false&#34;, will not show unassigned databases if it&#39;s true, support &#34;==&#34; operator. - table: filter by the database table, support &#34;==&#34; and &#34;.contains()&#34; operator. - labels.{key}: the database label, support &#34;==&#34; and &#34;in&#34; operators.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| SYNC_STATUS_UNSPECIFIED | 0 | |
-| OK | 1 | The database was synced successfully. |
-| FAILED | 2 | The database sync failed. |
+For example: environment == &#34;environments/{environment resource id}&#34; environment == &#34;&#34; (find databases which environment is not set) project == &#34;projects/{project resource id}&#34; instance == &#34;instances/{instance resource id}&#34; instance == &#34;projects/{project resource id}/instances/{instance resource id}&#34; name.contains(&#34;database name&#34;) engine == &#34;MYSQL&#34; engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;] !(engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;]) exclude_unassigned == true table == &#34;sample&#34; table.contains(&#34;sam&#34;) labels.environment == &#34;production&#34; labels.region == &#34;asia&#34; labels.region in [&#34;asia&#34;, &#34;europe&#34;]
+You can combine filter conditions like: environment == &#34;environments/prod&#34; &amp;&amp; name.contains(&#34;employee&#34;) |
+| show_deleted | [bool](#bool) | | Show deleted database if specified. |
+| order_by | [string](#string) | | The order by of databases. Support name, project, instance. The default sorting order is ascending. For example: - order_by = &#34;name&#34; - order by name ascending - order_by = &#34;name desc&#34; - order_by = &#34;name desc, project asc&#34; |
-<a name="bytebase-v1-TablePartitionMetadata-Type"></a>
-### TablePartitionMetadata.Type
-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)
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | |
-| RANGE | 1 | |
-| RANGE_COLUMNS | 2 | |
-| LIST | 3 | |
-| LIST_COLUMNS | 4 | |
-| HASH | 5 | |
-| LINEAR_HASH | 6 | |
-| KEY | 7 | |
-| LINEAR_KEY | 8 | |
+<a name="bytebase-v1-ListDatabasesResponse"></a>
-<a name="bytebase-v1-TaskMetadata-State"></a>
+### ListDatabasesResponse
-### TaskMetadata.State
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| STATE_UNSPECIFIED | 0 | |
-| STARTED | 1 | |
-| SUSPENDED | 2 | |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| databases | [Database](#bytebase-v1-Database) | repeated | The databases from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-
-
-<a name="bytebase-v1-DatabaseService"></a>
-### DatabaseService
-DatabaseService manages databases and their schemas.
+<a name="bytebase-v1-MaterializedViewMetadata"></a>
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| GetDatabase | [GetDatabaseRequest](#bytebase-v1-GetDatabaseRequest) | [Database](#bytebase-v1-Database) | Retrieves a database by name. Permissions required: bb.databases.get |
-| BatchGetDatabases | [BatchGetDatabasesRequest](#bytebase-v1-BatchGetDatabasesRequest) | [BatchGetDatabasesResponse](#bytebase-v1-BatchGetDatabasesResponse) | 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&#39;s project) |
-| ListDatabases | [ListDatabasesRequest](#bytebase-v1-ListDatabasesRequest) | [ListDatabasesResponse](#bytebase-v1-ListDatabasesResponse) | Lists databases in a project, instance, or workspace. Permissions required: bb.projects.get (for project parent), bb.databases.list (for workspace parent), or bb.instances.get (for instance parent) |
-| UpdateDatabase | [UpdateDatabaseRequest](#bytebase-v1-UpdateDatabaseRequest) | [Database](#bytebase-v1-Database) | Updates database properties such as labels and project assignment. Permissions required: bb.databases.update |
-| BatchUpdateDatabases | [BatchUpdateDatabasesRequest](#bytebase-v1-BatchUpdateDatabasesRequest) | [BatchUpdateDatabasesResponse](#bytebase-v1-BatchUpdateDatabasesResponse) | Updates multiple databases in a single batch operation. Permissions required: bb.databases.update |
-| SyncDatabase | [SyncDatabaseRequest](#bytebase-v1-SyncDatabaseRequest) | [SyncDatabaseResponse](#bytebase-v1-SyncDatabaseResponse) | Synchronizes database schema from the instance. Permissions required: bb.databases.sync |
-| BatchSyncDatabases | [BatchSyncDatabasesRequest](#bytebase-v1-BatchSyncDatabasesRequest) | [BatchSyncDatabasesResponse](#bytebase-v1-BatchSyncDatabasesResponse) | Synchronizes multiple databases in a single batch operation. Permissions required: bb.databases.sync |
-| GetDatabaseMetadata | [GetDatabaseMetadataRequest](#bytebase-v1-GetDatabaseMetadataRequest) | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | Retrieves database metadata including tables, columns, and indexes. Permissions required: bb.databases.getSchema |
-| GetDatabaseSchema | [GetDatabaseSchemaRequest](#bytebase-v1-GetDatabaseSchemaRequest) | [DatabaseSchema](#bytebase-v1-DatabaseSchema) | Retrieves database schema as DDL statements. Permissions required: bb.databases.getSchema |
-| GetDatabaseSDLSchema | [GetDatabaseSDLSchemaRequest](#bytebase-v1-GetDatabaseSDLSchemaRequest) | [DatabaseSDLSchema](#bytebase-v1-DatabaseSDLSchema) | Retrieves database schema in SDL (Schema Definition Language) format. Permissions required: bb.databases.getSchema |
-| DiffSchema | [DiffSchemaRequest](#bytebase-v1-DiffSchemaRequest) | [DiffSchemaResponse](#bytebase-v1-DiffSchemaResponse) | Compares and generates migration statements between two schemas. Permissions required: bb.databases.get |
-| DiffMetadata | [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest) | [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse) | Generates migration statements from the database&#39;s current schema to the given target metadata. Permissions required: bb.databases.diffMetadata |
-| GetSchemaString | [GetSchemaStringRequest](#bytebase-v1-GetSchemaStringRequest) | [GetSchemaStringResponse](#bytebase-v1-GetSchemaStringResponse) | Generates schema DDL for a database object. Permissions required: bb.databases.getSchema |
+### MaterializedViewMetadata
+MaterializedViewMetadata is the metadata for materialized views.
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name is the name of a materialized view. |
+| definition | [string](#string) | | The definition is the definition of a materialized view. |
+| comment | [string](#string) | | The comment is the comment of a materialized view. |
+| dependency_columns | [DependencyColumn](#bytebase-v1-DependencyColumn) | repeated | The dependency_columns is the list of dependency columns of a materialized view. |
+| triggers | [TriggerMetadata](#bytebase-v1-TriggerMetadata) | repeated | The columns is the ordered list of columns in a table. |
+| indexes | [IndexMetadata](#bytebase-v1-IndexMetadata) | repeated | The indexes is the list of indexes in a table. |
+| skip_dump | [bool](#bool) | | |
-<a name="v1_group_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/group_service.proto
-<a name="bytebase-v1-BatchGetGroupsRequest"></a>
+<a name="bytebase-v1-PackageMetadata"></a>
-### BatchGetGroupsRequest
-Request message for batch getting groups.
+### PackageMetadata
+PackageMetadata is the metadata for packages.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| names | [string](#string) | repeated | The group names to retrieve. Format: groups/{email} |
+| name | [string](#string) | | The name is the name of a package. |
+| definition | [string](#string) | | The definition is the definition of a package. |
-<a name="bytebase-v1-BatchGetGroupsResponse"></a>
+<a name="bytebase-v1-ProcedureMetadata"></a>
-### BatchGetGroupsResponse
-Response message for batch getting groups.
+### ProcedureMetadata
+ProcedureMetadata is the metadata for procedures.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| groups | [Group](#bytebase-v1-Group) | repeated | One group per requested name, in the same order as `names`. |
+| name | [string](#string) | | The name is the name of a procedure. |
+| definition | [string](#string) | | The definition is the definition of a procedure. |
+| signature | [string](#string) | | The signature is the name with the number and type of input arguments the procedure takes. |
+| character_set_client | [string](#string) | | MySQL specific metadata. |
+| collation_connection | [string](#string) | | |
+| database_collation | [string](#string) | | |
+| sql_mode | [string](#string) | | |
+| comment | [string](#string) | | The comment is the comment of a procedure. |
+| skip_dump | [bool](#bool) | | |
-<a name="bytebase-v1-CreateGroupRequest"></a>
+<a name="bytebase-v1-SchemaMetadata"></a>
-### CreateGroupRequest
-Request message for creating a group.
+### SchemaMetadata
+SchemaMetadata is the metadata for schemas.
+This is the concept of schema in Postgres, but it&#39;s a no-op for MySQL.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| group | [Group](#bytebase-v1-Group) | | The group to create. |
-| group_email | [string](#string) | | The email to use for the group, which will become the final component of the group&#39;s resource name. |
+| name | [string](#string) | | The name is the schema name. It is an empty string for databases without such concept such as MySQL. |
+| tables | [TableMetadata](#bytebase-v1-TableMetadata) | repeated | The tables is the list of tables in a schema. |
+| external_tables | [ExternalTableMetadata](#bytebase-v1-ExternalTableMetadata) | repeated | The external_tables is the list of external tables in a schema. |
+| views | [ViewMetadata](#bytebase-v1-ViewMetadata) | repeated | The views is the list of views in a schema. |
+| functions | [FunctionMetadata](#bytebase-v1-FunctionMetadata) | repeated | The functions is the list of functions in a schema. |
+| procedures | [ProcedureMetadata](#bytebase-v1-ProcedureMetadata) | repeated | The procedures is the list of procedures in a schema. |
+| streams | [StreamMetadata](#bytebase-v1-StreamMetadata) | repeated | The streams is the list of streams in a schema, currently, only used for Snowflake. |
+| tasks | [TaskMetadata](#bytebase-v1-TaskMetadata) | repeated | The routines is the list of routines in a schema, currently, only used for Snowflake. |
+| materialized_views | [MaterializedViewMetadata](#bytebase-v1-MaterializedViewMetadata) | repeated | The materialized_views is the list of materialized views in a schema. |
+| packages | [PackageMetadata](#bytebase-v1-PackageMetadata) | repeated | The packages is the list of packages in a schema. |
+| owner | [string](#string) | | The owner of the schema. |
+| sequences | [SequenceMetadata](#bytebase-v1-SequenceMetadata) | repeated | The sequences is the list of sequences in a schema, sorted by name. |
+| events | [EventMetadata](#bytebase-v1-EventMetadata) | repeated | The events is the list of scheduled events in a schema. |
+| enum_types | [EnumTypeMetadata](#bytebase-v1-EnumTypeMetadata) | repeated | The enum_types is the list of user-defined enum types in a schema. |
+| skip_dump | [bool](#bool) | | Whether to skip this schema during schema dump operations. |
+| comment | [string](#string) | | The comment is the comment of a schema. |
+| composite_types | [CompositeTypeMetadata](#bytebase-v1-CompositeTypeMetadata) | repeated | 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. |
-<a name="bytebase-v1-DeleteGroupRequest"></a>
+<a name="bytebase-v1-SequenceMetadata"></a>
+
+### SequenceMetadata
-### DeleteGroupRequest
-Request message for deleting a group.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the group to delete. Format: groups/{email} |
+| name | [string](#string) | | The name of a sequence. |
+| data_type | [string](#string) | | The data type of a sequence. |
+| start | [string](#string) | | The start value of a sequence. |
+| min_value | [string](#string) | | The minimum value of a sequence. |
+| max_value | [string](#string) | | The maximum value of a sequence. |
+| increment | [string](#string) | | Increment value of a sequence. |
+| cycle | [bool](#bool) | | Cycle is whether the sequence cycles. |
+| cache_size | [string](#string) | | Cache size of a sequence. |
+| last_value | [string](#string) | | Last value of a sequence. |
+| owner_table | [string](#string) | | The owner table of the sequence. |
+| owner_column | [string](#string) | | The owner column of the sequence. |
+| comment | [string](#string) | | The comment describing the sequence. |
+| skip_dump | [bool](#bool) | | Whether to skip this sequence during schema dump operations. |
-<a name="bytebase-v1-GetGroupRequest"></a>
+<a name="bytebase-v1-SpatialIndexConfig"></a>
-### GetGroupRequest
-Request message for getting a group.
+### SpatialIndexConfig
+SpatialIndexConfig defines the spatial index configuration for spatial databases.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the group to retrieve. Format: groups/{email} |
+| method | [string](#string) | | Spatial indexing method (e.g., &#34;SPATIAL&#34;, &#34;R-TREE&#34;, &#34;GIST&#34;) |
+| tessellation | [TessellationConfig](#bytebase-v1-TessellationConfig) | | Tessellation configuration for grid-based spatial indexes |
+| storage | [StorageConfig](#bytebase-v1-StorageConfig) | | Storage and performance configuration |
+| dimensional | [DimensionalConfig](#bytebase-v1-DimensionalConfig) | | Dimensional configuration |
-<a name="bytebase-v1-Group"></a>
+<a name="bytebase-v1-StorageConfig"></a>
-### Group
-A group of users within the workspace.
+### StorageConfig
+StorageConfig defines storage and performance parameters for spatial indexes.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the group to retrieve. Format: groups/{group}, the group should be email or uuid. |
-| title | [string](#string) | | The display title of the group. |
-| description | [string](#string) | | The description of the group. |
-| members | [GroupMember](#bytebase-v1-GroupMember) | repeated | The members of the group. |
-| source | [string](#string) | | The source system where the group originated (e.g., Entra ID for SCIM sync). |
-| email | [string](#string) | | The unique email for the group. |
+| fillfactor | [int32](#int32) | | Fill factor percentage (1-100) |
+| buffering | [string](#string) | | Buffering mode for PostgreSQL (auto, on, off) |
+| tablespace | [string](#string) | | Tablespace configuration for Oracle |
+| work_tablespace | [string](#string) | | |
+| sdo_level | [int32](#int32) | | |
+| commit_interval | [int32](#int32) | | |
+| pad_index | [bool](#bool) | | SQL Server specific parameters |
+| sort_in_tempdb | [string](#string) | | ON, OFF |
+| drop_existing | [bool](#bool) | | |
+| online | [bool](#bool) | | |
+| allow_row_locks | [bool](#bool) | | |
+| allow_page_locks | [bool](#bool) | | |
+| maxdop | [int32](#int32) | | |
+| data_compression | [string](#string) | | NONE, ROW, PAGE |
-<a name="bytebase-v1-GroupMember"></a>
+<a name="bytebase-v1-StreamMetadata"></a>
+
+### StreamMetadata
-### GroupMember
-A member of a group with a role.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| member | [string](#string) | | Member is the principal who belong to this group.
+| name | [string](#string) | | The name is the name of a stream. |
+| table_name | [string](#string) | | The table_name is the name of the table/view that the stream is created on. |
+| owner | [string](#string) | | The owner of the stream. |
+| comment | [string](#string) | | The comment of the stream. |
+| type | [StreamMetadata.Type](#bytebase-v1-StreamMetadata-Type) | | The type of the stream. |
+| stale | [bool](#bool) | | Indicates whether the stream was last read before the `stale_after` time. |
+| mode | [StreamMetadata.Mode](#bytebase-v1-StreamMetadata-Mode) | | The mode of the stream. |
+| definition | [string](#string) | | The definition of the stream. |
-Format: users/[email protected] |
-| role | [GroupMember.Role](#bytebase-v1-GroupMember-Role) | | The member&#39;s role in the group. |
+<a name="bytebase-v1-SyncDatabaseRequest"></a>
-<a name="bytebase-v1-ListGroupsRequest"></a>
+### SyncDatabaseRequest
-### ListGroupsRequest
-Request message for listing groups.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| page_size | [int32](#int32) | | 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. |
-| page_token | [string](#string) | | 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 | [string](#string) | | 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 &#34;==&#34; and &#34;.contains()&#34; operator. - email: the group email, support &#34;==&#34; and &#34;.contains()&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
-
-For example: title == &#34;dba&#34; email == &#34;[email protected]&#34; title.contains(&#34;dba&#34;) email.contains(&#34;dba&#34;) project == &#34;projects/sample-project&#34; You can combine filter conditions like: title.contains(&#34;dba&#34;) || email.contains(&#34;dba&#34;) |
-
+| name | [string](#string) | | The name of the database to sync. Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} |
-<a name="bytebase-v1-ListGroupsResponse"></a>
-### ListGroupsResponse
-Response message for listing groups.
+<a name="bytebase-v1-SyncDatabaseResponse"></a>
+### SyncDatabaseResponse
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| groups | [Group](#bytebase-v1-Group) | repeated | The groups from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-<a name="bytebase-v1-UpdateGroupRequest"></a>
+<a name="bytebase-v1-TableMetadata"></a>
-### UpdateGroupRequest
-Request message for updating a group.
+### TableMetadata
+TableMetadata is the metadata for tables.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| group | [Group](#bytebase-v1-Group) | | The group to update.
-
-The group&#39;s `name` field is used to identify the group to update. Format: groups/{email} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| allow_missing | [bool](#bool) | | If set to true, and the group is not found, a new group will be created. In this situation, `update_mask` is ignored. |
+| name | [string](#string) | | The name is the name of a table. |
+| columns | [ColumnMetadata](#bytebase-v1-ColumnMetadata) | repeated | The columns is the ordered list of columns in a table. |
+| indexes | [IndexMetadata](#bytebase-v1-IndexMetadata) | repeated | The indexes is the list of indexes in a table. |
+| engine | [string](#string) | | The engine is the engine of a table. |
+| collation | [string](#string) | | The collation is the collation of a table. |
+| charset | [string](#string) | | The character set of table. |
+| row_count | [int64](#int64) | | The row_count is the estimated number of rows of a table. |
+| data_size | [int64](#int64) | | The data_size is the estimated data size of a table. |
+| index_size | [int64](#int64) | | The index_size is the estimated index size of a table. |
+| data_free | [int64](#int64) | | The data_free is the estimated free data size of a table. |
+| create_options | [string](#string) | | The create_options is the create option of a table. |
+| comment | [string](#string) | | The comment is the comment of a table. |
+| foreign_keys | [ForeignKeyMetadata](#bytebase-v1-ForeignKeyMetadata) | repeated | The foreign_keys is the list of foreign keys in a table. |
+| partitions | [TablePartitionMetadata](#bytebase-v1-TablePartitionMetadata) | repeated | The partitions is the list of partitions in a table. |
+| check_constraints | [CheckConstraintMetadata](#bytebase-v1-CheckConstraintMetadata) | repeated | The check_constraints is the list of check constraints in a table. |
+| owner | [string](#string) | | The owner of the table. |
+| sorting_keys | [string](#string) | repeated | 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 | [TriggerMetadata](#bytebase-v1-TriggerMetadata) | repeated | The triggers is the list of triggers associated with the table. |
+| skip_dump | [bool](#bool) | | Whether to skip this table during schema dump operations. |
+| sharding_info | [string](#string) | | https://docs.pingcap.com/tidb/stable/information-schema-tables/ |
+| primary_key_type | [string](#string) | | https://docs.pingcap.com/tidb/stable/clustered-indexes/#clustered-indexes CLUSTERED or NONCLUSTERED. |
-
+<a name="bytebase-v1-TablePartitionMetadata"></a>
-<a name="bytebase-v1-GroupMember-Role"></a>
+### TablePartitionMetadata
+TablePartitionMetadata is the metadata for table partitions.
-### GroupMember.Role
-The role of a group member.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| ROLE_UNSPECIFIED | 0 | Unspecified role. |
-| OWNER | 1 | Group owner. |
-| MEMBER | 2 | Group member. |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name is the name of a table partition. |
+| type | [TablePartitionMetadata.Type](#bytebase-v1-TablePartitionMetadata-Type) | | The type of a table partition. |
+| expression | [string](#string) | | 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 | [string](#string) | | 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&#39;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&#39;s VALUES IN clause, which is a list of comma-separated integer values. - For others, it&#39;s an empty string. |
+| use_default | [string](#string) | | The use_default is whether the users use the default partition, it stores the different value for different database engines. For MySQL, it&#39;s [INT] type, 0 means not use default partition, otherwise, it&#39;s equals to number in syntax [SUB]PARTITION {number}. |
+| subpartitions | [TablePartitionMetadata](#bytebase-v1-TablePartitionMetadata) | repeated | The subpartitions is the list of subpartitions in a table partition. |
+| indexes | [IndexMetadata](#bytebase-v1-IndexMetadata) | repeated | |
+| check_constraints | [CheckConstraintMetadata](#bytebase-v1-CheckConstraintMetadata) | repeated | |
-
-
-<a name="bytebase-v1-GroupService"></a>
-### GroupService
-GroupService manages user groups for organizing users and permissions.
+<a name="bytebase-v1-TaskMetadata"></a>
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| GetGroup | [GetGroupRequest](#bytebase-v1-GetGroupRequest) | [Group](#bytebase-v1-Group) | 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 |
-| BatchGetGroups | [BatchGetGroupsRequest](#bytebase-v1-BatchGetGroupsRequest) | [BatchGetGroupsResponse](#bytebase-v1-BatchGetGroupsResponse) | 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 |
-| ListGroups | [ListGroupsRequest](#bytebase-v1-ListGroupsRequest) | [ListGroupsResponse](#bytebase-v1-ListGroupsResponse) | Lists all groups in the workspace. Permissions required: bb.groups.list |
-| CreateGroup | [CreateGroupRequest](#bytebase-v1-CreateGroupRequest) | [Group](#bytebase-v1-Group) | Creates a new group. Permissions required: bb.groups.create |
-| UpdateGroup | [UpdateGroupRequest](#bytebase-v1-UpdateGroupRequest) | [Group](#bytebase-v1-Group) | 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 |
-| DeleteGroup | [DeleteGroupRequest](#bytebase-v1-DeleteGroupRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a group. Group owners or users with bb.groups.delete permission can delete. Permissions required: bb.groups.delete OR caller is group owner |
+### TaskMetadata
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name is the name of a task. |
+| id | [string](#string) | | The id is the snowflake-generated id of a task. Example: 01ad32a0-1bb6-5e93-0000-000000000001 |
+| owner | [string](#string) | | The owner of the task. |
+| comment | [string](#string) | | The comment of the task. |
+| warehouse | [string](#string) | | The warehouse of the task. |
+| schedule | [string](#string) | | The schedule interval of the task. |
+| predecessors | [string](#string) | repeated | The predecessor tasks of the task. |
+| state | [TaskMetadata.State](#bytebase-v1-TaskMetadata-State) | | The state of the task. |
+| condition | [string](#string) | | The condition of the task. |
+| definition | [string](#string) | | The definition of the task. |
-<a name="v1_idp_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/idp_service.proto
-<a name="bytebase-v1-CreateIdentityProviderRequest"></a>
-### CreateIdentityProviderRequest
+<a name="bytebase-v1-TessellationConfig"></a>
+### TessellationConfig
+TessellationConfig defines tessellation parameters for spatial indexes.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| identity_provider | [IdentityProvider](#bytebase-v1-IdentityProvider) | | The identity provider to create. |
-| identity_provider_id | [string](#string) | | The ID to use for the identity provider, which will become the final component of the identity provider&#39;s resource name.
-
-This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
-| validate_only | [bool](#bool) | | If set to true, the request will be validated without actually creating the identity provider. |
+| scheme | [string](#string) | | Tessellation scheme (e.g., &#34;GEOMETRY_GRID&#34;, &#34;GEOGRAPHY_GRID&#34;, &#34;GEOMETRY_AUTO_GRID&#34;) |
+| grid_levels | [GridLevel](#bytebase-v1-GridLevel) | repeated | Grid levels and densities for multi-level tessellation |
+| cells_per_object | [int32](#int32) | | Number of cells per object (1-8192 for SQL Server) |
+| bounding_box | [BoundingBox](#bytebase-v1-BoundingBox) | | Bounding box for GEOMETRY tessellation (not used for GEOGRAPHY) |
-<a name="bytebase-v1-DeleteIdentityProviderRequest"></a>
+<a name="bytebase-v1-TriggerMetadata"></a>
-### DeleteIdentityProviderRequest
+### TriggerMetadata
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the identity provider to delete. Format: idps/{identity_provider} |
+| name | [string](#string) | | The name is the name of the trigger. |
+| event | [string](#string) | | The event is the event of the trigger, such as INSERT, UPDATE, DELETE, TRUNCATE. |
+| timing | [string](#string) | | The timing is the timing of the trigger, such as BEFORE, AFTER. |
+| body | [string](#string) | | The body is the body of the trigger. |
+| sql_mode | [string](#string) | | The SQL mode setting for the trigger. |
+| character_set_client | [string](#string) | | The character set used by the client creating the trigger. |
+| collation_connection | [string](#string) | | The collation used for the connection when creating the trigger. |
+| comment | [string](#string) | | The comment describing the trigger. |
+| skip_dump | [bool](#bool) | | Whether to skip this trigger during schema dump operations. |
-<a name="bytebase-v1-FieldMapping"></a>
+<a name="bytebase-v1-UpdateDatabaseRequest"></a>
+
+### UpdateDatabaseRequest
-### FieldMapping
-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`.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| identifier | [string](#string) | | Identifier is the field name of the unique identifier in 3rd-party idp user info. Required. |
-| display_name | [string](#string) | | DisplayName is the field name of display name in 3rd-party idp user info. Optional. |
-| phone | [string](#string) | | Phone is the field name of primary phone in 3rd-party idp user info. Optional. |
-| groups | [string](#string) | | 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/ |
+| database | [Database](#bytebase-v1-Database) | | The database to update.
+The database&#39;s `name` field is used to identify the database to update. Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-<a name="bytebase-v1-GetIdentityProviderRequest"></a>
-### GetIdentityProviderRequest
+<a name="bytebase-v1-ViewMetadata"></a>
+### ViewMetadata
+ViewMetadata is the metadata for views.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the identity provider to retrieve. Format: idps/{idp} |
+| name | [string](#string) | | The name is the name of a view. |
+| definition | [string](#string) | | The definition is the definition of a view. |
+| comment | [string](#string) | | The comment is the comment of a view. |
+| dependency_columns | [DependencyColumn](#bytebase-v1-DependencyColumn) | repeated | The dependency_columns is the list of dependency columns of a view. |
+| columns | [ColumnMetadata](#bytebase-v1-ColumnMetadata) | repeated | The columns is the ordered list of columns in a table. |
+| triggers | [TriggerMetadata](#bytebase-v1-TriggerMetadata) | repeated | The triggers is the list of triggers in a view. |
+| skip_dump | [bool](#bool) | | |
+
-<a name="bytebase-v1-IdentityProvider"></a>
-### IdentityProvider
+<a name="bytebase-v1-ColumnMetadata-IdentityGeneration"></a>
+### ColumnMetadata.IdentityGeneration
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the identity provider. Format: idps/{idp} |
-| title | [string](#string) | | The display title of the identity provider. |
-| domain | [string](#string) | | The domain for email matching when using this identity provider. |
-| type | [IdentityProviderType](#bytebase-v1-IdentityProviderType) | | The type of identity provider protocol. |
-| config | [IdentityProviderConfig](#bytebase-v1-IdentityProviderConfig) | | The configuration details for the identity provider. |
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| IDENTITY_GENERATION_UNSPECIFIED | 0 | |
+| ALWAYS | 1 | |
+| BY_DEFAULT | 2 | |
+<a name="bytebase-v1-GenerationMetadata-Type"></a>
+### GenerationMetadata.Type
-<a name="bytebase-v1-IdentityProviderConfig"></a>
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | |
+| VIRTUAL | 1 | |
+| STORED | 2 | |
-### IdentityProviderConfig
+<a name="bytebase-v1-GetDatabaseSDLSchemaRequest-SDLFormat"></a>
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| oauth2_config | [OAuth2IdentityProviderConfig](#bytebase-v1-OAuth2IdentityProviderConfig) | | OAuth2 protocol configuration. |
-| oidc_config | [OIDCIdentityProviderConfig](#bytebase-v1-OIDCIdentityProviderConfig) | | OIDC protocol configuration. |
-| ldap_config | [LDAPIdentityProviderConfig](#bytebase-v1-LDAPIdentityProviderConfig) | | LDAP protocol configuration. |
+### GetDatabaseSDLSchemaRequest.SDLFormat
+SDLFormat specifies the output format for SDL schema.
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| SDL_FORMAT_UNSPECIFIED | 0 | Unspecified format. Defaults to SINGLE_FILE. |
+| SINGLE_FILE | 1 | Single file format: returns the complete SDL schema as a single file. |
+| MULTI_FILE | 2 | Multi-file format: returns the SDL schema as a ZIP archive containing multiple files organized by schema objects (tables, views, functions, etc.). |
+<a name="bytebase-v1-GetSchemaStringRequest-ObjectType"></a>
+### GetSchemaStringRequest.ObjectType
-<a name="bytebase-v1-LDAPIdentityProviderConfig"></a>
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| OBJECT_TYPE_UNSPECIFIED | 0 | |
+| DATABASE | 1 | |
+| SCHEMA | 2 | |
+| TABLE | 3 | |
+| VIEW | 4 | |
+| MATERIALIZED_VIEW | 5 | |
+| FUNCTION | 6 | |
+| PROCEDURE | 7 | |
+| SEQUENCE | 8 | |
-### LDAPIdentityProviderConfig
-LDAPIdentityProviderConfig is the structure for LDAP identity provider config.
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| host | [string](#string) | | Host is the hostname or IP address of the LDAP server, e.g., &#34;ldap.example.com&#34;. |
-| port | [int32](#int32) | | 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. |
-| skip_tls_verify | [bool](#bool) | | SkipTLSVerify controls whether to skip TLS certificate verification. |
-| bind_dn | [string](#string) | | BindDN is the DN of the user to bind as a service account to perform search requests. |
-| bind_password | [string](#string) | | BindPassword is the password of the user to bind as a service account. |
-| base_dn | [string](#string) | | BaseDN is the base DN to search for users, e.g., &#34;ou=users,dc=example,dc=com&#34;. |
-| user_filter | [string](#string) | | UserFilter is the filter to search for users, e.g., &#34;(uid=%s)&#34;. |
-| security_protocol | [LDAPIdentityProviderConfig.SecurityProtocol](#bytebase-v1-LDAPIdentityProviderConfig-SecurityProtocol) | | SecurityProtocol is the security protocol to be used for establishing connections with the LDAP server. |
-| field_mapping | [FieldMapping](#bytebase-v1-FieldMapping) | | FieldMapping is the mapping of the user attributes returned by the LDAP server. |
+<a name="bytebase-v1-StreamMetadata-Mode"></a>
+
+### StreamMetadata.Mode
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| MODE_UNSPECIFIED | 0 | |
+| DEFAULT | 1 | |
+| APPEND_ONLY | 2 | |
+| INSERT_ONLY | 3 | |
+<a name="bytebase-v1-StreamMetadata-Type"></a>
+### StreamMetadata.Type
-<a name="bytebase-v1-LDAPIdentityProviderTestRequestContext"></a>
-### LDAPIdentityProviderTestRequestContext
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | |
+| DELTA | 1 | |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| username | [string](#string) | | The username of a directory user, substituted into the user filter. |
-| password | [string](#string) | | The password of the directory user. |
+<a name="bytebase-v1-SyncStatus"></a>
+### SyncStatus
+SyncStatus is the status of the database sync operation.
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| SYNC_STATUS_UNSPECIFIED | 0 | |
+| OK | 1 | The database was synced successfully. |
+| FAILED | 2 | The database sync failed. |
+<a name="bytebase-v1-TablePartitionMetadata-Type"></a>
-<a name="bytebase-v1-ListIdentityProvidersRequest"></a>
+### TablePartitionMetadata.Type
+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)
-### ListIdentityProvidersRequest
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | |
+| RANGE | 1 | |
+| RANGE_COLUMNS | 2 | |
+| LIST | 3 | |
+| LIST_COLUMNS | 4 | |
+| HASH | 5 | |
+| LINEAR_HASH | 6 | |
+| KEY | 7 | |
+| LINEAR_KEY | 8 | |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent workspace whose identity providers should be listed. Format: workspaces/{workspace} When unset, the workspace is resolved from the request context. |
+<a name="bytebase-v1-TaskMetadata-State"></a>
+
+### TaskMetadata.State
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| STATE_UNSPECIFIED | 0 | |
+| STARTED | 1 | |
+| SUSPENDED | 2 | |
+
+
-<a name="bytebase-v1-ListIdentityProvidersResponse"></a>
+<a name="bytebase-v1-DatabaseService"></a>
-### ListIdentityProvidersResponse
+### DatabaseService
+DatabaseService manages databases and their schemas.
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| GetDatabase | [GetDatabaseRequest](#bytebase-v1-GetDatabaseRequest) | [Database](#bytebase-v1-Database) | Retrieves a database by name. Permissions required: bb.databases.get |
+| BatchGetDatabases | [BatchGetDatabasesRequest](#bytebase-v1-BatchGetDatabasesRequest) | [BatchGetDatabasesResponse](#bytebase-v1-BatchGetDatabasesResponse) | 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&#39;s project) |
+| ListDatabases | [ListDatabasesRequest](#bytebase-v1-ListDatabasesRequest) | [ListDatabasesResponse](#bytebase-v1-ListDatabasesResponse) | Lists databases in a project, instance, or workspace. Permissions required: bb.projects.get (for project parent), bb.databases.list (for workspace parent), or bb.instances.get (for instance parent) |
+| UpdateDatabase | [UpdateDatabaseRequest](#bytebase-v1-UpdateDatabaseRequest) | [Database](#bytebase-v1-Database) | Updates database properties such as labels and project assignment. Permissions required: bb.databases.update |
+| BatchUpdateDatabases | [BatchUpdateDatabasesRequest](#bytebase-v1-BatchUpdateDatabasesRequest) | [BatchUpdateDatabasesResponse](#bytebase-v1-BatchUpdateDatabasesResponse) | Updates multiple databases in a single batch operation. Permissions required: bb.databases.update |
+| SyncDatabase | [SyncDatabaseRequest](#bytebase-v1-SyncDatabaseRequest) | [SyncDatabaseResponse](#bytebase-v1-SyncDatabaseResponse) | Synchronizes database schema from the instance. Permissions required: bb.databases.sync |
+| BatchSyncDatabases | [BatchSyncDatabasesRequest](#bytebase-v1-BatchSyncDatabasesRequest) | [BatchSyncDatabasesResponse](#bytebase-v1-BatchSyncDatabasesResponse) | Synchronizes multiple databases in a single batch operation. Permissions required: bb.databases.sync |
+| GetDatabaseMetadata | [GetDatabaseMetadataRequest](#bytebase-v1-GetDatabaseMetadataRequest) | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | Retrieves database metadata including tables, columns, and indexes. Permissions required: bb.databases.getSchema |
+| GetDatabaseSchema | [GetDatabaseSchemaRequest](#bytebase-v1-GetDatabaseSchemaRequest) | [DatabaseSchema](#bytebase-v1-DatabaseSchema) | Retrieves database schema as DDL statements. Permissions required: bb.databases.getSchema |
+| GetDatabaseSDLSchema | [GetDatabaseSDLSchemaRequest](#bytebase-v1-GetDatabaseSDLSchemaRequest) | [DatabaseSDLSchema](#bytebase-v1-DatabaseSDLSchema) | Retrieves database schema in SDL (Schema Definition Language) format. Permissions required: bb.databases.getSchema |
+| DiffSchema | [DiffSchemaRequest](#bytebase-v1-DiffSchemaRequest) | [DiffSchemaResponse](#bytebase-v1-DiffSchemaResponse) | Compares and generates migration statements between two schemas. Permissions required: bb.databases.get |
+| DiffMetadata | [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest) | [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse) | Generates migration statements from the database&#39;s current schema to the given target metadata. Permissions required: bb.databases.diffMetadata |
+| GetSchemaString | [GetSchemaStringRequest](#bytebase-v1-GetSchemaStringRequest) | [GetSchemaStringResponse](#bytebase-v1-GetSchemaStringResponse) | Generates schema DDL for a database object. Permissions required: bb.databases.getSchema |
+
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| identity_providers | [IdentityProvider](#bytebase-v1-IdentityProvider) | repeated | The identity providers from the specified request. |
+<a name="v1_group_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/group_service.proto
-<a name="bytebase-v1-OAuth2IdentityProviderConfig"></a>
+<a name="bytebase-v1-BatchGetGroupsRequest"></a>
-### OAuth2IdentityProviderConfig
-OAuth2IdentityProviderConfig is the structure for OAuth2 identity provider config.
+### BatchGetGroupsRequest
+Request message for batch getting groups.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| auth_url | [string](#string) | | The authorization endpoint URL for OAuth2 flow. |
-| token_url | [string](#string) | | The token endpoint URL for exchanging authorization code. |
-| user_info_url | [string](#string) | | The user information endpoint URL. |
-| client_id | [string](#string) | | The OAuth2 client identifier. |
-| client_secret | [string](#string) | | The OAuth2 client secret for authentication. |
-| scopes | [string](#string) | repeated | The list of OAuth2 scopes to request. |
-| field_mapping | [FieldMapping](#bytebase-v1-FieldMapping) | | Mapping configuration for user attributes from OAuth2 response. |
-| skip_tls_verify | [bool](#bool) | | Whether to skip TLS certificate verification. |
-| auth_style | [OAuth2AuthStyle](#bytebase-v1-OAuth2AuthStyle) | | The authentication style for client credentials. |
-
+| names | [string](#string) | repeated | The group names to retrieve. Format: groups/{email} |
-<a name="bytebase-v1-OAuth2IdentityProviderTestRequestContext"></a>
-### OAuth2IdentityProviderTestRequestContext
+<a name="bytebase-v1-BatchGetGroupsResponse"></a>
+### BatchGetGroupsResponse
+Response message for batch getting groups.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| code | [string](#string) | | Authorize code from website. |
+| groups | [Group](#bytebase-v1-Group) | repeated | One group per requested name, in the same order as `names`. |
-<a name="bytebase-v1-OIDCIdentityProviderConfig"></a>
+<a name="bytebase-v1-CreateGroupRequest"></a>
-### OIDCIdentityProviderConfig
-OIDCIdentityProviderConfig is the structure for OIDC identity provider config.
+### CreateGroupRequest
+Request message for creating a group.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| issuer | [string](#string) | | The OIDC issuer URL for the identity provider. |
-| client_id | [string](#string) | | The OIDC client identifier. |
-| client_secret | [string](#string) | | The OIDC client secret for authentication. |
-| scopes | [string](#string) | repeated | The scopes that the OIDC provider supports. Should be fetched from the well-known configuration file of the OIDC provider. |
-| field_mapping | [FieldMapping](#bytebase-v1-FieldMapping) | | Mapping configuration for user attributes from OIDC claims. |
-| skip_tls_verify | [bool](#bool) | | Whether to skip TLS certificate verification. |
-| auth_style | [OAuth2AuthStyle](#bytebase-v1-OAuth2AuthStyle) | | The authentication style for client credentials. |
-| auth_endpoint | [string](#string) | | The authorization endpoint of the OIDC provider. Should be fetched from the well-known configuration file of the OIDC provider. |
-
+| group | [Group](#bytebase-v1-Group) | | The group to create. |
+| group_email | [string](#string) | | The email to use for the group, which will become the final component of the group&#39;s resource name. |
-<a name="bytebase-v1-OIDCIdentityProviderTestRequestContext"></a>
-### OIDCIdentityProviderTestRequestContext
+<a name="bytebase-v1-DeleteGroupRequest"></a>
+### DeleteGroupRequest
+Request message for deleting a group.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| code | [string](#string) | | Authorize code from OIDC provider. |
-
+| name | [string](#string) | | The name of the group to delete. Format: groups/{email} |
-<a name="bytebase-v1-TestIdentityProviderRequest"></a>
-### TestIdentityProviderRequest
+<a name="bytebase-v1-GetGroupRequest"></a>
+### GetGroupRequest
+Request message for getting a group.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| identity_provider | [IdentityProvider](#bytebase-v1-IdentityProvider) | | The identity provider to test connection including uncreated. |
-| oauth2_context | [OAuth2IdentityProviderTestRequestContext](#bytebase-v1-OAuth2IdentityProviderTestRequestContext) | | |
-| oidc_context | [OIDCIdentityProviderTestRequestContext](#bytebase-v1-OIDCIdentityProviderTestRequestContext) | | OIDC authentication context for test connection. |
-| ldap_context | [LDAPIdentityProviderTestRequestContext](#bytebase-v1-LDAPIdentityProviderTestRequestContext) | | LDAP credentials context for test connection. |
-
+| name | [string](#string) | | The name of the group to retrieve. Format: groups/{email} |
-<a name="bytebase-v1-TestIdentityProviderResponse"></a>
-### TestIdentityProviderResponse
+<a name="bytebase-v1-Group"></a>
+### Group
+A group of users within the workspace.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| claims | [TestIdentityProviderResponse.ClaimsEntry](#bytebase-v1-TestIdentityProviderResponse-ClaimsEntry) | repeated | The map of claims returned by the identity provider. |
-| user_info | [TestIdentityProviderResponse.UserInfoEntry](#bytebase-v1-TestIdentityProviderResponse-UserInfoEntry) | repeated | The matched user info from the claims. |
-
+| name | [string](#string) | | The name of the group to retrieve. Format: groups/{group}, the group should be email or uuid. |
+| title | [string](#string) | | The display title of the group. |
+| description | [string](#string) | | The description of the group. |
+| members | [GroupMember](#bytebase-v1-GroupMember) | repeated | The members of the group. |
+| source | [string](#string) | | The source system where the group originated (e.g., Entra ID for SCIM sync). |
+| email | [string](#string) | | The unique email for the group. |
-<a name="bytebase-v1-TestIdentityProviderResponse-ClaimsEntry"></a>
-### TestIdentityProviderResponse.ClaimsEntry
+<a name="bytebase-v1-GroupMember"></a>
+### GroupMember
+A member of a group with a role.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [string](#string) | | |
+| member | [string](#string) | | Member is the principal who belong to this group.
+Format: users/[email protected] |
+| role | [GroupMember.Role](#bytebase-v1-GroupMember-Role) | | The member&#39;s role in the group. |
-<a name="bytebase-v1-TestIdentityProviderResponse-UserInfoEntry"></a>
-### TestIdentityProviderResponse.UserInfoEntry
+<a name="bytebase-v1-ListGroupsRequest"></a>
+### ListGroupsRequest
+Request message for listing groups.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [string](#string) | | |
-
-
+| page_size | [int32](#int32) | | 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. |
+| page_token | [string](#string) | | 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 | [string](#string) | | 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 &#34;==&#34; and &#34;.contains()&#34; operator. - email: the group email, support &#34;==&#34; and &#34;.contains()&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
+For example: title == &#34;dba&#34; email == &#34;[email protected]&#34; title.contains(&#34;dba&#34;) email.contains(&#34;dba&#34;) project == &#34;projects/sample-project&#34; You can combine filter conditions like: title.contains(&#34;dba&#34;) || email.contains(&#34;dba&#34;) |
-<a name="bytebase-v1-UpdateIdentityProviderRequest"></a>
-### UpdateIdentityProviderRequest
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| identity_provider | [IdentityProvider](#bytebase-v1-IdentityProvider) | | The identity provider to update.
-The identity provider&#39;s `name` field is used to identify the identity provider to update. Format: idps/{identity_provider} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| allow_missing | [bool](#bool) | | 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. |
+<a name="bytebase-v1-ListGroupsResponse"></a>
+### ListGroupsResponse
+Response message for listing groups.
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| groups | [Group](#bytebase-v1-Group) | repeated | The groups from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-
-<a name="bytebase-v1-IdentityProviderType"></a>
-### IdentityProviderType
+<a name="bytebase-v1-UpdateGroupRequest"></a>
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| IDENTITY_PROVIDER_TYPE_UNSPECIFIED | 0 | Unspecified identity provider type. |
-| OAUTH2 | 1 | OAuth 2.0 authentication protocol. |
-| OIDC | 2 | OpenID Connect authentication protocol. |
-| LDAP | 3 | LDAP directory service authentication. |
+### UpdateGroupRequest
+Request message for updating a group.
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| group | [Group](#bytebase-v1-Group) | | The group to update.
-<a name="bytebase-v1-LDAPIdentityProviderConfig-SecurityProtocol"></a>
+The group&#39;s `name` field is used to identify the group to update. Format: groups/{email} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| allow_missing | [bool](#bool) | | If set to true, and the group is not found, a new group will be created. In this situation, `update_mask` is ignored. |
-### LDAPIdentityProviderConfig.SecurityProtocol
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| SECURITY_PROTOCOL_UNSPECIFIED | 0 | |
-| START_TLS | 1 | StartTLS is the security protocol that starts with an unencrypted connection and then upgrades to TLS. |
-| LDAPS | 2 | LDAPS is the security protocol that uses TLS from the beginning. |
+
-<a name="bytebase-v1-OAuth2AuthStyle"></a>
-### OAuth2AuthStyle
+<a name="bytebase-v1-GroupMember-Role"></a>
+### GroupMember.Role
+The role of a group member.
| Name | Number | Description |
| ---- | ------ | ----------- |
-| OAUTH2_AUTH_STYLE_UNSPECIFIED | 0 | |
-| IN_PARAMS | 1 | IN_PARAMS sends the &#34;client_id&#34; and &#34;client_secret&#34; in the POST body as application/x-www-form-urlencoded parameters. |
-| IN_HEADER | 2 | IN_HEADER sends the client_id and client_password using HTTP Basic Authorization. This is an optional style described in the OAuth2 RFC 6749 section 2.3.1. |
+| ROLE_UNSPECIFIED | 0 | Unspecified role. |
+| OWNER | 1 | Group owner. |
+| MEMBER | 2 | Group member. |
@@ -9598,19 +9641,19 @@ The identity provider&#39;s `name` field is used to identify the identity provid
-<a name="bytebase-v1-IdentityProviderService"></a>
+<a name="bytebase-v1-GroupService"></a>
-### IdentityProviderService
-IdentityProviderService manages external identity providers for SSO authentication.
+### GroupService
+GroupService manages user groups for organizing users and permissions.
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
-| GetIdentityProvider | [GetIdentityProviderRequest](#bytebase-v1-GetIdentityProviderRequest) | [IdentityProvider](#bytebase-v1-IdentityProvider) | Gets an identity provider by name. Permissions required: bb.identityProviders.get |
-| ListIdentityProviders | [ListIdentityProvidersRequest](#bytebase-v1-ListIdentityProvidersRequest) | [ListIdentityProvidersResponse](#bytebase-v1-ListIdentityProvidersResponse) | Lists all configured identity providers (public endpoint for login page). Permissions required: None |
-| CreateIdentityProvider | [CreateIdentityProviderRequest](#bytebase-v1-CreateIdentityProviderRequest) | [IdentityProvider](#bytebase-v1-IdentityProvider) | Creates a new identity provider. Permissions required: bb.identityProviders.create |
-| UpdateIdentityProvider | [UpdateIdentityProviderRequest](#bytebase-v1-UpdateIdentityProviderRequest) | [IdentityProvider](#bytebase-v1-IdentityProvider) | Updates an identity provider. Permissions required: bb.identityProviders.update When allow_missing=true, also requires: bb.identityProviders.create |
-| DeleteIdentityProvider | [DeleteIdentityProviderRequest](#bytebase-v1-DeleteIdentityProviderRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes an identity provider. Permissions required: bb.identityProviders.delete |
-| TestIdentityProvider | [TestIdentityProviderRequest](#bytebase-v1-TestIdentityProviderRequest) | [TestIdentityProviderResponse](#bytebase-v1-TestIdentityProviderResponse) | Tests the connection and configuration of an identity provider. Permissions required: bb.identityProviders.update |
+| GetGroup | [GetGroupRequest](#bytebase-v1-GetGroupRequest) | [Group](#bytebase-v1-Group) | 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 |
+| BatchGetGroups | [BatchGetGroupsRequest](#bytebase-v1-BatchGetGroupsRequest) | [BatchGetGroupsResponse](#bytebase-v1-BatchGetGroupsResponse) | 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 |
+| ListGroups | [ListGroupsRequest](#bytebase-v1-ListGroupsRequest) | [ListGroupsResponse](#bytebase-v1-ListGroupsResponse) | Lists all groups in the workspace. Permissions required: bb.groups.list |
+| CreateGroup | [CreateGroupRequest](#bytebase-v1-CreateGroupRequest) | [Group](#bytebase-v1-Group) | Creates a new group. Permissions required: bb.groups.create |
+| UpdateGroup | [UpdateGroupRequest](#bytebase-v1-UpdateGroupRequest) | [Group](#bytebase-v1-Group) | 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 |
+| DeleteGroup | [DeleteGroupRequest](#bytebase-v1-DeleteGroupRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a group. Group owners or users with bb.groups.delete permission can delete. Permissions required: bb.groups.delete OR caller is group owner |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index 351b313a03..5adb3fcda4 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -507,6 +507,109 @@
</li>
+ <li>
+ <a href="#v1%2fidp_service.proto">v1/idp_service.proto</a>
+ <ul>
+
+ <li>
+ <a href="#bytebase.v1.CreateIdentityProviderRequest"><span class="badge">M</span>CreateIdentityProviderRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.DeleteIdentityProviderRequest"><span class="badge">M</span>DeleteIdentityProviderRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.FieldMapping"><span class="badge">M</span>FieldMapping</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.GetIdentityProviderRequest"><span class="badge">M</span>GetIdentityProviderRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.IdentityProvider"><span class="badge">M</span>IdentityProvider</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.IdentityProviderConfig"><span class="badge">M</span>IdentityProviderConfig</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.LDAPIdentityProviderConfig"><span class="badge">M</span>LDAPIdentityProviderConfig</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.LDAPIdentityProviderTestRequestContext"><span class="badge">M</span>LDAPIdentityProviderTestRequestContext</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.ListIdentityProvidersRequest"><span class="badge">M</span>ListIdentityProvidersRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.ListIdentityProvidersResponse"><span class="badge">M</span>ListIdentityProvidersResponse</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.OAuth2IdentityProviderConfig"><span class="badge">M</span>OAuth2IdentityProviderConfig</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.OAuth2IdentityProviderTestRequestContext"><span class="badge">M</span>OAuth2IdentityProviderTestRequestContext</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.OIDCIdentityProviderConfig"><span class="badge">M</span>OIDCIdentityProviderConfig</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.OIDCIdentityProviderTestRequestContext"><span class="badge">M</span>OIDCIdentityProviderTestRequestContext</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.TestIdentityProviderRequest"><span class="badge">M</span>TestIdentityProviderRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.TestIdentityProviderResponse"><span class="badge">M</span>TestIdentityProviderResponse</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.TestIdentityProviderResponse.ClaimsEntry"><span class="badge">M</span>TestIdentityProviderResponse.ClaimsEntry</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.TestIdentityProviderResponse.UserInfoEntry"><span class="badge">M</span>TestIdentityProviderResponse.UserInfoEntry</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.UpdateIdentityProviderRequest"><span class="badge">M</span>UpdateIdentityProviderRequest</a>
+ </li>
+
+
+ <li>
+ <a href="#bytebase.v1.IdentityProviderType"><span class="badge">E</span>IdentityProviderType</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol"><span class="badge">E</span>LDAPIdentityProviderConfig.SecurityProtocol</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.OAuth2AuthStyle"><span class="badge">E</span>OAuth2AuthStyle</a>
+ </li>
+
+
+
+ <li>
+ <a href="#bytebase.v1.IdentityProviderService"><span class="badge">S</span>IdentityProviderService</a>
+ </li>
+
+ </ul>
+ </li>
+
+
<li>
<a href="#v1%2frollout_service.proto">v1/rollout_service.proto</a>
<ul>
@@ -1468,6 +1571,10 @@
<a href="#bytebase.v1.AuthenticationInfo"><span class="badge">M</span>AuthenticationInfo</a>
</li>
+ <li>
+ <a href="#bytebase.v1.AuthorizationRequest"><span class="badge">M</span>AuthorizationRequest</a>
+ </li>
+
<li>
<a href="#bytebase.v1.ExchangeTokenRequest"><span class="badge">M</span>ExchangeTokenRequest</a>
</li>
@@ -1477,13 +1584,17 @@
</li>
<li>
- <a href="#bytebase.v1.GetAuthenticationRestrictionRequest"><span class="badge">M</span>GetAuthenticationRestrictionRequest</a>
+ <a href="#bytebase.v1.GetAuthenticationInfoRequest"><span class="badge">M</span>GetAuthenticationInfoRequest</a>
</li>
<li>
<a href="#bytebase.v1.IdentityProviderContext"><span class="badge">M</span>IdentityProviderContext</a>
</li>
+ <li>
+ <a href="#bytebase.v1.LoginIdentityProvider"><span class="badge">M</span>LoginIdentityProvider</a>
+ </li>
+
<li>
<a href="#bytebase.v1.LoginRequest"><span class="badge">M</span>LoginRequest</a>
</li>
@@ -2283,109 +2394,6 @@
</li>
- <li>
- <a href="#v1%2fidp_service.proto">v1/idp_service.proto</a>
- <ul>
-
- <li>
- <a href="#bytebase.v1.CreateIdentityProviderRequest"><span class="badge">M</span>CreateIdentityProviderRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.DeleteIdentityProviderRequest"><span class="badge">M</span>DeleteIdentityProviderRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.FieldMapping"><span class="badge">M</span>FieldMapping</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.GetIdentityProviderRequest"><span class="badge">M</span>GetIdentityProviderRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.IdentityProvider"><span class="badge">M</span>IdentityProvider</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.IdentityProviderConfig"><span class="badge">M</span>IdentityProviderConfig</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.LDAPIdentityProviderConfig"><span class="badge">M</span>LDAPIdentityProviderConfig</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.LDAPIdentityProviderTestRequestContext"><span class="badge">M</span>LDAPIdentityProviderTestRequestContext</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.ListIdentityProvidersRequest"><span class="badge">M</span>ListIdentityProvidersRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.ListIdentityProvidersResponse"><span class="badge">M</span>ListIdentityProvidersResponse</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.OAuth2IdentityProviderConfig"><span class="badge">M</span>OAuth2IdentityProviderConfig</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.OAuth2IdentityProviderTestRequestContext"><span class="badge">M</span>OAuth2IdentityProviderTestRequestContext</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.OIDCIdentityProviderConfig"><span class="badge">M</span>OIDCIdentityProviderConfig</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.OIDCIdentityProviderTestRequestContext"><span class="badge">M</span>OIDCIdentityProviderTestRequestContext</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.TestIdentityProviderRequest"><span class="badge">M</span>TestIdentityProviderRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.TestIdentityProviderResponse"><span class="badge">M</span>TestIdentityProviderResponse</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.TestIdentityProviderResponse.ClaimsEntry"><span class="badge">M</span>TestIdentityProviderResponse.ClaimsEntry</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.TestIdentityProviderResponse.UserInfoEntry"><span class="badge">M</span>TestIdentityProviderResponse.UserInfoEntry</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.UpdateIdentityProviderRequest"><span class="badge">M</span>UpdateIdentityProviderRequest</a>
- </li>
-
-
- <li>
- <a href="#bytebase.v1.IdentityProviderType"><span class="badge">E</span>IdentityProviderType</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol"><span class="badge">E</span>LDAPIdentityProviderConfig.SecurityProtocol</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.OAuth2AuthStyle"><span class="badge">E</span>OAuth2AuthStyle</a>
- </li>
-
-
-
- <li>
- <a href="#bytebase.v1.IdentityProviderService"><span class="badge">S</span>IdentityProviderService</a>
- </li>
-
- </ul>
- </li>
-
-
<li>
<a href="#v1%2forg_policy_service.proto">v1/org_policy_service.proto</a>
<ul>
@@ -6548,12 +6556,12 @@ Permissions required: bb.auditLogs.export</p></td>
<div class="file-heading">
- <h2 id="v1/rollout_service.proto">v1/rollout_service.proto</h2><a href="#title">Top</a>
+ <h2 id="v1/idp_service.proto">v1/idp_service.proto</h2><a href="#title">Top</a>
</div>
<p></p>
- <h3 id="bytebase.v1.BatchCancelTaskRunsRequest">BatchCancelTaskRunsRequest</h3>
+ <h3 id="bytebase.v1.CreateIdentityProviderRequest">CreateIdentityProviderRequest</h3>
<p></p>
@@ -6564,20 +6572,28 @@ Permissions required: bb.auditLogs.export</p></td>
<tbody>
<tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
+ <td>identity_provider</td>
+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>The identity provider to create. </p></td>
</tr>
<tr>
- <td>task_runs</td>
+ <td>identity_provider_id</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The taskRuns to cancel.
-Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>
+ <td></td>
+ <td><p>The ID to use for the identity provider, which will become the final component of
+the identity provider&#39;s resource name.
+
+This value should be 4-63 characters, and valid characters
+are /[a-z][0-9]-/. </p></td>
+ </tr>
+
+ <tr>
+ <td>validate_only</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>If set to true, the request will be validated without actually creating the identity provider. </p></td>
</tr>
</tbody>
@@ -6587,14 +6603,7 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/task
- <h3 id="bytebase.v1.BatchCancelTaskRunsResponse">BatchCancelTaskRunsResponse</h3>
- <p></p>
-
-
-
-
-
- <h3 id="bytebase.v1.BatchRunTasksRequest">BatchRunTasksRequest</h3>
+ <h3 id="bytebase.v1.DeleteIdentityProviderRequest">DeleteIdentityProviderRequest</h3>
<p></p>
@@ -6605,33 +6614,57 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/task
<tbody>
<tr>
- <td>parent</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The stage name for the tasks.
-Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>
- </tr>
+ <td><p>The name of the identity provider to delete.
+Format: idps/{identity_provider} </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.FieldMapping">FieldMapping</h3>
+ <p>FieldMapping saves the field names from user info API of identity provider.</p><p>As we save all raw json string of user info response data into `principal.idp_user_info`,</p><p>we can extract the relevant data based with `FieldMapping`.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>tasks</td>
+ <td>identifier</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The tasks to run.
-Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p></td>
+ <td></td>
+ <td><p>Identifier is the field name of the unique identifier in 3rd-party idp user info. Required. </p></td>
</tr>
<tr>
- <td>run_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td>optional</td>
- <td><p>The task run should run after run_time. </p></td>
+ <td>display_name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>DisplayName is the field name of display name in 3rd-party idp user info. Optional. </p></td>
</tr>
<tr>
- <td>skip_prior_backup</td>
- <td><a href="#bool">bool</a></td>
+ <td>phone</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>If true, skip prior backup for this run even if the task has prior backup enabled. </p></td>
+ <td><p>Phone is the field name of primary phone in 3rd-party idp user info. Optional. </p></td>
+ </tr>
+
+ <tr>
+ <td>groups</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>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/ </p></td>
</tr>
</tbody>
@@ -6641,14 +6674,32 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p>
- <h3 id="bytebase.v1.BatchRunTasksResponse">BatchRunTasksResponse</h3>
+ <h3 id="bytebase.v1.GetIdentityProviderRequest">GetIdentityProviderRequest</h3>
<p></p>
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the identity provider to retrieve.
+Format: idps/{idp} </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
- <h3 id="bytebase.v1.BatchSkipTasksRequest">BatchSkipTasksRequest</h3>
+ <h3 id="bytebase.v1.IdentityProvider">IdentityProvider</h3>
<p></p>
@@ -6659,26 +6710,39 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p>
<tbody>
<tr>
- <td>parent</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The stage name for the tasks.
-Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>
+ <td><p>The name of the identity provider.
+Format: idps/{idp} </p></td>
</tr>
<tr>
- <td>tasks</td>
+ <td>title</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The tasks to skip.
-Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p></td>
+ <td></td>
+ <td><p>The display title of the identity provider. </p></td>
</tr>
<tr>
- <td>reason</td>
+ <td>domain</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The reason for skipping the tasks. </p></td>
+ <td><p>The domain for email matching when using this identity provider. </p></td>
+ </tr>
+
+ <tr>
+ <td>type</td>
+ <td><a href="#bytebase.v1.IdentityProviderType">IdentityProviderType</a></td>
+ <td></td>
+ <td><p>The type of identity provider protocol. </p></td>
+ </tr>
+
+ <tr>
+ <td>config</td>
+ <td><a href="#bytebase.v1.IdentityProviderConfig">IdentityProviderConfig</a></td>
+ <td></td>
+ <td><p>The configuration details for the identity provider. </p></td>
</tr>
</tbody>
@@ -6688,14 +6752,7 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p>
- <h3 id="bytebase.v1.BatchSkipTasksResponse">BatchSkipTasksResponse</h3>
- <p></p>
-
-
-
-
-
- <h3 id="bytebase.v1.CreateRolloutRequest">CreateRolloutRequest</h3>
+ <h3 id="bytebase.v1.IdentityProviderConfig">IdentityProviderConfig</h3>
<p></p>
@@ -6706,21 +6763,24 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p>
<tbody>
<tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
+ <td>oauth2_config</td>
+ <td><a href="#bytebase.v1.OAuth2IdentityProviderConfig">OAuth2IdentityProviderConfig</a></td>
<td></td>
- <td><p>The parent plan for which this rollout will be created.
-Format: projects/{project}/plans/{plan} </p></td>
+ <td><p>OAuth2 protocol configuration. </p></td>
</tr>
<tr>
- <td>target</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>Create the rollout only for the specified target.
-Format: environments/{environment}
-If unspecified, all stages are created.
-If set to &#34;&#34;, no stages are created. </p></td>
+ <td>oidc_config</td>
+ <td><a href="#bytebase.v1.OIDCIdentityProviderConfig">OIDCIdentityProviderConfig</a></td>
+ <td></td>
+ <td><p>OIDC protocol configuration. </p></td>
+ </tr>
+
+ <tr>
+ <td>ldap_config</td>
+ <td><a href="#bytebase.v1.LDAPIdentityProviderConfig">LDAPIdentityProviderConfig</a></td>
+ <td></td>
+ <td><p>LDAP protocol configuration. </p></td>
</tr>
</tbody>
@@ -6730,8 +6790,8 @@ If set to &#34;&#34;, no stages are created. </p></td>
- <h3 id="bytebase.v1.GetRolloutRequest">GetRolloutRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.LDAPIdentityProviderConfig">LDAPIdentityProviderConfig</h3>
+ <p>LDAPIdentityProviderConfig is the structure for LDAP identity provider config.</p>
<table class="field-table">
@@ -6741,12 +6801,72 @@ If set to &#34;&#34;, no stages are created. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>host</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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 </p></td>
+ <td><p>Host is the hostname or IP address of the LDAP server, e.g.,
+&#34;ldap.example.com&#34;. </p></td>
+ </tr>
+
+ <tr>
+ <td>port</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>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. </p></td>
+ </tr>
+
+ <tr>
+ <td>skip_tls_verify</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>SkipTLSVerify controls whether to skip TLS certificate verification. </p></td>
+ </tr>
+
+ <tr>
+ <td>bind_dn</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>BindDN is the DN of the user to bind as a service account to perform
+search requests. </p></td>
+ </tr>
+
+ <tr>
+ <td>bind_password</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>BindPassword is the password of the user to bind as a service account. </p></td>
+ </tr>
+
+ <tr>
+ <td>base_dn</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>BaseDN is the base DN to search for users, e.g., &#34;ou=users,dc=example,dc=com&#34;. </p></td>
+ </tr>
+
+ <tr>
+ <td>user_filter</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>UserFilter is the filter to search for users, e.g., &#34;(uid=%s)&#34;. </p></td>
+ </tr>
+
+ <tr>
+ <td>security_protocol</td>
+ <td><a href="#bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol">LDAPIdentityProviderConfig.SecurityProtocol</a></td>
+ <td></td>
+ <td><p>SecurityProtocol is the security protocol to be used for establishing
+connections with the LDAP server. </p></td>
+ </tr>
+
+ <tr>
+ <td>field_mapping</td>
+ <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td>
+ <td></td>
+ <td><p>FieldMapping is the mapping of the user attributes returned by the LDAP
+server. </p></td>
</tr>
</tbody>
@@ -6756,7 +6876,7 @@ Format: projects/{project}/plans/{plan}/rollout </p></td>
- <h3 id="bytebase.v1.GetTaskRunLogRequest">GetTaskRunLogRequest</h3>
+ <h3 id="bytebase.v1.LDAPIdentityProviderTestRequestContext">LDAPIdentityProviderTestRequestContext</h3>
<p></p>
@@ -6767,10 +6887,17 @@ Format: projects/{project}/plans/{plan}/rollout </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>username</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>
+ <td><p>The username of a directory user, substituted into the user filter. </p></td>
+ </tr>
+
+ <tr>
+ <td>password</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The password of the directory user. </p></td>
</tr>
</tbody>
@@ -6780,7 +6907,7 @@ Format: projects/{project}/plans/{plan}/rollout </p></td>
- <h3 id="bytebase.v1.GetTaskRunRequest">GetTaskRunRequest</h3>
+ <h3 id="bytebase.v1.ListIdentityProvidersRequest">ListIdentityProvidersRequest</h3>
<p></p>
@@ -6791,10 +6918,12 @@ Format: projects/{project}/plans/{plan}/rollout </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>
+ <td><p>The parent workspace whose identity providers should be listed. It must be
+the workspace the caller&#39;s credential belongs to.
+Format: workspaces/{workspace} </p></td>
</tr>
</tbody>
@@ -6804,7 +6933,7 @@ Format: projects/{project}/plans/{plan}/rollout </p></td>
- <h3 id="bytebase.v1.GetTaskRunSessionRequest">GetTaskRunSessionRequest</h3>
+ <h3 id="bytebase.v1.ListIdentityProvidersResponse">ListIdentityProvidersResponse</h3>
<p></p>
@@ -6815,10 +6944,10 @@ Format: projects/{project}/plans/{plan}/rollout </p></td>
<tbody>
<tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>
+ <td>identity_providers</td>
+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
+ <td>repeated</td>
+ <td><p>The identity providers from the specified request. </p></td>
</tr>
</tbody>
@@ -6828,8 +6957,8 @@ Format: projects/{project}/plans/{plan}/rollout </p></td>
- <h3 id="bytebase.v1.ListRolloutsRequest">ListRolloutsRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.OAuth2IdentityProviderConfig">OAuth2IdentityProviderConfig</h3>
+ <p>OAuth2IdentityProviderConfig is the structure for OAuth2 identity provider config.</p>
<table class="field-table">
@@ -6839,49 +6968,66 @@ Format: projects/{project}/plans/{plan}/rollout </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>auth_url</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent, which owns this collection of rollouts.
-Format: projects/{project}
-Use &#34;projects/-&#34; to list all rollouts from all projects. </p></td>
+ <td><p>The authorization endpoint URL for OAuth2 flow. </p></td>
</tr>
<tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
+ <td>token_url</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>The token endpoint URL for exchanging authorization code. </p></td>
</tr>
<tr>
- <td>page_token</td>
+ <td>user_info_url</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>The user information endpoint URL. </p></td>
</tr>
<tr>
- <td>filter</td>
+ <td>client_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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 &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator.
-- task_type: the task type, support &#34;in&#34; operator, check the Task.Type enum for the values.
-
-For example:
-update_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34;
-task_type in [&#34;DATABASE_MIGRATE&#34;, &#34;DATABASE_CREATE&#34;] </p></td>
+ <td><p>The OAuth2 client identifier. </p></td>
+ </tr>
+
+ <tr>
+ <td>client_secret</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The OAuth2 client secret for authentication. </p></td>
+ </tr>
+
+ <tr>
+ <td>scopes</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The list of OAuth2 scopes to request. </p></td>
+ </tr>
+
+ <tr>
+ <td>field_mapping</td>
+ <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td>
+ <td></td>
+ <td><p>Mapping configuration for user attributes from OAuth2 response. </p></td>
+ </tr>
+
+ <tr>
+ <td>skip_tls_verify</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to skip TLS certificate verification. </p></td>
+ </tr>
+
+ <tr>
+ <td>auth_style</td>
+ <td><a href="#bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</a></td>
+ <td></td>
+ <td><p>The authentication style for client credentials. </p></td>
</tr>
</tbody>
@@ -6891,7 +7037,7 @@ task_type in [&#34;DATABASE_MIGRATE&#34;, &#34;DATABASE_CREATE&#34;] </p></td>
- <h3 id="bytebase.v1.ListRolloutsResponse">ListRolloutsResponse</h3>
+ <h3 id="bytebase.v1.OAuth2IdentityProviderTestRequestContext">OAuth2IdentityProviderTestRequestContext</h3>
<p></p>
@@ -6902,18 +7048,10 @@ task_type in [&#34;DATABASE_MIGRATE&#34;, &#34;DATABASE_CREATE&#34;] </p></td>
<tbody>
<tr>
- <td>rollouts</td>
- <td><a href="#bytebase.v1.Rollout">Rollout</a></td>
- <td>repeated</td>
- <td><p>The rollouts from the specified request. </p></td>
- </tr>
-
- <tr>
- <td>next_page_token</td>
+ <td>code</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td><p>Authorize code from website. </p></td>
</tr>
</tbody>
@@ -6923,8 +7061,8 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.ListTaskRunsRequest">ListTaskRunsRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.OIDCIdentityProviderConfig">OIDCIdentityProviderConfig</h3>
+ <p>OIDCIdentityProviderConfig is the structure for OIDC identity provider config.</p>
<table class="field-table">
@@ -6934,33 +7072,61 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>issuer</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent, which owns this collection of taskRuns.
-Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}
-Use &#34;projects/{project}/plans/{plan}/rollout/stages/-/tasks/-&#34; to list all taskRuns from a rollout. </p></td>
+ <td><p>The OIDC issuer URL for the identity provider. </p></td>
</tr>
<tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
+ <td>client_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>The OIDC client identifier. </p></td>
</tr>
<tr>
- <td>page_token</td>
+ <td>client_secret</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>The OIDC client secret for authentication. </p></td>
+ </tr>
+
+ <tr>
+ <td>scopes</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The scopes that the OIDC provider supports.
+Should be fetched from the well-known configuration file of the OIDC provider. </p></td>
+ </tr>
+
+ <tr>
+ <td>field_mapping</td>
+ <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td>
+ <td></td>
+ <td><p>Mapping configuration for user attributes from OIDC claims. </p></td>
+ </tr>
+
+ <tr>
+ <td>skip_tls_verify</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to skip TLS certificate verification. </p></td>
+ </tr>
+
+ <tr>
+ <td>auth_style</td>
+ <td><a href="#bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</a></td>
+ <td></td>
+ <td><p>The authentication style for client credentials. </p></td>
+ </tr>
+
+ <tr>
+ <td>auth_endpoint</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The authorization endpoint of the OIDC provider.
+Should be fetched from the well-known configuration file of the OIDC provider. </p></td>
</tr>
</tbody>
@@ -6970,7 +7136,7 @@ the call that provided the page token. </p></td>
- <h3 id="bytebase.v1.ListTaskRunsResponse">ListTaskRunsResponse</h3>
+ <h3 id="bytebase.v1.OIDCIdentityProviderTestRequestContext">OIDCIdentityProviderTestRequestContext</h3>
<p></p>
@@ -6981,18 +7147,10 @@ the call that provided the page token. </p></td>
<tbody>
<tr>
- <td>task_runs</td>
- <td><a href="#bytebase.v1.TaskRun">TaskRun</a></td>
- <td>repeated</td>
- <td><p>The taskRuns from the specified request. </p></td>
- </tr>
-
- <tr>
- <td>next_page_token</td>
+ <td>code</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td><p>Authorize code from OIDC provider. </p></td>
</tr>
</tbody>
@@ -7002,7 +7160,7 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.PreviewTaskRunRollbackRequest">PreviewTaskRunRollbackRequest</h3>
+ <h3 id="bytebase.v1.TestIdentityProviderRequest">TestIdentityProviderRequest</h3>
<p></p>
@@ -7013,10 +7171,31 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>identity_provider</td>
+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
<td></td>
- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>
+ <td><p>The identity provider to test connection including uncreated. </p></td>
+ </tr>
+
+ <tr>
+ <td>oauth2_context</td>
+ <td><a href="#bytebase.v1.OAuth2IdentityProviderTestRequestContext">OAuth2IdentityProviderTestRequestContext</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>oidc_context</td>
+ <td><a href="#bytebase.v1.OIDCIdentityProviderTestRequestContext">OIDCIdentityProviderTestRequestContext</a></td>
+ <td></td>
+ <td><p>OIDC authentication context for test connection. </p></td>
+ </tr>
+
+ <tr>
+ <td>ldap_context</td>
+ <td><a href="#bytebase.v1.LDAPIdentityProviderTestRequestContext">LDAPIdentityProviderTestRequestContext</a></td>
+ <td></td>
+ <td><p>LDAP credentials context for test connection. </p></td>
</tr>
</tbody>
@@ -7026,7 +7205,7 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.PreviewTaskRunRollbackResponse">PreviewTaskRunRollbackResponse</h3>
+ <h3 id="bytebase.v1.TestIdentityProviderResponse">TestIdentityProviderResponse</h3>
<p></p>
@@ -7037,10 +7216,17 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>statement</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The rollback SQL statement that would undo the task run. </p></td>
+ <td>claims</td>
+ <td><a href="#bytebase.v1.TestIdentityProviderResponse.ClaimsEntry">TestIdentityProviderResponse.ClaimsEntry</a></td>
+ <td>repeated</td>
+ <td><p>The map of claims returned by the identity provider. </p></td>
+ </tr>
+
+ <tr>
+ <td>user_info</td>
+ <td><a href="#bytebase.v1.TestIdentityProviderResponse.UserInfoEntry">TestIdentityProviderResponse.UserInfoEntry</a></td>
+ <td>repeated</td>
+ <td><p>The matched user info from the claims. </p></td>
</tr>
</tbody>
@@ -7050,7 +7236,7 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.Rollout">Rollout</h3>
+ <h3 id="bytebase.v1.TestIdentityProviderResponse.ClaimsEntry">TestIdentityProviderResponse.ClaimsEntry</h3>
<p></p>
@@ -7061,38 +7247,15 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The resource name of the rollout.
-Format: projects/{project}/plans/{plan}/rollout </p></td>
- </tr>
-
- <tr>
- <td>title</td>
+ <td>key</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The title of the rollout, inherited from the associated plan.
-This field is output only and cannot be directly set. </p></td>
- </tr>
-
- <tr>
- <td>stages</td>
- <td><a href="#bytebase.v1.Stage">Stage</a></td>
- <td>repeated</td>
- <td><p>Stages and thus tasks of the rollout. </p></td>
- </tr>
-
- <tr>
- <td>create_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>update_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>value</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -7104,7 +7267,7 @@ This field is output only and cannot be directly set. </p></td>
- <h3 id="bytebase.v1.Stage">Stage</h3>
+ <h3 id="bytebase.v1.TestIdentityProviderResponse.UserInfoEntry">TestIdentityProviderResponse.UserInfoEntry</h3>
<p></p>
@@ -7115,35 +7278,17 @@ This field is output only and cannot be directly set. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}
-Use &#34;-&#34; for {stage} when the stage has no environment or deleted environment. </p></td>
- </tr>
-
- <tr>
- <td>id</td>
+ <td>key</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>id is the environment id of the stage.
-e.g., &#34;prod&#34;.
-Use &#34;-&#34; when the stage has no environment or deleted environment. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>environment</td>
+ <td>value</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>environment is the environment of the stage.
-Format: environments/{environment} for valid environments, or &#34;environments/-&#34; for stages without environment or with deleted environments. </p></td>
- </tr>
-
- <tr>
- <td>tasks</td>
- <td><a href="#bytebase.v1.Task">Task</a></td>
- <td>repeated</td>
- <td><p>The tasks within this stage. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -7153,7 +7298,7 @@ Format: environments/{environment} for valid environments, or &#34;environments/
- <h3 id="bytebase.v1.Task">Task</h3>
+ <h3 id="bytebase.v1.UpdateIdentityProviderRequest">UpdateIdentityProviderRequest</h3>
<p></p>
@@ -7164,76 +7309,28 @@ Format: environments/{environment} for valid environments, or &#34;environments/
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p></td>
- </tr>
-
- <tr>
- <td>spec_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>A UUID4 string that uniquely identifies the Spec. </p></td>
- </tr>
-
- <tr>
- <td>status</td>
- <td><a href="#bytebase.v1.Task.Status">Task.Status</a></td>
- <td></td>
- <td><p>Status is the status of the task. </p></td>
- </tr>
-
- <tr>
- <td>skipped_reason</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The reason why the task was skipped. </p></td>
- </tr>
-
- <tr>
- <td>type</td>
- <td><a href="#bytebase.v1.Task.Type">Task.Type</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>target</td>
- <td><a href="#string">string</a></td>
+ <td>identity_provider</td>
+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
<td></td>
- <td><p>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} </p></td>
+ <td><p>The identity provider to update.
+
+The identity provider&#39;s `name` field is used to identify the identity provider to update.
+Format: idps/{identity_provider} </p></td>
</tr>
<tr>
- <td>database_create</td>
- <td><a href="#bytebase.v1.Task.DatabaseCreate">Task.DatabaseCreate</a></td>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The list of fields to update. </p></td>
</tr>
<tr>
- <td>database_update</td>
- <td><a href="#bytebase.v1.Task.DatabaseUpdate">Task.DatabaseUpdate</a></td>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>update_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td>optional</td>
- <td><p>The update_time is the update time of latest task run.
-If there are no task runs, it will be empty. </p></td>
- </tr>
-
- <tr>
- <td>run_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td>optional</td>
- <td><p>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. </p></td>
+ <td><p>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. </p></td>
</tr>
</tbody>
@@ -7243,52 +7340,293 @@ If there are no task runs or the task run is not scheduled, it will be empty. </
- <h3 id="bytebase.v1.Task.DatabaseCreate">Task.DatabaseCreate</h3>
- <p>Payload for creating a new database.</p>
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>sheet</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Format: projects/{project}/sheets/{sheet} </p></td>
- </tr>
-
- </tbody>
- </table>
+
+ <h3 id="bytebase.v1.IdentityProviderType">IdentityProviderType</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>IDENTITY_PROVIDER_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified identity provider type.</p></td>
+ </tr>
+
+ <tr>
+ <td>OAUTH2</td>
+ <td>1</td>
+ <td><p>OAuth 2.0 authentication protocol.</p></td>
+ </tr>
+
+ <tr>
+ <td>OIDC</td>
+ <td>2</td>
+ <td><p>OpenID Connect authentication protocol.</p></td>
+ </tr>
+
+ <tr>
+ <td>LDAP</td>
+ <td>3</td>
+ <td><p>LDAP directory service authentication.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol">LDAPIdentityProviderConfig.SecurityProtocol</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>SECURITY_PROTOCOL_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>START_TLS</td>
+ <td>1</td>
+ <td><p>StartTLS is the security protocol that starts with an unencrypted connection and then upgrades to TLS.</p></td>
+ </tr>
+
+ <tr>
+ <td>LDAPS</td>
+ <td>2</td>
+ <td><p>LDAPS is the security protocol that uses TLS from the beginning.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>OAUTH2_AUTH_STYLE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>IN_PARAMS</td>
+ <td>1</td>
+ <td><p>IN_PARAMS sends the &#34;client_id&#34; and &#34;client_secret&#34; in the POST body
+as application/x-www-form-urlencoded parameters.</p></td>
+ </tr>
+
+ <tr>
+ <td>IN_HEADER</td>
+ <td>2</td>
+ <td><p>IN_HEADER sends the client_id and client_password using HTTP Basic Authorization.
+This is an optional style described in the OAuth2 RFC 6749 section 2.3.1.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
-
+
-
- <h3 id="bytebase.v1.Task.DatabaseUpdate">Task.DatabaseUpdate</h3>
- <p>Payload for updating a database schema.</p>
+ <h3 id="bytebase.v1.IdentityProviderService">IdentityProviderService</h3>
+ <p>IdentityProviderService manages external identity providers for SSO authentication.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>GetIdentityProvider</td>
+ <td><a href="#bytebase.v1.GetIdentityProviderRequest">GetIdentityProviderRequest</a></td>
+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
+ <td><p>Gets an identity provider by name.
+Permissions required: bb.identityProviders.get</p></td>
+ </tr>
+
+ <tr>
+ <td>ListIdentityProviders</td>
+ <td><a href="#bytebase.v1.ListIdentityProvidersRequest">ListIdentityProvidersRequest</a></td>
+ <td><a href="#bytebase.v1.ListIdentityProvidersResponse">ListIdentityProvidersResponse</a></td>
+ <td><p>Lists the identity providers configured for the caller&#39;s workspace.
+The login page reads AuthService.GetAuthenticationInfo instead,
+which publishes only the fields a browser needs to start an SSO redirect.
+
+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</p></td>
+ </tr>
+
+ <tr>
+ <td>CreateIdentityProvider</td>
+ <td><a href="#bytebase.v1.CreateIdentityProviderRequest">CreateIdentityProviderRequest</a></td>
+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
+ <td><p>Creates a new identity provider.
+Permissions required: bb.identityProviders.create</p></td>
+ </tr>
+
+ <tr>
+ <td>UpdateIdentityProvider</td>
+ <td><a href="#bytebase.v1.UpdateIdentityProviderRequest">UpdateIdentityProviderRequest</a></td>
+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
+ <td><p>Updates an identity provider.
+Permissions required: bb.identityProviders.update
+When allow_missing=true, also requires: bb.identityProviders.create</p></td>
+ </tr>
+
+ <tr>
+ <td>DeleteIdentityProvider</td>
+ <td><a href="#bytebase.v1.DeleteIdentityProviderRequest">DeleteIdentityProviderRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Deletes an identity provider.
+Permissions required: bb.identityProviders.delete</p></td>
+ </tr>
+
+ <tr>
+ <td>TestIdentityProvider</td>
+ <td><a href="#bytebase.v1.TestIdentityProviderRequest">TestIdentityProviderRequest</a></td>
+ <td><a href="#bytebase.v1.TestIdentityProviderResponse">TestIdentityProviderResponse</a></td>
+ <td><p>Tests the connection and configuration of an identity provider.
+Permissions required: bb.identityProviders.update</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <table class="field-table">
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
<thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
+ </thead>
+ <tbody>
+
+
+
+ <tr>
+ <td>GetIdentityProvider</td>
+ <td>GET</td>
+ <td>/v1/{name=idps/*}</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>ListIdentityProviders</td>
+ <td>GET</td>
+ <td>/v1/idps</td>
+ <td></td>
+ </tr>
+
+ <tr>
+ <td>ListIdentityProviders</td>
+ <td>GET</td>
+ <td>/v1/{parent=workspaces/*}/idps</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>CreateIdentityProvider</td>
+ <td>POST</td>
+ <td>/v1/idps</td>
+ <td>identity_provider</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>UpdateIdentityProvider</td>
+ <td>PATCH</td>
+ <td>/v1/{identity_provider.name=idps/*}</td>
+ <td>identity_provider</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>DeleteIdentityProvider</td>
+ <td>DELETE</td>
+ <td>/v1/{name=idps/*}</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>TestIdentityProvider</td>
+ <td>POST</td>
+ <td>/v1/idps/*:test</td>
+ <td>*</td>
+ </tr>
+
+
+ </tbody>
+ </table>
+
+
+
+
+ <div class="file-heading">
+ <h2 id="v1/rollout_service.proto">v1/rollout_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.BatchCancelTaskRunsRequest">BatchCancelTaskRunsRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>
<tr>
- <td>sheet</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: projects/{project}/sheets/{sheet} </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>release</td>
+ <td>task_runs</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>Format: projects/{project}/releases/{release} </p></td>
+ <td>repeated</td>
+ <td><p>The taskRuns to cancel.
+Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>
</tr>
</tbody>
@@ -7298,7 +7636,14 @@ If there are no task runs or the task run is not scheduled, it will be empty. </
- <h3 id="bytebase.v1.TaskRun">TaskRun</h3>
+ <h3 id="bytebase.v1.BatchCancelTaskRunsResponse">BatchCancelTaskRunsResponse</h3>
+ <p></p>
+
+
+
+
+
+ <h3 id="bytebase.v1.BatchRunTasksRequest">BatchRunTasksRequest</h3>
<p></p>
@@ -7309,77 +7654,80 @@ If there are no task runs or the task run is not scheduled, it will be empty. </
<tbody>
<tr>
- <td>name</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>
+ <td><p>The stage name for the tasks.
+Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>
</tr>
<tr>
- <td>creator</td>
+ <td>tasks</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>Format: users/[email protected] </p></td>
+ <td>repeated</td>
+ <td><p>The tasks to run.
+Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p></td>
</tr>
<tr>
- <td>create_time</td>
+ <td>run_time</td>
<td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>optional</td>
+ <td><p>The task run should run after run_time. </p></td>
</tr>
<tr>
- <td>update_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>skip_prior_backup</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>If true, skip prior backup for this run even if the task has prior backup enabled. </p></td>
</tr>
- <tr>
- <td>status</td>
- <td><a href="#bytebase.v1.TaskRun.Status">TaskRun.Status</a></td>
- <td></td>
- <td><p>The current execution status of the task run. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.BatchRunTasksResponse">BatchRunTasksResponse</h3>
+ <p></p>
+
+
+
+
+
+ <h3 id="bytebase.v1.BatchSkipTasksRequest">BatchSkipTasksRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>detail</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Below are the results of a task run.
-Detailed information about the task run result. </p></td>
- </tr>
-
- <tr>
- <td>start_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p>The time when the task run started execution. </p></td>
+ <td><p>The stage name for the tasks.
+Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>
</tr>
<tr>
- <td>has_prior_backup</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>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. </p></td>
+ <td>tasks</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The tasks to skip.
+Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p></td>
</tr>
<tr>
- <td>scheduler_info</td>
- <td><a href="#bytebase.v1.TaskRun.SchedulerInfo">TaskRun.SchedulerInfo</a></td>
+ <td>reason</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Scheduling information about the task run. </p></td>
- </tr>
-
- <tr>
- <td>run_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td>optional</td>
- <td><p>The task run should run after run_time.
-This can only be set when creating the task run calling BatchRunTasks. </p></td>
+ <td><p>The reason for skipping the tasks. </p></td>
</tr>
</tbody>
@@ -7389,8 +7737,15 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td>
- <h3 id="bytebase.v1.TaskRun.SchedulerInfo">TaskRun.SchedulerInfo</h3>
- <p>Information about task run scheduling.</p>
+ <h3 id="bytebase.v1.BatchSkipTasksResponse">BatchSkipTasksResponse</h3>
+ <p></p>
+
+
+
+
+
+ <h3 id="bytebase.v1.CreateRolloutRequest">CreateRolloutRequest</h3>
+ <p></p>
<table class="field-table">
@@ -7400,17 +7755,21 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td>
<tbody>
<tr>
- <td>report_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The time when the scheduling info was reported. </p></td>
+ <td><p>The parent plan for which this rollout will be created.
+Format: projects/{project}/plans/{plan} </p></td>
</tr>
<tr>
- <td>waiting_cause</td>
- <td><a href="#bytebase.v1.TaskRun.SchedulerInfo.WaitingCause">TaskRun.SchedulerInfo.WaitingCause</a></td>
- <td></td>
- <td><p>The cause for the task run waiting. </p></td>
+ <td>target</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>Create the rollout only for the specified target.
+Format: environments/{environment}
+If unspecified, all stages are created.
+If set to &#34;&#34;, no stages are created. </p></td>
</tr>
</tbody>
@@ -7420,8 +7779,8 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td>
- <h3 id="bytebase.v1.TaskRun.SchedulerInfo.WaitingCause">TaskRun.SchedulerInfo.WaitingCause</h3>
- <p>Information about why a task run is waiting.</p>
+ <h3 id="bytebase.v1.GetRolloutRequest">GetRolloutRequest</h3>
+ <p></p>
<table class="field-table">
@@ -7431,10 +7790,12 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td>
<tbody>
<tr>
- <td>parallel_tasks_limit</td>
- <td><a href="#bool">bool</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Waiting due to parallel tasks limit. </p></td>
+ <td><p>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 </p></td>
</tr>
</tbody>
@@ -7444,7 +7805,7 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td>
- <h3 id="bytebase.v1.TaskRunLog">TaskRunLog</h3>
+ <h3 id="bytebase.v1.GetTaskRunLogRequest">GetTaskRunLogRequest</h3>
<p></p>
@@ -7455,17 +7816,10 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/log </p></td>
- </tr>
-
- <tr>
- <td>entries</td>
- <td><a href="#bytebase.v1.TaskRunLogEntry">TaskRunLogEntry</a></td>
- <td>repeated</td>
- <td><p>The log entries for this task run. </p></td>
+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>
</tr>
</tbody>
@@ -7475,7 +7829,7 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td>
- <h3 id="bytebase.v1.TaskRunLogEntry">TaskRunLogEntry</h3>
+ <h3 id="bytebase.v1.GetTaskRunRequest">GetTaskRunRequest</h3>
<p></p>
@@ -7486,87 +7840,10 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td>
<tbody>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.TaskRunLogEntry.Type">TaskRunLogEntry.Type</a></td>
- <td></td>
- <td><p>The type of this log entry. </p></td>
- </tr>
-
- <tr>
- <td>log_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p>The time when the log was recorded. </p></td>
- </tr>
-
- <tr>
- <td>replica_id</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The replica ID for this log entry. </p></td>
- </tr>
-
- <tr>
- <td>schema_dump</td>
- <td><a href="#bytebase.v1.TaskRunLogEntry.SchemaDump">TaskRunLogEntry.SchemaDump</a></td>
- <td></td>
- <td><p>Schema dump details (if type is SCHEMA_DUMP). </p></td>
- </tr>
-
- <tr>
- <td>command_execute</td>
- <td><a href="#bytebase.v1.TaskRunLogEntry.CommandExecute">TaskRunLogEntry.CommandExecute</a></td>
- <td></td>
- <td><p>Command execution details (if type is COMMAND_EXECUTE). </p></td>
- </tr>
-
- <tr>
- <td>database_sync</td>
- <td><a href="#bytebase.v1.TaskRunLogEntry.DatabaseSync">TaskRunLogEntry.DatabaseSync</a></td>
- <td></td>
- <td><p>Database sync details (if type is DATABASE_SYNC). </p></td>
- </tr>
-
- <tr>
- <td>transaction_control</td>
- <td><a href="#bytebase.v1.TaskRunLogEntry.TransactionControl">TaskRunLogEntry.TransactionControl</a></td>
- <td></td>
- <td><p>Transaction control details (if type is TRANSACTION_CONTROL). </p></td>
- </tr>
-
- <tr>
- <td>prior_backup</td>
- <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup">TaskRunLogEntry.PriorBackup</a></td>
- <td></td>
- <td><p>Prior backup details (if type is PRIOR_BACKUP). </p></td>
- </tr>
-
- <tr>
- <td>retry_info</td>
- <td><a href="#bytebase.v1.TaskRunLogEntry.RetryInfo">TaskRunLogEntry.RetryInfo</a></td>
- <td></td>
- <td><p>Retry information details (if type is RETRY_INFO). </p></td>
- </tr>
-
- <tr>
- <td>compute_diff</td>
- <td><a href="#bytebase.v1.TaskRunLogEntry.ComputeDiff">TaskRunLogEntry.ComputeDiff</a></td>
- <td></td>
- <td><p>Compute diff details (if type is COMPUTE_DIFF). </p></td>
- </tr>
-
- <tr>
- <td>release_file_execute</td>
- <td><a href="#bytebase.v1.TaskRunLogEntry.ReleaseFileExecute">TaskRunLogEntry.ReleaseFileExecute</a></td>
- <td></td>
- <td><p>Release file execution details (if type is RELEASE_FILE_EXECUTE). </p></td>
- </tr>
-
- <tr>
- <td>ghost_migration</td>
- <td><a href="#bytebase.v1.TaskRunLogEntry.GhostMigration">TaskRunLogEntry.GhostMigration</a></td>
- <td></td>
- <td><p>gh-ost migration details (if type is GHOST_MIGRATION). </p></td>
+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>
</tr>
</tbody>
@@ -7576,8 +7853,8 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td>
- <h3 id="bytebase.v1.TaskRunLogEntry.CommandExecute">TaskRunLogEntry.CommandExecute</h3>
- <p>Command execution details.</p>
+ <h3 id="bytebase.v1.GetTaskRunSessionRequest">GetTaskRunSessionRequest</h3>
+ <p></p>
<table class="field-table">
@@ -7587,33 +7864,10 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td>
<tbody>
<tr>
- <td>log_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p>When the command was logged. </p></td>
- </tr>
-
- <tr>
- <td>range</td>
- <td><a href="#bytebase.v1.Range">Range</a></td>
- <td></td>
- <td><p>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 &#34;SELECT 你好;&#34; in a UTF-8 sheet, range [0, 13) represents all 13 bytes. </p></td>
- </tr>
-
- <tr>
- <td>statement</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The executed statement. </p></td>
- </tr>
-
- <tr>
- <td>response</td>
- <td><a href="#bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse">TaskRunLogEntry.CommandExecute.CommandResponse</a></td>
- <td></td>
- <td><p>The response from executing the command. </p></td>
+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>
</tr>
</tbody>
@@ -7623,8 +7877,8 @@ Example: For &#34;SELECT 你好;&#34; in a UTF-8 sheet, range [0, 13) represents
- <h3 id="bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse">TaskRunLogEntry.CommandExecute.CommandResponse</h3>
- <p>Command execution response.</p>
+ <h3 id="bytebase.v1.ListRolloutsRequest">ListRolloutsRequest</h3>
+ <p></p>
<table class="field-table">
@@ -7634,32 +7888,49 @@ Example: For &#34;SELECT 你好;&#34; in a UTF-8 sheet, range [0, 13) represents
<tbody>
<tr>
- <td>log_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>When the response was logged. </p></td>
+ <td><p>The parent, which owns this collection of rollouts.
+Format: projects/{project}
+Use &#34;projects/-&#34; to list all rollouts from all projects. </p></td>
</tr>
<tr>
- <td>error</td>
- <td><a href="#string">string</a></td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>Error message if command execution failed. </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>affected_rows</td>
- <td><a href="#int64">int64</a></td>
+ <td>page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Total affected rows. </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>all_affected_rows</td>
- <td><a href="#int64">int64</a></td>
- <td>repeated</td>
- <td><p>`all_affected_rows` is the affected rows of each command.
-`all_affected_rows` may be unavailable if the database driver doesn&#39;t support it. Caller should fallback to `affected_rows` in that case. </p></td>
+ <td>filter</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>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 &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator.
+- task_type: the task type, support &#34;in&#34; operator, check the Task.Type enum for the values.
+
+For example:
+update_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34;
+task_type in [&#34;DATABASE_MIGRATE&#34;, &#34;DATABASE_CREATE&#34;] </p></td>
</tr>
</tbody>
@@ -7669,8 +7940,8 @@ Example: For &#34;SELECT 你好;&#34; in a UTF-8 sheet, range [0, 13) represents
- <h3 id="bytebase.v1.TaskRunLogEntry.ComputeDiff">TaskRunLogEntry.ComputeDiff</h3>
- <p>Schema diff computation details.</p>
+ <h3 id="bytebase.v1.ListRolloutsResponse">ListRolloutsResponse</h3>
+ <p></p>
<table class="field-table">
@@ -7680,24 +7951,18 @@ Example: For &#34;SELECT 你好;&#34; in a UTF-8 sheet, range [0, 13) represents
<tbody>
<tr>
- <td>start_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p>When diff computation started. </p></td>
- </tr>
-
- <tr>
- <td>end_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p>When diff computation ended. </p></td>
+ <td>rollouts</td>
+ <td><a href="#bytebase.v1.Rollout">Rollout</a></td>
+ <td>repeated</td>
+ <td><p>The rollouts from the specified request. </p></td>
</tr>
<tr>
- <td>error</td>
+ <td>next_page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Error message if computation failed. </p></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
</tr>
</tbody>
@@ -7707,8 +7972,8 @@ Example: For &#34;SELECT 你好;&#34; in a UTF-8 sheet, range [0, 13) represents
- <h3 id="bytebase.v1.TaskRunLogEntry.DatabaseSync">TaskRunLogEntry.DatabaseSync</h3>
- <p>Database synchronization details.</p>
+ <h3 id="bytebase.v1.ListTaskRunsRequest">ListTaskRunsRequest</h3>
+ <p></p>
<table class="field-table">
@@ -7718,24 +7983,33 @@ Example: For &#34;SELECT 你好;&#34; in a UTF-8 sheet, range [0, 13) represents
<tbody>
<tr>
- <td>start_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>When the database sync started. </p></td>
+ <td><p>The parent, which owns this collection of taskRuns.
+Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}
+Use &#34;projects/{project}/plans/{plan}/rollout/stages/-/tasks/-&#34; to list all taskRuns from a rollout. </p></td>
</tr>
<tr>
- <td>end_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>When the database sync ended. </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>error</td>
+ <td>page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Error message if sync failed. </p></td>
+ <td><p>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. </p></td>
</tr>
</tbody>
@@ -7745,8 +8019,8 @@ Example: For &#34;SELECT 你好;&#34; in a UTF-8 sheet, range [0, 13) represents
- <h3 id="bytebase.v1.TaskRunLogEntry.GhostMigration">TaskRunLogEntry.GhostMigration</h3>
- <p>gh-ost migration details.</p>
+ <h3 id="bytebase.v1.ListTaskRunsResponse">ListTaskRunsResponse</h3>
+ <p></p>
<table class="field-table">
@@ -7756,24 +8030,18 @@ Example: For &#34;SELECT 你好;&#34; in a UTF-8 sheet, range [0, 13) represents
<tbody>
<tr>
- <td>start_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p>When the gh-ost migration started. </p></td>
- </tr>
-
- <tr>
- <td>end_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p>When the gh-ost migration ended. </p></td>
+ <td>task_runs</td>
+ <td><a href="#bytebase.v1.TaskRun">TaskRun</a></td>
+ <td>repeated</td>
+ <td><p>The taskRuns from the specified request. </p></td>
</tr>
<tr>
- <td>error</td>
+ <td>next_page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Error message if the gh-ost migration failed. </p></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
</tr>
</tbody>
@@ -7783,8 +8051,8 @@ Example: For &#34;SELECT 你好;&#34; in a UTF-8 sheet, range [0, 13) represents
- <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup">TaskRunLogEntry.PriorBackup</h3>
- <p>Prior backup operation details.</p>
+ <h3 id="bytebase.v1.PreviewTaskRunRollbackRequest">PreviewTaskRunRollbackRequest</h3>
+ <p></p>
<table class="field-table">
@@ -7794,31 +8062,10 @@ Example: For &#34;SELECT 你好;&#34; in a UTF-8 sheet, range [0, 13) represents
<tbody>
<tr>
- <td>start_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>When the backup started. </p></td>
- </tr>
-
- <tr>
- <td>end_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p>When the backup ended. </p></td>
- </tr>
-
- <tr>
- <td>prior_backup_detail</td>
- <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail">TaskRunLogEntry.PriorBackup.PriorBackupDetail</a></td>
- <td></td>
- <td><p>The backup details. </p></td>
- </tr>
-
- <tr>
- <td>error</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Error message if the backup failed. </p></td>
+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>
</tr>
</tbody>
@@ -7828,8 +8075,8 @@ Example: For &#34;SELECT 你好;&#34; in a UTF-8 sheet, range [0, 13) represents
- <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail">TaskRunLogEntry.PriorBackup.PriorBackupDetail</h3>
- <p>Prior backup detail for rollback purposes.</p>
+ <h3 id="bytebase.v1.PreviewTaskRunRollbackResponse">PreviewTaskRunRollbackResponse</h3>
+ <p></p>
<table class="field-table">
@@ -7839,10 +8086,10 @@ Example: For &#34;SELECT 你好;&#34; in a UTF-8 sheet, range [0, 13) represents
<tbody>
<tr>
- <td>items</td>
- <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item</a></td>
- <td>repeated</td>
- <td><p>The list of backed up tables. </p></td>
+ <td>statement</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The rollback SQL statement that would undo the task run. </p></td>
</tr>
</tbody>
@@ -7852,8 +8099,8 @@ Example: For &#34;SELECT 你好;&#34; in a UTF-8 sheet, range [0, 13) represents
- <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item</h3>
- <p>A single backup table mapping.</p>
+ <h3 id="bytebase.v1.Rollout">Rollout</h3>
+ <p></p>
<table class="field-table">
@@ -7863,31 +8110,40 @@ Example: For &#34;SELECT 你好;&#34; in a UTF-8 sheet, range [0, 13) represents
<tbody>
<tr>
- <td>source_table</td>
- <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The original table information. </p></td>
+ <td><p>The resource name of the rollout.
+Format: projects/{project}/plans/{plan}/rollout </p></td>
</tr>
<tr>
- <td>target_table</td>
- <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table</a></td>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The target backup table information. </p></td>
+ <td><p>The title of the rollout, inherited from the associated plan.
+This field is output only and cannot be directly set. </p></td>
</tr>
<tr>
- <td>start_position</td>
- <td><a href="#bytebase.v1.Position">Position</a></td>
+ <td>stages</td>
+ <td><a href="#bytebase.v1.Stage">Stage</a></td>
+ <td>repeated</td>
+ <td><p>Stages and thus tasks of the rollout. </p></td>
+ </tr>
+
+ <tr>
+ <td>create_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>The start position in the SQL statement. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>end_position</td>
- <td><a href="#bytebase.v1.Position">Position</a></td>
+ <td>update_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>The end position in the SQL statement. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -7897,8 +8153,8 @@ Example: For &#34;SELECT 你好;&#34; in a UTF-8 sheet, range [0, 13) represents
- <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table</h3>
- <p>Table information.</p>
+ <h3 id="bytebase.v1.Stage">Stage</h3>
+ <p></p>
<table class="field-table">
@@ -7908,25 +8164,35 @@ Example: For &#34;SELECT 你好;&#34; in a UTF-8 sheet, range [0, 13) represents
<tbody>
<tr>
- <td>database</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The database information.
-Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} </p></td>
+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}
+Use &#34;-&#34; for {stage} when the stage has no environment or deleted environment. </p></td>
</tr>
<tr>
- <td>schema</td>
+ <td>id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The schema name. </p></td>
+ <td><p>id is the environment id of the stage.
+e.g., &#34;prod&#34;.
+Use &#34;-&#34; when the stage has no environment or deleted environment. </p></td>
</tr>
<tr>
- <td>table</td>
+ <td>environment</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The table name. </p></td>
+ <td><p>environment is the environment of the stage.
+Format: environments/{environment} for valid environments, or &#34;environments/-&#34; for stages without environment or with deleted environments. </p></td>
+ </tr>
+
+ <tr>
+ <td>tasks</td>
+ <td><a href="#bytebase.v1.Task">Task</a></td>
+ <td>repeated</td>
+ <td><p>The tasks within this stage. </p></td>
</tr>
</tbody>
@@ -7936,8 +8202,8 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance
- <h3 id="bytebase.v1.TaskRunLogEntry.ReleaseFileExecute">TaskRunLogEntry.ReleaseFileExecute</h3>
- <p>Release file execution details.</p>
+ <h3 id="bytebase.v1.Task">Task</h3>
+ <p></p>
<table class="field-table">
@@ -7947,93 +8213,76 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance
<tbody>
<tr>
- <td>version</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The version of the file being executed (e.g., &#34;0001&#34;). </p></td>
+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p></td>
</tr>
<tr>
- <td>file_path</td>
+ <td>spec_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The file path within the release (e.g., &#34;2.2/V0001_create_table.sql&#34;). </p></td>
+ <td><p>A UUID4 string that uniquely identifies the Spec. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.TaskRunLogEntry.RetryInfo">TaskRunLogEntry.RetryInfo</h3>
- <p>Retry information for failed operations.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>status</td>
+ <td><a href="#bytebase.v1.Task.Status">Task.Status</a></td>
+ <td></td>
+ <td><p>Status is the status of the task. </p></td>
+ </tr>
<tr>
- <td>error</td>
+ <td>skipped_reason</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The error that triggered the retry. </p></td>
+ <td><p>The reason why the task was skipped. </p></td>
</tr>
<tr>
- <td>retry_count</td>
- <td><a href="#int32">int32</a></td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.Task.Type">Task.Type</a></td>
<td></td>
- <td><p>Current retry attempt number. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>maximum_retries</td>
- <td><a href="#int32">int32</a></td>
+ <td>target</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Maximum number of retries allowed. </p></td>
+ <td><p>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} </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.TaskRunLogEntry.SchemaDump">TaskRunLogEntry.SchemaDump</h3>
- <p>Schema dump operation details.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>database_create</td>
+ <td><a href="#bytebase.v1.Task.DatabaseCreate">Task.DatabaseCreate</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
<tr>
- <td>start_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>database_update</td>
+ <td><a href="#bytebase.v1.Task.DatabaseUpdate">Task.DatabaseUpdate</a></td>
<td></td>
- <td><p>When the schema dump started. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>end_time</td>
+ <td>update_time</td>
<td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p>When the schema dump ended. </p></td>
+ <td>optional</td>
+ <td><p>The update_time is the update time of latest task run.
+If there are no task runs, it will be empty. </p></td>
</tr>
<tr>
- <td>error</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Error message if the schema dump failed. </p></td>
+ <td>run_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>optional</td>
+ <td><p>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. </p></td>
</tr>
</tbody>
@@ -8043,8 +8292,8 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance
- <h3 id="bytebase.v1.TaskRunLogEntry.TransactionControl">TaskRunLogEntry.TransactionControl</h3>
- <p>Transaction control operation details.</p>
+ <h3 id="bytebase.v1.Task.DatabaseCreate">Task.DatabaseCreate</h3>
+ <p>Payload for creating a new database.</p>
<table class="field-table">
@@ -8054,17 +8303,10 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance
<tbody>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.TaskRunLogEntry.TransactionControl.Type">TaskRunLogEntry.TransactionControl.Type</a></td>
- <td></td>
- <td><p>The type of transaction control. </p></td>
- </tr>
-
- <tr>
- <td>error</td>
+ <td>sheet</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Error message if the operation failed. </p></td>
+ <td><p>Format: projects/{project}/sheets/{sheet} </p></td>
</tr>
</tbody>
@@ -8074,8 +8316,8 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance
- <h3 id="bytebase.v1.TaskRunSession">TaskRunSession</h3>
- <p></p>
+ <h3 id="bytebase.v1.Task.DatabaseUpdate">Task.DatabaseUpdate</h3>
+ <p>Payload for updating a database schema.</p>
<table class="field-table">
@@ -8085,17 +8327,17 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance
<tbody>
<tr>
- <td>name</td>
+ <td>sheet</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/session </p></td>
+ <td><p>Format: projects/{project}/sheets/{sheet} </p></td>
</tr>
<tr>
- <td>postgres</td>
- <td><a href="#bytebase.v1.TaskRunSession.Postgres">TaskRunSession.Postgres</a></td>
+ <td>release</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>PostgreSQL session information. </p></td>
+ <td><p>Format: projects/{project}/releases/{release} </p></td>
</tr>
</tbody>
@@ -8105,8 +8347,8 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance
- <h3 id="bytebase.v1.TaskRunSession.Postgres">TaskRunSession.Postgres</h3>
- <p>PostgreSQL session information.</p>
+ <h3 id="bytebase.v1.TaskRun">TaskRun</h3>
+ <p></p>
<table class="field-table">
@@ -8116,35 +8358,88 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance
<tbody>
<tr>
- <td>session</td>
- <td><a href="#bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>`session` is the session of the task run executing commands. </p></td>
+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>
</tr>
<tr>
- <td>blocking_sessions</td>
- <td><a href="#bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</a></td>
- <td>repeated</td>
- <td><p>`blocking_sessions` block `session`. </p></td>
+ <td>creator</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Format: users/[email protected] </p></td>
</tr>
<tr>
- <td>blocked_sessions</td>
- <td><a href="#bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</a></td>
- <td>repeated</td>
- <td><p>`blocked_sessions` are blocked by `session`. </p></td>
+ <td>create_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</h3>
- <p>PostgreSQL session information read from `pg_stat_activity`.</p>
+ <tr>
+ <td>update_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>status</td>
+ <td><a href="#bytebase.v1.TaskRun.Status">TaskRun.Status</a></td>
+ <td></td>
+ <td><p>The current execution status of the task run. </p></td>
+ </tr>
+
+ <tr>
+ <td>detail</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Below are the results of a task run.
+Detailed information about the task run result. </p></td>
+ </tr>
+
+ <tr>
+ <td>start_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>The time when the task run started execution. </p></td>
+ </tr>
+
+ <tr>
+ <td>has_prior_backup</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>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. </p></td>
+ </tr>
+
+ <tr>
+ <td>scheduler_info</td>
+ <td><a href="#bytebase.v1.TaskRun.SchedulerInfo">TaskRun.SchedulerInfo</a></td>
+ <td></td>
+ <td><p>Scheduling information about the task run. </p></td>
+ </tr>
+
+ <tr>
+ <td>run_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>optional</td>
+ <td><p>The task run should run after run_time.
+This can only be set when creating the task run calling BatchRunTasks. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.TaskRun.SchedulerInfo">TaskRun.SchedulerInfo</h3>
+ <p>Information about task run scheduling.</p>
<table class="field-table">
@@ -8154,101 +8449,173 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance
<tbody>
<tr>
- <td>pid</td>
- <td><a href="#string">string</a></td>
+ <td>report_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>Process ID of the session. </p></td>
+ <td><p>The time when the scheduling info was reported. </p></td>
</tr>
<tr>
- <td>blocked_by_pids</td>
+ <td>waiting_cause</td>
+ <td><a href="#bytebase.v1.TaskRun.SchedulerInfo.WaitingCause">TaskRun.SchedulerInfo.WaitingCause</a></td>
+ <td></td>
+ <td><p>The cause for the task run waiting. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.TaskRun.SchedulerInfo.WaitingCause">TaskRun.SchedulerInfo.WaitingCause</h3>
+ <p>Information about why a task run is waiting.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>parallel_tasks_limit</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Waiting due to parallel tasks limit. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.TaskRunLog">TaskRunLog</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
<td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/log </p></td>
+ </tr>
+
+ <tr>
+ <td>entries</td>
+ <td><a href="#bytebase.v1.TaskRunLogEntry">TaskRunLogEntry</a></td>
<td>repeated</td>
- <td><p>PIDs of sessions blocking this session. </p></td>
+ <td><p>The log entries for this task run. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.TaskRunLogEntry">TaskRunLogEntry</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>query</td>
- <td><a href="#string">string</a></td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.TaskRunLogEntry.Type">TaskRunLogEntry.Type</a></td>
<td></td>
- <td><p>Current query being executed. </p></td>
+ <td><p>The type of this log entry. </p></td>
</tr>
<tr>
- <td>state</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>Session state (active, idle, etc.). </p></td>
+ <td>log_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>The time when the log was recorded. </p></td>
</tr>
<tr>
- <td>wait_event_type</td>
+ <td>replica_id</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>Wait event type if session is waiting. </p></td>
+ <td></td>
+ <td><p>The replica ID for this log entry. </p></td>
</tr>
<tr>
- <td>wait_event</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>Specific wait event if session is waiting. </p></td>
+ <td>schema_dump</td>
+ <td><a href="#bytebase.v1.TaskRunLogEntry.SchemaDump">TaskRunLogEntry.SchemaDump</a></td>
+ <td></td>
+ <td><p>Schema dump details (if type is SCHEMA_DUMP). </p></td>
</tr>
<tr>
- <td>datname</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>Database name. </p></td>
+ <td>command_execute</td>
+ <td><a href="#bytebase.v1.TaskRunLogEntry.CommandExecute">TaskRunLogEntry.CommandExecute</a></td>
+ <td></td>
+ <td><p>Command execution details (if type is COMMAND_EXECUTE). </p></td>
</tr>
<tr>
- <td>usename</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>User name. </p></td>
+ <td>database_sync</td>
+ <td><a href="#bytebase.v1.TaskRunLogEntry.DatabaseSync">TaskRunLogEntry.DatabaseSync</a></td>
+ <td></td>
+ <td><p>Database sync details (if type is DATABASE_SYNC). </p></td>
</tr>
<tr>
- <td>application_name</td>
- <td><a href="#string">string</a></td>
+ <td>transaction_control</td>
+ <td><a href="#bytebase.v1.TaskRunLogEntry.TransactionControl">TaskRunLogEntry.TransactionControl</a></td>
<td></td>
- <td><p>Application name. </p></td>
+ <td><p>Transaction control details (if type is TRANSACTION_CONTROL). </p></td>
</tr>
<tr>
- <td>client_addr</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>Client IP address. </p></td>
+ <td>prior_backup</td>
+ <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup">TaskRunLogEntry.PriorBackup</a></td>
+ <td></td>
+ <td><p>Prior backup details (if type is PRIOR_BACKUP). </p></td>
</tr>
<tr>
- <td>client_port</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>Client port number. </p></td>
+ <td>retry_info</td>
+ <td><a href="#bytebase.v1.TaskRunLogEntry.RetryInfo">TaskRunLogEntry.RetryInfo</a></td>
+ <td></td>
+ <td><p>Retry information details (if type is RETRY_INFO). </p></td>
</tr>
<tr>
- <td>backend_start</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>compute_diff</td>
+ <td><a href="#bytebase.v1.TaskRunLogEntry.ComputeDiff">TaskRunLogEntry.ComputeDiff</a></td>
<td></td>
- <td><p>When the backend process started. </p></td>
+ <td><p>Compute diff details (if type is COMPUTE_DIFF). </p></td>
</tr>
<tr>
- <td>xact_start</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td>optional</td>
- <td><p>When the current transaction started. </p></td>
+ <td>release_file_execute</td>
+ <td><a href="#bytebase.v1.TaskRunLogEntry.ReleaseFileExecute">TaskRunLogEntry.ReleaseFileExecute</a></td>
+ <td></td>
+ <td><p>Release file execution details (if type is RELEASE_FILE_EXECUTE). </p></td>
</tr>
<tr>
- <td>query_start</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td>optional</td>
- <td><p>When the current query started. </p></td>
+ <td>ghost_migration</td>
+ <td><a href="#bytebase.v1.TaskRunLogEntry.GhostMigration">TaskRunLogEntry.GhostMigration</a></td>
+ <td></td>
+ <td><p>gh-ost migration details (if type is GHOST_MIGRATION). </p></td>
</tr>
</tbody>
@@ -8258,508 +8625,177 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance
+ <h3 id="bytebase.v1.TaskRunLogEntry.CommandExecute">TaskRunLogEntry.CommandExecute</h3>
+ <p>Command execution details.</p>
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>log_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>When the command was logged. </p></td>
+ </tr>
+
+ <tr>
+ <td>range</td>
+ <td><a href="#bytebase.v1.Range">Range</a></td>
+ <td></td>
+ <td><p>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 &#34;SELECT 你好;&#34; in a UTF-8 sheet, range [0, 13) represents all 13 bytes. </p></td>
+ </tr>
+
+ <tr>
+ <td>statement</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The executed statement. </p></td>
+ </tr>
+
+ <tr>
+ <td>response</td>
+ <td><a href="#bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse">TaskRunLogEntry.CommandExecute.CommandResponse</a></td>
+ <td></td>
+ <td><p>The response from executing the command. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
- <h3 id="bytebase.v1.Task.Status">Task.Status</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>STATUS_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified status.</p></td>
- </tr>
-
- <tr>
- <td>NOT_STARTED</td>
- <td>1</td>
- <td><p>Task has not started and is awaiting its turn in the deployment sequence.</p></td>
- </tr>
-
- <tr>
- <td>PENDING</td>
- <td>2</td>
- <td><p>Task is ready to run and waiting for approval or scheduled time.</p></td>
- </tr>
-
- <tr>
- <td>RUNNING</td>
- <td>3</td>
- <td><p>Task is currently executing.</p></td>
- </tr>
-
- <tr>
- <td>DONE</td>
- <td>4</td>
- <td><p>Task completed successfully.</p></td>
- </tr>
-
- <tr>
- <td>FAILED</td>
- <td>5</td>
- <td><p>Task execution failed with errors.</p></td>
- </tr>
-
- <tr>
- <td>CANCELED</td>
- <td>6</td>
- <td><p>Task execution was canceled by a user.</p></td>
- </tr>
-
- <tr>
- <td>SKIPPED</td>
- <td>7</td>
- <td><p>Task was skipped and will not be executed.</p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.Task.Type">Task.Type</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified task type.</p></td>
- </tr>
-
- <tr>
- <td>GENERAL</td>
- <td>1</td>
- <td><p>General task for miscellaneous operations.</p></td>
- </tr>
-
- <tr>
- <td>DATABASE_CREATE</td>
- <td>2</td>
- <td><p>Database creation task that creates a new database.
-Use payload DatabaseCreate.</p></td>
- </tr>
-
- <tr>
- <td>DATABASE_MIGRATE</td>
- <td>3</td>
- <td><p>Database migration task that applies versioned schema changes.
-Use payload DatabaseUpdate.</p></td>
- </tr>
-
- </tbody>
- </table>
+ <h3 id="bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse">TaskRunLogEntry.CommandExecute.CommandResponse</h3>
+ <p>Command execution response.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>log_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>When the response was logged. </p></td>
+ </tr>
+
+ <tr>
+ <td>error</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Error message if command execution failed. </p></td>
+ </tr>
+
+ <tr>
+ <td>affected_rows</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p>Total affected rows. </p></td>
+ </tr>
+
+ <tr>
+ <td>all_affected_rows</td>
+ <td><a href="#int64">int64</a></td>
+ <td>repeated</td>
+ <td><p>`all_affected_rows` is the affected rows of each command.
+`all_affected_rows` may be unavailable if the database driver doesn&#39;t support it. Caller should fallback to `affected_rows` in that case. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
- <h3 id="bytebase.v1.TaskRun.Status">TaskRun.Status</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>STATUS_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified status.</p></td>
- </tr>
-
- <tr>
- <td>PENDING</td>
- <td>1</td>
- <td><p>Task run is queued and waiting to start execution.</p></td>
- </tr>
-
- <tr>
- <td>RUNNING</td>
- <td>2</td>
- <td><p>Task run is currently executing.</p></td>
- </tr>
-
- <tr>
- <td>DONE</td>
- <td>3</td>
- <td><p>Task run completed successfully.</p></td>
- </tr>
-
- <tr>
- <td>FAILED</td>
- <td>4</td>
- <td><p>Task run execution failed with errors.</p></td>
- </tr>
-
- <tr>
- <td>CANCELED</td>
- <td>5</td>
- <td><p>Task run execution was canceled by a user.</p></td>
- </tr>
-
- <tr>
- <td>AVAILABLE</td>
- <td>6</td>
- <td><p>Task run is ready for immediate execution.</p></td>
- </tr>
-
- </tbody>
- </table>
+ <h3 id="bytebase.v1.TaskRunLogEntry.ComputeDiff">TaskRunLogEntry.ComputeDiff</h3>
+ <p>Schema diff computation details.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>start_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>When diff computation started. </p></td>
+ </tr>
+
+ <tr>
+ <td>end_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>When diff computation ended. </p></td>
+ </tr>
+
+ <tr>
+ <td>error</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Error message if computation failed. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
- <h3 id="bytebase.v1.TaskRunLogEntry.TransactionControl.Type">TaskRunLogEntry.TransactionControl.Type</h3>
- <p>Transaction control type.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified type.</p></td>
- </tr>
-
- <tr>
- <td>BEGIN</td>
- <td>1</td>
- <td><p>Begin transaction.</p></td>
- </tr>
-
- <tr>
- <td>COMMIT</td>
- <td>2</td>
- <td><p>Commit transaction.</p></td>
- </tr>
-
- <tr>
- <td>ROLLBACK</td>
- <td>3</td>
- <td><p>Rollback transaction.</p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.TaskRunLogEntry.Type">TaskRunLogEntry.Type</h3>
- <p>The type of log entry.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified type.</p></td>
- </tr>
-
- <tr>
- <td>SCHEMA_DUMP</td>
- <td>1</td>
- <td><p>Schema dump operation.</p></td>
- </tr>
-
- <tr>
- <td>COMMAND_EXECUTE</td>
- <td>2</td>
- <td><p>Command execution.</p></td>
- </tr>
-
- <tr>
- <td>DATABASE_SYNC</td>
- <td>3</td>
- <td><p>Database synchronization.</p></td>
- </tr>
-
- <tr>
- <td>TRANSACTION_CONTROL</td>
- <td>5</td>
- <td><p>Transaction control (BEGIN, COMMIT, ROLLBACK).</p></td>
- </tr>
-
- <tr>
- <td>PRIOR_BACKUP</td>
- <td>6</td>
- <td><p>Prior backup operation.</p></td>
- </tr>
-
- <tr>
- <td>RETRY_INFO</td>
- <td>7</td>
- <td><p>Retry information.</p></td>
- </tr>
-
- <tr>
- <td>COMPUTE_DIFF</td>
- <td>8</td>
- <td><p>Schema diff computation.</p></td>
- </tr>
-
- <tr>
- <td>RELEASE_FILE_EXECUTE</td>
- <td>9</td>
- <td><p>Release file execution.</p></td>
- </tr>
-
- <tr>
- <td>GHOST_MIGRATION</td>
- <td>10</td>
- <td><p>gh-ost online migration.</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.RolloutService">RolloutService</h3>
- <p>RolloutService manages the execution of deployment plans.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>GetRollout</td>
- <td><a href="#bytebase.v1.GetRolloutRequest">GetRolloutRequest</a></td>
- <td><a href="#bytebase.v1.Rollout">Rollout</a></td>
- <td><p>Retrieves a rollout by its plan name.
-Permissions required: bb.rollouts.get</p></td>
- </tr>
-
- <tr>
- <td>ListRollouts</td>
- <td><a href="#bytebase.v1.ListRolloutsRequest">ListRolloutsRequest</a></td>
- <td><a href="#bytebase.v1.ListRolloutsResponse">ListRolloutsResponse</a></td>
- <td><p>Lists rollouts in a project.
-Permissions required: bb.rollouts.list</p></td>
- </tr>
-
- <tr>
- <td>CreateRollout</td>
- <td><a href="#bytebase.v1.CreateRolloutRequest">CreateRolloutRequest</a></td>
- <td><a href="#bytebase.v1.Rollout">Rollout</a></td>
- <td><p>Creates a new rollout for a plan.
-Permissions required: bb.rollouts.create</p></td>
- </tr>
-
- <tr>
- <td>ListTaskRuns</td>
- <td><a href="#bytebase.v1.ListTaskRunsRequest">ListTaskRunsRequest</a></td>
- <td><a href="#bytebase.v1.ListTaskRunsResponse">ListTaskRunsResponse</a></td>
- <td><p>Lists task run executions for a task.
-Permissions required: bb.taskRuns.list</p></td>
- </tr>
-
- <tr>
- <td>GetTaskRun</td>
- <td><a href="#bytebase.v1.GetTaskRunRequest">GetTaskRunRequest</a></td>
- <td><a href="#bytebase.v1.TaskRun">TaskRun</a></td>
- <td><p>Retrieves a task run by name.
-Permissions required: bb.taskRuns.list</p></td>
- </tr>
-
- <tr>
- <td>GetTaskRunLog</td>
- <td><a href="#bytebase.v1.GetTaskRunLogRequest">GetTaskRunLogRequest</a></td>
- <td><a href="#bytebase.v1.TaskRunLog">TaskRunLog</a></td>
- <td><p>Retrieves execution logs for a task run.
-Permissions required: bb.taskRuns.list</p></td>
- </tr>
-
- <tr>
- <td>GetTaskRunSession</td>
- <td><a href="#bytebase.v1.GetTaskRunSessionRequest">GetTaskRunSessionRequest</a></td>
- <td><a href="#bytebase.v1.TaskRunSession">TaskRunSession</a></td>
- <td><p>Retrieves database session information for a running task.
-Permissions required: bb.taskRuns.list</p></td>
- </tr>
-
- <tr>
- <td>BatchRunTasks</td>
- <td><a href="#bytebase.v1.BatchRunTasksRequest">BatchRunTasksRequest</a></td>
- <td><a href="#bytebase.v1.BatchRunTasksResponse">BatchRunTasksResponse</a></td>
- <td><p>Executes multiple tasks in a rollout stage.
-Permissions required: bb.taskRuns.create (or user with rollout policy role for the environment)</p></td>
- </tr>
-
- <tr>
- <td>BatchSkipTasks</td>
- <td><a href="#bytebase.v1.BatchSkipTasksRequest">BatchSkipTasksRequest</a></td>
- <td><a href="#bytebase.v1.BatchSkipTasksResponse">BatchSkipTasksResponse</a></td>
- <td><p>Skips multiple tasks in a rollout stage.
-Permissions required: bb.taskRuns.create (or user with rollout policy role for the environment)</p></td>
- </tr>
-
- <tr>
- <td>BatchCancelTaskRuns</td>
- <td><a href="#bytebase.v1.BatchCancelTaskRunsRequest">BatchCancelTaskRunsRequest</a></td>
- <td><a href="#bytebase.v1.BatchCancelTaskRunsResponse">BatchCancelTaskRunsResponse</a></td>
- <td><p>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)</p></td>
- </tr>
-
- <tr>
- <td>PreviewTaskRunRollback</td>
- <td><a href="#bytebase.v1.PreviewTaskRunRollbackRequest">PreviewTaskRunRollbackRequest</a></td>
- <td><a href="#bytebase.v1.PreviewTaskRunRollbackResponse">PreviewTaskRunRollbackResponse</a></td>
- <td><p>Generates rollback SQL for a completed task run.
-Permissions required: bb.taskRuns.list</p></td>
- </tr>
-
- </tbody>
- </table>
+ <h3 id="bytebase.v1.TaskRunLogEntry.DatabaseSync">TaskRunLogEntry.DatabaseSync</h3>
+ <p>Database synchronization details.</p>
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
+ <table class="field-table">
<thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>
-
-
-
- <tr>
- <td>GetRollout</td>
- <td>GET</td>
- <td>/v1/{name=projects/*/plans/*/rollout}</td>
- <td></td>
- </tr>
-
-
+ <tr>
+ <td>start_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>When the database sync started. </p></td>
+ </tr>
- <tr>
- <td>ListRollouts</td>
- <td>GET</td>
- <td>/v1/{parent=projects/*}/rollouts</td>
- <td></td>
- </tr>
+ <tr>
+ <td>end_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>When the database sync ended. </p></td>
+ </tr>
-
+ <tr>
+ <td>error</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Error message if sync failed. </p></td>
+ </tr>
-
- <tr>
- <td>CreateRollout</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*/plans/*}/rollout</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>ListTaskRuns</td>
- <td>GET</td>
- <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*}/taskRuns</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>GetTaskRun</td>
- <td>GET</td>
- <td>/v1/{name=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>GetTaskRunLog</td>
- <td>GET</td>
- <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}/log</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>GetTaskRunSession</td>
- <td>GET</td>
- <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}/session</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>BatchRunTasks</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*/plans/*/rollout/stages/*}/tasks:batchRun</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>BatchSkipTasks</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*/plans/*/rollout/stages/*}/tasks:batchSkip</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>BatchCancelTaskRuns</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*}/taskRuns:batchCancel</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>PreviewTaskRunRollback</td>
- <td>POST</td>
- <td>/v1/{name=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}:previewRollback</td>
- <td>*</td>
- </tr>
-
-
</tbody>
</table>
+
-
-
-
- <div class="file-heading">
- <h2 id="v1/query_history_service.proto">v1/query_history_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
+
- <h3 id="bytebase.v1.GetQueryHistoryRequest">GetQueryHistoryRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.TaskRunLogEntry.GhostMigration">TaskRunLogEntry.GhostMigration</h3>
+ <p>gh-ost migration details.</p>
<table class="field-table">
@@ -8769,11 +8805,24 @@ Permissions required: bb.taskRuns.list</p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>start_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>When the gh-ost migration started. </p></td>
+ </tr>
+
+ <tr>
+ <td>end_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>When the gh-ost migration ended. </p></td>
+ </tr>
+
+ <tr>
+ <td>error</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the query history to retrieve.
-Format: projects/{project}/queryHistories/{id} </p></td>
+ <td><p>Error message if the gh-ost migration failed. </p></td>
</tr>
</tbody>
@@ -8783,8 +8832,8 @@ Format: projects/{project}/queryHistories/{id} </p></td>
- <h3 id="bytebase.v1.ListQueryHistoriesRequest">ListQueryHistoriesRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup">TaskRunLogEntry.PriorBackup</h3>
+ <p>Prior backup operation details.</p>
<table class="field-table">
@@ -8794,46 +8843,31 @@ Format: projects/{project}/queryHistories/{id} </p></td>
<tbody>
<tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
+ <td>start_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>The parent project whose query histories are listed.
-Format: projects/{project}
-Use &#34;projects/-&#34; to list query histories across all projects
-(https://google.aip.dev/159); this requires the bb.queryHistories.list
-permission on the workspace. </p></td>
+ <td><p>When the backup started. </p></td>
</tr>
<tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
+ <td>end_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>When the backup ended. </p></td>
</tr>
<tr>
- <td>page_token</td>
- <td><a href="#string">string</a></td>
+ <td>prior_backup_detail</td>
+ <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail">TaskRunLogEntry.PriorBackup.PriorBackupDetail</a></td>
<td></td>
- <td><p>A page token, received from a previous `ListQueryHistories` call.
-Provide this to retrieve the subsequent page. </p></td>
+ <td><p>The backup details. </p></td>
</tr>
<tr>
- <td>filter</td>
+ <td>error</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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 &#34;users/{email}&#34; format, support &#34;==&#34; operator.
-
-For example:
-creator == &#34;users/{email}&#34; </p></td>
+ <td><p>Error message if the backup failed. </p></td>
</tr>
</tbody>
@@ -8843,8 +8877,8 @@ creator == &#34;users/{email}&#34; </p></td>
- <h3 id="bytebase.v1.ListQueryHistoriesResponse">ListQueryHistoriesResponse</h3>
- <p></p>
+ <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail">TaskRunLogEntry.PriorBackup.PriorBackupDetail</h3>
+ <p>Prior backup detail for rollback purposes.</p>
<table class="field-table">
@@ -8854,19 +8888,10 @@ creator == &#34;users/{email}&#34; </p></td>
<tbody>
<tr>
- <td>query_histories</td>
- <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>
+ <td>items</td>
+ <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item</a></td>
<td>repeated</td>
- <td><p>The list of query histories. </p></td>
- </tr>
-
- <tr>
- <td>next_page_token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>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. </p></td>
+ <td><p>The list of backed up tables. </p></td>
</tr>
</tbody>
@@ -8876,8 +8901,8 @@ Pass this value in the page_token field in the subsequent call to
- <h3 id="bytebase.v1.QueryHistory">QueryHistory</h3>
- <p></p>
+ <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item</h3>
+ <p>A single backup table mapping.</p>
<table class="field-table">
@@ -8887,61 +8912,70 @@ Pass this value in the page_token field in the subsequent call to
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>source_table</td>
+ <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table</a></td>
<td></td>
- <td><p>The name for the query history.
-Format: projects/{project}/queryHistories/{id} </p></td>
+ <td><p>The original table information. </p></td>
</tr>
<tr>
- <td>database</td>
- <td><a href="#string">string</a></td>
+ <td>target_table</td>
+ <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table</a></td>
<td></td>
- <td><p>The database name to execute the query.
-Format: instances/{instance}/databases/{databaseName} or projects/{project}/instances/{instance}/databases/{databaseName} </p></td>
+ <td><p>The target backup table information. </p></td>
</tr>
<tr>
- <td>creator</td>
- <td><a href="#string">string</a></td>
+ <td>start_position</td>
+ <td><a href="#bytebase.v1.Position">Position</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The start position in the SQL statement. </p></td>
</tr>
<tr>
- <td>create_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>end_position</td>
+ <td><a href="#bytebase.v1.Position">Position</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The end position in the SQL statement. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table</h3>
+ <p>Table information.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>statement</td>
+ <td>database</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The database information.
+Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} </p></td>
</tr>
<tr>
- <td>error</td>
+ <td>schema</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>duration</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The schema name. </p></td>
</tr>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.QueryHistory.Type">QueryHistory.Type</a></td>
+ <td>table</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The table name. </p></td>
</tr>
</tbody>
@@ -8951,8 +8985,8 @@ Format: instances/{instance}/databases/{databaseName} or projects/{project}/inst
- <h3 id="bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.TaskRunLogEntry.ReleaseFileExecute">TaskRunLogEntry.ReleaseFileExecute</h3>
+ <p>Release file execution details.</p>
<table class="field-table">
@@ -8962,56 +8996,17 @@ Format: instances/{instance}/databases/{databaseName} or projects/{project}/inst
<tbody>
<tr>
- <td>parent</td>
+ <td>version</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent project to search query histories in.
-Format: projects/{project}
-The AIP-159 wildcard &#34;projects/-&#34; is not supported; use
-ListQueryHistories for cross-project reads. </p></td>
- </tr>
-
- <tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>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. </p></td>
- </tr>
-
- <tr>
- <td>page_token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>A page token, received from a previous `ListQueryHistory` call.
-Provide this to retrieve the subsequent page. </p></td>
+ <td><p>The version of the file being executed (e.g., &#34;0001&#34;). </p></td>
</tr>
<tr>
- <td>filter</td>
+ <td>file_path</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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 &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
-- database: the database full name in &#34;instances/{id}/databases/{name}&#34; or &#34;projects/{project}/instances/{id}/databases/{name}&#34; format, support &#34;==&#34; operator.
-- instance: the instance full name in &#34;instances/{id}&#34; or &#34;projects/{project}/instances/{id}&#34; format, support &#34;==&#34; operator.
-- type: the type, should be &#34;QUERY&#34; or &#34;EXPORT&#34;, support &#34;==&#34; operator.
-- statement: the SQL statement, support &#34;==&#34; and &#34;.contains()&#34; operators.
-
-For example:
-project == &#34;projects/{project}&#34;
-database == &#34;instances/{instance}/databases/{database}&#34;
-instance == &#34;instances/{instance}&#34;
-type == &#34;QUERY&#34;
-type == &#34;EXPORT&#34;
-statement == &#34;SELECT 1;&#34;
-statement.contains(&#34;select&#34;)
-type == &#34;QUERY&#34; &amp;&amp; statement.contains(&#34;select&#34;) </p></td>
+ <td><p>The file path within the release (e.g., &#34;2.2/V0001_create_table.sql&#34;). </p></td>
</tr>
</tbody>
@@ -9021,8 +9016,8 @@ type == &#34;QUERY&#34; &amp;&amp; statement.contains(&#34;select&#34;) </p></td
- <h3 id="bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</h3>
- <p></p>
+ <h3 id="bytebase.v1.TaskRunLogEntry.RetryInfo">TaskRunLogEntry.RetryInfo</h3>
+ <p>Retry information for failed operations.</p>
<table class="field-table">
@@ -9032,19 +9027,24 @@ type == &#34;QUERY&#34; &amp;&amp; statement.contains(&#34;select&#34;) </p></td
<tbody>
<tr>
- <td>query_histories</td>
- <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>
- <td>repeated</td>
- <td><p>The list of history. </p></td>
+ <td>error</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The error that triggered the retry. </p></td>
</tr>
<tr>
- <td>next_page_token</td>
- <td><a href="#string">string</a></td>
+ <td>retry_count</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>Current retry attempt number. </p></td>
+ </tr>
+
+ <tr>
+ <td>maximum_retries</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>Maximum number of retries allowed. </p></td>
</tr>
</tbody>
@@ -9054,136 +9054,46 @@ Pass this value in the page_token field in the subsequent call to
-
-
- <h3 id="bytebase.v1.QueryHistory.Type">QueryHistory.Type</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified query history type.</p></td>
- </tr>
-
- <tr>
- <td>QUERY</td>
- <td>1</td>
- <td><p>Query execution for data retrieval.</p></td>
- </tr>
-
- <tr>
- <td>EXPORT</td>
- <td>2</td>
- <td><p>Data export operation to file.</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.QueryHistoryService">QueryHistoryService</h3>
- <p>QueryHistoryService manages query history records of SQL Editor queries and exports.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>SearchQueryHistories</td>
- <td><a href="#bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</a></td>
- <td><a href="#bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</a></td>
- <td><p>SearchQueryHistories searches query histories for the caller.
-Permissions required: None (only returns caller&#39;s own query histories)</p></td>
- </tr>
-
- <tr>
- <td>ListQueryHistories</td>
- <td><a href="#bytebase.v1.ListQueryHistoriesRequest">ListQueryHistoriesRequest</a></td>
- <td><a href="#bytebase.v1.ListQueryHistoriesResponse">ListQueryHistoriesResponse</a></td>
- <td><p>ListQueryHistories lists query histories of all users in a project.
-Results are ordered by create time descending (newest first).
-Permissions required: bb.queryHistories.list</p></td>
- </tr>
-
- <tr>
- <td>GetQueryHistory</td>
- <td><a href="#bytebase.v1.GetQueryHistoryRequest">GetQueryHistoryRequest</a></td>
- <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>
- <td><p>GetQueryHistory gets a single query history for the caller.
-Permissions required: None (only returns the caller&#39;s own query history)</p></td>
- </tr>
-
- </tbody>
- </table>
+ <h3 id="bytebase.v1.TaskRunLogEntry.SchemaDump">TaskRunLogEntry.SchemaDump</h3>
+ <p>Schema dump operation details.</p>
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
+ <table class="field-table">
<thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>
-
-
-
- <tr>
- <td>SearchQueryHistories</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*}/queryHistories:search</td>
- <td>*</td>
- </tr>
-
-
-
- <tr>
- <td>ListQueryHistories</td>
- <td>GET</td>
- <td>/v1/{parent=projects/*}/queryHistories</td>
- <td></td>
- </tr>
-
-
+ <tr>
+ <td>start_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>When the schema dump started. </p></td>
+ </tr>
+ <tr>
+ <td>end_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>When the schema dump ended. </p></td>
+ </tr>
- <tr>
- <td>GetQueryHistory</td>
- <td>GET</td>
- <td>/v1/{name=projects/*/queryHistories/*}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>error</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Error message if the schema dump failed. </p></td>
+ </tr>
-
</tbody>
</table>
+
-
-
-
- <div class="file-heading">
- <h2 id="v1/sql_service.proto">v1/sql_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
+
- <h3 id="bytebase.v1.AdminExecuteRequest">AdminExecuteRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.TaskRunLogEntry.TransactionControl">TaskRunLogEntry.TransactionControl</h3>
+ <p>Transaction control operation details.</p>
<table class="field-table">
@@ -9193,42 +9103,17 @@ Permissions required: None (only returns the caller&#39;s own query history)</p>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.TaskRunLogEntry.TransactionControl.Type">TaskRunLogEntry.TransactionControl.Type</a></td>
<td></td>
- <td><p>The name is the instance name to execute the query against.
-Format: instances/{instance}/databases/{databaseName} or
-projects/{project}/instances/{instance}/databases/{databaseName} </p></td>
+ <td><p>The type of transaction control. </p></td>
</tr>
<tr>
- <td>statement</td>
+ <td>error</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The SQL statement to execute. </p></td>
- </tr>
-
- <tr>
- <td>limit</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The maximum number of rows to return. </p></td>
- </tr>
-
- <tr>
- <td>schema</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The default schema to execute the statement. Equals to the current schema
-in Oracle and search path in Postgres. </p></td>
- </tr>
-
- <tr>
- <td>container</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>Container is the container name to execute the query against, used for
-CosmosDB only. </p></td>
+ <td><p>Error message if the operation failed. </p></td>
</tr>
</tbody>
@@ -9238,7 +9123,7 @@ CosmosDB only. </p></td>
- <h3 id="bytebase.v1.AdminExecuteResponse">AdminExecuteResponse</h3>
+ <h3 id="bytebase.v1.TaskRunSession">TaskRunSession</h3>
<p></p>
@@ -9249,11 +9134,18 @@ CosmosDB only. </p></td>
<tbody>
<tr>
- <td>results</td>
- <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>
- <td>repeated</td>
- <td><p>The query results. </p></td>
- </tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/session </p></td>
+ </tr>
+
+ <tr>
+ <td>postgres</td>
+ <td><a href="#bytebase.v1.TaskRunSession.Postgres">TaskRunSession.Postgres</a></td>
+ <td></td>
+ <td><p>PostgreSQL session information. </p></td>
+ </tr>
</tbody>
</table>
@@ -9262,8 +9154,8 @@ CosmosDB only. </p></td>
- <h3 id="bytebase.v1.Advice">Advice</h3>
- <p></p>
+ <h3 id="bytebase.v1.TaskRunSession.Postgres">TaskRunSession.Postgres</h3>
+ <p>PostgreSQL session information.</p>
<table class="field-table">
@@ -9273,53 +9165,24 @@ CosmosDB only. </p></td>
<tbody>
<tr>
- <td>status</td>
- <td><a href="#bytebase.v1.Advice.Level">Advice.Level</a></td>
- <td></td>
- <td><p>The advice level. </p></td>
- </tr>
-
- <tr>
- <td>code</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The advice code. </p></td>
- </tr>
-
- <tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The advice title. </p></td>
- </tr>
-
- <tr>
- <td>content</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The advice content. </p></td>
- </tr>
-
- <tr>
- <td>start_position</td>
- <td><a href="#bytebase.v1.Position">Position</a></td>
+ <td>session</td>
+ <td><a href="#bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</a></td>
<td></td>
- <td><p>The start_position is inclusive and the end_position is exclusive.
-TODO: use range instead </p></td>
+ <td><p>`session` is the session of the task run executing commands. </p></td>
</tr>
<tr>
- <td>end_position</td>
- <td><a href="#bytebase.v1.Position">Position</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>blocking_sessions</td>
+ <td><a href="#bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</a></td>
+ <td>repeated</td>
+ <td><p>`blocking_sessions` block `session`. </p></td>
</tr>
<tr>
- <td>rule_type</td>
- <td><a href="#bytebase.v1.Advice.RuleType">Advice.RuleType</a></td>
- <td></td>
- <td><p>The type of linting rule that generated this advice. </p></td>
+ <td>blocked_sessions</td>
+ <td><a href="#bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</a></td>
+ <td>repeated</td>
+ <td><p>`blocked_sessions` are blocked by `session`. </p></td>
</tr>
</tbody>
@@ -9329,8 +9192,8 @@ TODO: use range instead </p></td>
- <h3 id="bytebase.v1.ExportRequest">ExportRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</h3>
+ <p>PostgreSQL session information read from `pg_stat_activity`.</p>
<table class="field-table">
@@ -9340,174 +9203,101 @@ TODO: use range instead </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>pid</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the resource name to execute the export against.
-Format: instances/{instance}/databases/{database} or
-projects/{project}/instances/{instance}/databases/{database} </p></td>
+ <td><p>Process ID of the session. </p></td>
</tr>
<tr>
- <td>statement</td>
+ <td>blocked_by_pids</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The SQL statement to execute. </p></td>
- </tr>
-
- <tr>
- <td>limit</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The maximum number of rows to return. </p></td>
- </tr>
-
- <tr>
- <td>format</td>
- <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>
- <td></td>
- <td><p>The export format. </p></td>
- </tr>
-
- <tr>
- <td>admin</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>The admin is used for workspace owner and DBA for exporting data from SQL
-Editor Admin mode. The exported data is not masked. </p></td>
+ <td>repeated</td>
+ <td><p>PIDs of sessions blocking this session. </p></td>
</tr>
<tr>
- <td>password</td>
+ <td>query</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The zip password provide by users. </p></td>
+ <td><p>Current query being executed. </p></td>
</tr>
<tr>
- <td>data_source_id</td>
+ <td>state</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>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. </p></td>
+ <td>optional</td>
+ <td><p>Session state (active, idle, etc.). </p></td>
</tr>
<tr>
- <td>schema</td>
+ <td>wait_event_type</td>
<td><a href="#string">string</a></td>
<td>optional</td>
- <td><p>The default schema to search objects. Equals to the current schema in
-Oracle and search path in Postgres. </p></td>
+ <td><p>Wait event type if session is waiting. </p></td>
</tr>
<tr>
- <td>container</td>
+ <td>wait_event</td>
<td><a href="#string">string</a></td>
<td>optional</td>
- <td><p>Container is the container name to execute the query against, used for
-CosmosDB only. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ExportResponse">ExportResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>content</td>
- <td><a href="#bytes">bytes</a></td>
- <td></td>
- <td><p>The export file content. </p></td>
+ <td><p>Specific wait event if session is waiting. </p></td>
</tr>
<tr>
- <td>applied_access_grant</td>
+ <td>datname</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>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. </p></td>
+ <td>optional</td>
+ <td><p>Database name. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.MaskingReason">MaskingReason</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>semantic_type_id</td>
+ <td>usename</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The semantic type that triggered masking (e.g., &#34;SSN&#34;, &#34;email&#34;, &#34;phone&#34;). </p></td>
+ <td>optional</td>
+ <td><p>User name. </p></td>
</tr>
<tr>
- <td>semantic_type_title</td>
+ <td>application_name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Human-readable semantic type title. </p></td>
+ <td><p>Application name. </p></td>
</tr>
<tr>
- <td>masking_rule_id</td>
+ <td>client_addr</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The masking rule ID that matched (if applicable). </p></td>
+ <td>optional</td>
+ <td><p>Client IP address. </p></td>
</tr>
<tr>
- <td>algorithm</td>
+ <td>client_port</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The masking algorithm used. </p></td>
+ <td>optional</td>
+ <td><p>Client port number. </p></td>
</tr>
<tr>
- <td>context</td>
- <td><a href="#string">string</a></td>
+ <td>backend_start</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>Additional context (e.g., &#34;Matched global rule: PII Protection&#34;). </p></td>
+ <td><p>When the backend process started. </p></td>
</tr>
<tr>
- <td>classification_level</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The classification level that triggered masking. </p></td>
+ <td>xact_start</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>optional</td>
+ <td><p>When the current transaction started. </p></td>
</tr>
<tr>
- <td>semantic_type_icon</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Icon associated with the semantic type (if any). </p></td>
+ <td>query_start</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>optional</td>
+ <td><p>When the current query started. </p></td>
</tr>
</tbody>
@@ -9517,454 +9307,508 @@ Empty when the user was authorized through normal ACL rather than a grant. </p><
- <h3 id="bytebase.v1.QueryOption">QueryOption</h3>
- <p></p>
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>redis_run_commands_on</td>
- <td><a href="#bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>mssql_explain_format</td>
- <td><a href="#bytebase.v1.QueryOption.MSSQLExplainFormat">QueryOption.MSSQLExplainFormat</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
- <h3 id="bytebase.v1.QueryRequest">QueryRequest</h3>
+ <h3 id="bytebase.v1.Task.Status">Task.Status</h3>
<p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the database resource name to execute the query against.
-Format: instances/{instance}/databases/{databaseName} or
-projects/{project}/instances/{instance}/databases/{databaseName} </p></td>
- </tr>
-
- <tr>
- <td>statement</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The SQL statement to execute. </p></td>
- </tr>
-
- <tr>
- <td>limit</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The maximum number of rows to return. </p></td>
- </tr>
-
- <tr>
- <td>data_source_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>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. </p></td>
- </tr>
-
- <tr>
- <td>explain</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Explain the statement. </p></td>
- </tr>
-
- <tr>
- <td>schema</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The default schema to search objects. Equals to the current schema in
-Oracle and search path in Postgres. </p></td>
- </tr>
-
- <tr>
- <td>query_option</td>
- <td><a href="#bytebase.v1.QueryOption">QueryOption</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>container</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>Container is the container name to execute the query against, used for
-CosmosDB only. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>STATUS_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified status.</p></td>
+ </tr>
+
+ <tr>
+ <td>NOT_STARTED</td>
+ <td>1</td>
+ <td><p>Task has not started and is awaiting its turn in the deployment sequence.</p></td>
+ </tr>
+
+ <tr>
+ <td>PENDING</td>
+ <td>2</td>
+ <td><p>Task is ready to run and waiting for approval or scheduled time.</p></td>
+ </tr>
+
+ <tr>
+ <td>RUNNING</td>
+ <td>3</td>
+ <td><p>Task is currently executing.</p></td>
+ </tr>
+
+ <tr>
+ <td>DONE</td>
+ <td>4</td>
+ <td><p>Task completed successfully.</p></td>
+ </tr>
+
+ <tr>
+ <td>FAILED</td>
+ <td>5</td>
+ <td><p>Task execution failed with errors.</p></td>
+ </tr>
+
+ <tr>
+ <td>CANCELED</td>
+ <td>6</td>
+ <td><p>Task execution was canceled by a user.</p></td>
+ </tr>
+
+ <tr>
+ <td>SKIPPED</td>
+ <td>7</td>
+ <td><p>Task was skipped and will not be executed.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.v1.QueryResponse">QueryResponse</h3>
+ <h3 id="bytebase.v1.Task.Type">Task.Type</h3>
<p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>results</td>
- <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>
- <td>repeated</td>
- <td><p>The query results. </p></td>
- </tr>
-
- <tr>
- <td>applied_access_grant</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>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. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified task type.</p></td>
+ </tr>
+
+ <tr>
+ <td>GENERAL</td>
+ <td>1</td>
+ <td><p>General task for miscellaneous operations.</p></td>
+ </tr>
+
+ <tr>
+ <td>DATABASE_CREATE</td>
+ <td>2</td>
+ <td><p>Database creation task that creates a new database.
+Use payload DatabaseCreate.</p></td>
+ </tr>
+
+ <tr>
+ <td>DATABASE_MIGRATE</td>
+ <td>3</td>
+ <td><p>Database migration task that applies versioned schema changes.
+Use payload DatabaseUpdate.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.v1.QueryResult">QueryResult</h3>
+ <h3 id="bytebase.v1.TaskRun.Status">TaskRun.Status</h3>
<p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>column_names</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>Column names of the query result. </p></td>
- </tr>
-
- <tr>
- <td>column_type_names</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>Column types of the query result.
-The types come from the Golang SQL driver. </p></td>
- </tr>
-
- <tr>
- <td>rows</td>
- <td><a href="#bytebase.v1.QueryRow">QueryRow</a></td>
- <td>repeated</td>
- <td><p>Rows of the query result. </p></td>
- </tr>
-
- <tr>
- <td>rows_count</td>
- <td><a href="#int64">int64</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>error</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The error message if the query failed. </p></td>
- </tr>
-
- <tr>
- <td>latency</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
- <td></td>
- <td><p>The time it takes to execute the query. </p></td>
- </tr>
-
- <tr>
- <td>statement</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The query statement for the result. </p></td>
- </tr>
-
- <tr>
- <td>postgres_error</td>
- <td><a href="#bytebase.v1.QueryResult.PostgresError">QueryResult.PostgresError</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>syntax_error</td>
- <td><a href="#bytebase.v1.QueryResult.SyntaxError">QueryResult.SyntaxError</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>permission_denied</td>
- <td><a href="#bytebase.v1.PermissionDeniedDetail">PermissionDeniedDetail</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>command_error</td>
- <td><a href="#bytebase.v1.QueryResult.CommandError">QueryResult.CommandError</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>messages</td>
- <td><a href="#bytebase.v1.QueryResult.Message">QueryResult.Message</a></td>
- <td>repeated</td>
- <td><p>Informational or debug messages returned by the database engine during query execution.
-Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39;s DBMS_OUTPUT.PUT_LINE. </p></td>
- </tr>
-
- <tr>
- <td>masked</td>
- <td><a href="#bytebase.v1.MaskingReason">MaskingReason</a></td>
- <td>repeated</td>
- <td><p>Masking reasons for each column (empty for non-masked columns). </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>STATUS_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified status.</p></td>
+ </tr>
+
+ <tr>
+ <td>PENDING</td>
+ <td>1</td>
+ <td><p>Task run is queued and waiting to start execution.</p></td>
+ </tr>
+
+ <tr>
+ <td>RUNNING</td>
+ <td>2</td>
+ <td><p>Task run is currently executing.</p></td>
+ </tr>
+
+ <tr>
+ <td>DONE</td>
+ <td>3</td>
+ <td><p>Task run completed successfully.</p></td>
+ </tr>
+
+ <tr>
+ <td>FAILED</td>
+ <td>4</td>
+ <td><p>Task run execution failed with errors.</p></td>
+ </tr>
+
+ <tr>
+ <td>CANCELED</td>
+ <td>5</td>
+ <td><p>Task run execution was canceled by a user.</p></td>
+ </tr>
+
+ <tr>
+ <td>AVAILABLE</td>
+ <td>6</td>
+ <td><p>Task run is ready for immediate execution.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.v1.QueryResult.CommandError">QueryResult.CommandError</h3>
- <p>Permission denied with resource information or disallowed command_type.</p><p>Either resources or command_type is available.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>command_type</td>
- <td><a href="#bytebase.v1.QueryResult.CommandError.Type">QueryResult.CommandError.Type</a></td>
- <td></td>
- <td><p>Disallowed command_type. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
+ <h3 id="bytebase.v1.TaskRunLogEntry.TransactionControl.Type">TaskRunLogEntry.TransactionControl.Type</h3>
+ <p>Transaction control type.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified type.</p></td>
+ </tr>
+
+ <tr>
+ <td>BEGIN</td>
+ <td>1</td>
+ <td><p>Begin transaction.</p></td>
+ </tr>
+
+ <tr>
+ <td>COMMIT</td>
+ <td>2</td>
+ <td><p>Commit transaction.</p></td>
+ </tr>
+
+ <tr>
+ <td>ROLLBACK</td>
+ <td>3</td>
+ <td><p>Rollback transaction.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.TaskRunLogEntry.Type">TaskRunLogEntry.Type</h3>
+ <p>The type of log entry.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified type.</p></td>
+ </tr>
+
+ <tr>
+ <td>SCHEMA_DUMP</td>
+ <td>1</td>
+ <td><p>Schema dump operation.</p></td>
+ </tr>
+
+ <tr>
+ <td>COMMAND_EXECUTE</td>
+ <td>2</td>
+ <td><p>Command execution.</p></td>
+ </tr>
+
+ <tr>
+ <td>DATABASE_SYNC</td>
+ <td>3</td>
+ <td><p>Database synchronization.</p></td>
+ </tr>
+
+ <tr>
+ <td>TRANSACTION_CONTROL</td>
+ <td>5</td>
+ <td><p>Transaction control (BEGIN, COMMIT, ROLLBACK).</p></td>
+ </tr>
+
+ <tr>
+ <td>PRIOR_BACKUP</td>
+ <td>6</td>
+ <td><p>Prior backup operation.</p></td>
+ </tr>
+
+ <tr>
+ <td>RETRY_INFO</td>
+ <td>7</td>
+ <td><p>Retry information.</p></td>
+ </tr>
+
+ <tr>
+ <td>COMPUTE_DIFF</td>
+ <td>8</td>
+ <td><p>Schema diff computation.</p></td>
+ </tr>
+
+ <tr>
+ <td>RELEASE_FILE_EXECUTE</td>
+ <td>9</td>
+ <td><p>Release file execution.</p></td>
+ </tr>
+
+ <tr>
+ <td>GHOST_MIGRATION</td>
+ <td>10</td>
+ <td><p>gh-ost online migration.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.v1.QueryResult.Message">QueryResult.Message</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>level</td>
- <td><a href="#bytebase.v1.QueryResult.Message.Level">QueryResult.Message.Level</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>content</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
+
-
- <h3 id="bytebase.v1.QueryResult.PostgresError">QueryResult.PostgresError</h3>
- <p>refer https://www.postgresql.org/docs/11/protocol-error-fields.html</p><p>for field description.</p>
+ <h3 id="bytebase.v1.RolloutService">RolloutService</h3>
+ <p>RolloutService manages the execution of deployment plans.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>GetRollout</td>
+ <td><a href="#bytebase.v1.GetRolloutRequest">GetRolloutRequest</a></td>
+ <td><a href="#bytebase.v1.Rollout">Rollout</a></td>
+ <td><p>Retrieves a rollout by its plan name.
+Permissions required: bb.rollouts.get</p></td>
+ </tr>
+
+ <tr>
+ <td>ListRollouts</td>
+ <td><a href="#bytebase.v1.ListRolloutsRequest">ListRolloutsRequest</a></td>
+ <td><a href="#bytebase.v1.ListRolloutsResponse">ListRolloutsResponse</a></td>
+ <td><p>Lists rollouts in a project.
+Permissions required: bb.rollouts.list</p></td>
+ </tr>
+
+ <tr>
+ <td>CreateRollout</td>
+ <td><a href="#bytebase.v1.CreateRolloutRequest">CreateRolloutRequest</a></td>
+ <td><a href="#bytebase.v1.Rollout">Rollout</a></td>
+ <td><p>Creates a new rollout for a plan.
+Permissions required: bb.rollouts.create</p></td>
+ </tr>
+
+ <tr>
+ <td>ListTaskRuns</td>
+ <td><a href="#bytebase.v1.ListTaskRunsRequest">ListTaskRunsRequest</a></td>
+ <td><a href="#bytebase.v1.ListTaskRunsResponse">ListTaskRunsResponse</a></td>
+ <td><p>Lists task run executions for a task.
+Permissions required: bb.taskRuns.list</p></td>
+ </tr>
+
+ <tr>
+ <td>GetTaskRun</td>
+ <td><a href="#bytebase.v1.GetTaskRunRequest">GetTaskRunRequest</a></td>
+ <td><a href="#bytebase.v1.TaskRun">TaskRun</a></td>
+ <td><p>Retrieves a task run by name.
+Permissions required: bb.taskRuns.list</p></td>
+ </tr>
+
+ <tr>
+ <td>GetTaskRunLog</td>
+ <td><a href="#bytebase.v1.GetTaskRunLogRequest">GetTaskRunLogRequest</a></td>
+ <td><a href="#bytebase.v1.TaskRunLog">TaskRunLog</a></td>
+ <td><p>Retrieves execution logs for a task run.
+Permissions required: bb.taskRuns.list</p></td>
+ </tr>
+
+ <tr>
+ <td>GetTaskRunSession</td>
+ <td><a href="#bytebase.v1.GetTaskRunSessionRequest">GetTaskRunSessionRequest</a></td>
+ <td><a href="#bytebase.v1.TaskRunSession">TaskRunSession</a></td>
+ <td><p>Retrieves database session information for a running task.
+Permissions required: bb.taskRuns.list</p></td>
+ </tr>
+
+ <tr>
+ <td>BatchRunTasks</td>
+ <td><a href="#bytebase.v1.BatchRunTasksRequest">BatchRunTasksRequest</a></td>
+ <td><a href="#bytebase.v1.BatchRunTasksResponse">BatchRunTasksResponse</a></td>
+ <td><p>Executes multiple tasks in a rollout stage.
+Permissions required: bb.taskRuns.create (or user with rollout policy role for the environment)</p></td>
+ </tr>
+
+ <tr>
+ <td>BatchSkipTasks</td>
+ <td><a href="#bytebase.v1.BatchSkipTasksRequest">BatchSkipTasksRequest</a></td>
+ <td><a href="#bytebase.v1.BatchSkipTasksResponse">BatchSkipTasksResponse</a></td>
+ <td><p>Skips multiple tasks in a rollout stage.
+Permissions required: bb.taskRuns.create (or user with rollout policy role for the environment)</p></td>
+ </tr>
+
+ <tr>
+ <td>BatchCancelTaskRuns</td>
+ <td><a href="#bytebase.v1.BatchCancelTaskRunsRequest">BatchCancelTaskRunsRequest</a></td>
+ <td><a href="#bytebase.v1.BatchCancelTaskRunsResponse">BatchCancelTaskRunsResponse</a></td>
+ <td><p>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)</p></td>
+ </tr>
+
+ <tr>
+ <td>PreviewTaskRunRollback</td>
+ <td><a href="#bytebase.v1.PreviewTaskRunRollbackRequest">PreviewTaskRunRollbackRequest</a></td>
+ <td><a href="#bytebase.v1.PreviewTaskRunRollbackResponse">PreviewTaskRunRollbackResponse</a></td>
+ <td><p>Generates rollback SQL for a completed task run.
+Permissions required: bb.taskRuns.list</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <table class="field-table">
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
<thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
</thead>
<tbody>
+
- <tr>
- <td>severity</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>code</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
- <tr>
- <td>message</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ <tr>
+ <td>GetRollout</td>
+ <td>GET</td>
+ <td>/v1/{name=projects/*/plans/*/rollout}</td>
+ <td></td>
+ </tr>
- <tr>
- <td>detail</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+
- <tr>
- <td>hint</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
- <tr>
- <td>position</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ <tr>
+ <td>ListRollouts</td>
+ <td>GET</td>
+ <td>/v1/{parent=projects/*}/rollouts</td>
+ <td></td>
+ </tr>
- <tr>
- <td>internal_position</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+
- <tr>
- <td>internal_query</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
- <tr>
- <td>where</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ <tr>
+ <td>CreateRollout</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*/plans/*}/rollout</td>
+ <td>*</td>
+ </tr>
- <tr>
- <td>schema_name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+
- <tr>
- <td>table_name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
- <tr>
- <td>column_name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ <tr>
+ <td>ListTaskRuns</td>
+ <td>GET</td>
+ <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*}/taskRuns</td>
+ <td></td>
+ </tr>
- <tr>
- <td>data_type_name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+
- <tr>
- <td>constraint_name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
- <tr>
- <td>file</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ <tr>
+ <td>GetTaskRun</td>
+ <td>GET</td>
+ <td>/v1/{name=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}</td>
+ <td></td>
+ </tr>
- <tr>
- <td>line</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+
- <tr>
- <td>routine</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
- </tbody>
+ <tr>
+ <td>GetTaskRunLog</td>
+ <td>GET</td>
+ <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}/log</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>GetTaskRunSession</td>
+ <td>GET</td>
+ <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}/session</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>BatchRunTasks</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*/plans/*/rollout/stages/*}/tasks:batchRun</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>BatchSkipTasks</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*/plans/*/rollout/stages/*}/tasks:batchSkip</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>BatchCancelTaskRuns</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*}/taskRuns:batchCancel</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>PreviewTaskRunRollback</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}:previewRollback</td>
+ <td>*</td>
+ </tr>
+
+
+ </tbody>
</table>
-
-
+
- <h3 id="bytebase.v1.QueryResult.SyntaxError">QueryResult.SyntaxError</h3>
- <p>Syntax error with position information for editor highlighting</p>
+ <div class="file-heading">
+ <h2 id="v1/query_history_service.proto">v1/query_history_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.GetQueryHistoryRequest">GetQueryHistoryRequest</h3>
+ <p></p>
<table class="field-table">
@@ -9974,10 +9818,11 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
<tbody>
<tr>
- <td>start_position</td>
- <td><a href="#bytebase.v1.Position">Position</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Position information for highlighting in editor </p></td>
+ <td><p>The name of the query history to retrieve.
+Format: projects/{project}/queryHistories/{id} </p></td>
</tr>
</tbody>
@@ -9987,7 +9832,7 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
- <h3 id="bytebase.v1.QueryRow">QueryRow</h3>
+ <h3 id="bytebase.v1.ListQueryHistoriesRequest">ListQueryHistoriesRequest</h3>
<p></p>
@@ -9998,10 +9843,46 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
<tbody>
<tr>
- <td>values</td>
- <td><a href="#bytebase.v1.RowValue">RowValue</a></td>
- <td>repeated</td>
- <td><p>Row values of the query result. </p></td>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The parent project whose query histories are listed.
+Format: projects/{project}
+Use &#34;projects/-&#34; to list query histories across all projects
+(https://google.aip.dev/159); this requires the bb.queryHistories.list
+permission on the workspace. </p></td>
+ </tr>
+
+ <tr>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>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. </p></td>
+ </tr>
+
+ <tr>
+ <td>page_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>A page token, received from a previous `ListQueryHistories` call.
+Provide this to retrieve the subsequent page. </p></td>
+ </tr>
+
+ <tr>
+ <td>filter</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>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 &#34;users/{email}&#34; format, support &#34;==&#34; operator.
+
+For example:
+creator == &#34;users/{email}&#34; </p></td>
</tr>
</tbody>
@@ -10011,7 +9892,7 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
- <h3 id="bytebase.v1.RowValue">RowValue</h3>
+ <h3 id="bytebase.v1.ListQueryHistoriesResponse">ListQueryHistoriesResponse</h3>
<p></p>
@@ -10022,98 +9903,94 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
<tbody>
<tr>
- <td>null_value</td>
- <td><a href="#google.protobuf.NullValue">google.protobuf.NullValue</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>query_histories</td>
+ <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>
+ <td>repeated</td>
+ <td><p>The list of query histories. </p></td>
</tr>
<tr>
- <td>bool_value</td>
- <td><a href="#bool">bool</a></td>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>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. </p></td>
</tr>
- <tr>
- <td>bytes_value</td>
- <td><a href="#bytes">bytes</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.QueryHistory">QueryHistory</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>double_value</td>
- <td><a href="#double">double</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name for the query history.
+Format: projects/{project}/queryHistories/{id} </p></td>
</tr>
<tr>
- <td>float_value</td>
- <td><a href="#float">float</a></td>
+ <td>database</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The database name to execute the query.
+Format: instances/{instance}/databases/{databaseName} or projects/{project}/instances/{instance}/databases/{databaseName} </p></td>
</tr>
<tr>
- <td>int32_value</td>
- <td><a href="#int32">int32</a></td>
+ <td>creator</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>int64_value</td>
- <td><a href="#int64">int64</a></td>
+ <td>create_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>string_value</td>
+ <td>statement</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>uint32_value</td>
- <td><a href="#uint32">uint32</a></td>
- <td></td>
+ <td>error</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
<td><p> </p></td>
</tr>
<tr>
- <td>uint64_value</td>
- <td><a href="#uint64">uint64</a></td>
+ <td>duration</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>value_value</td>
- <td><a href="#google.protobuf.Value">google.protobuf.Value</a></td>
- <td></td>
- <td><p>value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only. </p></td>
- </tr>
-
- <tr>
- <td>timestamp_value</td>
- <td><a href="#bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</a></td>
- <td></td>
- <td><p>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. </p></td>
- </tr>
-
- <tr>
- <td>timestamp_tz_value</td>
- <td><a href="#bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</a></td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.QueryHistory.Type">QueryHistory.Type</a></td>
<td></td>
- <td><p>timestamp_tz_value is used for the timestamptz data type, which
-accurately represents the timestamp with location information. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -10123,7 +10000,7 @@ accurately represents the timestamp with location information. </p></td>
- <h3 id="bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</h3>
+ <h3 id="bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</h3>
<p></p>
@@ -10134,67 +10011,89 @@ accurately represents the timestamp with location information. </p></td>
<tbody>
<tr>
- <td>google_timestamp</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The parent project to search query histories in.
+Format: projects/{project}
+The AIP-159 wildcard &#34;projects/-&#34; is not supported; use
+ListQueryHistories for cross-project reads. </p></td>
</tr>
<tr>
- <td>accuracy</td>
+ <td>page_size</td>
<td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The accuracy is the number of digits after the decimal point. </p></td>
+ <td><p>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. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>google_timestamp</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>A page token, received from a previous `ListQueryHistory` call.
+Provide this to retrieve the subsequent page. </p></td>
</tr>
<tr>
- <td>zone</td>
+ <td>filter</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Zone is the time zone abbreviations in timezone database such as &#34;PDT&#34;,
-&#34;PST&#34;. 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() </p></td>
+ <td><p>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 &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
+- database: the database full name in &#34;instances/{id}/databases/{name}&#34; or &#34;projects/{project}/instances/{id}/databases/{name}&#34; format, support &#34;==&#34; operator.
+- instance: the instance full name in &#34;instances/{id}&#34; or &#34;projects/{project}/instances/{id}&#34; format, support &#34;==&#34; operator.
+- type: the type, should be &#34;QUERY&#34; or &#34;EXPORT&#34;, support &#34;==&#34; operator.
+- statement: the SQL statement, support &#34;==&#34; and &#34;.contains()&#34; operators.
+
+For example:
+project == &#34;projects/{project}&#34;
+database == &#34;instances/{instance}/databases/{database}&#34;
+instance == &#34;instances/{instance}&#34;
+type == &#34;QUERY&#34;
+type == &#34;EXPORT&#34;
+statement == &#34;SELECT 1;&#34;
+statement.contains(&#34;select&#34;)
+type == &#34;QUERY&#34; &amp;&amp; statement.contains(&#34;select&#34;) </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>offset</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The offset is in seconds east of UTC </p></td>
+ <td>query_histories</td>
+ <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>
+ <td>repeated</td>
+ <td><p>The list of history. </p></td>
</tr>
<tr>
- <td>accuracy</td>
- <td><a href="#int32">int32</a></td>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>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. </p></td>
</tr>
</tbody>
@@ -10206,8 +10105,8 @@ time.Time.Zone() </p></td>
- <h3 id="bytebase.v1.Advice.Level">Advice.Level</h3>
- <p>Level represents the severity level of the advice.</p>
+ <h3 id="bytebase.v1.QueryHistory.Type">QueryHistory.Type</h3>
+ <p></p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -10215,381 +10114,180 @@ time.Time.Zone() </p></td>
<tbody>
<tr>
- <td>ADVICE_LEVEL_UNSPECIFIED</td>
+ <td>TYPE_UNSPECIFIED</td>
<td>0</td>
- <td><p>Unspecified advice level.</p></td>
+ <td><p>Unspecified query history type.</p></td>
</tr>
<tr>
- <td>SUCCESS</td>
+ <td>QUERY</td>
<td>1</td>
- <td><p>Success status indicating the check passed without issues.</p></td>
+ <td><p>Query execution for data retrieval.</p></td>
</tr>
<tr>
- <td>WARNING</td>
+ <td>EXPORT</td>
<td>2</td>
- <td><p>Warning status indicating potential issues that should be reviewed.</p></td>
- </tr>
-
- <tr>
- <td>ERROR</td>
- <td>3</td>
- <td><p>Error status indicating critical issues that must be addressed.</p></td>
+ <td><p>Data export operation to file.</p></td>
</tr>
</tbody>
</table>
- <h3 id="bytebase.v1.Advice.RuleType">Advice.RuleType</h3>
- <p>RuleType indicates the source of the linting rule.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>RULE_TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified rule type.</p></td>
- </tr>
-
- <tr>
- <td>PARSER_BASED</td>
- <td>1</td>
- <td><p>Parser-based rule enforced by the built-in SQL parser.
-These are non-configurable, mandatory checks for schema health.</p></td>
- </tr>
-
- <tr>
- <td>AI_POWERED</td>
- <td>2</td>
- <td><p>AI-powered rule defined by user in natural language.
-These are custom, flexible checks powered by AI models.</p></td>
- </tr>
-
- </tbody>
- </table>
+
- <h3 id="bytebase.v1.QueryOption.MSSQLExplainFormat">QueryOption.MSSQLExplainFormat</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>MSSQL_EXPLAIN_FORMAT_UNSPECIFIED</td>
- <td>0</td>
- <td><p>defaults to SHOWPLAN_ALL</p></td>
- </tr>
-
- <tr>
- <td>MSSQL_EXPLAIN_FORMAT_ALL</td>
- <td>1</td>
- <td><p>SHOWPLAN_ALL</p></td>
- </tr>
-
- <tr>
- <td>MSSQL_EXPLAIN_FORMAT_XML</td>
- <td>2</td>
- <td><p>SHOWPLAN_XML</p></td>
- </tr>
-
- </tbody>
- </table>
+
- <h3 id="bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</h3>
- <p></p>
+ <h3 id="bytebase.v1.QueryHistoryService">QueryHistoryService</h3>
+ <p>QueryHistoryService manages query history records of SQL Editor queries and exports.</p>
<table class="enum-table">
<thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
</thead>
<tbody>
<tr>
- <td>REDIS_RUN_COMMANDS_ON_UNSPECIFIED</td>
- <td>0</td>
- <td><p>UNSPECIFIED defaults to SINGLE_NODE.</p></td>
+ <td>SearchQueryHistories</td>
+ <td><a href="#bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</a></td>
+ <td><a href="#bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</a></td>
+ <td><p>SearchQueryHistories searches query histories for the caller.
+Permissions required: None (only returns caller&#39;s own query histories)</p></td>
</tr>
<tr>
- <td>SINGLE_NODE</td>
- <td>1</td>
- <td><p>Execute Redis commands on a single node in the cluster.</p></td>
+ <td>ListQueryHistories</td>
+ <td><a href="#bytebase.v1.ListQueryHistoriesRequest">ListQueryHistoriesRequest</a></td>
+ <td><a href="#bytebase.v1.ListQueryHistoriesResponse">ListQueryHistoriesResponse</a></td>
+ <td><p>ListQueryHistories lists query histories of all users in a project.
+Results are ordered by create time descending (newest first).
+Permissions required: bb.queryHistories.list</p></td>
</tr>
<tr>
- <td>ALL_NODES</td>
- <td>2</td>
- <td><p>Execute Redis commands on all nodes in the cluster for cluster-wide operations.</p></td>
+ <td>GetQueryHistory</td>
+ <td><a href="#bytebase.v1.GetQueryHistoryRequest">GetQueryHistoryRequest</a></td>
+ <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>
+ <td><p>GetQueryHistory gets a single query history for the caller.
+Permissions required: None (only returns the caller&#39;s own query history)</p></td>
</tr>
</tbody>
</table>
-
- <h3 id="bytebase.v1.QueryResult.CommandError.Type">QueryResult.CommandError.Type</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
+
+
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
+ <thead>
<tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
</tr>
+ </thead>
+ <tbody>
+
+
<tr>
- <td>DDL</td>
- <td>1</td>
- <td><p></p></td>
+ <td>SearchQueryHistories</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*}/queryHistories:search</td>
+ <td>*</td>
</tr>
+
+
+
<tr>
- <td>DML</td>
- <td>2</td>
- <td><p></p></td>
+ <td>ListQueryHistories</td>
+ <td>GET</td>
+ <td>/v1/{parent=projects/*}/queryHistories</td>
+ <td></td>
</tr>
+
+
+
<tr>
- <td>NON_READ_ONLY</td>
- <td>3</td>
- <td><p></p></td>
+ <td>GetQueryHistory</td>
+ <td>GET</td>
+ <td>/v1/{name=projects/*/queryHistories/*}</td>
+ <td></td>
</tr>
+
- </tbody>
- </table>
+ </tbody>
+ </table>
+
+
+
- <h3 id="bytebase.v1.QueryResult.Message.Level">QueryResult.Message.Level</h3>
+ <div class="file-heading">
+ <h2 id="v1/sql_service.proto">v1/sql_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.AdminExecuteRequest">AdminExecuteRequest</h3>
<p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>LEVEL_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified message level.</p></td>
- </tr>
-
- <tr>
- <td>INFO</td>
- <td>1</td>
- <td><p>Informational message.</p></td>
- </tr>
-
- <tr>
- <td>WARNING</td>
- <td>2</td>
- <td><p>Warning message indicating potential issues.</p></td>
- </tr>
-
- <tr>
- <td>DEBUG</td>
- <td>3</td>
- <td><p>Debug message for development and troubleshooting.</p></td>
- </tr>
-
- <tr>
- <td>LOG</td>
- <td>4</td>
- <td><p>General log message.</p></td>
- </tr>
-
- <tr>
- <td>NOTICE</td>
- <td>5</td>
- <td><p>Notice message for important information.</p></td>
- </tr>
-
- <tr>
- <td>EXCEPTION</td>
- <td>6</td>
- <td><p>Exception message indicating error conditions.</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.SQLService">SQLService</h3>
- <p>SQLService executes SQL queries and manages query operations.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>Query</td>
- <td><a href="#bytebase.v1.QueryRequest">QueryRequest</a></td>
- <td><a href="#bytebase.v1.QueryResponse">QueryResponse</a></td>
- <td><p>Executes a read-only SQL query against a database.
-Permissions required: bb.databases.get</p></td>
- </tr>
-
- <tr>
- <td>AdminExecute</td>
- <td><a href="#bytebase.v1.AdminExecuteRequest">AdminExecuteRequest</a> stream</td>
- <td><a href="#bytebase.v1.AdminExecuteResponse">AdminExecuteResponse</a> stream</td>
- <td><p>Executes SQL with admin privileges via streaming connection.
-Permissions required: bb.sql.admin</p></td>
- </tr>
-
- <tr>
- <td>SearchQueryHistories</td>
- <td><a href="#bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</a></td>
- <td><a href="#bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</a></td>
- <td><p>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&#39;s own query histories)</p></td>
- </tr>
-
- <tr>
- <td>ListQueryHistories</td>
- <td><a href="#bytebase.v1.ListQueryHistoriesRequest">ListQueryHistoriesRequest</a></td>
- <td><a href="#bytebase.v1.ListQueryHistoriesResponse">ListQueryHistoriesResponse</a></td>
- <td><p>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</p></td>
- </tr>
-
- <tr>
- <td>GetQueryHistory</td>
- <td><a href="#bytebase.v1.GetQueryHistoryRequest">GetQueryHistoryRequest</a></td>
- <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>
- <td><p>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&#39;s own query history)</p></td>
- </tr>
-
- <tr>
- <td>Export</td>
- <td><a href="#bytebase.v1.ExportRequest">ExportRequest</a></td>
- <td><a href="#bytebase.v1.ExportResponse">ExportResponse</a></td>
- <td><p>Exports query results to a file format.
-Permissions required: bb.databases.get</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
- <h4>Methods with deprecated option</h4>
- <table>
- <thead>
- <tr>
- <td>Method Name</td>
- <td>Option</td>
- </tr>
- </thead>
- <tbody>
-
- <tr>
- <td>SearchQueryHistories</td>
- <td><p>true</p></td>
- </tr>
-
- <tr>
- <td>ListQueryHistories</td>
- <td><p>true</p></td>
- </tr>
-
- <tr>
- <td>GetQueryHistory</td>
- <td><p>true</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
+ <table class="field-table">
<thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>
-
-
- <tr>
- <td>Query</td>
- <td>POST</td>
- <td>/v1/{name=instances/*/databases/*}:query</td>
- <td>*</td>
- </tr>
-
- <tr>
- <td>Query</td>
- <td>POST</td>
- <td>/v1/{name=projects/*/instances/*/databases/*}:query</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>AdminExecute</td>
- <td>GET</td>
- <td>/v1:adminExecute</td>
- <td></td>
- </tr>
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name is the instance name to execute the query against.
+Format: instances/{instance}/databases/{databaseName} or
+projects/{project}/instances/{instance}/databases/{databaseName} </p></td>
+ </tr>
-
+ <tr>
+ <td>statement</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The SQL statement to execute. </p></td>
+ </tr>
+ <tr>
+ <td>limit</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The maximum number of rows to return. </p></td>
+ </tr>
- <tr>
- <td>Export</td>
- <td>POST</td>
- <td>/v1/{name=instances/*/databases/*}:export</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>schema</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>The default schema to execute the statement. Equals to the current schema
+in Oracle and search path in Postgres. </p></td>
+ </tr>
- <tr>
- <td>Export</td>
- <td>POST</td>
- <td>/v1/{name=projects/*/instances/*/databases/*}:export</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>container</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>Container is the container name to execute the query against, used for
+CosmosDB only. </p></td>
+ </tr>
-
</tbody>
</table>
+
-
-
-
- <div class="file-heading">
- <h2 id="v1/plan_service.proto">v1/plan_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
+
- <h3 id="bytebase.v1.CancelPlanCheckRunRequest">CancelPlanCheckRunRequest</h3>
+ <h3 id="bytebase.v1.AdminExecuteResponse">AdminExecuteResponse</h3>
<p></p>
@@ -10600,11 +10298,10 @@ Permissions required: bb.databases.get</p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the plan check run to cancel.
-Format: projects/{project}/plans/{plan}/planCheckRun </p></td>
+ <td>results</td>
+ <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>
+ <td>repeated</td>
+ <td><p>The query results. </p></td>
</tr>
</tbody>
@@ -10614,14 +10311,7 @@ Format: projects/{project}/plans/{plan}/planCheckRun </p></td>
- <h3 id="bytebase.v1.CancelPlanCheckRunResponse">CancelPlanCheckRunResponse</h3>
- <p></p>
-
-
-
-
-
- <h3 id="bytebase.v1.CreatePlanRequest">CreatePlanRequest</h3>
+ <h3 id="bytebase.v1.Advice">Advice</h3>
<p></p>
@@ -10632,18 +10322,53 @@ Format: projects/{project}/plans/{plan}/planCheckRun </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>status</td>
+ <td><a href="#bytebase.v1.Advice.Level">Advice.Level</a></td>
+ <td></td>
+ <td><p>The advice level. </p></td>
+ </tr>
+
+ <tr>
+ <td>code</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The advice code. </p></td>
+ </tr>
+
+ <tr>
+ <td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent project where this plan will be created.
-Format: projects/{project} </p></td>
+ <td><p>The advice title. </p></td>
</tr>
<tr>
- <td>plan</td>
- <td><a href="#bytebase.v1.Plan">Plan</a></td>
+ <td>content</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The plan to create. </p></td>
+ <td><p>The advice content. </p></td>
+ </tr>
+
+ <tr>
+ <td>start_position</td>
+ <td><a href="#bytebase.v1.Position">Position</a></td>
+ <td></td>
+ <td><p>The start_position is inclusive and the end_position is exclusive.
+TODO: use range instead </p></td>
+ </tr>
+
+ <tr>
+ <td>end_position</td>
+ <td><a href="#bytebase.v1.Position">Position</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>rule_type</td>
+ <td><a href="#bytebase.v1.Advice.RuleType">Advice.RuleType</a></td>
+ <td></td>
+ <td><p>The type of linting rule that generated this advice. </p></td>
</tr>
</tbody>
@@ -10653,7 +10378,7 @@ Format: projects/{project} </p></td>
- <h3 id="bytebase.v1.GetPlanCheckRunRequest">GetPlanCheckRunRequest</h3>
+ <h3 id="bytebase.v1.ExportRequest">ExportRequest</h3>
<p></p>
@@ -10667,8 +10392,72 @@ Format: projects/{project} </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the plan check run to retrieve.
-Format: projects/{project}/plans/{plan}/planCheckRun </p></td>
+ <td><p>The name is the resource name to execute the export against.
+Format: instances/{instance}/databases/{database} or
+projects/{project}/instances/{instance}/databases/{database} </p></td>
+ </tr>
+
+ <tr>
+ <td>statement</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The SQL statement to execute. </p></td>
+ </tr>
+
+ <tr>
+ <td>limit</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The maximum number of rows to return. </p></td>
+ </tr>
+
+ <tr>
+ <td>format</td>
+ <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>
+ <td></td>
+ <td><p>The export format. </p></td>
+ </tr>
+
+ <tr>
+ <td>admin</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>The admin is used for workspace owner and DBA for exporting data from SQL
+Editor Admin mode. The exported data is not masked. </p></td>
+ </tr>
+
+ <tr>
+ <td>password</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The zip password provide by users. </p></td>
+ </tr>
+
+ <tr>
+ <td>data_source_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>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. </p></td>
+ </tr>
+
+ <tr>
+ <td>schema</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>The default schema to search objects. Equals to the current schema in
+Oracle and search path in Postgres. </p></td>
+ </tr>
+
+ <tr>
+ <td>container</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>Container is the container name to execute the query against, used for
+CosmosDB only. </p></td>
</tr>
</tbody>
@@ -10678,7 +10467,7 @@ Format: projects/{project}/plans/{plan}/planCheckRun </p></td>
- <h3 id="bytebase.v1.GetPlanRequest">GetPlanRequest</h3>
+ <h3 id="bytebase.v1.ExportResponse">ExportResponse</h3>
<p></p>
@@ -10689,11 +10478,19 @@ Format: projects/{project}/plans/{plan}/planCheckRun </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>content</td>
+ <td><a href="#bytes">bytes</a></td>
+ <td></td>
+ <td><p>The export file content. </p></td>
+ </tr>
+
+ <tr>
+ <td>applied_access_grant</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the plan to retrieve.
-Format: projects/{project}/plans/{plan} </p></td>
+ <td><p>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. </p></td>
</tr>
</tbody>
@@ -10703,7 +10500,7 @@ Format: projects/{project}/plans/{plan} </p></td>
- <h3 id="bytebase.v1.ListPlansRequest">ListPlansRequest</h3>
+ <h3 id="bytebase.v1.MaskingReason">MaskingReason</h3>
<p></p>
@@ -10714,56 +10511,52 @@ Format: projects/{project}/plans/{plan} </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>semantic_type_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent, which owns this collection of plans.
-Format: projects/{project}
-Use &#34;projects/-&#34; to list all plans from all projects. </p></td>
+ <td><p>The semantic type that triggered masking (e.g., &#34;SSN&#34;, &#34;email&#34;, &#34;phone&#34;). </p></td>
</tr>
<tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
+ <td>semantic_type_title</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>Human-readable semantic type title. </p></td>
</tr>
<tr>
- <td>page_token</td>
+ <td>masking_rule_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>The masking rule ID that matched (if applicable). </p></td>
</tr>
<tr>
- <td>filter</td>
+ <td>algorithm</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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 &#34;users/{email or id}&#34; format, support &#34;==&#34; operator.
-- create_time: the plan create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator.
-- has_rollout: whether the plan has rollout, support &#34;==&#34; operator, the value should be &#34;true&#34; or &#34;false&#34;.
-- title: the plan title, support &#34;==&#34; operator for exact match and &#34;.contains()&#34; operator for case-insensitive substring match.
-- spec_type: the plan spec config type, support &#34;==&#34; operator, the value should be &#34;create_database_config&#34; or &#34;change_database_config&#34;.
-- state: the plan state, support &#34;==&#34; operator, the value should be &#34;ACTIVE&#34; or &#34;DELETED&#34;.
-
-For example:
-creator == &#34;users/[email protected]&#34; &amp;&amp; create_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34;
-title == &#34;My Plan&#34;
-title.contains(&#34;database migration&#34;)
-spec_type == &#34;change_database_config&#34;
-state == &#34;ACTIVE&#34; </p></td>
+ <td><p>The masking algorithm used. </p></td>
+ </tr>
+
+ <tr>
+ <td>context</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Additional context (e.g., &#34;Matched global rule: PII Protection&#34;). </p></td>
+ </tr>
+
+ <tr>
+ <td>classification_level</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The classification level that triggered masking. </p></td>
+ </tr>
+
+ <tr>
+ <td>semantic_type_icon</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Icon associated with the semantic type (if any). </p></td>
</tr>
</tbody>
@@ -10773,7 +10566,7 @@ state == &#34;ACTIVE&#34; </p></td>
- <h3 id="bytebase.v1.ListPlansResponse">ListPlansResponse</h3>
+ <h3 id="bytebase.v1.QueryOption">QueryOption</h3>
<p></p>
@@ -10784,18 +10577,17 @@ state == &#34;ACTIVE&#34; </p></td>
<tbody>
<tr>
- <td>plans</td>
- <td><a href="#bytebase.v1.Plan">Plan</a></td>
- <td>repeated</td>
- <td><p>The plans from the specified request. </p></td>
+ <td>redis_run_commands_on</td>
+ <td><a href="#bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>next_page_token</td>
- <td><a href="#string">string</a></td>
+ <td>mssql_explain_format</td>
+ <td><a href="#bytebase.v1.QueryOption.MSSQLExplainFormat">QueryOption.MSSQLExplainFormat</a></td>
<td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -10805,7 +10597,7 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.Plan">Plan</h3>
+ <h3 id="bytebase.v1.QueryRequest">QueryRequest</h3>
<p></p>
@@ -10819,119 +10611,64 @@ If this field is omitted, there are no subsequent pages. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the plan.
-`plan` is a system generated ID.
-Format: projects/{project}/plans/{plan} </p></td>
+ <td><p>The name is the database resource name to execute the query against.
+Format: instances/{instance}/databases/{databaseName} or
+projects/{project}/instances/{instance}/databases/{databaseName} </p></td>
</tr>
<tr>
- <td>state</td>
- <td><a href="#bytebase.v1.State">State</a></td>
+ <td>statement</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The state of the plan. </p></td>
+ <td><p>The SQL statement to execute. </p></td>
</tr>
<tr>
- <td>issue</td>
- <td><a href="#string">string</a></td>
+ <td>limit</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The issue associated with the plan.
-Can be empty.
-Format: projects/{project}/issues/{issue} </p></td>
+ <td><p>The maximum number of rows to return. </p></td>
</tr>
<tr>
- <td>title</td>
+ <td>data_source_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The title of the plan. </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>description</td>
- <td><a href="#string">string</a></td>
+ <td>explain</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The description of the plan. </p></td>
+ <td><p>Explain the statement. </p></td>
</tr>
<tr>
- <td>specs</td>
- <td><a href="#bytebase.v1.Plan.Spec">Plan.Spec</a></td>
- <td>repeated</td>
- <td><p>The deployment specs for the plan. </p></td>
- </tr>
-
- <tr>
- <td>creator</td>
+ <td>schema</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>Format: users/[email protected] </p></td>
- </tr>
-
- <tr>
- <td>create_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>optional</td>
+ <td><p>The default schema to search objects. Equals to the current schema in
+Oracle and search path in Postgres. </p></td>
</tr>
<tr>
- <td>update_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>query_option</td>
+ <td><a href="#bytebase.v1.QueryOption">QueryOption</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>plan_check_run_status_count</td>
- <td><a href="#bytebase.v1.Plan.PlanCheckRunStatusCountEntry">Plan.PlanCheckRunStatusCountEntry</a></td>
- <td>repeated</td>
- <td><p>The status count of the latest plan check runs.
-Keys are:
-- SUCCESS
-- WARNING
-- ERROR
-- RUNNING </p></td>
- </tr>
-
- <tr>
- <td>has_rollout</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether the plan has started the rollout. </p></td>
- </tr>
-
- <tr>
- <td>approval_status</td>
- <td><a href="#bytebase.v1.ApprovalStatus">ApprovalStatus</a></td>
- <td></td>
- <td><p>The approval status of the linked issue.
-Unspecified when no linked issue exists or the linked issue is a draft. </p></td>
- </tr>
-
- <tr>
- <td>rollout_stage_summaries</td>
- <td><a href="#bytebase.v1.Plan.RolloutStageSummary">Plan.RolloutStageSummary</a></td>
- <td>repeated</td>
- <td><p>Per-stage rollout status summary.
-Ordered by environment deployment order. Empty when no rollout exists. </p></td>
- </tr>
-
- <tr>
- <td>issue_status</td>
- <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>
- <td></td>
- <td><p>The lifecycle status of the linked issue.
-Unspecified when no linked issue exists. </p></td>
- </tr>
-
- <tr>
- <td>last_plan_editor</td>
+ <td>container</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>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. </p></td>
+ <td>optional</td>
+ <td><p>Container is the container name to execute the query against, used for
+CosmosDB only. </p></td>
</tr>
</tbody>
@@ -10941,7 +10678,7 @@ this falls back to the Plan creator. </p></td>
- <h3 id="bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</h3>
+ <h3 id="bytebase.v1.QueryResponse">QueryResponse</h3>
<p></p>
@@ -10952,35 +10689,19 @@ this falls back to the Plan creator. </p></td>
<tbody>
<tr>
- <td>targets</td>
- <td><a href="#string">string</a></td>
+ <td>results</td>
+ <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>
<td>repeated</td>
- <td><p>The list of targets.
-Multi-database format: [instances/{instance-id}/databases/{database-name}].
-Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. </p></td>
- </tr>
-
- <tr>
- <td>sheet</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The resource name of the sheet.
-Format: projects/{project}/sheets/{sheet} </p></td>
+ <td><p>The query results. </p></td>
</tr>
<tr>
- <td>release</td>
+ <td>applied_access_grant</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The resource name of the release.
-Format: projects/{project}/releases/{release} </p></td>
- </tr>
-
- <tr>
- <td>enable_prior_backup</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>If set, a backup of the modified data will be created automatically before any changes are applied. </p></td>
+ <td><p>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. </p></td>
</tr>
</tbody>
@@ -10990,7 +10711,7 @@ Format: projects/{project}/releases/{release} </p></td>
- <h3 id="bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</h3>
+ <h3 id="bytebase.v1.QueryResult">QueryResult</h3>
<p></p>
@@ -11001,95 +10722,98 @@ Format: projects/{project}/releases/{release} </p></td>
<tbody>
<tr>
- <td>target</td>
+ <td>column_names</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The resource name of the instance on which the database is created.
-Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>
+ <td>repeated</td>
+ <td><p>Column names of the query result. </p></td>
</tr>
<tr>
- <td>database</td>
+ <td>column_type_names</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the database to create. </p></td>
+ <td>repeated</td>
+ <td><p>Column types of the query result.
+The types come from the Golang SQL driver. </p></td>
</tr>
<tr>
- <td>table</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>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. </p></td>
+ <td>rows</td>
+ <td><a href="#bytebase.v1.QueryRow">QueryRow</a></td>
+ <td>repeated</td>
+ <td><p>Rows of the query result. </p></td>
</tr>
<tr>
- <td>character_set</td>
- <td><a href="#string">string</a></td>
+ <td>rows_count</td>
+ <td><a href="#int64">int64</a></td>
<td></td>
- <td><p>character_set is the character set of the database. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>collation</td>
+ <td>error</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>collation is the collation of the database. </p></td>
+ <td><p>The error message if the query failed. </p></td>
</tr>
<tr>
- <td>cluster</td>
- <td><a href="#string">string</a></td>
+ <td>latency</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
<td></td>
- <td><p>cluster is the cluster of the database. This is only applicable to ClickHouse for &#34;ON CLUSTER &lt;&lt;cluster&gt;&gt;&#34;. </p></td>
+ <td><p>The time it takes to execute the query. </p></td>
</tr>
<tr>
- <td>owner</td>
+ <td>statement</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>owner is the owner of the database. This is only applicable to Postgres for &#34;WITH OWNER &lt;&lt;owner&gt;&gt;&#34;. </p></td>
+ <td><p>The query statement for the result. </p></td>
</tr>
<tr>
- <td>environment</td>
- <td><a href="#string">string</a></td>
+ <td>postgres_error</td>
+ <td><a href="#bytebase.v1.QueryResult.PostgresError">QueryResult.PostgresError</a></td>
<td></td>
- <td><p>The environment resource.
-Format: environments/prod where prod is the environment resource ID. </p></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.Plan.PlanCheckRunStatusCountEntry">Plan.PlanCheckRunStatusCountEntry</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>syntax_error</td>
+ <td><a href="#bytebase.v1.QueryResult.SyntaxError">QueryResult.SyntaxError</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
<tr>
- <td>key</td>
- <td><a href="#string">string</a></td>
+ <td>permission_denied</td>
+ <td><a href="#bytebase.v1.PermissionDeniedDetail">PermissionDeniedDetail</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>value</td>
- <td><a href="#int32">int32</a></td>
+ <td>command_error</td>
+ <td><a href="#bytebase.v1.QueryResult.CommandError">QueryResult.CommandError</a></td>
<td></td>
<td><p> </p></td>
</tr>
+ <tr>
+ <td>messages</td>
+ <td><a href="#bytebase.v1.QueryResult.Message">QueryResult.Message</a></td>
+ <td>repeated</td>
+ <td><p>Informational or debug messages returned by the database engine during query execution.
+Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39;s DBMS_OUTPUT.PUT_LINE. </p></td>
+ </tr>
+
+ <tr>
+ <td>masked</td>
+ <td><a href="#bytebase.v1.MaskingReason">MaskingReason</a></td>
+ <td>repeated</td>
+ <td><p>Masking reasons for each column (empty for non-masked columns). </p></td>
+ </tr>
+
</tbody>
</table>
@@ -11097,8 +10821,8 @@ Format: environments/prod where prod is the environment resource ID. </p></td>
- <h3 id="bytebase.v1.Plan.RolloutStageSummary">Plan.RolloutStageSummary</h3>
- <p></p>
+ <h3 id="bytebase.v1.QueryResult.CommandError">QueryResult.CommandError</h3>
+ <p>Permission denied with resource information or disallowed command_type.</p><p>Either resources or command_type is available.</p>
<table class="field-table">
@@ -11108,18 +10832,10 @@ Format: environments/prod where prod is the environment resource ID. </p></td>
<tbody>
<tr>
- <td>stage</td>
- <td><a href="#string">string</a></td>
+ <td>command_type</td>
+ <td><a href="#bytebase.v1.QueryResult.CommandError.Type">QueryResult.CommandError.Type</a></td>
<td></td>
- <td><p>The stage resource name.
-Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>
- </tr>
-
- <tr>
- <td>task_status_counts</td>
- <td><a href="#bytebase.v1.Plan.TaskStatusCount">Plan.TaskStatusCount</a></td>
- <td>repeated</td>
- <td><p>Task status counts for this stage. </p></td>
+ <td><p>Disallowed command_type. </p></td>
</tr>
</tbody>
@@ -11129,7 +10845,7 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>
- <h3 id="bytebase.v1.Plan.Spec">Plan.Spec</h3>
+ <h3 id="bytebase.v1.QueryResult.Message">QueryResult.Message</h3>
<p></p>
@@ -11140,22 +10856,15 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>
<tbody>
<tr>
- <td>id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>A UUID4 string that uniquely identifies the Spec. </p></td>
- </tr>
-
- <tr>
- <td>create_database_config</td>
- <td><a href="#bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</a></td>
+ <td>level</td>
+ <td><a href="#bytebase.v1.QueryResult.Message.Level">QueryResult.Message.Level</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>change_database_config</td>
- <td><a href="#bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</a></td>
+ <td>content</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -11167,8 +10876,8 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>
- <h3 id="bytebase.v1.Plan.TaskStatusCount">Plan.TaskStatusCount</h3>
- <p></p>
+ <h3 id="bytebase.v1.QueryResult.PostgresError">QueryResult.PostgresError</h3>
+ <p>refer https://www.postgresql.org/docs/11/protocol-error-fields.html</p><p>for field description.</p>
<table class="field-table">
@@ -11178,141 +10887,120 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>
<tbody>
<tr>
- <td>status</td>
- <td><a href="#bytebase.v1.Task.Status">Task.Status</a></td>
+ <td>severity</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The task status. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>count</td>
- <td><a href="#int32">int32</a></td>
+ <td>code</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The number of tasks in the status. </p></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.PlanCheckRun">PlanCheckRun</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>message</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
<tr>
- <td>name</td>
+ <td>detail</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: projects/{project}/plans/{plan}/planCheckRun </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>status</td>
- <td><a href="#bytebase.v1.PlanCheckRun.Status">PlanCheckRun.Status</a></td>
+ <td>hint</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>results</td>
- <td><a href="#bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</a></td>
- <td>repeated</td>
+ <td>position</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>error</td>
- <td><a href="#string">string</a></td>
+ <td>internal_position</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>error is set if the Status is FAILED. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>create_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>internal_query</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>where</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
<tr>
- <td>status</td>
- <td><a href="#bytebase.v1.Advice.Level">Advice.Level</a></td>
+ <td>schema_name</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>title</td>
+ <td>table_name</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>content</td>
+ <td>column_name</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>code</td>
- <td><a href="#int32">int32</a></td>
+ <td>data_type_name</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>target</td>
+ <td>constraint_name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Target identification for consolidated results.
-Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.PlanCheckRun.Result.Type">PlanCheckRun.Result.Type</a></td>
+ <td>file</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>sql_summary_report</td>
- <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</a></td>
+ <td>line</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>sql_review_report</td>
- <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</a></td>
+ <td>routine</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -11324,8 +11012,8 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance
- <h3 id="bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</h3>
- <p></p>
+ <h3 id="bytebase.v1.QueryResult.SyntaxError">QueryResult.SyntaxError</h3>
+ <p>Syntax error with position information for editor highlighting</p>
<table class="field-table">
@@ -11338,14 +11026,7 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance
<td>start_position</td>
<td><a href="#bytebase.v1.Position">Position</a></td>
<td></td>
- <td><p>Position of the SQL statement. </p></td>
- </tr>
-
- <tr>
- <td>end_position</td>
- <td><a href="#bytebase.v1.Position">Position</a></td>
- <td></td>
- <td><p> </p></td>
+ <td><p>Position information for highlighting in editor </p></td>
</tr>
</tbody>
@@ -11355,7 +11036,7 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance
- <h3 id="bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</h3>
+ <h3 id="bytebase.v1.QueryRow">QueryRow</h3>
<p></p>
@@ -11366,17 +11047,10 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance
<tbody>
<tr>
- <td>statement_types</td>
- <td><a href="#bytebase.v1.StatementType">StatementType</a></td>
+ <td>values</td>
+ <td><a href="#bytebase.v1.RowValue">RowValue</a></td>
<td>repeated</td>
- <td><p>statement_types are the types of statements that are found in the sql. </p></td>
- </tr>
-
- <tr>
- <td>affected_rows</td>
- <td><a href="#int64">int64</a></td>
- <td></td>
- <td><p> </p></td>
+ <td><p>Row values of the query result. </p></td>
</tr>
</tbody>
@@ -11386,7 +11060,7 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance
- <h3 id="bytebase.v1.RunPlanChecksRequest">RunPlanChecksRequest</h3>
+ <h3 id="bytebase.v1.RowValue">RowValue</h3>
<p></p>
@@ -11397,20 +11071,98 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>null_value</td>
+ <td><a href="#google.protobuf.NullValue">google.protobuf.NullValue</a></td>
<td></td>
- <td><p>The plan to run plan checks.
-Format: projects/{project}/plans/{plan} </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>spec_id</td>
+ <td>bool_value</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>bytes_value</td>
+ <td><a href="#bytes">bytes</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>double_value</td>
+ <td><a href="#double">double</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>float_value</td>
+ <td><a href="#float">float</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>int32_value</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>int64_value</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>string_value</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>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. </p></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>uint32_value</td>
+ <td><a href="#uint32">uint32</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>uint64_value</td>
+ <td><a href="#uint64">uint64</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>value_value</td>
+ <td><a href="#google.protobuf.Value">google.protobuf.Value</a></td>
+ <td></td>
+ <td><p>value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only. </p></td>
+ </tr>
+
+ <tr>
+ <td>timestamp_value</td>
+ <td><a href="#bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</a></td>
+ <td></td>
+ <td><p>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. </p></td>
+ </tr>
+
+ <tr>
+ <td>timestamp_tz_value</td>
+ <td><a href="#bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</a></td>
+ <td></td>
+ <td><p>timestamp_tz_value is used for the timestamptz data type, which
+accurately represents the timestamp with location information. </p></td>
</tr>
</tbody>
@@ -11420,14 +11172,7 @@ If not set, all specs in the plan will be used. </p></td>
- <h3 id="bytebase.v1.RunPlanChecksResponse">RunPlanChecksResponse</h3>
- <p></p>
-
-
-
-
-
- <h3 id="bytebase.v1.UpdatePlanRequest">UpdatePlanRequest</h3>
+ <h3 id="bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</h3>
<p></p>
@@ -11438,28 +11183,67 @@ If not set, all specs in the plan will be used. </p></td>
<tbody>
<tr>
- <td>plan</td>
- <td><a href="#bytebase.v1.Plan">Plan</a></td>
- <td></td>
- <td><p>The plan to update.
-
-The plan&#39;s `name` field is used to identify the plan to update.
-Format: projects/{project}/plans/{plan} </p></td>
- </tr>
-
- <tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td>google_timestamp</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>The list of fields to update. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>allow_missing</td>
- <td><a href="#bool">bool</a></td>
+ <td>accuracy</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>If set to true, and the plan is not found, a new plan will be created.
-In this situation, `update_mask` is ignored. </p></td>
+ <td><p>The accuracy is the number of digits after the decimal point. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>google_timestamp</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>zone</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Zone is the time zone abbreviations in timezone database such as &#34;PDT&#34;,
+&#34;PST&#34;. 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() </p></td>
+ </tr>
+
+ <tr>
+ <td>offset</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The offset is in seconds east of UTC </p></td>
+ </tr>
+
+ <tr>
+ <td>accuracy</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -11471,8 +11255,8 @@ In this situation, `update_mask` is ignored. </p></td>
- <h3 id="bytebase.v1.PlanCheckRun.Result.Type">PlanCheckRun.Result.Type</h3>
- <p></p>
+ <h3 id="bytebase.v1.Advice.Level">Advice.Level</h3>
+ <p>Level represents the severity level of the advice.</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -11480,34 +11264,34 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>TYPE_UNSPECIFIED</td>
+ <td>ADVICE_LEVEL_UNSPECIFIED</td>
<td>0</td>
- <td><p></p></td>
+ <td><p>Unspecified advice level.</p></td>
</tr>
<tr>
- <td>STATEMENT_ADVISE</td>
+ <td>SUCCESS</td>
<td>1</td>
- <td><p></p></td>
+ <td><p>Success status indicating the check passed without issues.</p></td>
</tr>
<tr>
- <td>STATEMENT_SUMMARY_REPORT</td>
+ <td>WARNING</td>
<td>2</td>
- <td><p></p></td>
+ <td><p>Warning status indicating potential issues that should be reviewed.</p></td>
</tr>
<tr>
- <td>GHOST_SYNC</td>
+ <td>ERROR</td>
<td>3</td>
- <td><p></p></td>
+ <td><p>Error status indicating critical issues that must be addressed.</p></td>
</tr>
</tbody>
</table>
- <h3 id="bytebase.v1.PlanCheckRun.Status">PlanCheckRun.Status</h3>
- <p></p>
+ <h3 id="bytebase.v1.Advice.RuleType">Advice.RuleType</h3>
+ <p>RuleType indicates the source of the linting rule.</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -11515,171 +11299,312 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>STATUS_UNSPECIFIED</td>
+ <td>RULE_TYPE_UNSPECIFIED</td>
<td>0</td>
- <td><p></p></td>
+ <td><p>Unspecified rule type.</p></td>
</tr>
<tr>
- <td>RUNNING</td>
+ <td>PARSER_BASED</td>
<td>1</td>
- <td><p></p></td>
+ <td><p>Parser-based rule enforced by the built-in SQL parser.
+These are non-configurable, mandatory checks for schema health.</p></td>
</tr>
<tr>
- <td>DONE</td>
+ <td>AI_POWERED</td>
<td>2</td>
- <td><p></p></td>
+ <td><p>AI-powered rule defined by user in natural language.
+These are custom, flexible checks powered by AI models.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.QueryOption.MSSQLExplainFormat">QueryOption.MSSQLExplainFormat</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>MSSQL_EXPLAIN_FORMAT_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>defaults to SHOWPLAN_ALL</p></td>
</tr>
<tr>
- <td>FAILED</td>
- <td>3</td>
- <td><p></p></td>
+ <td>MSSQL_EXPLAIN_FORMAT_ALL</td>
+ <td>1</td>
+ <td><p>SHOWPLAN_ALL</p></td>
</tr>
<tr>
- <td>CANCELED</td>
- <td>4</td>
- <td><p></p></td>
+ <td>MSSQL_EXPLAIN_FORMAT_XML</td>
+ <td>2</td>
+ <td><p>SHOWPLAN_XML</p></td>
</tr>
</tbody>
</table>
-
-
-
-
- <h3 id="bytebase.v1.PlanService">PlanService</h3>
- <p>PlanService manages deployment plans for database changes.</p>
+ <h3 id="bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</h3>
+ <p></p>
<table class="enum-table">
<thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
</thead>
<tbody>
<tr>
- <td>GetPlan</td>
- <td><a href="#bytebase.v1.GetPlanRequest">GetPlanRequest</a></td>
- <td><a href="#bytebase.v1.Plan">Plan</a></td>
- <td><p>Retrieves a deployment plan by name.
-Permissions required: bb.plans.get</p></td>
+ <td>REDIS_RUN_COMMANDS_ON_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>UNSPECIFIED defaults to SINGLE_NODE.</p></td>
</tr>
<tr>
- <td>ListPlans</td>
- <td><a href="#bytebase.v1.ListPlansRequest">ListPlansRequest</a></td>
- <td><a href="#bytebase.v1.ListPlansResponse">ListPlansResponse</a></td>
- <td><p>Lists deployment plans in a project.
-Permissions required: bb.plans.list</p></td>
+ <td>SINGLE_NODE</td>
+ <td>1</td>
+ <td><p>Execute Redis commands on a single node in the cluster.</p></td>
</tr>
<tr>
- <td>CreatePlan</td>
- <td><a href="#bytebase.v1.CreatePlanRequest">CreatePlanRequest</a></td>
- <td><a href="#bytebase.v1.Plan">Plan</a></td>
- <td><p>Creates a new deployment plan.
-Permissions required: bb.plans.create</p></td>
+ <td>ALL_NODES</td>
+ <td>2</td>
+ <td><p>Execute Redis commands on all nodes in the cluster for cluster-wide operations.</p></td>
</tr>
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.QueryResult.CommandError.Type">QueryResult.CommandError.Type</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>UpdatePlan</td>
- <td><a href="#bytebase.v1.UpdatePlanRequest">UpdatePlanRequest</a></td>
- <td><a href="#bytebase.v1.Plan">Plan</a></td>
- <td><p>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)</p></td>
+ <td>TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
</tr>
<tr>
- <td>GetPlanCheckRun</td>
- <td><a href="#bytebase.v1.GetPlanCheckRunRequest">GetPlanCheckRunRequest</a></td>
- <td><a href="#bytebase.v1.PlanCheckRun">PlanCheckRun</a></td>
- <td><p>Gets the plan check run for a deployment plan.
-Permissions required: bb.planCheckRuns.get</p></td>
+ <td>DDL</td>
+ <td>1</td>
+ <td><p></p></td>
</tr>
<tr>
- <td>RunPlanChecks</td>
- <td><a href="#bytebase.v1.RunPlanChecksRequest">RunPlanChecksRequest</a></td>
- <td><a href="#bytebase.v1.RunPlanChecksResponse">RunPlanChecksResponse</a></td>
- <td><p>Executes validation checks on a deployment plan.
-Permissions required: bb.planCheckRuns.run</p></td>
+ <td>DML</td>
+ <td>2</td>
+ <td><p></p></td>
</tr>
<tr>
- <td>CancelPlanCheckRun</td>
- <td><a href="#bytebase.v1.CancelPlanCheckRunRequest">CancelPlanCheckRunRequest</a></td>
- <td><a href="#bytebase.v1.CancelPlanCheckRunResponse">CancelPlanCheckRunResponse</a></td>
- <td><p>Cancels the plan check run for a deployment plan.
-Permissions required: bb.planCheckRuns.run</p></td>
+ <td>NON_READ_ONLY</td>
+ <td>3</td>
+ <td><p></p></td>
</tr>
</tbody>
</table>
-
-
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
- <thead>
+
+ <h3 id="bytebase.v1.QueryResult.Message.Level">QueryResult.Message.Level</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
+ <td>LEVEL_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified message level.</p></td>
</tr>
- </thead>
- <tbody>
-
-
<tr>
- <td>GetPlan</td>
- <td>GET</td>
- <td>/v1/{name=projects/*/plans/*}</td>
- <td></td>
+ <td>INFO</td>
+ <td>1</td>
+ <td><p>Informational message.</p></td>
</tr>
-
-
-
<tr>
- <td>ListPlans</td>
- <td>GET</td>
- <td>/v1/{parent=projects/*}/plans</td>
- <td></td>
+ <td>WARNING</td>
+ <td>2</td>
+ <td><p>Warning message indicating potential issues.</p></td>
</tr>
-
-
-
<tr>
- <td>CreatePlan</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*}/plans</td>
- <td>plan</td>
+ <td>DEBUG</td>
+ <td>3</td>
+ <td><p>Debug message for development and troubleshooting.</p></td>
</tr>
-
-
-
<tr>
- <td>UpdatePlan</td>
- <td>PATCH</td>
- <td>/v1/{plan.name=projects/*/plans/*}</td>
- <td>plan</td>
+ <td>LOG</td>
+ <td>4</td>
+ <td><p>General log message.</p></td>
+ </tr>
+
+ <tr>
+ <td>NOTICE</td>
+ <td>5</td>
+ <td><p>Notice message for important information.</p></td>
+ </tr>
+
+ <tr>
+ <td>EXCEPTION</td>
+ <td>6</td>
+ <td><p>Exception message indicating error conditions.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.SQLService">SQLService</h3>
+ <p>SQLService executes SQL queries and manages query operations.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>Query</td>
+ <td><a href="#bytebase.v1.QueryRequest">QueryRequest</a></td>
+ <td><a href="#bytebase.v1.QueryResponse">QueryResponse</a></td>
+ <td><p>Executes a read-only SQL query against a database.
+Permissions required: bb.databases.get</p></td>
+ </tr>
+
+ <tr>
+ <td>AdminExecute</td>
+ <td><a href="#bytebase.v1.AdminExecuteRequest">AdminExecuteRequest</a> stream</td>
+ <td><a href="#bytebase.v1.AdminExecuteResponse">AdminExecuteResponse</a> stream</td>
+ <td><p>Executes SQL with admin privileges via streaming connection.
+Permissions required: bb.sql.admin</p></td>
+ </tr>
+
+ <tr>
+ <td>SearchQueryHistories</td>
+ <td><a href="#bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</a></td>
+ <td><a href="#bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</a></td>
+ <td><p>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&#39;s own query histories)</p></td>
+ </tr>
+
+ <tr>
+ <td>ListQueryHistories</td>
+ <td><a href="#bytebase.v1.ListQueryHistoriesRequest">ListQueryHistoriesRequest</a></td>
+ <td><a href="#bytebase.v1.ListQueryHistoriesResponse">ListQueryHistoriesResponse</a></td>
+ <td><p>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</p></td>
+ </tr>
+
+ <tr>
+ <td>GetQueryHistory</td>
+ <td><a href="#bytebase.v1.GetQueryHistoryRequest">GetQueryHistoryRequest</a></td>
+ <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>
+ <td><p>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&#39;s own query history)</p></td>
+ </tr>
+
+ <tr>
+ <td>Export</td>
+ <td><a href="#bytebase.v1.ExportRequest">ExportRequest</a></td>
+ <td><a href="#bytebase.v1.ExportResponse">ExportResponse</a></td>
+ <td><p>Exports query results to a file format.
+Permissions required: bb.databases.get</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+ <h4>Methods with deprecated option</h4>
+ <table>
+ <thead>
+ <tr>
+ <td>Method Name</td>
+ <td>Option</td>
+ </tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>SearchQueryHistories</td>
+ <td><p>true</p></td>
+ </tr>
+
+ <tr>
+ <td>ListQueryHistories</td>
+ <td><p>true</p></td>
+ </tr>
+
+ <tr>
+ <td>GetQueryHistory</td>
+ <td><p>true</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
+ <thead>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
+ </thead>
+ <tbody>
+
+
+
+ <tr>
+ <td>Query</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*/databases/*}:query</td>
+ <td>*</td>
+ </tr>
+
+ <tr>
+ <td>Query</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/instances/*/databases/*}:query</td>
+ <td>*</td>
</tr>
<tr>
- <td>GetPlanCheckRun</td>
+ <td>AdminExecute</td>
<td>GET</td>
- <td>/v1/{name=projects/*/plans/*/planCheckRun}</td>
+ <td>/v1:adminExecute</td>
<td></td>
</tr>
@@ -11687,19 +11612,16 @@ Permissions required: bb.planCheckRuns.run</p></td>
<tr>
- <td>RunPlanChecks</td>
+ <td>Export</td>
<td>POST</td>
- <td>/v1/{name=projects/*/plans/*}:runPlanChecks</td>
+ <td>/v1/{name=instances/*/databases/*}:export</td>
<td>*</td>
</tr>
-
-
-
<tr>
- <td>CancelPlanCheckRun</td>
+ <td>Export</td>
<td>POST</td>
- <td>/v1/{name=projects/*/plans/*/planCheckRun}:cancel</td>
+ <td>/v1/{name=projects/*/instances/*/databases/*}:export</td>
<td>*</td>
</tr>
@@ -11711,12 +11633,12 @@ Permissions required: bb.planCheckRuns.run</p></td>
<div class="file-heading">
- <h2 id="v1/issue_service.proto">v1/issue_service.proto</h2><a href="#title">Top</a>
+ <h2 id="v1/plan_service.proto">v1/plan_service.proto</h2><a href="#title">Top</a>
</div>
<p></p>
- <h3 id="bytebase.v1.ApprovalFlow">ApprovalFlow</h3>
+ <h3 id="bytebase.v1.CancelPlanCheckRunRequest">CancelPlanCheckRunRequest</h3>
<p></p>
@@ -11727,10 +11649,11 @@ Permissions required: bb.planCheckRuns.run</p></td>
<tbody>
<tr>
- <td>roles</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The roles required for approval in order. </p></td>
+ <td></td>
+ <td><p>The name of the plan check run to cancel.
+Format: projects/{project}/plans/{plan}/planCheckRun </p></td>
</tr>
</tbody>
@@ -11740,7 +11663,14 @@ Permissions required: bb.planCheckRuns.run</p></td>
- <h3 id="bytebase.v1.ApprovalTemplate">ApprovalTemplate</h3>
+ <h3 id="bytebase.v1.CancelPlanCheckRunResponse">CancelPlanCheckRunResponse</h3>
+ <p></p>
+
+
+
+
+
+ <h3 id="bytebase.v1.CreatePlanRequest">CreatePlanRequest</h3>
<p></p>
@@ -11751,24 +11681,18 @@ Permissions required: bb.planCheckRuns.run</p></td>
<tbody>
<tr>
- <td>flow</td>
- <td><a href="#bytebase.v1.ApprovalFlow">ApprovalFlow</a></td>
- <td></td>
- <td><p>The approval flow definition. </p></td>
- </tr>
-
- <tr>
- <td>title</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The title of the approval template. </p></td>
+ <td><p>The parent project where this plan will be created.
+Format: projects/{project} </p></td>
</tr>
<tr>
- <td>description</td>
- <td><a href="#string">string</a></td>
+ <td>plan</td>
+ <td><a href="#bytebase.v1.Plan">Plan</a></td>
<td></td>
- <td><p>The description of the approval template. </p></td>
+ <td><p>The plan to create. </p></td>
</tr>
</tbody>
@@ -11778,7 +11702,7 @@ Permissions required: bb.planCheckRuns.run</p></td>
- <h3 id="bytebase.v1.ApproveIssueRequest">ApproveIssueRequest</h3>
+ <h3 id="bytebase.v1.GetPlanCheckRunRequest">GetPlanCheckRunRequest</h3>
<p></p>
@@ -11792,15 +11716,8 @@ Permissions required: bb.planCheckRuns.run</p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the issue to add an approver.
-Format: projects/{project}/issues/{issue} </p></td>
- </tr>
-
- <tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The comment explaining the approval decision. </p></td>
+ <td><p>The name of the plan check run to retrieve.
+Format: projects/{project}/plans/{plan}/planCheckRun </p></td>
</tr>
</tbody>
@@ -11810,7 +11727,7 @@ Format: projects/{project}/issues/{issue} </p></td>
- <h3 id="bytebase.v1.BatchUpdateIssuesStatusRequest">BatchUpdateIssuesStatusRequest</h3>
+ <h3 id="bytebase.v1.GetPlanRequest">GetPlanRequest</h3>
<p></p>
@@ -11821,35 +11738,11 @@ Format: projects/{project}/issues/{issue} </p></td>
<tbody>
<tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>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. </p></td>
- </tr>
-
- <tr>
- <td>issues</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The list of issues to update.
-Format: projects/{project}/issues/{issue} </p></td>
- </tr>
-
- <tr>
- <td>status</td>
- <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>
- <td></td>
- <td><p>The new status. </p></td>
- </tr>
-
- <tr>
- <td>reason</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The reason for the status change. </p></td>
+ <td><p>The name of the plan to retrieve.
+Format: projects/{project}/plans/{plan} </p></td>
</tr>
</tbody>
@@ -11859,14 +11752,7 @@ Format: projects/{project}/issues/{issue} </p></td>
- <h3 id="bytebase.v1.BatchUpdateIssuesStatusResponse">BatchUpdateIssuesStatusResponse</h3>
- <p></p>
-
-
-
-
-
- <h3 id="bytebase.v1.CreateIssueCommentRequest">CreateIssueCommentRequest</h3>
+ <h3 id="bytebase.v1.ListPlansRequest">ListPlansRequest</h3>
<p></p>
@@ -11880,47 +11766,53 @@ Format: projects/{project}/issues/{issue} </p></td>
<td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The issue name
-Format: projects/{project}/issues/{issue} </p></td>
+ <td><p>The parent, which owns this collection of plans.
+Format: projects/{project}
+Use &#34;projects/-&#34; to list all plans from all projects. </p></td>
</tr>
<tr>
- <td>issue_comment</td>
- <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The comment to create. </p></td>
+ <td><p>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. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.CreateIssueRequest">CreateIssueRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>parent</td>
+ <td>page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent, which owns this collection of issues.
-Format: projects/{project} </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>issue</td>
- <td><a href="#bytebase.v1.Issue">Issue</a></td>
+ <td>filter</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The issue to create. </p></td>
+ <td><p>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 &#34;users/{email or id}&#34; format, support &#34;==&#34; operator.
+- create_time: the plan create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator.
+- has_rollout: whether the plan has rollout, support &#34;==&#34; operator, the value should be &#34;true&#34; or &#34;false&#34;.
+- title: the plan title, support &#34;==&#34; operator for exact match and &#34;.contains()&#34; operator for case-insensitive substring match.
+- spec_type: the plan spec config type, support &#34;==&#34; operator, the value should be &#34;create_database_config&#34; or &#34;change_database_config&#34;.
+- state: the plan state, support &#34;==&#34; operator, the value should be &#34;ACTIVE&#34; or &#34;DELETED&#34;.
+
+For example:
+creator == &#34;users/[email protected]&#34; &amp;&amp; create_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34;
+title == &#34;My Plan&#34;
+title.contains(&#34;database migration&#34;)
+spec_type == &#34;change_database_config&#34;
+state == &#34;ACTIVE&#34; </p></td>
</tr>
</tbody>
@@ -11930,7 +11822,7 @@ Format: projects/{project} </p></td>
- <h3 id="bytebase.v1.GetIssueRequest">GetIssueRequest</h3>
+ <h3 id="bytebase.v1.ListPlansResponse">ListPlansResponse</h3>
<p></p>
@@ -11941,18 +11833,18 @@ Format: projects/{project} </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the issue to retrieve.
-Format: projects/{project}/issues/{issue} </p></td>
+ <td>plans</td>
+ <td><a href="#bytebase.v1.Plan">Plan</a></td>
+ <td>repeated</td>
+ <td><p>The plans from the specified request. </p></td>
</tr>
<tr>
- <td>force</td>
- <td><a href="#bool">bool</a></td>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>If set to true, bypass cache and fetch the latest data. </p></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
</tr>
</tbody>
@@ -11962,7 +11854,7 @@ Format: projects/{project}/issues/{issue} </p></td>
- <h3 id="bytebase.v1.Issue">Issue</h3>
+ <h3 id="bytebase.v1.Plan">Plan</h3>
<p></p>
@@ -11976,50 +11868,46 @@ Format: projects/{project}/issues/{issue} </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the issue.
-Format: projects/{project}/issues/{issue} </p></td>
+ <td><p>The name of the plan.
+`plan` is a system generated ID.
+Format: projects/{project}/plans/{plan} </p></td>
</tr>
<tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
+ <td>state</td>
+ <td><a href="#bytebase.v1.State">State</a></td>
<td></td>
- <td><p>The title of the issue. </p></td>
+ <td><p>The state of the plan. </p></td>
</tr>
<tr>
- <td>description</td>
+ <td>issue</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The description of the issue. </p></td>
+ <td><p>The issue associated with the plan.
+Can be empty.
+Format: projects/{project}/issues/{issue} </p></td>
</tr>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.Issue.Type">Issue.Type</a></td>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The title of the plan. </p></td>
</tr>
<tr>
- <td>status</td>
- <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>
+ <td>description</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The status of the issue. </p></td>
+ <td><p>The description of the plan. </p></td>
</tr>
<tr>
- <td>approvers</td>
- <td><a href="#bytebase.v1.Issue.Approver">Issue.Approver</a></td>
+ <td>specs</td>
+ <td><a href="#bytebase.v1.Plan.Spec">Plan.Spec</a></td>
<td>repeated</td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>approval_template</td>
- <td><a href="#bytebase.v1.ApprovalTemplate">ApprovalTemplate</a></td>
- <td></td>
- <td><p>The approval template for the issue. </p></td>
+ <td><p>The deployment specs for the plan. </p></td>
</tr>
<tr>
@@ -12044,55 +11932,55 @@ Format: projects/{project}/issues/{issue} </p></td>
</tr>
<tr>
- <td>plan</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The plan associated with the issue.
-Can be empty.
-Format: projects/{project}/plans/{plan} </p></td>
+ <td>plan_check_run_status_count</td>
+ <td><a href="#bytebase.v1.Plan.PlanCheckRunStatusCountEntry">Plan.PlanCheckRunStatusCountEntry</a></td>
+ <td>repeated</td>
+ <td><p>The status count of the latest plan check runs.
+Keys are:
+- SUCCESS
+- WARNING
+- ERROR
+- RUNNING </p></td>
</tr>
<tr>
- <td>role_grant</td>
- <td><a href="#bytebase.v1.RoleGrant">RoleGrant</a></td>
+ <td>has_rollout</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Used if the issue type is ROLE_GRANT. </p></td>
+ <td><p>Whether the plan has started the rollout. </p></td>
</tr>
<tr>
- <td>risk_level</td>
- <td><a href="#bytebase.v1.RiskLevel">RiskLevel</a></td>
+ <td>approval_status</td>
+ <td><a href="#bytebase.v1.ApprovalStatus">ApprovalStatus</a></td>
<td></td>
- <td><p>The risk level of the issue. </p></td>
+ <td><p>The approval status of the linked issue.
+Unspecified when no linked issue exists or the linked issue is a draft. </p></td>
</tr>
<tr>
- <td>labels</td>
- <td><a href="#string">string</a></td>
+ <td>rollout_stage_summaries</td>
+ <td><a href="#bytebase.v1.Plan.RolloutStageSummary">Plan.RolloutStageSummary</a></td>
<td>repeated</td>
- <td><p>Labels attached to the issue for categorization and filtering. </p></td>
+ <td><p>Per-stage rollout status summary.
+Ordered by environment deployment order. Empty when no rollout exists. </p></td>
</tr>
<tr>
- <td>approval_status</td>
- <td><a href="#bytebase.v1.ApprovalStatus">ApprovalStatus</a></td>
+ <td>issue_status</td>
+ <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>
<td></td>
- <td><p>The overall approval status for the issue. </p></td>
+ <td><p>The lifecycle status of the linked issue.
+Unspecified when no linked issue exists. </p></td>
</tr>
<tr>
- <td>access_grant</td>
+ <td>last_plan_editor</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The access grant associated with this issue.
-Format: projects/{project}/accessGrants/{access_grant} </p></td>
- </tr>
-
- <tr>
- <td>draft</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether this issue is a Draft Review Issue. </p></td>
+ <td><p>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. </p></td>
</tr>
</tbody>
@@ -12102,8 +11990,8 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>
- <h3 id="bytebase.v1.Issue.Approver">Issue.Approver</h3>
- <p>Approvers and their approval status for the issue.</p>
+ <h3 id="bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</h3>
+ <p></p>
<table class="field-table">
@@ -12113,17 +12001,35 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>
<tbody>
<tr>
- <td>status</td>
- <td><a href="#bytebase.v1.Issue.Approver.Status">Issue.Approver.Status</a></td>
+ <td>targets</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The list of targets.
+Multi-database format: [instances/{instance-id}/databases/{database-name}].
+Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. </p></td>
+ </tr>
+
+ <tr>
+ <td>sheet</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The new status. </p></td>
+ <td><p>The resource name of the sheet.
+Format: projects/{project}/sheets/{sheet} </p></td>
</tr>
<tr>
- <td>principal</td>
+ <td>release</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: users/[email protected] </p></td>
+ <td><p>The resource name of the release.
+Format: projects/{project}/releases/{release} </p></td>
+ </tr>
+
+ <tr>
+ <td>enable_prior_backup</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>If set, a backup of the modified data will be created automatically before any changes are applied. </p></td>
</tr>
</tbody>
@@ -12133,8 +12039,8 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>
- <h3 id="bytebase.v1.IssueComment">IssueComment</h3>
- <p>A comment on an issue.</p>
+ <h3 id="bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</h3>
+ <p></p>
<table class="field-table">
@@ -12144,73 +12050,93 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>target</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: projects/{project}/issues/{issue}/issueComments/{issueComment-uid} </p></td>
+ <td><p>The resource name of the instance on which the database is created.
+Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>
</tr>
<tr>
- <td>comment</td>
+ <td>database</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The text content of the comment. </p></td>
+ <td><p>The name of the database to create. </p></td>
</tr>
<tr>
- <td>payload</td>
+ <td>table</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>TODO: use struct message instead. </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>create_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>character_set</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>character_set is the character set of the database. </p></td>
</tr>
<tr>
- <td>update_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>collation</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>collation is the collation of the database. </p></td>
</tr>
<tr>
- <td>creator</td>
+ <td>cluster</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: users/{email} </p></td>
+ <td><p>cluster is the cluster of the database. This is only applicable to ClickHouse for &#34;ON CLUSTER &lt;&lt;cluster&gt;&gt;&#34;. </p></td>
</tr>
<tr>
- <td>approval</td>
- <td><a href="#bytebase.v1.IssueComment.Approval">IssueComment.Approval</a></td>
+ <td>owner</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Approval event. </p></td>
+ <td><p>owner is the owner of the database. This is only applicable to Postgres for &#34;WITH OWNER &lt;&lt;owner&gt;&gt;&#34;. </p></td>
</tr>
<tr>
- <td>issue_update</td>
- <td><a href="#bytebase.v1.IssueComment.IssueUpdate">IssueComment.IssueUpdate</a></td>
+ <td>environment</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Issue update event. </p></td>
+ <td><p>The environment resource.
+Format: environments/prod where prod is the environment resource ID. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.Plan.PlanCheckRunStatusCountEntry">Plan.PlanCheckRunStatusCountEntry</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>plan_update</td>
- <td><a href="#bytebase.v1.IssueComment.PlanUpdate">IssueComment.PlanUpdate</a></td>
+ <td>key</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Plan update event. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>review_submission</td>
- <td><a href="#bytebase.v1.IssueComment.ReviewSubmission">IssueComment.ReviewSubmission</a></td>
+ <td>value</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>Review submission event. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -12220,8 +12146,8 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>
- <h3 id="bytebase.v1.IssueComment.Approval">IssueComment.Approval</h3>
- <p>Approval event information.</p>
+ <h3 id="bytebase.v1.Plan.RolloutStageSummary">Plan.RolloutStageSummary</h3>
+ <p></p>
<table class="field-table">
@@ -12231,10 +12157,18 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>
<tbody>
<tr>
- <td>status</td>
- <td><a href="#bytebase.v1.IssueComment.Approval.Status">IssueComment.Approval.Status</a></td>
+ <td>stage</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The approval status. </p></td>
+ <td><p>The stage resource name.
+Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>
+ </tr>
+
+ <tr>
+ <td>task_status_counts</td>
+ <td><a href="#bytebase.v1.Plan.TaskStatusCount">Plan.TaskStatusCount</a></td>
+ <td>repeated</td>
+ <td><p>Task status counts for this stage. </p></td>
</tr>
</tbody>
@@ -12244,8 +12178,8 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>
- <h3 id="bytebase.v1.IssueComment.IssueUpdate">IssueComment.IssueUpdate</h3>
- <p>Issue update event information.</p>
+ <h3 id="bytebase.v1.Plan.Spec">Plan.Spec</h3>
+ <p></p>
<table class="field-table">
@@ -12255,59 +12189,55 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>
<tbody>
<tr>
- <td>from_title</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>to_title</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>from_description</td>
+ <td>id</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p> </p></td>
+ <td></td>
+ <td><p>A UUID4 string that uniquely identifies the Spec. </p></td>
</tr>
<tr>
- <td>to_description</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
+ <td>create_database_config</td>
+ <td><a href="#bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>from_status</td>
- <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>
- <td>optional</td>
+ <td>change_database_config</td>
+ <td><a href="#bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
- <tr>
- <td>to_status</td>
- <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>
- <td>optional</td>
- <td><p> </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.Plan.TaskStatusCount">Plan.TaskStatusCount</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>from_labels</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td>status</td>
+ <td><a href="#bytebase.v1.Task.Status">Task.Status</a></td>
+ <td></td>
+ <td><p>The task status. </p></td>
</tr>
<tr>
- <td>to_labels</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td>count</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The number of tasks in the status. </p></td>
</tr>
</tbody>
@@ -12317,8 +12247,8 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>
- <h3 id="bytebase.v1.IssueComment.PlanUpdate">IssueComment.PlanUpdate</h3>
- <p>Plan update event information (snapshot of plan.config.specs before</p><p>and after a PlanService.UpdatePlan call that mutated specs).</p>
+ <h3 id="bytebase.v1.PlanCheckRun">PlanCheckRun</h3>
+ <p></p>
<table class="field-table">
@@ -12328,19 +12258,40 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>
<tbody>
<tr>
- <td>from_specs</td>
- <td><a href="#bytebase.v1.Plan.Spec">Plan.Spec</a></td>
- <td>repeated</td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Format: projects/{project}/plans/{plan}/planCheckRun </p></td>
+ </tr>
+
+ <tr>
+ <td>status</td>
+ <td><a href="#bytebase.v1.PlanCheckRun.Status">PlanCheckRun.Status</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>to_specs</td>
- <td><a href="#bytebase.v1.Plan.Spec">Plan.Spec</a></td>
+ <td>results</td>
+ <td><a href="#bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</a></td>
<td>repeated</td>
<td><p> </p></td>
</tr>
+ <tr>
+ <td>error</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>error is set if the Status is FAILED. </p></td>
+ </tr>
+
+ <tr>
+ <td>create_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
</tbody>
</table>
@@ -12348,14 +12299,7 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>
- <h3 id="bytebase.v1.IssueComment.ReviewSubmission">IssueComment.ReviewSubmission</h3>
- <p>Review submission event information.</p>
-
-
-
-
-
- <h3 id="bytebase.v1.ListIssueCommentsRequest">ListIssueCommentsRequest</h3>
+ <h3 id="bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</h3>
<p></p>
@@ -12366,31 +12310,60 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>status</td>
+ <td><a href="#bytebase.v1.Advice.Level">Advice.Level</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: projects/{projects}/issues/{issue} </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>page_size</td>
+ <td>content</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>code</td>
<td><a href="#int32">int32</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>page_token</td>
+ <td>target</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>Target identification for consolidated results.
+Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} </p></td>
+ </tr>
+
+ <tr>
+ <td>type</td>
+ <td><a href="#bytebase.v1.PlanCheckRun.Result.Type">PlanCheckRun.Result.Type</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>sql_summary_report</td>
+ <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>sql_review_report</td>
+ <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -12400,7 +12373,7 @@ the call that provided the page token. </p></td>
- <h3 id="bytebase.v1.ListIssueCommentsResponse">ListIssueCommentsResponse</h3>
+ <h3 id="bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</h3>
<p></p>
@@ -12411,18 +12384,17 @@ the call that provided the page token. </p></td>
<tbody>
<tr>
- <td>issue_comments</td>
- <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>
- <td>repeated</td>
- <td><p>The issue comments from the specified request. </p></td>
+ <td>start_position</td>
+ <td><a href="#bytebase.v1.Position">Position</a></td>
+ <td></td>
+ <td><p>Position of the SQL statement. </p></td>
</tr>
<tr>
- <td>next_page_token</td>
- <td><a href="#string">string</a></td>
+ <td>end_position</td>
+ <td><a href="#bytebase.v1.Position">Position</a></td>
<td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -12432,7 +12404,7 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.ListIssuesRequest">ListIssuesRequest</h3>
+ <h3 id="bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</h3>
<p></p>
@@ -12443,110 +12415,17 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The parent, which owns this collection of issues.
-Format: projects/{project} </p></td>
+ <td>statement_types</td>
+ <td><a href="#bytebase.v1.StatementType">StatementType</a></td>
+ <td>repeated</td>
+ <td><p>statement_types are the types of statements that are found in the sql. </p></td>
</tr>
<tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
+ <td>affected_rows</td>
+ <td><a href="#int64">int64</a></td>
<td></td>
- <td><p>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. </p></td>
- </tr>
-
- <tr>
- <td>page_token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>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. </p></td>
- </tr>
-
- <tr>
- <td>filter</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>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 &#34;users/{email or id}&#34; format, support &#34;==&#34; operator.
-- status: the issue status, support &#34;==&#34; and &#34;in&#34; operator, check the IssueStatus enum for the values.
-- create_time: issue create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator.
-- type: the issue type, support &#34;==&#34; and &#34;in&#34; operator, check the Type enum in the Issue message for the values.
-- labels: the issue labels, support &#34;==&#34; and &#34;in&#34; operator.
-- risk_level: the issue risk level, support &#34;in&#34; operator, check the RiskLevel enum for the values.
-- approval_status: issue approval status, support &#34;==&#34; operator.
-- current_approver: the issue approver, should in &#34;users/{email} format&#34;, support &#34;==&#34; operator.
-
-For example:
-creator == &#34;users/[email protected]&#34; &amp;&amp; status in [&#34;OPEN&#34;, &#34;DONE&#34;]
-status == &#34;CANCELED&#34; &amp;&amp; type == &#34;DATABASE_CHANGE&#34;
-labels in [&#34;label1&#34;, &#34;label2&#34;]
-risk_level in [&#34;HIGH&#34;, &#34;MODERATE&#34;]
-create_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34; </p></td>
- </tr>
-
- <tr>
- <td>query</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Query is the query statement. </p></td>
- </tr>
-
- <tr>
- <td>order_by</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The order by of issues.
-Support:
-- create_time
-- update_time
-The default sorting order is ascending.
-For example:
-- order_by = &#34;create_time desc&#34;
-- order_by = &#34;update_time asc&#34; </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ListIssuesResponse">ListIssuesResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>issues</td>
- <td><a href="#bytebase.v1.Issue">Issue</a></td>
- <td>repeated</td>
- <td><p>The issues from the specified request. </p></td>
- </tr>
-
- <tr>
- <td>next_page_token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -12556,7 +12435,7 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.RejectIssueRequest">RejectIssueRequest</h3>
+ <h3 id="bytebase.v1.RunPlanChecksRequest">RunPlanChecksRequest</h3>
<p></p>
@@ -12570,15 +12449,17 @@ If this field is omitted, there are no subsequent pages. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the issue to add a rejection.
-Format: projects/{project}/issues/{issue} </p></td>
+ <td><p>The plan to run plan checks.
+Format: projects/{project}/plans/{plan} </p></td>
</tr>
<tr>
- <td>comment</td>
+ <td>spec_id</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The comment explaining the rejection decision. </p></td>
+ <td>optional</td>
+ <td><p>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. </p></td>
</tr>
</tbody>
@@ -12588,39 +12469,14 @@ Format: projects/{project}/issues/{issue} </p></td>
- <h3 id="bytebase.v1.RequestIssueRequest">RequestIssueRequest</h3>
+ <h3 id="bytebase.v1.RunPlanChecksResponse">RunPlanChecksResponse</h3>
<p></p>
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the issue to request a issue.
-Format: projects/{project}/issues/{issue} </p></td>
- </tr>
-
- <tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The comment explaining the request. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
- <h3 id="bytebase.v1.RetryIssueApprovalRequest">RetryIssueApprovalRequest</h3>
+ <h3 id="bytebase.v1.UpdatePlanRequest">UpdatePlanRequest</h3>
<p></p>
@@ -12631,75 +12487,28 @@ Format: projects/{project}/issues/{issue} </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>plan</td>
+ <td><a href="#bytebase.v1.Plan">Plan</a></td>
<td></td>
- <td><p>The name of the issue whose approval-finding should be retried.
-Format: projects/{project}/issues/{issue} </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ReviewRun">ReviewRun</h3>
- <p></p>
+ <td><p>The plan to update.
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun}
-The {reviewRun} id is the reviewer: &#34;rule&#34; or &#34;guideline&#34;. The name
-addresses a slot, not an execution. </p></td>
- </tr>
-
- <tr>
- <td>type</td>
- <td><a href="#bytebase.v1.ReviewRun.Type">ReviewRun.Type</a></td>
- <td></td>
- <td><p>Derived from the name. </p></td>
- </tr>
-
- <tr>
- <td>status</td>
- <td><a href="#bytebase.v1.ReviewRun.Status">ReviewRun.Status</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>create_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p>When the current run was triggered. Reset on every re-run. </p></td>
+The plan&#39;s `name` field is used to identify the plan to update.
+Format: projects/{project}/plans/{plan} </p></td>
</tr>
<tr>
- <td>end_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
<td></td>
- <td><p>When the run reached a terminal status. Unset while AVAILABLE or
-RUNNING. </p></td>
+ <td><p>The list of fields to update. </p></td>
</tr>
<tr>
- <td>error</td>
- <td><a href="#string">string</a></td>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>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). </p></td>
+ <td><p>If set to true, and the plan is not found, a new plan will be created.
+In this situation, `update_mask` is ignored. </p></td>
</tr>
</tbody>
@@ -12709,281 +12518,10 @@ review results on a DONE run). </p></td>
- <h3 id="bytebase.v1.RoleGrant">RoleGrant</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>role</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The requested role.
-Format: roles/EXPORTER. </p></td>
- </tr>
-
- <tr>
- <td>user</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The user to be granted.
-Format: users/{email}. </p></td>
- </tr>
-
- <tr>
- <td>condition</td>
- <td><a href="#google.type.Expr">google.type.Expr</a></td>
- <td></td>
- <td><p>The condition for the role. Same as the condition in IAM Binding message. </p></td>
- </tr>
-
- <tr>
- <td>expiration</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
- <td></td>
- <td><p>The duration for which the grant is valid. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
- <h3 id="bytebase.v1.RunReviewRequest">RunReviewRequest</h3>
+ <h3 id="bytebase.v1.PlanCheckRun.Result.Type">PlanCheckRun.Result.Type</h3>
<p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun} </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.SearchIssuesRequest">SearchIssuesRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The parent, which owns this collection of issues.
-Format: projects/{project}
-Use the wildcard &#34;projects/-&#34; 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. </p></td>
- </tr>
-
- <tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>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. </p></td>
- </tr>
-
- <tr>
- <td>page_token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>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. </p></td>
- </tr>
-
- <tr>
- <td>filter</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Filter is used to filter issues returned in the list.
-Check the filter field in the ListIssuesRequest message. </p></td>
- </tr>
-
- <tr>
- <td>query</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Query is the query statement. </p></td>
- </tr>
-
- <tr>
- <td>order_by</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The order by of issues.
-Support:
-- create_time
-- update_time
-The default sorting order is ascending.
-For example:
-- order_by = &#34;create_time desc&#34;
-- order_by = &#34;update_time asc&#34; </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.SearchIssuesResponse">SearchIssuesResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>issues</td>
- <td><a href="#bytebase.v1.Issue">Issue</a></td>
- <td>repeated</td>
- <td><p>The issues from the specified request. </p></td>
- </tr>
-
- <tr>
- <td>next_page_token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.UpdateIssueCommentRequest">UpdateIssueCommentRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The issue name
-Format: projects/{project}/issues/{issue} </p></td>
- </tr>
-
- <tr>
- <td>issue_comment</td>
- <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>
- <td></td>
- <td><p>The comment to update. </p></td>
- </tr>
-
- <tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
- <td></td>
- <td><p>The list of fields to update. </p></td>
- </tr>
-
- <tr>
- <td>allow_missing</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>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. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.UpdateIssueRequest">UpdateIssueRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>issue</td>
- <td><a href="#bytebase.v1.Issue">Issue</a></td>
- <td></td>
- <td><p>The issue to update.
-
-The issue&#39;s `name` field is used to identify the issue to update.
-Format: projects/{project}/issues/{issue} </p></td>
- </tr>
-
- <tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
- <td></td>
- <td><p>The list of fields to update. </p></td>
- </tr>
-
- <tr>
- <td>allow_missing</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>If set to true, and the issue is not found, a new issue will be created.
-In this situation, `update_mask` is ignored. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
-
-
- <h3 id="bytebase.v1.Issue.Approver.Status">Issue.Approver.Status</h3>
- <p>The approval status of an approver.</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -12991,34 +12529,34 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>STATUS_UNSPECIFIED</td>
+ <td>TYPE_UNSPECIFIED</td>
<td>0</td>
- <td><p>Unspecified status.</p></td>
+ <td><p></p></td>
</tr>
<tr>
- <td>PENDING</td>
+ <td>STATEMENT_ADVISE</td>
<td>1</td>
- <td><p>Awaiting approval.</p></td>
+ <td><p></p></td>
</tr>
<tr>
- <td>APPROVED</td>
+ <td>STATEMENT_SUMMARY_REPORT</td>
<td>2</td>
- <td><p>Approved.</p></td>
+ <td><p></p></td>
</tr>
<tr>
- <td>REJECTED</td>
+ <td>GHOST_SYNC</td>
<td>3</td>
- <td><p>Rejected.</p></td>
+ <td><p></p></td>
</tr>
</tbody>
</table>
- <h3 id="bytebase.v1.Issue.Type">Issue.Type</h3>
- <p>The type of issue.</p>
+ <h3 id="bytebase.v1.PlanCheckRun.Status">PlanCheckRun.Status</h3>
+ <p></p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -13026,135 +12564,35 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>TYPE_UNSPECIFIED</td>
+ <td>STATUS_UNSPECIFIED</td>
<td>0</td>
- <td><p>Unspecified issue type.</p></td>
+ <td><p></p></td>
</tr>
<tr>
- <td>DATABASE_CHANGE</td>
+ <td>RUNNING</td>
<td>1</td>
- <td><p>Database schema or data change.</p></td>
+ <td><p></p></td>
</tr>
<tr>
- <td>ROLE_GRANT</td>
+ <td>DONE</td>
<td>2</td>
- <td><p>Role grant request.</p></td>
+ <td><p></p></td>
</tr>
<tr>
- <td>ACCESS_GRANT</td>
- <td>4</td>
- <td><p>Temporary access grant request.</p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.IssueComment.Approval.Status">IssueComment.Approval.Status</h3>
- <p>Approval status values.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>STATUS_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified status.</p></td>
- </tr>
-
- <tr>
- <td>PENDING</td>
- <td>1</td>
- <td><p>Approval pending.</p></td>
- </tr>
-
- <tr>
- <td>APPROVED</td>
- <td>2</td>
- <td><p>Approved.</p></td>
- </tr>
-
- <tr>
- <td>REJECTED</td>
+ <td>FAILED</td>
<td>3</td>
- <td><p>Rejected.</p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.ReviewRun.Status">ReviewRun.Status</h3>
- <p>States follow task_run, minus PENDING (review needs no admission</p><p>control) and minus CANCELED (runs are side-effect-free until the fenced</p><p>completion transaction, so re-running supersedes instead of canceling).</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>STATUS_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>AVAILABLE</td>
- <td>1</td>
- <td><p>Created and claimable by any replica.</p></td>
- </tr>
-
- <tr>
- <td>RUNNING</td>
- <td>2</td>
<td><p></p></td>
</tr>
<tr>
- <td>DONE</td>
- <td>3</td>
- <td><p>Every (spec, target) unit was evaluated. DONE does not mean the
-review passed: whether problems remain is judged from open comments.</p></td>
- </tr>
-
- <tr>
- <td>FAILED</td>
+ <td>CANCELED</td>
<td>4</td>
- <td><p>At least one unit was not evaluated; the cause is in `error`.</p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.ReviewRun.Type">ReviewRun.Type</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
<td><p></p></td>
</tr>
- <tr>
- <td>RULE</td>
- <td>1</td>
- <td><p>Review against the standard rules.</p></td>
- </tr>
-
- <tr>
- <td>GUIDELINE</td>
- <td>2</td>
- <td><p>Review against natural-language guidelines, performed by AI.</p></td>
- </tr>
-
</tbody>
</table>
@@ -13162,8 +12600,8 @@ review passed: whether problems remain is judged from open comments.</p></td>
- <h3 id="bytebase.v1.IssueService">IssueService</h3>
- <p>IssueService manages issues for tracking database changes and tasks.</p>
+ <h3 id="bytebase.v1.PlanService">PlanService</h3>
+ <p>PlanService manages deployment plans for database changes.</p>
<table class="enum-table">
<thead>
<tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
@@ -13171,128 +12609,60 @@ review passed: whether problems remain is judged from open comments.</p></td>
<tbody>
<tr>
- <td>GetIssue</td>
- <td><a href="#bytebase.v1.GetIssueRequest">GetIssueRequest</a></td>
- <td><a href="#bytebase.v1.Issue">Issue</a></td>
- <td><p>Retrieves an issue by name.
-Permissions required: bb.issues.get</p></td>
- </tr>
-
- <tr>
- <td>CreateIssue</td>
- <td><a href="#bytebase.v1.CreateIssueRequest">CreateIssueRequest</a></td>
- <td><a href="#bytebase.v1.Issue">Issue</a></td>
- <td><p>Creates a new issue for database changes or tasks.
-Permissions required: bb.issues.create</p></td>
- </tr>
-
- <tr>
- <td>ListIssues</td>
- <td><a href="#bytebase.v1.ListIssuesRequest">ListIssuesRequest</a></td>
- <td><a href="#bytebase.v1.ListIssuesResponse">ListIssuesResponse</a></td>
- <td><p>Lists issues in a project.
-Permissions required: bb.issues.list</p></td>
- </tr>
-
- <tr>
- <td>SearchIssues</td>
- <td><a href="#bytebase.v1.SearchIssuesRequest">SearchIssuesRequest</a></td>
- <td><a href="#bytebase.v1.SearchIssuesResponse">SearchIssuesResponse</a></td>
- <td><p>Search for issues that the caller has the bb.issues.get permission on and also satisfy the specified filter &amp; query.
-Permissions required: bb.issues.get</p></td>
- </tr>
-
- <tr>
- <td>UpdateIssue</td>
- <td><a href="#bytebase.v1.UpdateIssueRequest">UpdateIssueRequest</a></td>
- <td><a href="#bytebase.v1.Issue">Issue</a></td>
- <td><p>Updates an issue&#39;s properties such as title, description, or labels.
-Permissions required: bb.issues.update</p></td>
- </tr>
-
- <tr>
- <td>ListIssueComments</td>
- <td><a href="#bytebase.v1.ListIssueCommentsRequest">ListIssueCommentsRequest</a></td>
- <td><a href="#bytebase.v1.ListIssueCommentsResponse">ListIssueCommentsResponse</a></td>
- <td><p>Lists comments on an issue.
-Permissions required: bb.issueComments.list</p></td>
- </tr>
-
- <tr>
- <td>CreateIssueComment</td>
- <td><a href="#bytebase.v1.CreateIssueCommentRequest">CreateIssueCommentRequest</a></td>
- <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>
- <td><p>Adds a comment to an issue.
-Permissions required: bb.issueComments.create</p></td>
- </tr>
-
- <tr>
- <td>UpdateIssueComment</td>
- <td><a href="#bytebase.v1.UpdateIssueCommentRequest">UpdateIssueCommentRequest</a></td>
- <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>
- <td><p>Updates an existing issue comment.
-Permissions required: bb.issueComments.update</p></td>
+ <td>GetPlan</td>
+ <td><a href="#bytebase.v1.GetPlanRequest">GetPlanRequest</a></td>
+ <td><a href="#bytebase.v1.Plan">Plan</a></td>
+ <td><p>Retrieves a deployment plan by name.
+Permissions required: bb.plans.get</p></td>
</tr>
<tr>
- <td>BatchUpdateIssuesStatus</td>
- <td><a href="#bytebase.v1.BatchUpdateIssuesStatusRequest">BatchUpdateIssuesStatusRequest</a></td>
- <td><a href="#bytebase.v1.BatchUpdateIssuesStatusResponse">BatchUpdateIssuesStatusResponse</a></td>
- <td><p>Updates the status of multiple issues in a single operation.
-Permissions required: bb.issues.update</p></td>
+ <td>ListPlans</td>
+ <td><a href="#bytebase.v1.ListPlansRequest">ListPlansRequest</a></td>
+ <td><a href="#bytebase.v1.ListPlansResponse">ListPlansResponse</a></td>
+ <td><p>Lists deployment plans in a project.
+Permissions required: bb.plans.list</p></td>
</tr>
<tr>
- <td>ApproveIssue</td>
- <td><a href="#bytebase.v1.ApproveIssueRequest">ApproveIssueRequest</a></td>
- <td><a href="#bytebase.v1.Issue">Issue</a></td>
- <td><p>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)</p></td>
+ <td>CreatePlan</td>
+ <td><a href="#bytebase.v1.CreatePlanRequest">CreatePlanRequest</a></td>
+ <td><a href="#bytebase.v1.Plan">Plan</a></td>
+ <td><p>Creates a new deployment plan.
+Permissions required: bb.plans.create</p></td>
</tr>
<tr>
- <td>RejectIssue</td>
- <td><a href="#bytebase.v1.RejectIssueRequest">RejectIssueRequest</a></td>
- <td><a href="#bytebase.v1.Issue">Issue</a></td>
- <td><p>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)</p></td>
+ <td>UpdatePlan</td>
+ <td><a href="#bytebase.v1.UpdatePlanRequest">UpdatePlanRequest</a></td>
+ <td><a href="#bytebase.v1.Plan">Plan</a></td>
+ <td><p>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)</p></td>
</tr>
<tr>
- <td>RequestIssue</td>
- <td><a href="#bytebase.v1.RequestIssueRequest">RequestIssueRequest</a></td>
- <td><a href="#bytebase.v1.Issue">Issue</a></td>
- <td><p>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)</p></td>
+ <td>GetPlanCheckRun</td>
+ <td><a href="#bytebase.v1.GetPlanCheckRunRequest">GetPlanCheckRunRequest</a></td>
+ <td><a href="#bytebase.v1.PlanCheckRun">PlanCheckRun</a></td>
+ <td><p>Gets the plan check run for a deployment plan.
+Permissions required: bb.planCheckRuns.get</p></td>
</tr>
<tr>
- <td>RetryIssueApproval</td>
- <td><a href="#bytebase.v1.RetryIssueApprovalRequest">RetryIssueApprovalRequest</a></td>
- <td><a href="#bytebase.v1.Issue">Issue</a></td>
- <td><p>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&#39;s authorization model).</p></td>
+ <td>RunPlanChecks</td>
+ <td><a href="#bytebase.v1.RunPlanChecksRequest">RunPlanChecksRequest</a></td>
+ <td><a href="#bytebase.v1.RunPlanChecksResponse">RunPlanChecksResponse</a></td>
+ <td><p>Executes validation checks on a deployment plan.
+Permissions required: bb.planCheckRuns.run</p></td>
</tr>
<tr>
- <td>RunReview</td>
- <td><a href="#bytebase.v1.RunReviewRequest">RunReviewRequest</a></td>
- <td><a href="#bytebase.v1.ReviewRun">ReviewRun</a></td>
- <td><p>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 and have no read RPC yet:
-findings will surface as issue comments once the review comment
-integration lands. The returned run carries execution status only.
-The audit log is the only record of who triggered a run.
-Permissions required: bb.reviewRuns.run</p></td>
+ <td>CancelPlanCheckRun</td>
+ <td><a href="#bytebase.v1.CancelPlanCheckRunRequest">CancelPlanCheckRunRequest</a></td>
+ <td><a href="#bytebase.v1.CancelPlanCheckRunResponse">CancelPlanCheckRunResponse</a></td>
+ <td><p>Cancels the plan check run for a deployment plan.
+Permissions required: bb.planCheckRuns.run</p></td>
</tr>
</tbody>
@@ -13316,9 +12686,9 @@ Permissions required: bb.reviewRuns.run</p></td>
<tr>
- <td>GetIssue</td>
+ <td>GetPlan</td>
<td>GET</td>
- <td>/v1/{name=projects/*/issues/*}</td>
+ <td>/v1/{name=projects/*/plans/*}</td>
<td></td>
</tr>
@@ -13326,19 +12696,9 @@ Permissions required: bb.reviewRuns.run</p></td>
<tr>
- <td>CreateIssue</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*}/issues</td>
- <td>issue</td>
- </tr>
-
-
-
-
- <tr>
- <td>ListIssues</td>
+ <td>ListPlans</td>
<td>GET</td>
- <td>/v1/{parent=projects/*}/issues</td>
+ <td>/v1/{parent=projects/*}/plans</td>
<td></td>
</tr>
@@ -13346,29 +12706,29 @@ Permissions required: bb.reviewRuns.run</p></td>
<tr>
- <td>SearchIssues</td>
+ <td>CreatePlan</td>
<td>POST</td>
- <td>/v1/{parent=projects/*}/issues:search</td>
- <td>*</td>
+ <td>/v1/{parent=projects/*}/plans</td>
+ <td>plan</td>
</tr>
<tr>
- <td>UpdateIssue</td>
+ <td>UpdatePlan</td>
<td>PATCH</td>
- <td>/v1/{issue.name=projects/*/issues/*}</td>
- <td>issue</td>
+ <td>/v1/{plan.name=projects/*/plans/*}</td>
+ <td>plan</td>
</tr>
<tr>
- <td>ListIssueComments</td>
+ <td>GetPlanCheckRun</td>
<td>GET</td>
- <td>/v1/{parent=projects/*/issues/*}/issueComments</td>
+ <td>/v1/{name=projects/*/plans/*/planCheckRun}</td>
<td></td>
</tr>
@@ -13376,69 +12736,9 @@ Permissions required: bb.reviewRuns.run</p></td>
<tr>
- <td>CreateIssueComment</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*/issues/*}:comment</td>
- <td>issue_comment</td>
- </tr>
-
-
-
-
- <tr>
- <td>UpdateIssueComment</td>
- <td>PATCH</td>
- <td>/v1/{parent=projects/*/issues/*}:comment</td>
- <td>issue_comment</td>
- </tr>
-
-
-
-
- <tr>
- <td>BatchUpdateIssuesStatus</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*}/issues:batchUpdateStatus</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>ApproveIssue</td>
- <td>POST</td>
- <td>/v1/{name=projects/*/issues/*}:approve</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>RejectIssue</td>
- <td>POST</td>
- <td>/v1/{name=projects/*/issues/*}:reject</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>RequestIssue</td>
- <td>POST</td>
- <td>/v1/{name=projects/*/issues/*}:request</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>RetryIssueApproval</td>
+ <td>RunPlanChecks</td>
<td>POST</td>
- <td>/v1/{name=projects/*/issues/*}:retryApproval</td>
+ <td>/v1/{name=projects/*/plans/*}:runPlanChecks</td>
<td>*</td>
</tr>
@@ -13446,9 +12746,9 @@ Permissions required: bb.reviewRuns.run</p></td>
<tr>
- <td>RunReview</td>
+ <td>CancelPlanCheckRun</td>
<td>POST</td>
- <td>/v1/{name=projects/*/issues/*/reviewRuns/*}:run</td>
+ <td>/v1/{name=projects/*/plans/*/planCheckRun}:cancel</td>
<td>*</td>
</tr>
@@ -13460,12 +12760,12 @@ Permissions required: bb.reviewRuns.run</p></td>
<div class="file-heading">
- <h2 id="v1/setting_service.proto">v1/setting_service.proto</h2><a href="#title">Top</a>
+ <h2 id="v1/issue_service.proto">v1/issue_service.proto</h2><a href="#title">Top</a>
</div>
<p></p>
- <h3 id="bytebase.v1.AISetting">AISetting</h3>
+ <h3 id="bytebase.v1.ApprovalFlow">ApprovalFlow</h3>
<p></p>
@@ -13476,45 +12776,10 @@ Permissions required: bb.reviewRuns.run</p></td>
<tbody>
<tr>
- <td>enabled</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>provider</td>
- <td><a href="#bytebase.v1.AISetting.Provider">AISetting.Provider</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>endpoint</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>api_key</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>model</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>version</td>
+ <td>roles</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>repeated</td>
+ <td><p>The roles required for approval in order. </p></td>
</tr>
</tbody>
@@ -13524,7 +12789,7 @@ Permissions required: bb.reviewRuns.run</p></td>
- <h3 id="bytebase.v1.Algorithm">Algorithm</h3>
+ <h3 id="bytebase.v1.ApprovalTemplate">ApprovalTemplate</h3>
<p></p>
@@ -13535,31 +12800,24 @@ Permissions required: bb.reviewRuns.run</p></td>
<tbody>
<tr>
- <td>full_mask</td>
- <td><a href="#bytebase.v1.Algorithm.FullMask">Algorithm.FullMask</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>range_mask</td>
- <td><a href="#bytebase.v1.Algorithm.RangeMask">Algorithm.RangeMask</a></td>
+ <td>flow</td>
+ <td><a href="#bytebase.v1.ApprovalFlow">ApprovalFlow</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The approval flow definition. </p></td>
</tr>
<tr>
- <td>md5_mask</td>
- <td><a href="#bytebase.v1.Algorithm.MD5Mask">Algorithm.MD5Mask</a></td>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The title of the approval template. </p></td>
</tr>
<tr>
- <td>inner_outer_mask</td>
- <td><a href="#bytebase.v1.Algorithm.InnerOuterMask">Algorithm.InnerOuterMask</a></td>
+ <td>description</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The description of the approval template. </p></td>
</tr>
</tbody>
@@ -13569,7 +12827,7 @@ Permissions required: bb.reviewRuns.run</p></td>
- <h3 id="bytebase.v1.Algorithm.FullMask">Algorithm.FullMask</h3>
+ <h3 id="bytebase.v1.ApproveIssueRequest">ApproveIssueRequest</h3>
<p></p>
@@ -13580,11 +12838,18 @@ Permissions required: bb.reviewRuns.run</p></td>
<tbody>
<tr>
- <td>substitution</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>substitution is the string used to replace the original value, the
-max length of the string is 16 bytes. </p></td>
+ <td><p>The name of the issue to add an approver.
+Format: projects/{project}/issues/{issue} </p></td>
+ </tr>
+
+ <tr>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The comment explaining the approval decision. </p></td>
</tr>
</tbody>
@@ -13594,7 +12859,7 @@ max length of the string is 16 bytes. </p></td>
- <h3 id="bytebase.v1.Algorithm.InnerOuterMask">Algorithm.InnerOuterMask</h3>
+ <h3 id="bytebase.v1.BatchUpdateIssuesStatusRequest">BatchUpdateIssuesStatusRequest</h3>
<p></p>
@@ -13605,31 +12870,35 @@ max length of the string is 16 bytes. </p></td>
<tbody>
<tr>
- <td>prefix_len</td>
- <td><a href="#int32">int32</a></td>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>suffix_len</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>issues</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The list of issues to update.
+Format: projects/{project}/issues/{issue} </p></td>
</tr>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.Algorithm.InnerOuterMask.MaskType">Algorithm.InnerOuterMask.MaskType</a></td>
+ <td>status</td>
+ <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The new status. </p></td>
</tr>
<tr>
- <td>substitution</td>
+ <td>reason</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The reason for the status change. </p></td>
</tr>
</tbody>
@@ -13639,7 +12908,14 @@ max length of the string is 16 bytes. </p></td>
- <h3 id="bytebase.v1.Algorithm.MD5Mask">Algorithm.MD5Mask</h3>
+ <h3 id="bytebase.v1.BatchUpdateIssuesStatusResponse">BatchUpdateIssuesStatusResponse</h3>
+ <p></p>
+
+
+
+
+
+ <h3 id="bytebase.v1.CreateIssueCommentRequest">CreateIssueCommentRequest</h3>
<p></p>
@@ -13650,10 +12926,18 @@ max length of the string is 16 bytes. </p></td>
<tbody>
<tr>
- <td>salt</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>salt is the salt value to generate a different hash that with the word alone. </p></td>
+ <td><p>The issue name
+Format: projects/{project}/issues/{issue} </p></td>
+ </tr>
+
+ <tr>
+ <td>issue_comment</td>
+ <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>
+ <td></td>
+ <td><p>The comment to create. </p></td>
</tr>
</tbody>
@@ -13663,7 +12947,7 @@ max length of the string is 16 bytes. </p></td>
- <h3 id="bytebase.v1.Algorithm.RangeMask">Algorithm.RangeMask</h3>
+ <h3 id="bytebase.v1.CreateIssueRequest">CreateIssueRequest</h3>
<p></p>
@@ -13674,11 +12958,18 @@ max length of the string is 16 bytes. </p></td>
<tbody>
<tr>
- <td>slices</td>
- <td><a href="#bytebase.v1.Algorithm.RangeMask.Slice">Algorithm.RangeMask.Slice</a></td>
- <td>repeated</td>
- <td><p>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. </p></td>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The parent, which owns this collection of issues.
+Format: projects/{project} </p></td>
+ </tr>
+
+ <tr>
+ <td>issue</td>
+ <td><a href="#bytebase.v1.Issue">Issue</a></td>
+ <td></td>
+ <td><p>The issue to create. </p></td>
</tr>
</tbody>
@@ -13688,7 +12979,7 @@ But frontend can be started with a single rule easily. </p></td>
- <h3 id="bytebase.v1.Algorithm.RangeMask.Slice">Algorithm.RangeMask.Slice</h3>
+ <h3 id="bytebase.v1.GetIssueRequest">GetIssueRequest</h3>
<p></p>
@@ -13699,27 +12990,18 @@ But frontend can be started with a single rule easily. </p></td>
<tbody>
<tr>
- <td>start</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>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 &#34;你好world&#34;, character index 2 refers to &#39;w&#39; (the 3rd character). </p></td>
- </tr>
-
- <tr>
- <td>end</td>
- <td><a href="#int32">int32</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>end is the end character index (exclusive) of the original value.
-Uses character indices (not byte offsets) for display-oriented masking. </p></td>
+ <td><p>The name of the issue to retrieve.
+Format: projects/{project}/issues/{issue} </p></td>
</tr>
<tr>
- <td>substitution</td>
- <td><a href="#string">string</a></td>
+ <td>force</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>substitution is the string used to replace the OriginalValue[start:end). </p></td>
+ <td><p>If set to true, bypass cache and fetch the latest data. </p></td>
</tr>
</tbody>
@@ -13729,7 +13011,7 @@ Uses character indices (not byte offsets) for display-oriented masking. </p></td
- <h3 id="bytebase.v1.Announcement">Announcement</h3>
+ <h3 id="bytebase.v1.Issue">Issue</h3>
<p></p>
@@ -13740,118 +13022,126 @@ Uses character indices (not byte offsets) for display-oriented masking. </p></td
<tbody>
<tr>
- <td>text</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The text of announcement </p></td>
+ <td><p>The name of the issue.
+Format: projects/{project}/issues/{issue} </p></td>
</tr>
<tr>
- <td>link</td>
+ <td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The optional link, user can follow the link to check extra details </p></td>
+ <td><p>The title of the issue. </p></td>
</tr>
<tr>
- <td>theme</td>
- <td><a href="#bytebase.v1.Announcement.AnnouncementTheme">Announcement.AnnouncementTheme</a></td>
+ <td>description</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Banner colors. Built-in presets (info/warning/critical) are a
-frontend-only concept that seeds these colors; the store only holds them. </p></td>
+ <td><p>The description of the issue. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.Announcement.AnnouncementTheme">Announcement.AnnouncementTheme</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>background</td>
- <td><a href="#google.type.Color">google.type.Color</a></td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.Issue.Type">Issue.Type</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>text</td>
- <td><a href="#google.type.Color">google.type.Color</a></td>
+ <td>status</td>
+ <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The status of the issue. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.AppIMSetting">AppIMSetting</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>settings</td>
- <td><a href="#bytebase.v1.AppIMSetting.IMSetting">AppIMSetting.IMSetting</a></td>
+ <td>approvers</td>
+ <td><a href="#bytebase.v1.Issue.Approver">Issue.Approver</a></td>
<td>repeated</td>
<td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.AppIMSetting.DingTalk">AppIMSetting.DingTalk</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>approval_template</td>
+ <td><a href="#bytebase.v1.ApprovalTemplate">ApprovalTemplate</a></td>
+ <td></td>
+ <td><p>The approval template for the issue. </p></td>
+ </tr>
<tr>
- <td>client_id</td>
+ <td>creator</td>
<td><a href="#string">string</a></td>
<td></td>
+ <td><p>Format: users/[email protected] </p></td>
+ </tr>
+
+ <tr>
+ <td>create_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>client_secret</td>
- <td><a href="#string">string</a></td>
+ <td>update_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>robot_code</td>
+ <td>plan</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The plan associated with the issue.
+Can be empty.
+Format: projects/{project}/plans/{plan} </p></td>
+ </tr>
+
+ <tr>
+ <td>role_grant</td>
+ <td><a href="#bytebase.v1.RoleGrant">RoleGrant</a></td>
+ <td></td>
+ <td><p>Used if the issue type is ROLE_GRANT. </p></td>
+ </tr>
+
+ <tr>
+ <td>risk_level</td>
+ <td><a href="#bytebase.v1.RiskLevel">RiskLevel</a></td>
+ <td></td>
+ <td><p>The risk level of the issue. </p></td>
+ </tr>
+
+ <tr>
+ <td>labels</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>Labels attached to the issue for categorization and filtering. </p></td>
+ </tr>
+
+ <tr>
+ <td>approval_status</td>
+ <td><a href="#bytebase.v1.ApprovalStatus">ApprovalStatus</a></td>
+ <td></td>
+ <td><p>The overall approval status for the issue. </p></td>
+ </tr>
+
+ <tr>
+ <td>access_grant</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The access grant associated with this issue.
+Format: projects/{project}/accessGrants/{access_grant} </p></td>
+ </tr>
+
+ <tr>
+ <td>draft</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether this issue is a Draft Review Issue. </p></td>
</tr>
</tbody>
@@ -13861,8 +13151,8 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
- <h3 id="bytebase.v1.AppIMSetting.Feishu">AppIMSetting.Feishu</h3>
- <p></p>
+ <h3 id="bytebase.v1.Issue.Approver">Issue.Approver</h3>
+ <p>Approvers and their approval status for the issue.</p>
<table class="field-table">
@@ -13872,17 +13162,17 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
<tbody>
<tr>
- <td>app_id</td>
- <td><a href="#string">string</a></td>
+ <td>status</td>
+ <td><a href="#bytebase.v1.Issue.Approver.Status">Issue.Approver.Status</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The new status. </p></td>
</tr>
<tr>
- <td>app_secret</td>
+ <td>principal</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Format: users/[email protected] </p></td>
</tr>
</tbody>
@@ -13892,8 +13182,8 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
- <h3 id="bytebase.v1.AppIMSetting.IMSetting">AppIMSetting.IMSetting</h3>
- <p></p>
+ <h3 id="bytebase.v1.IssueComment">IssueComment</h3>
+ <p>A comment on an issue.</p>
<table class="field-table">
@@ -13903,52 +13193,73 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
<tbody>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.WebhookType">WebhookType</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Format: projects/{project}/issues/{issue}/issueComments/{issueComment-uid} </p></td>
</tr>
<tr>
- <td>slack</td>
- <td><a href="#bytebase.v1.AppIMSetting.Slack">AppIMSetting.Slack</a></td>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The text content of the comment. </p></td>
</tr>
<tr>
- <td>feishu</td>
- <td><a href="#bytebase.v1.AppIMSetting.Feishu">AppIMSetting.Feishu</a></td>
+ <td>payload</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>TODO: use struct message instead. </p></td>
</tr>
<tr>
- <td>wecom</td>
- <td><a href="#bytebase.v1.AppIMSetting.Wecom">AppIMSetting.Wecom</a></td>
+ <td>create_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>lark</td>
- <td><a href="#bytebase.v1.AppIMSetting.Lark">AppIMSetting.Lark</a></td>
+ <td>update_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>dingtalk</td>
- <td><a href="#bytebase.v1.AppIMSetting.DingTalk">AppIMSetting.DingTalk</a></td>
+ <td>creator</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Format: users/{email} </p></td>
</tr>
<tr>
- <td>teams</td>
- <td><a href="#bytebase.v1.AppIMSetting.Teams">AppIMSetting.Teams</a></td>
+ <td>approval</td>
+ <td><a href="#bytebase.v1.IssueComment.Approval">IssueComment.Approval</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Approval event. </p></td>
+ </tr>
+
+ <tr>
+ <td>issue_update</td>
+ <td><a href="#bytebase.v1.IssueComment.IssueUpdate">IssueComment.IssueUpdate</a></td>
+ <td></td>
+ <td><p>Issue update event. </p></td>
+ </tr>
+
+ <tr>
+ <td>plan_update</td>
+ <td><a href="#bytebase.v1.IssueComment.PlanUpdate">IssueComment.PlanUpdate</a></td>
+ <td></td>
+ <td><p>Plan update event. </p></td>
+ </tr>
+
+ <tr>
+ <td>review_submission</td>
+ <td><a href="#bytebase.v1.IssueComment.ReviewSubmission">IssueComment.ReviewSubmission</a></td>
+ <td></td>
+ <td><p>Review submission event. </p></td>
</tr>
</tbody>
@@ -13958,8 +13269,8 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
- <h3 id="bytebase.v1.AppIMSetting.Lark">AppIMSetting.Lark</h3>
- <p></p>
+ <h3 id="bytebase.v1.IssueComment.Approval">IssueComment.Approval</h3>
+ <p>Approval event information.</p>
<table class="field-table">
@@ -13969,17 +13280,10 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
<tbody>
<tr>
- <td>app_id</td>
- <td><a href="#string">string</a></td>
+ <td>status</td>
+ <td><a href="#bytebase.v1.IssueComment.Approval.Status">IssueComment.Approval.Status</a></td>
<td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>app_secret</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td><p>The approval status. </p></td>
</tr>
</tbody>
@@ -13989,8 +13293,8 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
- <h3 id="bytebase.v1.AppIMSetting.Slack">AppIMSetting.Slack</h3>
- <p></p>
+ <h3 id="bytebase.v1.IssueComment.IssueUpdate">IssueComment.IssueUpdate</h3>
+ <p>Issue update event information.</p>
<table class="field-table">
@@ -14000,9 +13304,58 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
<tbody>
<tr>
- <td>token</td>
+ <td>from_title</td>
<td><a href="#string">string</a></td>
- <td></td>
+ <td>optional</td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>to_title</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>from_description</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>to_description</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>from_status</td>
+ <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>
+ <td>optional</td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>to_status</td>
+ <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>
+ <td>optional</td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>from_labels</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>to_labels</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
<td><p> </p></td>
</tr>
@@ -14013,8 +13366,8 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
- <h3 id="bytebase.v1.AppIMSetting.Teams">AppIMSetting.Teams</h3>
- <p></p>
+ <h3 id="bytebase.v1.IssueComment.PlanUpdate">IssueComment.PlanUpdate</h3>
+ <p>Plan update event information (snapshot of plan.config.specs before</p><p>and after a PlanService.UpdatePlan call that mutated specs).</p>
<table class="field-table">
@@ -14024,24 +13377,17 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
<tbody>
<tr>
- <td>tenant_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Azure AD tenant ID (Directory ID). </p></td>
- </tr>
-
- <tr>
- <td>client_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Azure AD application (client) ID. </p></td>
+ <td>from_specs</td>
+ <td><a href="#bytebase.v1.Plan.Spec">Plan.Spec</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>client_secret</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Azure AD client secret. </p></td>
+ <td>to_specs</td>
+ <td><a href="#bytebase.v1.Plan.Spec">Plan.Spec</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -14051,7 +13397,14 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
- <h3 id="bytebase.v1.AppIMSetting.Wecom">AppIMSetting.Wecom</h3>
+ <h3 id="bytebase.v1.IssueComment.ReviewSubmission">IssueComment.ReviewSubmission</h3>
+ <p>Review submission event information.</p>
+
+
+
+
+
+ <h3 id="bytebase.v1.ListIssueCommentsRequest">ListIssueCommentsRequest</h3>
<p></p>
@@ -14062,24 +13415,31 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
<tbody>
<tr>
- <td>corp_id</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Format: projects/{projects}/issues/{issue} </p></td>
</tr>
<tr>
- <td>agent_id</td>
- <td><a href="#string">string</a></td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>secret</td>
+ <td>page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>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. </p></td>
</tr>
</tbody>
@@ -14089,7 +13449,7 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
- <h3 id="bytebase.v1.DataClassificationSetting">DataClassificationSetting</h3>
+ <h3 id="bytebase.v1.ListIssueCommentsResponse">ListIssueCommentsResponse</h3>
<p></p>
@@ -14100,10 +13460,18 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
<tbody>
<tr>
- <td>configs</td>
- <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig">DataClassificationSetting.DataClassificationConfig</a></td>
+ <td>issue_comments</td>
+ <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>
<td>repeated</td>
- <td><p> </p></td>
+ <td><p>The issue comments from the specified request. </p></td>
+ </tr>
+
+ <tr>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
</tr>
</tbody>
@@ -14113,7 +13481,7 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
- <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig">DataClassificationSetting.DataClassificationConfig</h3>
+ <h3 id="bytebase.v1.ListIssuesRequest">ListIssuesRequest</h3>
<p></p>
@@ -14124,32 +13492,78 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
<tbody>
<tr>
- <td>id</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>id is the uuid for classification. Each project can chose one classification config. </p></td>
+ <td><p>The parent, which owns this collection of issues.
+Format: projects/{project} </p></td>
</tr>
<tr>
- <td>title</td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>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. </p></td>
+ </tr>
+
+ <tr>
+ <td>page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>levels</td>
- <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level">DataClassificationSetting.DataClassificationConfig.Level</a></td>
- <td>repeated</td>
- <td><p>levels is user defined level list for classification. </p></td>
+ <td>filter</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>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 &#34;users/{email or id}&#34; format, support &#34;==&#34; operator.
+- status: the issue status, support &#34;==&#34; and &#34;in&#34; operator, check the IssueStatus enum for the values.
+- create_time: issue create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator.
+- type: the issue type, support &#34;==&#34; and &#34;in&#34; operator, check the Type enum in the Issue message for the values.
+- labels: the issue labels, support &#34;==&#34; and &#34;in&#34; operator.
+- risk_level: the issue risk level, support &#34;in&#34; operator, check the RiskLevel enum for the values.
+- approval_status: issue approval status, support &#34;==&#34; operator.
+- current_approver: the issue approver, should in &#34;users/{email} format&#34;, support &#34;==&#34; operator.
+
+For example:
+creator == &#34;users/[email protected]&#34; &amp;&amp; status in [&#34;OPEN&#34;, &#34;DONE&#34;]
+status == &#34;CANCELED&#34; &amp;&amp; type == &#34;DATABASE_CHANGE&#34;
+labels in [&#34;label1&#34;, &#34;label2&#34;]
+risk_level in [&#34;HIGH&#34;, &#34;MODERATE&#34;]
+create_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34; </p></td>
</tr>
<tr>
- <td>classification</td>
- <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry">DataClassificationSetting.DataClassificationConfig.ClassificationEntry</a></td>
- <td>repeated</td>
- <td><p>classification is the id - DataClassification map.
-The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
+ <td>query</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Query is the query statement. </p></td>
+ </tr>
+
+ <tr>
+ <td>order_by</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The order by of issues.
+Support:
+- create_time
+- update_time
+The default sorting order is ascending.
+For example:
+- order_by = &#34;create_time desc&#34;
+- order_by = &#34;update_time asc&#34; </p></td>
</tr>
</tbody>
@@ -14159,7 +13573,7 @@ The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
- <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry">DataClassificationSetting.DataClassificationConfig.ClassificationEntry</h3>
+ <h3 id="bytebase.v1.ListIssuesResponse">ListIssuesResponse</h3>
<p></p>
@@ -14170,17 +13584,18 @@ The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
<tbody>
<tr>
- <td>key</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>issues</td>
+ <td><a href="#bytebase.v1.Issue">Issue</a></td>
+ <td>repeated</td>
+ <td><p>The issues from the specified request. </p></td>
</tr>
<tr>
- <td>value</td>
- <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification">DataClassificationSetting.DataClassificationConfig.DataClassification</a></td>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
</tr>
</tbody>
@@ -14190,7 +13605,7 @@ The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
- <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification">DataClassificationSetting.DataClassificationConfig.DataClassification</h3>
+ <h3 id="bytebase.v1.RejectIssueRequest">RejectIssueRequest</h3>
<p></p>
@@ -14201,24 +13616,18 @@ The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
<tbody>
<tr>
- <td>id</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>id is the classification id in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
+ <td><p>The name of the issue to add a rejection.
+Format: projects/{project}/issues/{issue} </p></td>
</tr>
<tr>
- <td>title</td>
+ <td>comment</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>level</td>
- <td><a href="#int32">int32</a></td>
- <td>optional</td>
- <td><p>The sensitivity level. Maps to Level.level. </p></td>
+ <td><p>The comment explaining the rejection decision. </p></td>
</tr>
</tbody>
@@ -14228,7 +13637,7 @@ The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
- <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level">DataClassificationSetting.DataClassificationConfig.Level</h3>
+ <h3 id="bytebase.v1.RequestIssueRequest">RequestIssueRequest</h3>
<p></p>
@@ -14239,17 +13648,18 @@ The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
<tbody>
<tr>
- <td>title</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name of the issue to request a issue.
+Format: projects/{project}/issues/{issue} </p></td>
</tr>
<tr>
- <td>level</td>
- <td><a href="#int32">int32</a></td>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The numeric level for ordering. Higher = more sensitive. </p></td>
+ <td><p>The comment explaining the request. </p></td>
</tr>
</tbody>
@@ -14259,7 +13669,7 @@ The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
- <h3 id="bytebase.v1.EmailSetting">EmailSetting</h3>
+ <h3 id="bytebase.v1.RetryIssueApprovalRequest">RetryIssueApprovalRequest</h3>
<p></p>
@@ -14270,33 +13680,77 @@ The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
<tbody>
<tr>
- <td>from</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name of the issue whose approval-finding should be retried.
+Format: projects/{project}/issues/{issue} </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ReviewRun">ReviewRun</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>from_name</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun}
+The {reviewRun} id is the reviewer: &#34;rule&#34; or &#34;guideline&#34;. The name
+addresses a slot, not an execution. </p></td>
</tr>
<tr>
<td>type</td>
- <td><a href="#bytebase.v1.EmailSetting.Type">EmailSetting.Type</a></td>
+ <td><a href="#bytebase.v1.ReviewRun.Type">ReviewRun.Type</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Derived from the name. </p></td>
</tr>
<tr>
- <td>smtp</td>
- <td><a href="#bytebase.v1.EmailSetting.SMTPConfig">EmailSetting.SMTPConfig</a></td>
+ <td>status</td>
+ <td><a href="#bytebase.v1.ReviewRun.Status">ReviewRun.Status</a></td>
<td></td>
<td><p> </p></td>
</tr>
+ <tr>
+ <td>create_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>When the current run was triggered. Reset on every re-run. </p></td>
+ </tr>
+
+ <tr>
+ <td>end_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>When the run reached a terminal status. Unset while AVAILABLE or
+RUNNING. </p></td>
+ </tr>
+
+ <tr>
+ <td>error</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>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). </p></td>
+ </tr>
+
</tbody>
</table>
@@ -14304,7 +13758,7 @@ The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
- <h3 id="bytebase.v1.EmailSetting.SMTPConfig">EmailSetting.SMTPConfig</h3>
+ <h3 id="bytebase.v1.RoleGrant">RoleGrant</h3>
<p></p>
@@ -14315,45 +13769,33 @@ The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
<tbody>
<tr>
- <td>host</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>port</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>username</td>
+ <td>role</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The requested role.
+Format: roles/EXPORTER. </p></td>
</tr>
<tr>
- <td>password</td>
+ <td>user</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The user to be granted.
+Format: users/{email}. </p></td>
</tr>
<tr>
- <td>encryption</td>
- <td><a href="#bytebase.v1.EmailSetting.SMTPConfig.Encryption">EmailSetting.SMTPConfig.Encryption</a></td>
+ <td>condition</td>
+ <td><a href="#google.type.Expr">google.type.Expr</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The condition for the role. Same as the condition in IAM Binding message. </p></td>
</tr>
<tr>
- <td>authentication</td>
- <td><a href="#bytebase.v1.EmailSetting.SMTPConfig.Authentication">EmailSetting.SMTPConfig.Authentication</a></td>
+ <td>expiration</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The duration for which the grant is valid. </p></td>
</tr>
</tbody>
@@ -14363,7 +13805,7 @@ The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
- <h3 id="bytebase.v1.EnvironmentSetting">EnvironmentSetting</h3>
+ <h3 id="bytebase.v1.RunReviewRequest">RunReviewRequest</h3>
<p></p>
@@ -14374,10 +13816,10 @@ The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
<tbody>
<tr>
- <td>environments</td>
- <td><a href="#bytebase.v1.EnvironmentSetting.Environment">EnvironmentSetting.Environment</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun} </p></td>
</tr>
</tbody>
@@ -14387,7 +13829,7 @@ The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
- <h3 id="bytebase.v1.EnvironmentSetting.Environment">EnvironmentSetting.Environment</h3>
+ <h3 id="bytebase.v1.SearchIssuesRequest">SearchIssuesRequest</h3>
<p></p>
@@ -14398,42 +13840,65 @@ The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The resource name of the environment.
-Format: environments/{environment}.
-Output only. </p></td>
+ <td><p>The parent, which owns this collection of issues.
+Format: projects/{project}
+Use the wildcard &#34;projects/-&#34; 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. </p></td>
</tr>
<tr>
- <td>id</td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>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. </p></td>
+ </tr>
+
+ <tr>
+ <td>page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The resource id of the environment.
-This value should be 4-63 characters, and valid characters
-are /[a-z][0-9]-/. </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>title</td>
+ <td>filter</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The display name of the environment. </p></td>
+ <td><p>Filter is used to filter issues returned in the list.
+Check the filter field in the ListIssuesRequest message. </p></td>
</tr>
<tr>
- <td>tags</td>
- <td><a href="#bytebase.v1.EnvironmentSetting.Environment.TagsEntry">EnvironmentSetting.Environment.TagsEntry</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td>query</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Query is the query statement. </p></td>
</tr>
<tr>
- <td>color</td>
- <td><a href="#google.type.Color">google.type.Color</a></td>
+ <td>order_by</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The order by of issues.
+Support:
+- create_time
+- update_time
+The default sorting order is ascending.
+For example:
+- order_by = &#34;create_time desc&#34;
+- order_by = &#34;update_time asc&#34; </p></td>
</tr>
</tbody>
@@ -14443,7 +13908,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.v1.EnvironmentSetting.Environment.TagsEntry">EnvironmentSetting.Environment.TagsEntry</h3>
+ <h3 id="bytebase.v1.SearchIssuesResponse">SearchIssuesResponse</h3>
<p></p>
@@ -14454,17 +13919,18 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>key</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>issues</td>
+ <td><a href="#bytebase.v1.Issue">Issue</a></td>
+ <td>repeated</td>
+ <td><p>The issues from the specified request. </p></td>
</tr>
<tr>
- <td>value</td>
+ <td>next_page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
</tr>
</tbody>
@@ -14474,8 +13940,8 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.v1.GetSettingRequest">GetSettingRequest</h3>
- <p>The request message for getting a setting.</p>
+ <h3 id="bytebase.v1.UpdateIssueCommentRequest">UpdateIssueCommentRequest</h3>
+ <p></p>
<table class="field-table">
@@ -14485,10 +13951,33 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The resource name of the setting. </p></td>
+ <td><p>The issue name
+Format: projects/{project}/issues/{issue} </p></td>
+ </tr>
+
+ <tr>
+ <td>issue_comment</td>
+ <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>
+ <td></td>
+ <td><p>The comment to update. </p></td>
+ </tr>
+
+ <tr>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td></td>
+ <td><p>The list of fields to update. </p></td>
+ </tr>
+
+ <tr>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>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. </p></td>
</tr>
</tbody>
@@ -14498,8 +13987,8 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.v1.GetSettingResponse">GetSettingResponse</h3>
- <p>The response message for getting a setting.</p>
+ <h3 id="bytebase.v1.UpdateIssueRequest">UpdateIssueRequest</h3>
+ <p></p>
<table class="field-table">
@@ -14509,10 +13998,28 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>setting</td>
- <td><a href="#bytebase.v1.Setting">Setting</a></td>
+ <td>issue</td>
+ <td><a href="#bytebase.v1.Issue">Issue</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The issue to update.
+
+The issue&#39;s `name` field is used to identify the issue to update.
+Format: projects/{project}/issues/{issue} </p></td>
+ </tr>
+
+ <tr>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td></td>
+ <td><p>The list of fields to update. </p></td>
+ </tr>
+
+ <tr>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>If set to true, and the issue is not found, a new issue will be created.
+In this situation, `update_mask` is ignored. </p></td>
</tr>
</tbody>
@@ -14522,269 +14029,493 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.v1.ListSettingsRequest">ListSettingsRequest</h3>
- <p></p>
-
-
-
- <h3 id="bytebase.v1.ListSettingsResponse">ListSettingsResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>settings</td>
- <td><a href="#bytebase.v1.Setting">Setting</a></td>
- <td>repeated</td>
- <td><p>The settings from the specified request. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
+ <h3 id="bytebase.v1.Issue.Approver.Status">Issue.Approver.Status</h3>
+ <p>The approval status of an approver.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>STATUS_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified status.</p></td>
+ </tr>
+
+ <tr>
+ <td>PENDING</td>
+ <td>1</td>
+ <td><p>Awaiting approval.</p></td>
+ </tr>
+
+ <tr>
+ <td>APPROVED</td>
+ <td>2</td>
+ <td><p>Approved.</p></td>
+ </tr>
+
+ <tr>
+ <td>REJECTED</td>
+ <td>3</td>
+ <td><p>Rejected.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.v1.MCPSetting">MCPSetting</h3>
- <p>MCPSetting is what an MCP (Model Context Protocol) session may do in this</p><p>workspace.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>capability</td>
- <td><a href="#bytebase.v1.MCPSetting.Capability">MCPSetting.Capability</a></td>
- <td></td>
- <td><p>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. </p></td>
- </tr>
-
- <tr>
- <td>ignore_masking_exemptions</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether a request that arrived over MCP stops applying the caller&#39;s own
-unmasking provisioning. Two mechanisms let a user see a real value and this
-suppresses both: the masking exemptions granted to them, and the unmask
-carried by an access grant. The same user in the console is untouched.
-
-It cannot force masking where there is none. Masking substitutes values in
-query results, so this does not reach data copied into a column carrying no
-masking policy, and it does nothing on the engines Bytebase does not mask.
-It narrows what an agent reads through the paths Bytebase masks; it is not
-a confidentiality boundary. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
+ <h3 id="bytebase.v1.Issue.Type">Issue.Type</h3>
+ <p>The type of issue.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified issue type.</p></td>
+ </tr>
+
+ <tr>
+ <td>DATABASE_CHANGE</td>
+ <td>1</td>
+ <td><p>Database schema or data change.</p></td>
+ </tr>
+
+ <tr>
+ <td>ROLE_GRANT</td>
+ <td>2</td>
+ <td><p>Role grant request.</p></td>
+ </tr>
+
+ <tr>
+ <td>ACCESS_GRANT</td>
+ <td>4</td>
+ <td><p>Temporary access grant request.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.v1.SQLEditorThemeSetting">SQLEditorThemeSetting</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>monaco_base</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>tokens</td>
- <td><a href="#bytebase.v1.SQLEditorThemeSetting.TokensEntry">SQLEditorThemeSetting.TokensEntry</a></td>
- <td>repeated</td>
- <td><p>CSS token colors. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
+ <h3 id="bytebase.v1.IssueComment.Approval.Status">IssueComment.Approval.Status</h3>
+ <p>Approval status values.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>STATUS_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified status.</p></td>
+ </tr>
+
+ <tr>
+ <td>PENDING</td>
+ <td>1</td>
+ <td><p>Approval pending.</p></td>
+ </tr>
+
+ <tr>
+ <td>APPROVED</td>
+ <td>2</td>
+ <td><p>Approved.</p></td>
+ </tr>
+
+ <tr>
+ <td>REJECTED</td>
+ <td>3</td>
+ <td><p>Rejected.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.v1.SQLEditorThemeSetting.TokensEntry">SQLEditorThemeSetting.TokensEntry</h3>
+ <h3 id="bytebase.v1.ReviewRun.Status">ReviewRun.Status</h3>
+ <p>States follow task_run, minus PENDING (review needs no admission</p><p>control) and minus CANCELED (runs are side-effect-free until the fenced</p><p>completion transaction, so re-running supersedes instead of canceling).</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>STATUS_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>AVAILABLE</td>
+ <td>1</td>
+ <td><p>Created and claimable by any replica.</p></td>
+ </tr>
+
+ <tr>
+ <td>RUNNING</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DONE</td>
+ <td>3</td>
+ <td><p>Every (spec, target) unit was evaluated. DONE does not mean the
+review passed: whether problems remain is judged from open comments.</p></td>
+ </tr>
+
+ <tr>
+ <td>FAILED</td>
+ <td>4</td>
+ <td><p>At least one unit was not evaluated; the cause is in `error`.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.ReviewRun.Type">ReviewRun.Type</h3>
<p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>key</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>value</td>
- <td><a href="#google.type.Color">google.type.Color</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>RULE</td>
+ <td>1</td>
+ <td><p>Review against the standard rules.</p></td>
+ </tr>
+
+ <tr>
+ <td>GUIDELINE</td>
+ <td>2</td>
+ <td><p>Review against natural-language guidelines, performed by AI.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.v1.SemanticTypeSetting">SemanticTypeSetting</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>types</td>
- <td><a href="#bytebase.v1.SemanticTypeSetting.SemanticType">SemanticTypeSetting.SemanticType</a></td>
- <td>repeated</td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
+
-
- <h3 id="bytebase.v1.SemanticTypeSetting.SemanticType">SemanticTypeSetting.SemanticType</h3>
- <p></p>
+ <h3 id="bytebase.v1.IssueService">IssueService</h3>
+ <p>IssueService manages issues for tracking database changes and tasks.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>GetIssue</td>
+ <td><a href="#bytebase.v1.GetIssueRequest">GetIssueRequest</a></td>
+ <td><a href="#bytebase.v1.Issue">Issue</a></td>
+ <td><p>Retrieves an issue by name.
+Permissions required: bb.issues.get</p></td>
+ </tr>
+
+ <tr>
+ <td>CreateIssue</td>
+ <td><a href="#bytebase.v1.CreateIssueRequest">CreateIssueRequest</a></td>
+ <td><a href="#bytebase.v1.Issue">Issue</a></td>
+ <td><p>Creates a new issue for database changes or tasks.
+Permissions required: bb.issues.create</p></td>
+ </tr>
+
+ <tr>
+ <td>ListIssues</td>
+ <td><a href="#bytebase.v1.ListIssuesRequest">ListIssuesRequest</a></td>
+ <td><a href="#bytebase.v1.ListIssuesResponse">ListIssuesResponse</a></td>
+ <td><p>Lists issues in a project.
+Permissions required: bb.issues.list</p></td>
+ </tr>
+
+ <tr>
+ <td>SearchIssues</td>
+ <td><a href="#bytebase.v1.SearchIssuesRequest">SearchIssuesRequest</a></td>
+ <td><a href="#bytebase.v1.SearchIssuesResponse">SearchIssuesResponse</a></td>
+ <td><p>Search for issues that the caller has the bb.issues.get permission on and also satisfy the specified filter &amp; query.
+Permissions required: bb.issues.get</p></td>
+ </tr>
+
+ <tr>
+ <td>UpdateIssue</td>
+ <td><a href="#bytebase.v1.UpdateIssueRequest">UpdateIssueRequest</a></td>
+ <td><a href="#bytebase.v1.Issue">Issue</a></td>
+ <td><p>Updates an issue&#39;s properties such as title, description, or labels.
+Permissions required: bb.issues.update</p></td>
+ </tr>
+
+ <tr>
+ <td>ListIssueComments</td>
+ <td><a href="#bytebase.v1.ListIssueCommentsRequest">ListIssueCommentsRequest</a></td>
+ <td><a href="#bytebase.v1.ListIssueCommentsResponse">ListIssueCommentsResponse</a></td>
+ <td><p>Lists comments on an issue.
+Permissions required: bb.issueComments.list</p></td>
+ </tr>
+
+ <tr>
+ <td>CreateIssueComment</td>
+ <td><a href="#bytebase.v1.CreateIssueCommentRequest">CreateIssueCommentRequest</a></td>
+ <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>
+ <td><p>Adds a comment to an issue.
+Permissions required: bb.issueComments.create</p></td>
+ </tr>
+
+ <tr>
+ <td>UpdateIssueComment</td>
+ <td><a href="#bytebase.v1.UpdateIssueCommentRequest">UpdateIssueCommentRequest</a></td>
+ <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>
+ <td><p>Updates an existing issue comment.
+Permissions required: bb.issueComments.update</p></td>
+ </tr>
+
+ <tr>
+ <td>BatchUpdateIssuesStatus</td>
+ <td><a href="#bytebase.v1.BatchUpdateIssuesStatusRequest">BatchUpdateIssuesStatusRequest</a></td>
+ <td><a href="#bytebase.v1.BatchUpdateIssuesStatusResponse">BatchUpdateIssuesStatusResponse</a></td>
+ <td><p>Updates the status of multiple issues in a single operation.
+Permissions required: bb.issues.update</p></td>
+ </tr>
+
+ <tr>
+ <td>ApproveIssue</td>
+ <td><a href="#bytebase.v1.ApproveIssueRequest">ApproveIssueRequest</a></td>
+ <td><a href="#bytebase.v1.Issue">Issue</a></td>
+ <td><p>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)</p></td>
+ </tr>
+
+ <tr>
+ <td>RejectIssue</td>
+ <td><a href="#bytebase.v1.RejectIssueRequest">RejectIssueRequest</a></td>
+ <td><a href="#bytebase.v1.Issue">Issue</a></td>
+ <td><p>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)</p></td>
+ </tr>
+
+ <tr>
+ <td>RequestIssue</td>
+ <td><a href="#bytebase.v1.RequestIssueRequest">RequestIssueRequest</a></td>
+ <td><a href="#bytebase.v1.Issue">Issue</a></td>
+ <td><p>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)</p></td>
+ </tr>
+
+ <tr>
+ <td>RetryIssueApproval</td>
+ <td><a href="#bytebase.v1.RetryIssueApprovalRequest">RetryIssueApprovalRequest</a></td>
+ <td><a href="#bytebase.v1.Issue">Issue</a></td>
+ <td><p>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&#39;s authorization model).</p></td>
+ </tr>
+
+ <tr>
+ <td>RunReview</td>
+ <td><a href="#bytebase.v1.RunReviewRequest">RunReviewRequest</a></td>
+ <td><a href="#bytebase.v1.ReviewRun">ReviewRun</a></td>
+ <td><p>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 and have no read RPC yet:
+findings will surface as issue comments once the review comment
+integration lands. The returned run carries execution status only.
+The audit log is the only record of who triggered a run.
+Permissions required: bb.reviewRuns.run</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <table class="field-table">
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
<thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
</thead>
<tbody>
+
- <tr>
- <td>id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>id is the uuid for semantic type. </p></td>
- </tr>
- <tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>the title of the semantic type, it should not be empty. </p></td>
- </tr>
+ <tr>
+ <td>GetIssue</td>
+ <td>GET</td>
+ <td>/v1/{name=projects/*/issues/*}</td>
+ <td></td>
+ </tr>
- <tr>
- <td>description</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>the description of the semantic type, it can be empty. </p></td>
- </tr>
+
- <tr>
- <td>algorithm</td>
- <td><a href="#bytebase.v1.Algorithm">Algorithm</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
- <tr>
- <td>icon</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>icon is the icon for semantic type, it can be emoji or base64 encoded image. </p></td>
- </tr>
+ <tr>
+ <td>CreateIssue</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*}/issues</td>
+ <td>issue</td>
+ </tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.Setting">Setting</h3>
- <p>The schema of setting.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The resource name of the setting.
-Format: settings/{setting}
-Example: &#34;settings/SEMANTIC_TYPES&#34; </p></td>
- </tr>
- <tr>
- <td>value</td>
- <td><a href="#bytebase.v1.SettingValue">SettingValue</a></td>
- <td></td>
- <td><p>The configuration value of the setting. </p></td>
- </tr>
+ <tr>
+ <td>ListIssues</td>
+ <td>GET</td>
+ <td>/v1/{parent=projects/*}/issues</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>SearchIssues</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*}/issues:search</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>UpdateIssue</td>
+ <td>PATCH</td>
+ <td>/v1/{issue.name=projects/*/issues/*}</td>
+ <td>issue</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>ListIssueComments</td>
+ <td>GET</td>
+ <td>/v1/{parent=projects/*/issues/*}/issueComments</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>CreateIssueComment</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*/issues/*}:comment</td>
+ <td>issue_comment</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>UpdateIssueComment</td>
+ <td>PATCH</td>
+ <td>/v1/{parent=projects/*/issues/*}:comment</td>
+ <td>issue_comment</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>BatchUpdateIssuesStatus</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*}/issues:batchUpdateStatus</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>ApproveIssue</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/issues/*}:approve</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>RejectIssue</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/issues/*}:reject</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>RequestIssue</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/issues/*}:request</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>RetryIssueApproval</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/issues/*}:retryApproval</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>RunReview</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/issues/*/reviewRuns/*}:run</td>
+ <td>*</td>
+ </tr>
+
</tbody>
</table>
-
-
+
- <h3 id="bytebase.v1.SettingValue">SettingValue</h3>
- <p>The data in setting value.</p>
+ <div class="file-heading">
+ <h2 id="v1/setting_service.proto">v1/setting_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.AISetting">AISetting</h3>
+ <p></p>
<table class="field-table">
@@ -14794,64 +14525,43 @@ Example: &#34;settings/SEMANTIC_TYPES&#34; </p></td>
<tbody>
<tr>
- <td>app_im</td>
- <td><a href="#bytebase.v1.AppIMSetting">AppIMSetting</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>workspace_profile</td>
- <td><a href="#bytebase.v1.WorkspaceProfileSetting">WorkspaceProfileSetting</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>workspace_approval</td>
- <td><a href="#bytebase.v1.WorkspaceApprovalSetting">WorkspaceApprovalSetting</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>data_classification</td>
- <td><a href="#bytebase.v1.DataClassificationSetting">DataClassificationSetting</a></td>
+ <td>enabled</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>semantic_type</td>
- <td><a href="#bytebase.v1.SemanticTypeSetting">SemanticTypeSetting</a></td>
+ <td>provider</td>
+ <td><a href="#bytebase.v1.AISetting.Provider">AISetting.Provider</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>ai</td>
- <td><a href="#bytebase.v1.AISetting">AISetting</a></td>
+ <td>endpoint</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>environment</td>
- <td><a href="#bytebase.v1.EnvironmentSetting">EnvironmentSetting</a></td>
+ <td>api_key</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>email</td>
- <td><a href="#bytebase.v1.EmailSetting">EmailSetting</a></td>
+ <td>model</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>mcp</td>
- <td><a href="#bytebase.v1.MCPSetting">MCPSetting</a></td>
+ <td>version</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -14863,7 +14573,7 @@ Example: &#34;settings/SEMANTIC_TYPES&#34; </p></td>
- <h3 id="bytebase.v1.TestEmailSettingRequest">TestEmailSettingRequest</h3>
+ <h3 id="bytebase.v1.Algorithm">Algorithm</h3>
<p></p>
@@ -14874,22 +14584,29 @@ Example: &#34;settings/SEMANTIC_TYPES&#34; </p></td>
<tbody>
<tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
+ <td>full_mask</td>
+ <td><a href="#bytebase.v1.Algorithm.FullMask">Algorithm.FullMask</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>email_setting</td>
- <td><a href="#bytebase.v1.EmailSetting">EmailSetting</a></td>
+ <td>range_mask</td>
+ <td><a href="#bytebase.v1.Algorithm.RangeMask">Algorithm.RangeMask</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>to</td>
- <td><a href="#string">string</a></td>
+ <td>md5_mask</td>
+ <td><a href="#bytebase.v1.Algorithm.MD5Mask">Algorithm.MD5Mask</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>inner_outer_mask</td>
+ <td><a href="#bytebase.v1.Algorithm.InnerOuterMask">Algorithm.InnerOuterMask</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -14901,7 +14618,7 @@ Example: &#34;settings/SEMANTIC_TYPES&#34; </p></td>
- <h3 id="bytebase.v1.TestEmailSettingResponse">TestEmailSettingResponse</h3>
+ <h3 id="bytebase.v1.Algorithm.FullMask">Algorithm.FullMask</h3>
<p></p>
@@ -14912,17 +14629,11 @@ Example: &#34;settings/SEMANTIC_TYPES&#34; </p></td>
<tbody>
<tr>
- <td>success</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>error</td>
+ <td>substitution</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>substitution is the string used to replace the original value, the
+max length of the string is 16 bytes. </p></td>
</tr>
</tbody>
@@ -14932,8 +14643,8 @@ Example: &#34;settings/SEMANTIC_TYPES&#34; </p></td>
- <h3 id="bytebase.v1.UpdateSettingRequest">UpdateSettingRequest</h3>
- <p>The request message for updating or creating a setting.</p>
+ <h3 id="bytebase.v1.Algorithm.InnerOuterMask">Algorithm.InnerOuterMask</h3>
+ <p></p>
<table class="field-table">
@@ -14943,30 +14654,29 @@ Example: &#34;settings/SEMANTIC_TYPES&#34; </p></td>
<tbody>
<tr>
- <td>setting</td>
- <td><a href="#bytebase.v1.Setting">Setting</a></td>
+ <td>prefix_len</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The setting to update. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>validate_only</td>
- <td><a href="#bool">bool</a></td>
+ <td>suffix_len</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>validate_only is a flag to indicate whether to validate the setting value,
-server would not persist the setting value if it is true. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>allow_missing</td>
- <td><a href="#bool">bool</a></td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.Algorithm.InnerOuterMask.MaskType">Algorithm.InnerOuterMask.MaskType</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td>substitution</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -14978,7 +14688,7 @@ server would not persist the setting value if it is true. </p></td>
- <h3 id="bytebase.v1.WorkspaceApprovalSetting">WorkspaceApprovalSetting</h3>
+ <h3 id="bytebase.v1.Algorithm.MD5Mask">Algorithm.MD5Mask</h3>
<p></p>
@@ -14989,10 +14699,35 @@ server would not persist the setting value if it is true. </p></td>
<tbody>
<tr>
- <td>rules</td>
- <td><a href="#bytebase.v1.WorkspaceApprovalSetting.Rule">WorkspaceApprovalSetting.Rule</a></td>
+ <td>salt</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>salt is the salt value to generate a different hash that with the word alone. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.Algorithm.RangeMask">Algorithm.RangeMask</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>slices</td>
+ <td><a href="#bytebase.v1.Algorithm.RangeMask.Slice">Algorithm.RangeMask.Slice</a></td>
<td>repeated</td>
- <td><p> </p></td>
+ <td><p>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. </p></td>
</tr>
</tbody>
@@ -15002,7 +14737,7 @@ server would not persist the setting value if it is true. </p></td>
- <h3 id="bytebase.v1.WorkspaceApprovalSetting.Rule">WorkspaceApprovalSetting.Rule</h3>
+ <h3 id="bytebase.v1.Algorithm.RangeMask.Slice">Algorithm.RangeMask.Slice</h3>
<p></p>
@@ -15013,50 +14748,27 @@ server would not persist the setting value if it is true. </p></td>
<tbody>
<tr>
- <td>template</td>
- <td><a href="#bytebase.v1.ApprovalTemplate">ApprovalTemplate</a></td>
+ <td>start</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>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 &#34;你好world&#34;, character index 2 refers to &#39;w&#39; (the 3rd character). </p></td>
</tr>
<tr>
- <td>condition</td>
- <td><a href="#google.type.Expr">google.type.Expr</a></td>
+ <td>end</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>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 &#34;==&#34;, &#34;!=&#34;, &#34;&lt;&#34;, &#34;&lt;=&#34;, &#34;&gt;&#34;, &#34;&gt;=&#34; operations.
-statement.table_rows: table row count number, support &#34;==&#34;, &#34;!=&#34;, &#34;&lt;&#34;, &#34;&lt;=&#34;, &#34;&gt;&#34;, &#34;&gt;=&#34; operations.
-resource.environment_id: the environment resource id, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operations.
-resource.project_id: the project resource id, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
-resource.db_engine: the database engine type, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operations. Check the Engine enum for values.
-statement.sql_type: the SQL type, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operations.
-resource.database_name: the database name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
-resource.schema_name: the schema name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
-resource.table_name: the table name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
-statement.text: the SQL statement, support &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
-request.expiration_days: the role expiration days for the request, support &#34;==&#34;, &#34;!=&#34;, &#34;&lt;&#34;, &#34;&lt;=&#34;, &#34;&gt;&#34;, &#34;&gt;=&#34; operations.
-request.role: the request role full name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; 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 == &#34;prod&#34; &amp;&amp; statement.affected_rows &gt;= 100
-resource.table_name.matches(&#34;sensitive_.*&#34;) &amp;&amp; resource.db_engine == &#34;MYSQL&#34; </p></td>
+ <td><p>end is the end character index (exclusive) of the original value.
+Uses character indices (not byte offsets) for display-oriented masking. </p></td>
</tr>
<tr>
- <td>source</td>
- <td><a href="#bytebase.v1.WorkspaceApprovalSetting.Rule.Source">WorkspaceApprovalSetting.Rule.Source</a></td>
+ <td>substitution</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>substitution is the string used to replace the OriginalValue[start:end). </p></td>
</tr>
</tbody>
@@ -15066,7 +14778,7 @@ resource.table_name.matches(&#34;sensitive_.*&#34;) &amp;&amp; resource.db_engin
- <h3 id="bytebase.v1.WorkspaceProfileSetting">WorkspaceProfileSetting</h3>
+ <h3 id="bytebase.v1.Announcement">Announcement</h3>
<p></p>
@@ -15077,180 +14789,270 @@ resource.table_name.matches(&#34;sensitive_.*&#34;) &amp;&amp; resource.db_engin
<tbody>
<tr>
- <td>external_url</td>
+ <td>text</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The external URL is used for sso authentication callback. </p></td>
+ <td><p>The text of announcement </p></td>
</tr>
<tr>
- <td>disallow_signup</td>
- <td><a href="#bool">bool</a></td>
+ <td>link</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Disallow self-service signup, users can only be invited by the owner. </p></td>
+ <td><p>The optional link, user can follow the link to check extra details </p></td>
</tr>
<tr>
- <td>require_mfa</td>
- <td><a href="#bool">bool</a></td>
+ <td>theme</td>
+ <td><a href="#bytebase.v1.Announcement.AnnouncementTheme">Announcement.AnnouncementTheme</a></td>
<td></td>
- <td><p>Require MFA for all users. </p></td>
+ <td><p>Banner colors. Built-in presets (info/warning/critical) are a
+frontend-only concept that seeds these colors; the store only holds them. </p></td>
</tr>
- <tr>
- <td>refresh_token_duration</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
- <td></td>
- <td><p>The duration for refresh token. Default is 7 days. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.Announcement.AnnouncementTheme">Announcement.AnnouncementTheme</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>announcement</td>
- <td><a href="#bytebase.v1.Announcement">Announcement</a></td>
+ <td>background</td>
+ <td><a href="#google.type.Color">google.type.Color</a></td>
<td></td>
- <td><p>The setting of custom announcement </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>maximum_request_expiration</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td>text</td>
+ <td><a href="#google.type.Color">google.type.Color</a></td>
<td></td>
- <td><p>The max expiration duration for data access requests. </p></td>
+ <td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.AppIMSetting">AppIMSetting</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>domains</td>
- <td><a href="#string">string</a></td>
+ <td>settings</td>
+ <td><a href="#bytebase.v1.AppIMSetting.IMSetting">AppIMSetting.IMSetting</a></td>
<td>repeated</td>
- <td><p>The workspace domain, e.g., bytebase.com. </p></td>
+ <td><p> </p></td>
</tr>
- <tr>
- <td>enforce_identity_domain</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Only user and group from the domains can be created and login. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.AppIMSetting.DingTalk">AppIMSetting.DingTalk</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>database_change_mode</td>
- <td><a href="#bytebase.v1.DatabaseChangeMode">DatabaseChangeMode</a></td>
+ <td>client_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The workspace database change mode. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>disallow_password_signin</td>
- <td><a href="#bool">bool</a></td>
+ <td>client_secret</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether password sign-in is disabled for all end users. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>enable_metric_collection</td>
- <td><a href="#bool">bool</a></td>
+ <td>robot_code</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether to enable metric collection for the workspace. </p></td>
+ <td><p> </p></td>
</tr>
- <tr>
- <td>inactive_session_timeout</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
- <td></td>
- <td><p>The session expiration time if not activity detected for the user. Value &lt;= 0 means no limit. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.AppIMSetting.Feishu">AppIMSetting.Feishu</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>enable_audit_log_stdout</td>
- <td><a href="#bool">bool</a></td>
+ <td>app_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether to enable audit logging to stdout in structured JSON format.
-Requires TEAM or ENTERPRISE license. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>watermark</td>
- <td><a href="#bool">bool</a></td>
+ <td>app_secret</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether to display watermark on pages.
-Requires ENTERPRISE license. </p></td>
+ <td><p> </p></td>
</tr>
- <tr>
- <td>password_restriction</td>
- <td><a href="#bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</a></td>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.AppIMSetting.IMSetting">AppIMSetting.IMSetting</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>type</td>
+ <td><a href="#bytebase.v1.WebhookType">WebhookType</a></td>
<td></td>
- <td><p>Password restriction settings. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>access_token_duration</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td>slack</td>
+ <td><a href="#bytebase.v1.AppIMSetting.Slack">AppIMSetting.Slack</a></td>
<td></td>
- <td><p>The duration for access token. Default is 1 hour. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>enable_debug</td>
- <td><a href="#bool">bool</a></td>
+ <td>feishu</td>
+ <td><a href="#bytebase.v1.AppIMSetting.Feishu">AppIMSetting.Feishu</a></td>
<td></td>
- <td><p>Whether debug mode is enabled. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>sql_result_size</td>
- <td><a href="#int64">int64</a></td>
+ <td>wecom</td>
+ <td><a href="#bytebase.v1.AppIMSetting.Wecom">AppIMSetting.Wecom</a></td>
<td></td>
- <td><p>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 &lt;= 0. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>query_timeout</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td>lark</td>
+ <td><a href="#bytebase.v1.AppIMSetting.Lark">AppIMSetting.Lark</a></td>
<td></td>
- <td><p>The query timeout duration for query and export, works for the SQL Editor and Export Center. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>allow_email_code_signin</td>
- <td><a href="#bool">bool</a></td>
+ <td>dingtalk</td>
+ <td><a href="#bytebase.v1.AppIMSetting.DingTalk">AppIMSetting.DingTalk</a></td>
<td></td>
- <td><p>Allow signin/signup using email &#43; a 6-digit one-time verification code.
-Requires the EMAIL setting to be configured on the workspace. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>sql_editor_theme_id</td>
- <td><a href="#string">string</a></td>
+ <td>teams</td>
+ <td><a href="#bytebase.v1.AppIMSetting.Teams">AppIMSetting.Teams</a></td>
<td></td>
- <td><p>Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id
-OR a custom theme&#39;s uuid. Empty ⇒ default light. </p></td>
+ <td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.AppIMSetting.Lark">AppIMSetting.Lark</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>sql_editor_custom_theme</td>
- <td><a href="#bytebase.v1.SQLEditorThemeSetting">SQLEditorThemeSetting</a></td>
+ <td>app_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The enforced CUSTOM theme&#39;s full definition — present ONLY when
-sql_editor_theme_id is a custom uuid. tokens is always complete. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>maximum_role_expiration</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td>app_secret</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The max expiration duration for request role.
-Deprecated: use just-in-time access request flows instead. </p></td>
+ <td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.AppIMSetting.Slack">AppIMSetting.Slack</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>directory_sync_token_configured</td>
- <td><a href="#bool">bool</a></td>
+ <td>token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>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 &#34;generate&#34; and &#34;regenerate&#34;. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -15260,7 +15062,7 @@ offering &#34;generate&#34; and &#34;regenerate&#34;. </p></td>
- <h3 id="bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</h3>
+ <h3 id="bytebase.v1.AppIMSetting.Teams">AppIMSetting.Teams</h3>
<p></p>
@@ -15271,52 +15073,86 @@ offering &#34;generate&#34; and &#34;regenerate&#34;. </p></td>
<tbody>
<tr>
- <td>min_length</td>
- <td><a href="#int32">int32</a></td>
+ <td>tenant_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>min_length is the minimum length for password, should no less than 8. </p></td>
+ <td><p>Azure AD tenant ID (Directory ID). </p></td>
</tr>
<tr>
- <td>require_number</td>
- <td><a href="#bool">bool</a></td>
+ <td>client_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>require_number requires the password must contains at least one number. </p></td>
+ <td><p>Azure AD application (client) ID. </p></td>
</tr>
<tr>
- <td>require_letter</td>
- <td><a href="#bool">bool</a></td>
+ <td>client_secret</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>require_letter requires the password must contains at least one letter, regardless of upper case or lower case </p></td>
+ <td><p>Azure AD client secret. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.AppIMSetting.Wecom">AppIMSetting.Wecom</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>require_uppercase_letter</td>
- <td><a href="#bool">bool</a></td>
+ <td>corp_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>require_uppercase_letter requires the password must contains at least one upper case letter. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>require_special_character</td>
- <td><a href="#bool">bool</a></td>
+ <td>agent_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>require_special_character requires the password must contains at least one special character. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>require_reset_password_for_first_login</td>
- <td><a href="#bool">bool</a></td>
+ <td>secret</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>require_reset_password_for_first_login requires users to reset their password after the 1st login. </p></td>
+ <td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DataClassificationSetting">DataClassificationSetting</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>password_rotation</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
- <td></td>
- <td><p>password_rotation requires users to reset their password after the duration. </p></td>
+ <td>configs</td>
+ <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig">DataClassificationSetting.DataClassificationConfig</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -15326,474 +15162,369 @@ offering &#34;generate&#34; and &#34;regenerate&#34;. </p></td>
+ <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig">DataClassificationSetting.DataClassificationConfig</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>id is the uuid for classification. Each project can chose one classification config. </p></td>
+ </tr>
+
+ <tr>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>levels</td>
+ <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level">DataClassificationSetting.DataClassificationConfig.Level</a></td>
+ <td>repeated</td>
+ <td><p>levels is user defined level list for classification. </p></td>
+ </tr>
+
+ <tr>
+ <td>classification</td>
+ <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry">DataClassificationSetting.DataClassificationConfig.ClassificationEntry</a></td>
+ <td>repeated</td>
+ <td><p>classification is the id - DataClassification map.
+The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
- <h3 id="bytebase.v1.AISetting.Provider">AISetting.Provider</h3>
+ <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry">DataClassificationSetting.DataClassificationConfig.ClassificationEntry</h3>
<p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>PROVIDER_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>OPEN_AI</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>CLAUDE</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>GEMINI</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>AZURE_OPENAI</td>
- <td>4</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>key</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>value</td>
+ <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification">DataClassificationSetting.DataClassificationConfig.DataClassification</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
- <h3 id="bytebase.v1.Algorithm.InnerOuterMask.MaskType">Algorithm.InnerOuterMask.MaskType</h3>
+ <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification">DataClassificationSetting.DataClassificationConfig.DataClassification</h3>
<p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>MASK_TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>INNER</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>OUTER</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>id is the classification id in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
+ </tr>
+
+ <tr>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>level</td>
+ <td><a href="#int32">int32</a></td>
+ <td>optional</td>
+ <td><p>The sensitivity level. Maps to Level.level. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
- <h3 id="bytebase.v1.DatabaseChangeMode">DatabaseChangeMode</h3>
+ <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level">DataClassificationSetting.DataClassificationConfig.Level</h3>
<p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>DATABASE_CHANGE_MODE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>PIPELINE</td>
- <td>1</td>
- <td><p>A more advanced database change process, including custom approval workflows and other advanced features.
-Default to this mode.</p></td>
- </tr>
-
- <tr>
- <td>EDITOR</td>
- <td>2</td>
- <td><p>A simple database change process in SQL editor. Users can execute SQL directly.</p></td>
- </tr>
-
- </tbody>
- </table>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>level</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The numeric level for ordering. Higher = more sensitive. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
- <h3 id="bytebase.v1.EmailSetting.SMTPConfig.Authentication">EmailSetting.SMTPConfig.Authentication</h3>
+ <h3 id="bytebase.v1.EmailSetting">EmailSetting</h3>
<p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>AUTHENTICATION_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>AUTHENTICATION_NONE</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>PLAIN</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>LOGIN</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>CRAM_MD5</td>
- <td>4</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>from</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>from_name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>type</td>
+ <td><a href="#bytebase.v1.EmailSetting.Type">EmailSetting.Type</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>smtp</td>
+ <td><a href="#bytebase.v1.EmailSetting.SMTPConfig">EmailSetting.SMTPConfig</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
- <h3 id="bytebase.v1.EmailSetting.SMTPConfig.Encryption">EmailSetting.SMTPConfig.Encryption</h3>
+ <h3 id="bytebase.v1.EmailSetting.SMTPConfig">EmailSetting.SMTPConfig</h3>
<p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>ENCRYPTION_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>ENCRYPTION_NONE</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>STARTTLS</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>SSL_TLS</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>host</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>port</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>username</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>password</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>encryption</td>
+ <td><a href="#bytebase.v1.EmailSetting.SMTPConfig.Encryption">EmailSetting.SMTPConfig.Encryption</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>authentication</td>
+ <td><a href="#bytebase.v1.EmailSetting.SMTPConfig.Authentication">EmailSetting.SMTPConfig.Authentication</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
- <h3 id="bytebase.v1.EmailSetting.Type">EmailSetting.Type</h3>
+ <h3 id="bytebase.v1.EnvironmentSetting">EnvironmentSetting</h3>
<p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>SMTP</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>environments</td>
+ <td><a href="#bytebase.v1.EnvironmentSetting.Environment">EnvironmentSetting.Environment</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
- <h3 id="bytebase.v1.MCPSetting.Capability">MCPSetting.Capability</h3>
- <p>Capability is the ceiling: a session runs at this level or lower.</p><p>Writing CAPABILITY_UNSPECIFIED explicitly is rejected; omit the update mask</p><p>path to leave the current ceiling unchanged.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>CAPABILITY_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DISABLED</td>
- <td>1</td>
- <td><p>MCP connections are rejected.</p></td>
- </tr>
-
- <tr>
- <td>READ_ONLY</td>
- <td>3</td>
- <td><p>MCP may inspect metadata and run read-only queries. A session opens, and
-what it may do is decided per method by the capability gate and per
-statement by the SQL clamp: a request holding a statement that is not a
-read is refused whole, and where the engine&#39;s driver has one the
-database session is opened read-only as well.</p></td>
- </tr>
-
- <tr>
- <td>READ_WRITE</td>
- <td>4</td>
- <td><p>MCP may perform mutations, still bounded by the user&#39;s RBAC.</p></td>
- </tr>
-
- </tbody>
- </table>
+ <h3 id="bytebase.v1.EnvironmentSetting.Environment">EnvironmentSetting.Environment</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The resource name of the environment.
+Format: environments/{environment}.
+Output only. </p></td>
+ </tr>
+
+ <tr>
+ <td>id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The resource id of the environment.
+This value should be 4-63 characters, and valid characters
+are /[a-z][0-9]-/. </p></td>
+ </tr>
+
+ <tr>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The display name of the environment. </p></td>
+ </tr>
+
+ <tr>
+ <td>tags</td>
+ <td><a href="#bytebase.v1.EnvironmentSetting.Environment.TagsEntry">EnvironmentSetting.Environment.TagsEntry</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>color</td>
+ <td><a href="#google.type.Color">google.type.Color</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
- <h3 id="bytebase.v1.Setting.SettingName">Setting.SettingName</h3>
+ <h3 id="bytebase.v1.EnvironmentSetting.Environment.TagsEntry">EnvironmentSetting.Environment.TagsEntry</h3>
<p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>SETTING_NAME_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>WORKSPACE_PROFILE</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>WORKSPACE_APPROVAL</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>APP_IM</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>AI</td>
- <td>4</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DATA_CLASSIFICATION</td>
- <td>5</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>SEMANTIC_TYPES</td>
- <td>6</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>ENVIRONMENT</td>
- <td>7</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>EMAIL</td>
- <td>8</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>MCP</td>
- <td>9</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.WorkspaceApprovalSetting.Rule.Source">WorkspaceApprovalSetting.Rule.Source</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>SOURCE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>CHANGE_DATABASE</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>CREATE_DATABASE</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>REQUEST_ROLE</td>
- <td>4</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>REQUEST_ACCESS</td>
- <td>5</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.SettingService">SettingService</h3>
- <p>SettingService manages workspace-level settings and configurations.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>ListSettings</td>
- <td><a href="#bytebase.v1.ListSettingsRequest">ListSettingsRequest</a></td>
- <td><a href="#bytebase.v1.ListSettingsResponse">ListSettingsResponse</a></td>
- <td><p>Lists all workspace settings.
-Permissions required: bb.settings.list</p></td>
- </tr>
-
- <tr>
- <td>GetSetting</td>
- <td><a href="#bytebase.v1.GetSettingRequest">GetSettingRequest</a></td>
- <td><a href="#bytebase.v1.Setting">Setting</a></td>
- <td><p>Retrieves a workspace setting by name.
-Permissions required: bb.settings.get</p></td>
- </tr>
-
- <tr>
- <td>UpdateSetting</td>
- <td><a href="#bytebase.v1.UpdateSettingRequest">UpdateSettingRequest</a></td>
- <td><a href="#bytebase.v1.Setting">Setting</a></td>
- <td><p>Updates a workspace setting.
-Permissions required: bb.settings.set</p></td>
- </tr>
-
- <tr>
- <td>TestEmailSetting</td>
- <td><a href="#bytebase.v1.TestEmailSettingRequest">TestEmailSettingRequest</a></td>
- <td><a href="#bytebase.v1.TestEmailSettingResponse">TestEmailSettingResponse</a></td>
- <td><p>Sends a test email using the provided config (without persisting).
-Permissions required: bb.settings.set</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
+ <table class="field-table">
<thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>
-
-
-
- <tr>
- <td>ListSettings</td>
- <td>GET</td>
- <td>/v1/settings</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>GetSetting</td>
- <td>GET</td>
- <td>/v1/{name=settings/*}</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>UpdateSetting</td>
- <td>PATCH</td>
- <td>/v1/{setting.name=settings/*}</td>
- <td>setting</td>
- </tr>
-
-
+ <tr>
+ <td>key</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
- <tr>
- <td>TestEmailSetting</td>
- <td>POST</td>
- <td>/v1/{parent=workspaces/*}/settings/EMAIL:test</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>value</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
-
</tbody>
</table>
+
-
-
-
- <div class="file-heading">
- <h2 id="v1/user_service.proto">v1/user_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
+
- <h3 id="bytebase.v1.BatchGetUsersRequest">BatchGetUsersRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.GetSettingRequest">GetSettingRequest</h3>
+ <p>The request message for getting a setting.</p>
<table class="field-table">
@@ -15803,11 +15534,10 @@ Permissions required: bb.settings.set</p></td>
<tbody>
<tr>
- <td>names</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The user names to retrieve.
-Format: users/{email} </p></td>
+ <td></td>
+ <td><p>The resource name of the setting. </p></td>
</tr>
</tbody>
@@ -15817,8 +15547,8 @@ Format: users/{email} </p></td>
- <h3 id="bytebase.v1.BatchGetUsersResponse">BatchGetUsersResponse</h3>
- <p></p>
+ <h3 id="bytebase.v1.GetSettingResponse">GetSettingResponse</h3>
+ <p>The response message for getting a setting.</p>
<table class="field-table">
@@ -15828,10 +15558,10 @@ Format: users/{email} </p></td>
<tbody>
<tr>
- <td>users</td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td>repeated</td>
- <td><p>One user per requested name, in the same order as `names`. </p></td>
+ <td>setting</td>
+ <td><a href="#bytebase.v1.Setting">Setting</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -15841,7 +15571,14 @@ Format: users/{email} </p></td>
- <h3 id="bytebase.v1.ChangePasswordRequest">ChangePasswordRequest</h3>
+ <h3 id="bytebase.v1.ListSettingsRequest">ListSettingsRequest</h3>
+ <p></p>
+
+
+
+
+
+ <h3 id="bytebase.v1.ListSettingsResponse">ListSettingsResponse</h3>
<p></p>
@@ -15852,24 +15589,10 @@ Format: users/{email} </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Format: users/{email}. Must be the caller&#39;s own name. </p></td>
- </tr>
-
- <tr>
- <td>new_password</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>credential</td>
- <td><a href="#bytebase.v1.CredentialProof">CredentialProof</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>settings</td>
+ <td><a href="#bytebase.v1.Setting">Setting</a></td>
+ <td>repeated</td>
+ <td><p>The settings from the specified request. </p></td>
</tr>
</tbody>
@@ -15879,9 +15602,9 @@ Format: users/{email} </p></td>
- <h3 id="bytebase.v1.ConfirmRecoveryCodesRequest">ConfirmRecoveryCodesRequest</h3>
- <p></p>
-
+ <h3 id="bytebase.v1.MCPSetting">MCPSetting</h3>
+ <p>MCPSetting is what an MCP (Model Context Protocol) session may do in this</p><p>workspace.</p>
+
<table class="field-table">
<thead>
@@ -15890,57 +15613,31 @@ Format: users/{email} </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Format: users/{email}. Must be the caller&#39;s own name. </p></td>
- </tr>
-
- <tr>
- <td>pending_version</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p>The pending_version of the codes being confirmed. Confirming promotes
-exactly the set this version identifies, or nothing. </p></td>
- </tr>
-
- <tr>
- <td>credential</td>
- <td><a href="#bytebase.v1.CredentialProof">CredentialProof</a></td>
+ <td>capability</td>
+ <td><a href="#bytebase.v1.MCPSetting.Capability">MCPSetting.Capability</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>otp_code</td>
- <td><a href="#string">string</a></td>
+ <td>ignore_masking_exemptions</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Required for first-time enrollment, rejected otherwise. A *fresh* code,
-not the one EnableMFA took. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.CreateUserRequest">CreateUserRequest</h3>
- <p></p>
+ <td><p>Whether a request that arrived over MCP stops applying the caller&#39;s own
+unmasking provisioning. Two mechanisms let a user see a real value and this
+suppresses both: the masking exemptions granted to them, and the unmask
+carried by an access grant. The same user in the console is untouched.
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>user</td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td></td>
- <td><p>The user to create. </p></td>
+It cannot force masking where there is none. Masking substitutes values in
+query results, so this does not reach data copied into a column carrying no
+masking policy, and it does nothing on the engines Bytebase does not mask.
+It narrows what an agent reads through the paths Bytebase masks; it is not
+a confidentiality boundary. </p></td>
</tr>
</tbody>
@@ -15950,8 +15647,8 @@ not the one EnableMFA took. </p></td>
- <h3 id="bytebase.v1.CredentialProof">CredentialProof</h3>
- <p>One proof that the caller currently controls a credential on the account.</p><p>Exactly one field must be set; enforced in the handler.</p>
+ <h3 id="bytebase.v1.SQLEditorThemeSetting">SQLEditorThemeSetting</h3>
+ <p></p>
<table class="field-table">
@@ -15961,33 +15658,31 @@ not the one EnableMFA took. </p></td>
<tbody>
<tr>
- <td>current_password</td>
+ <td>id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The account&#39;s current password. Refused by a factor-touching method
-while a live MFA factor exists. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>otp_code</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A live code from the account&#39;s enrolled TOTP authenticator. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>recovery_code</td>
+ <td>monaco_base</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A single-use MFA recovery code. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>email_code</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>A one-time code from RequestReauthCode. Bytebase Cloud only, and only
-while the account has no live MFA factor. </p></td>
+ <td>tokens</td>
+ <td><a href="#bytebase.v1.SQLEditorThemeSetting.TokensEntry">SQLEditorThemeSetting.TokensEntry</a></td>
+ <td>repeated</td>
+ <td><p>CSS token colors. </p></td>
</tr>
</tbody>
@@ -15997,7 +15692,7 @@ while the account has no live MFA factor. </p></td>
- <h3 id="bytebase.v1.DeleteUserRequest">DeleteUserRequest</h3>
+ <h3 id="bytebase.v1.SQLEditorThemeSetting.TokensEntry">SQLEditorThemeSetting.TokensEntry</h3>
<p></p>
@@ -16008,11 +15703,17 @@ while the account has no live MFA factor. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>key</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the user to delete.
-Format: users/{email} </p></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>value</td>
+ <td><a href="#google.type.Color">google.type.Color</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -16022,7 +15723,7 @@ Format: users/{email} </p></td>
- <h3 id="bytebase.v1.DisableMFARequest">DisableMFARequest</h3>
+ <h3 id="bytebase.v1.SemanticTypeSetting">SemanticTypeSetting</h3>
<p></p>
@@ -16033,19 +15734,10 @@ Format: users/{email} </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Format: users/{email}. The caller&#39;s own, or another user&#39;s with
-bb.users.update. </p></td>
- </tr>
-
- <tr>
- <td>credential</td>
- <td><a href="#bytebase.v1.CredentialProof">CredentialProof</a></td>
- <td></td>
- <td><p>Required for a self-service call against a live factor, and then only
-otp_code or recovery_code. Unused on an admin-assisted call. </p></td>
+ <td>types</td>
+ <td><a href="#bytebase.v1.SemanticTypeSetting.SemanticType">SemanticTypeSetting.SemanticType</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -16055,7 +15747,7 @@ otp_code or recovery_code. Unused on an admin-assisted call. </p></td>
- <h3 id="bytebase.v1.EnableMFARequest">EnableMFARequest</h3>
+ <h3 id="bytebase.v1.SemanticTypeSetting.SemanticType">SemanticTypeSetting.SemanticType</h3>
<p></p>
@@ -16066,32 +15758,38 @@ otp_code or recovery_code. Unused on an admin-assisted call. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: users/{email}. Must be the caller&#39;s own name. </p></td>
+ <td><p>id is the uuid for semantic type. </p></td>
</tr>
<tr>
- <td>otp_code</td>
+ <td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A code from the authenticator the pending secret was just added to. </p></td>
+ <td><p>the title of the semantic type, it should not be empty. </p></td>
</tr>
<tr>
- <td>pending_version</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>description</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The pending_version this enrollment was minted with. </p></td>
+ <td><p>the description of the semantic type, it can be empty. </p></td>
</tr>
<tr>
- <td>credential</td>
- <td><a href="#bytebase.v1.CredentialProof">CredentialProof</a></td>
+ <td>algorithm</td>
+ <td><a href="#bytebase.v1.Algorithm">Algorithm</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>icon</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>icon is the icon for semantic type, it can be emoji or base64 encoded image. </p></td>
</tr>
</tbody>
@@ -16101,8 +15799,8 @@ rotation, and for first-time enrollment on an account with a password. </p></td>
- <h3 id="bytebase.v1.GetUserRequest">GetUserRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.Setting">Setting</h3>
+ <p>The schema of setting.</p>
<table class="field-table">
@@ -16115,8 +15813,16 @@ rotation, and for first-time enrollment on an account with a password. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the user to retrieve.
-Format: users/{email} </p></td>
+ <td><p>The resource name of the setting.
+Format: settings/{setting}
+Example: &#34;settings/SEMANTIC_TYPES&#34; </p></td>
+ </tr>
+
+ <tr>
+ <td>value</td>
+ <td><a href="#bytebase.v1.SettingValue">SettingValue</a></td>
+ <td></td>
+ <td><p>The configuration value of the setting. </p></td>
</tr>
</tbody>
@@ -16126,8 +15832,8 @@ Format: users/{email} </p></td>
- <h3 id="bytebase.v1.ListUsersRequest">ListUsersRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.SettingValue">SettingValue</h3>
+ <p>The data in setting value.</p>
<table class="field-table">
@@ -16137,112 +15843,66 @@ Format: users/{email} </p></td>
<tbody>
<tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
+ <td>app_im</td>
+ <td><a href="#bytebase.v1.AppIMSetting">AppIMSetting</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>page_token</td>
- <td><a href="#string">string</a></td>
+ <td>workspace_profile</td>
+ <td><a href="#bytebase.v1.WorkspaceProfileSetting">WorkspaceProfileSetting</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>show_deleted</td>
- <td><a href="#bool">bool</a></td>
+ <td>workspace_approval</td>
+ <td><a href="#bytebase.v1.WorkspaceApprovalSetting">WorkspaceApprovalSetting</a></td>
<td></td>
- <td><p>Show deleted users if specified. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>filter</td>
- <td><a href="#string">string</a></td>
+ <td>data_classification</td>
+ <td><a href="#bytebase.v1.DataClassificationSetting">DataClassificationSetting</a></td>
<td></td>
- <td><p>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 &#34;==&#34; and &#34;.contains()&#34; operator.
-- email: the user email, support &#34;==&#34; and &#34;.contains()&#34; operator.
-- state: check State enum for values, support &#34;==&#34; operator.
-- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
-
-For example:
-name == &#34;ed&#34;
-name.contains(&#34;ed&#34;)
-email == &#34;[email protected]&#34;
-email.contains(&#34;ed&#34;)
-state == &#34;DELETED&#34;
-project == &#34;projects/sample-project&#34;
-You can combine filter conditions like:
-name.contains(&#34;ed&#34;) &amp;&amp; project == &#34;projects/sample-project&#34;
-(name == &#34;ed&#34; || email == &#34;[email protected]&#34;) &amp;&amp; project == &#34;projects/sample-project&#34; </p></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ListUsersResponse">ListUsersResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>users</td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td>repeated</td>
- <td><p>The users from the specified request. </p></td>
+ <td>semantic_type</td>
+ <td><a href="#bytebase.v1.SemanticTypeSetting">SemanticTypeSetting</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>next_page_token</td>
- <td><a href="#string">string</a></td>
+ <td>ai</td>
+ <td><a href="#bytebase.v1.AISetting">AISetting</a></td>
<td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.RegenerateRecoveryCodesRequest">RegenerateRecoveryCodesRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>environment</td>
+ <td><a href="#bytebase.v1.EnvironmentSetting">EnvironmentSetting</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>email</td>
+ <td><a href="#bytebase.v1.EmailSetting">EmailSetting</a></td>
<td></td>
- <td><p>Format: users/{email}. Must be the caller&#39;s own name. </p></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>mcp</td>
+ <td><a href="#bytebase.v1.MCPSetting">MCPSetting</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -16252,7 +15912,7 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.RegenerateRecoveryCodesResponse">RegenerateRecoveryCodesResponse</h3>
+ <h3 id="bytebase.v1.TestEmailSettingRequest">TestEmailSettingRequest</h3>
<p></p>
@@ -16263,41 +15923,24 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>recovery_codes</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The pending recovery codes, shown once for the caller to save. </p></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>pending_version</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>email_setting</td>
+ <td><a href="#bytebase.v1.EmailSetting">EmailSetting</a></td>
<td></td>
- <td><p>Identifies this mint; see StartMFAEnrollmentResponse.pending_version. </p></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.RequestReauthCodeRequest">RequestReauthCodeRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>name</td>
+ <td>to</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: users/{email}. Must be the caller&#39;s own name. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -16307,7 +15950,7 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.StartMFAEnrollmentRequest">StartMFAEnrollmentRequest</h3>
+ <h3 id="bytebase.v1.TestEmailSettingResponse">TestEmailSettingResponse</h3>
<p></p>
@@ -16318,10 +15961,17 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>success</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>error</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: users/{email}. Must be the caller&#39;s own name. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -16331,8 +15981,8 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.StartMFAEnrollmentResponse">StartMFAEnrollmentResponse</h3>
- <p></p>
+ <h3 id="bytebase.v1.UpdateSettingRequest">UpdateSettingRequest</h3>
+ <p>The request message for updating or creating a setting.</p>
<table class="field-table">
@@ -16342,35 +15992,32 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>otp_secret</td>
- <td><a href="#string">string</a></td>
+ <td>setting</td>
+ <td><a href="#bytebase.v1.Setting">Setting</a></td>
<td></td>
- <td><p>The pending TOTP secret. The only response that carries it — it is never
-readable from the User resource. </p></td>
+ <td><p>The setting to update. </p></td>
</tr>
<tr>
- <td>recovery_codes</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The pending recovery codes, shown once for the caller to save. </p></td>
+ <td>validate_only</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>validate_only is a flag to indicate whether to validate the setting value,
+server would not persist the setting value if it is true. </p></td>
</tr>
<tr>
- <td>expire_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>When this enrollment stops being confirmable. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>pending_version</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -16380,7 +16027,7 @@ pending one rather than promoting something this caller never saw. </p></td>
- <h3 id="bytebase.v1.UndeleteUserRequest">UndeleteUserRequest</h3>
+ <h3 id="bytebase.v1.WorkspaceApprovalSetting">WorkspaceApprovalSetting</h3>
<p></p>
@@ -16391,11 +16038,10 @@ pending one rather than promoting something this caller never saw. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the deleted user.
-Format: users/{email} </p></td>
+ <td>rules</td>
+ <td><a href="#bytebase.v1.WorkspaceApprovalSetting.Rule">WorkspaceApprovalSetting.Rule</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -16405,7 +16051,7 @@ Format: users/{email} </p></td>
- <h3 id="bytebase.v1.UpdateEmailRequest">UpdateEmailRequest</h3>
+ <h3 id="bytebase.v1.WorkspaceApprovalSetting.Rule">WorkspaceApprovalSetting.Rule</h3>
<p></p>
@@ -16416,61 +16062,50 @@ Format: users/{email} </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>template</td>
+ <td><a href="#bytebase.v1.ApprovalTemplate">ApprovalTemplate</a></td>
<td></td>
- <td><p>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 &#39;email&#39; field. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>email</td>
- <td><a href="#string">string</a></td>
+ <td>condition</td>
+ <td><a href="#google.type.Expr">google.type.Expr</a></td>
<td></td>
- <td><p>The new email address. </p></td>
- </tr>
-
- </tbody>
- </table>
+ <td><p>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.
-
-
- <h3 id="bytebase.v1.UpdateUserRequest">UpdateUserRequest</h3>
- <p></p>
+All supported variables:
+statement.affected_rows: affected row count in the DDL/DML, support &#34;==&#34;, &#34;!=&#34;, &#34;&lt;&#34;, &#34;&lt;=&#34;, &#34;&gt;&#34;, &#34;&gt;=&#34; operations.
+statement.table_rows: table row count number, support &#34;==&#34;, &#34;!=&#34;, &#34;&lt;&#34;, &#34;&lt;=&#34;, &#34;&gt;&#34;, &#34;&gt;=&#34; operations.
+resource.environment_id: the environment resource id, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operations.
+resource.project_id: the project resource id, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
+resource.db_engine: the database engine type, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operations. Check the Engine enum for values.
+statement.sql_type: the SQL type, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operations.
+resource.database_name: the database name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
+resource.schema_name: the schema name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
+resource.table_name: the table name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
+statement.text: the SQL statement, support &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
+request.expiration_days: the role expiration days for the request, support &#34;==&#34;, &#34;!=&#34;, &#34;&lt;&#34;, &#34;&lt;=&#34;, &#34;&gt;&#34;, &#34;&gt;=&#34; operations.
+request.role: the request role full name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>user</td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td></td>
- <td><p>The user to update.
+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
-The user&#39;s `name` field is used to identify the user to update.
-Format: users/{email} </p></td>
- </tr>
-
- <tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
- <td></td>
- <td><p>The list of fields to update. </p></td>
+For examples:
+resource.environment_id == &#34;prod&#34; &amp;&amp; statement.affected_rows &gt;= 100
+resource.table_name.matches(&#34;sensitive_.*&#34;) &amp;&amp; resource.db_engine == &#34;MYSQL&#34; </p></td>
</tr>
<tr>
- <td>allow_missing</td>
- <td><a href="#bool">bool</a></td>
+ <td>source</td>
+ <td><a href="#bytebase.v1.WorkspaceApprovalSetting.Rule.Source">WorkspaceApprovalSetting.Rule.Source</a></td>
<td></td>
- <td><p>If set to true, and the user is not found, a new user will be created.
-In this situation, `update_mask` is ignored. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -16480,7 +16115,7 @@ In this situation, `update_mask` is ignored. </p></td>
- <h3 id="bytebase.v1.User">User</h3>
+ <h3 id="bytebase.v1.WorkspaceProfileSetting">WorkspaceProfileSetting</h3>
<p></p>
@@ -16491,78 +16126,180 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>external_url</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the user.
-Format: users/{email} </p></td>
+ <td><p>The external URL is used for sso authentication callback. </p></td>
</tr>
<tr>
- <td>state</td>
- <td><a href="#bytebase.v1.State">State</a></td>
+ <td>disallow_signup</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The lifecycle state of the user account. </p></td>
+ <td><p>Disallow self-service signup, users can only be invited by the owner. </p></td>
</tr>
<tr>
- <td>email</td>
- <td><a href="#string">string</a></td>
+ <td>require_mfa</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The email address of the user, used for login and notifications. </p></td>
+ <td><p>Require MFA for all users. </p></td>
</tr>
<tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
+ <td>refresh_token_duration</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
<td></td>
- <td><p>The display title or full name of the user. </p></td>
+ <td><p>The duration for refresh token. Default is 7 days. </p></td>
</tr>
<tr>
- <td>password</td>
- <td><a href="#string">string</a></td>
+ <td>announcement</td>
+ <td><a href="#bytebase.v1.Announcement">Announcement</a></td>
<td></td>
- <td><p>The password for authentication. Only used during user creation or password updates. </p></td>
+ <td><p>The setting of custom announcement </p></td>
</tr>
<tr>
- <td>mfa_enabled</td>
- <td><a href="#bool">bool</a></td>
+ <td>maximum_request_expiration</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
<td></td>
- <td><p>Whether the user has a live MFA factor. Set by ConfirmRecoveryCodes and
-DisableMFA, never by an update. </p></td>
+ <td><p>The max expiration duration for data access requests. </p></td>
</tr>
<tr>
- <td>phone</td>
+ <td>domains</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>Should be a valid E.164 compliant phone number.
-Could be empty. </p></td>
+ <td>repeated</td>
+ <td><p>The workspace domain, e.g., bytebase.com. </p></td>
</tr>
<tr>
- <td>profile</td>
- <td><a href="#bytebase.v1.User.Profile">User.Profile</a></td>
+ <td>enforce_identity_domain</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>User profile metadata. </p></td>
+ <td><p>Only user and group from the domains can be created and login. </p></td>
</tr>
<tr>
- <td>groups</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The groups for the user.
-Format: groups/{email} </p></td>
+ <td>database_change_mode</td>
+ <td><a href="#bytebase.v1.DatabaseChangeMode">DatabaseChangeMode</a></td>
+ <td></td>
+ <td><p>The workspace database change mode. </p></td>
</tr>
<tr>
- <td>workspace</td>
+ <td>disallow_password_signin</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether password sign-in is disabled for all end users. </p></td>
+ </tr>
+
+ <tr>
+ <td>enable_metric_collection</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to enable metric collection for the workspace. </p></td>
+ </tr>
+
+ <tr>
+ <td>inactive_session_timeout</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td></td>
+ <td><p>The session expiration time if not activity detected for the user. Value &lt;= 0 means no limit. </p></td>
+ </tr>
+
+ <tr>
+ <td>enable_audit_log_stdout</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to enable audit logging to stdout in structured JSON format.
+Requires TEAM or ENTERPRISE license. </p></td>
+ </tr>
+
+ <tr>
+ <td>watermark</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to display watermark on pages.
+Requires ENTERPRISE license. </p></td>
+ </tr>
+
+ <tr>
+ <td>password_restriction</td>
+ <td><a href="#bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</a></td>
+ <td></td>
+ <td><p>Password restriction settings. </p></td>
+ </tr>
+
+ <tr>
+ <td>access_token_duration</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td></td>
+ <td><p>The duration for access token. Default is 1 hour. </p></td>
+ </tr>
+
+ <tr>
+ <td>enable_debug</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether debug mode is enabled. </p></td>
+ </tr>
+
+ <tr>
+ <td>sql_result_size</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p>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 &lt;= 0. </p></td>
+ </tr>
+
+ <tr>
+ <td>query_timeout</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td></td>
+ <td><p>The query timeout duration for query and export, works for the SQL Editor and Export Center. </p></td>
+ </tr>
+
+ <tr>
+ <td>allow_email_code_signin</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Allow signin/signup using email &#43; a 6-digit one-time verification code.
+Requires the EMAIL setting to be configured on the workspace. </p></td>
+ </tr>
+
+ <tr>
+ <td>sql_editor_theme_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The current workspace.
-Format: workspaces/{id} </p></td>
+ <td><p>Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id
+OR a custom theme&#39;s uuid. Empty ⇒ default light. </p></td>
+ </tr>
+
+ <tr>
+ <td>sql_editor_custom_theme</td>
+ <td><a href="#bytebase.v1.SQLEditorThemeSetting">SQLEditorThemeSetting</a></td>
+ <td></td>
+ <td><p>The enforced CUSTOM theme&#39;s full definition — present ONLY when
+sql_editor_theme_id is a custom uuid. tokens is always complete. </p></td>
+ </tr>
+
+ <tr>
+ <td>maximum_role_expiration</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td></td>
+ <td><p>The max expiration duration for request role.
+Deprecated: use just-in-time access request flows instead. </p></td>
+ </tr>
+
+ <tr>
+ <td>directory_sync_token_configured</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>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 &#34;generate&#34; and &#34;regenerate&#34;. </p></td>
</tr>
</tbody>
@@ -16572,7 +16309,7 @@ Format: workspaces/{id} </p></td>
- <h3 id="bytebase.v1.User.Profile">User.Profile</h3>
+ <h3 id="bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</h3>
<p></p>
@@ -16583,24 +16320,52 @@ Format: workspaces/{id} </p></td>
<tbody>
<tr>
- <td>last_login_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>min_length</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The last time the user successfully logged in. </p></td>
+ <td><p>min_length is the minimum length for password, should no less than 8. </p></td>
</tr>
<tr>
- <td>last_change_password_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>require_number</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The last time the user changed their password. </p></td>
+ <td><p>require_number requires the password must contains at least one number. </p></td>
</tr>
<tr>
- <td>source</td>
- <td><a href="#string">string</a></td>
+ <td>require_letter</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>source means where the user comes from. For now we support Entra ID SCIM sync, so the source could be Entra ID. </p></td>
+ <td><p>require_letter requires the password must contains at least one letter, regardless of upper case or lower case </p></td>
+ </tr>
+
+ <tr>
+ <td>require_uppercase_letter</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>require_uppercase_letter requires the password must contains at least one upper case letter. </p></td>
+ </tr>
+
+ <tr>
+ <td>require_special_character</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>require_special_character requires the password must contains at least one special character. </p></td>
+ </tr>
+
+ <tr>
+ <td>require_reset_password_for_first_login</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>require_reset_password_for_first_login requires users to reset their password after the 1st login. </p></td>
+ </tr>
+
+ <tr>
+ <td>password_rotation</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td></td>
+ <td><p>password_rotation requires users to reset their password after the duration. </p></td>
</tr>
</tbody>
@@ -16612,348 +16377,454 @@ Format: workspaces/{id} </p></td>
-
-
-
-
- <h3 id="bytebase.v1.UserService">UserService</h3>
- <p>UserService manages user accounts and authentication.</p>
+ <h3 id="bytebase.v1.AISetting.Provider">AISetting.Provider</h3>
+ <p></p>
<table class="enum-table">
<thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
</thead>
<tbody>
<tr>
- <td>GetUser</td>
- <td><a href="#bytebase.v1.GetUserRequest">GetUserRequest</a></td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td><p>Get the user.
-Any authenticated user can get the user.
-Permissions required: bb.users.get</p></td>
+ <td>PROVIDER_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
</tr>
<tr>
- <td>BatchGetUsers</td>
- <td><a href="#bytebase.v1.BatchGetUsersRequest">BatchGetUsersRequest</a></td>
- <td><a href="#bytebase.v1.BatchGetUsersResponse">BatchGetUsersResponse</a></td>
- <td><p>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</p></td>
+ <td>OPEN_AI</td>
+ <td>1</td>
+ <td><p></p></td>
</tr>
<tr>
- <td>GetCurrentUser</td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td><p>Get the current authenticated user.
-Permissions required: None</p></td>
+ <td>CLAUDE</td>
+ <td>2</td>
+ <td><p></p></td>
</tr>
<tr>
- <td>ListUsers</td>
- <td><a href="#bytebase.v1.ListUsersRequest">ListUsersRequest</a></td>
- <td><a href="#bytebase.v1.ListUsersResponse">ListUsersResponse</a></td>
- <td><p>List all users.
-Any authenticated user can list users.
-Permissions required: bb.users.list</p></td>
+ <td>GEMINI</td>
+ <td>3</td>
+ <td><p></p></td>
</tr>
<tr>
- <td>CreateUser</td>
- <td><a href="#bytebase.v1.CreateUserRequest">CreateUserRequest</a></td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td><p>Creates a user in the caller&#39;s workspace (admin action, self-hosted only).
-In SaaS mode, admins should add users via workspace IAM policy instead.
-Permissions required: bb.users.create</p></td>
+ <td>AZURE_OPENAI</td>
+ <td>4</td>
+ <td><p></p></td>
</tr>
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.Algorithm.InnerOuterMask.MaskType">Algorithm.InnerOuterMask.MaskType</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>UpdateUser</td>
- <td><a href="#bytebase.v1.UpdateUserRequest">UpdateUserRequest</a></td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td><p>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)</p></td>
+ <td>MASK_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
</tr>
<tr>
- <td>DeleteUser</td>
- <td><a href="#bytebase.v1.DeleteUserRequest">DeleteUserRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Deletes a user. Requires bb.users.delete permission with additional validation: the last remaining workspace admin cannot be deleted.
-Permissions required: bb.users.delete</p></td>
+ <td>INNER</td>
+ <td>1</td>
+ <td><p></p></td>
</tr>
<tr>
- <td>UndeleteUser</td>
- <td><a href="#bytebase.v1.UndeleteUserRequest">UndeleteUserRequest</a></td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td><p>Restores a deleted user.
-Permissions required: bb.users.undelete</p></td>
+ <td>OUTER</td>
+ <td>2</td>
+ <td><p></p></td>
</tr>
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.DatabaseChangeMode">DatabaseChangeMode</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>UpdateEmail</td>
- <td><a href="#bytebase.v1.UpdateEmailRequest">UpdateEmailRequest</a></td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td><p>Updates a user&#39;s email address.
-Permissions required: bb.users.updateEmail</p></td>
+ <td>DATABASE_CHANGE_MODE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
</tr>
<tr>
- <td>RequestReauthCode</td>
- <td><a href="#bytebase.v1.RequestReauthCodeRequest">RequestReauthCodeRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Sends a one-time code to the caller&#39;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`.</p></td>
+ <td>PIPELINE</td>
+ <td>1</td>
+ <td><p>A more advanced database change process, including custom approval workflows and other advanced features.
+Default to this mode.</p></td>
</tr>
<tr>
- <td>ChangePassword</td>
- <td><a href="#bytebase.v1.ChangePasswordRequest">ChangePasswordRequest</a></td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td><p>Changes the caller&#39;s own password. An administrator resetting someone
-else&#39;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`.</p></td>
+ <td>EDITOR</td>
+ <td>2</td>
+ <td><p>A simple database change process in SQL editor. Users can execute SQL directly.</p></td>
</tr>
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.EmailSetting.SMTPConfig.Authentication">EmailSetting.SMTPConfig.Authentication</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>StartMFAEnrollment</td>
- <td><a href="#bytebase.v1.StartMFAEnrollmentRequest">StartMFAEnrollmentRequest</a></td>
- <td><a href="#bytebase.v1.StartMFAEnrollmentResponse">StartMFAEnrollmentResponse</a></td>
- <td><p>Mints a pending TOTP secret and recovery codes for the caller&#39;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`.</p></td>
+ <td>AUTHENTICATION_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
</tr>
<tr>
- <td>EnableMFA</td>
- <td><a href="#bytebase.v1.EnableMFARequest">EnableMFARequest</a></td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td><p>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.</p></td>
+ <td>AUTHENTICATION_NONE</td>
+ <td>1</td>
+ <td><p></p></td>
</tr>
<tr>
- <td>DisableMFA</td>
- <td><a href="#bytebase.v1.DisableMFARequest">DisableMFARequest</a></td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td><p>Turns MFA off, clearing the entire MFA config — live and pending state
-alike. Callers may disable their own; an administrator may disable
-another user&#39;s with bb.users.update, which is how a locked-out user is
-recovered.
-Permissions required: bb.users.update, unless `name` is the caller&#39;s own.</p></td>
+ <td>PLAIN</td>
+ <td>2</td>
+ <td><p></p></td>
</tr>
<tr>
- <td>RegenerateRecoveryCodes</td>
- <td><a href="#bytebase.v1.RegenerateRecoveryCodesRequest">RegenerateRecoveryCodesRequest</a></td>
- <td><a href="#bytebase.v1.RegenerateRecoveryCodesResponse">RegenerateRecoveryCodesResponse</a></td>
- <td><p>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`.</p></td>
+ <td>LOGIN</td>
+ <td>3</td>
+ <td><p></p></td>
</tr>
<tr>
- <td>ConfirmRecoveryCodes</td>
- <td><a href="#bytebase.v1.ConfirmRecoveryCodesRequest">ConfirmRecoveryCodesRequest</a></td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td><p>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`.</p></td>
+ <td>CRAM_MD5</td>
+ <td>4</td>
+ <td><p></p></td>
</tr>
</tbody>
</table>
-
-
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
- <thead>
+
+ <h3 id="bytebase.v1.EmailSetting.SMTPConfig.Encryption">EmailSetting.SMTPConfig.Encryption</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
+ <td>ENCRYPTION_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
</tr>
- </thead>
- <tbody>
-
-
<tr>
- <td>GetUser</td>
- <td>GET</td>
- <td>/v1/{name=users/*}</td>
- <td></td>
+ <td>ENCRYPTION_NONE</td>
+ <td>1</td>
+ <td><p></p></td>
</tr>
-
-
-
<tr>
- <td>BatchGetUsers</td>
- <td>GET</td>
- <td>/v1/users:batchGet</td>
- <td></td>
+ <td>STARTTLS</td>
+ <td>2</td>
+ <td><p></p></td>
</tr>
-
-
-
<tr>
- <td>GetCurrentUser</td>
- <td>GET</td>
- <td>/v1/users/me</td>
- <td></td>
+ <td>SSL_TLS</td>
+ <td>3</td>
+ <td><p></p></td>
</tr>
-
-
-
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.EmailSetting.Type">EmailSetting.Type</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>ListUsers</td>
- <td>GET</td>
- <td>/v1/users</td>
- <td></td>
+ <td>TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
</tr>
-
-
-
<tr>
- <td>CreateUser</td>
- <td>POST</td>
- <td>/v1/users</td>
- <td>user</td>
+ <td>SMTP</td>
+ <td>1</td>
+ <td><p></p></td>
</tr>
-
-
-
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.MCPSetting.Capability">MCPSetting.Capability</h3>
+ <p>Capability is the ceiling: a session runs at this level or lower.</p><p>Writing CAPABILITY_UNSPECIFIED explicitly is rejected; omit the update mask</p><p>path to leave the current ceiling unchanged.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>UpdateUser</td>
- <td>PATCH</td>
- <td>/v1/{user.name=users/*}</td>
- <td>user</td>
+ <td>CAPABILITY_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
</tr>
-
-
-
<tr>
- <td>DeleteUser</td>
- <td>DELETE</td>
- <td>/v1/{name=users/*}</td>
- <td></td>
+ <td>DISABLED</td>
+ <td>1</td>
+ <td><p>MCP connections are rejected.</p></td>
</tr>
-
-
-
<tr>
- <td>UndeleteUser</td>
- <td>POST</td>
- <td>/v1/{name=users/*}:undelete</td>
- <td>*</td>
+ <td>READ_ONLY</td>
+ <td>3</td>
+ <td><p>MCP may inspect metadata and run read-only queries. A session opens, and
+what it may do is decided per method by the capability gate and per
+statement by the SQL clamp: a request holding a statement that is not a
+read is refused whole, and where the engine&#39;s driver has one the
+database session is opened read-only as well.</p></td>
</tr>
-
-
-
<tr>
- <td>UpdateEmail</td>
- <td>POST</td>
- <td>/v1/{name=users/*}:updateEmail</td>
- <td>*</td>
+ <td>READ_WRITE</td>
+ <td>4</td>
+ <td><p>MCP may perform mutations, still bounded by the user&#39;s RBAC.</p></td>
</tr>
-
-
-
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.Setting.SettingName">Setting.SettingName</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>RequestReauthCode</td>
- <td>POST</td>
- <td>/v1/{name=users/*}:requestReauthCode</td>
- <td>*</td>
+ <td>SETTING_NAME_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
</tr>
-
-
-
<tr>
- <td>ChangePassword</td>
- <td>POST</td>
- <td>/v1/{name=users/*}:changePassword</td>
- <td>*</td>
+ <td>WORKSPACE_PROFILE</td>
+ <td>1</td>
+ <td><p></p></td>
</tr>
-
-
-
<tr>
- <td>StartMFAEnrollment</td>
- <td>POST</td>
- <td>/v1/{name=users/*}:startMFAEnrollment</td>
- <td>*</td>
+ <td>WORKSPACE_APPROVAL</td>
+ <td>2</td>
+ <td><p></p></td>
</tr>
-
+
+ <tr>
+ <td>APP_IM</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>AI</td>
+ <td>4</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DATA_CLASSIFICATION</td>
+ <td>5</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>SEMANTIC_TYPES</td>
+ <td>6</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>ENVIRONMENT</td>
+ <td>7</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>EMAIL</td>
+ <td>8</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>MCP</td>
+ <td>9</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.WorkspaceApprovalSetting.Rule.Source">WorkspaceApprovalSetting.Rule.Source</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>SOURCE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>CHANGE_DATABASE</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>CREATE_DATABASE</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>REQUEST_ROLE</td>
+ <td>4</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>REQUEST_ACCESS</td>
+ <td>5</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.SettingService">SettingService</h3>
+ <p>SettingService manages workspace-level settings and configurations.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>ListSettings</td>
+ <td><a href="#bytebase.v1.ListSettingsRequest">ListSettingsRequest</a></td>
+ <td><a href="#bytebase.v1.ListSettingsResponse">ListSettingsResponse</a></td>
+ <td><p>Lists all workspace settings.
+Permissions required: bb.settings.list</p></td>
+ </tr>
+
+ <tr>
+ <td>GetSetting</td>
+ <td><a href="#bytebase.v1.GetSettingRequest">GetSettingRequest</a></td>
+ <td><a href="#bytebase.v1.Setting">Setting</a></td>
+ <td><p>Retrieves a workspace setting by name.
+Permissions required: bb.settings.get</p></td>
+ </tr>
+
+ <tr>
+ <td>UpdateSetting</td>
+ <td><a href="#bytebase.v1.UpdateSettingRequest">UpdateSettingRequest</a></td>
+ <td><a href="#bytebase.v1.Setting">Setting</a></td>
+ <td><p>Updates a workspace setting.
+Permissions required: bb.settings.set</p></td>
+ </tr>
+
+ <tr>
+ <td>TestEmailSetting</td>
+ <td><a href="#bytebase.v1.TestEmailSettingRequest">TestEmailSettingRequest</a></td>
+ <td><a href="#bytebase.v1.TestEmailSettingResponse">TestEmailSettingResponse</a></td>
+ <td><p>Sends a test email using the provided config (without persisting).
+Permissions required: bb.settings.set</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
+ <thead>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
+ </thead>
+ <tbody>
<tr>
- <td>EnableMFA</td>
- <td>POST</td>
- <td>/v1/{name=users/*}:enableMFA</td>
- <td>*</td>
+ <td>ListSettings</td>
+ <td>GET</td>
+ <td>/v1/settings</td>
+ <td></td>
</tr>
<tr>
- <td>DisableMFA</td>
- <td>POST</td>
- <td>/v1/{name=users/*}:disableMFA</td>
- <td>*</td>
+ <td>GetSetting</td>
+ <td>GET</td>
+ <td>/v1/{name=settings/*}</td>
+ <td></td>
</tr>
<tr>
- <td>RegenerateRecoveryCodes</td>
- <td>POST</td>
- <td>/v1/{name=users/*}:regenerateRecoveryCodes</td>
- <td>*</td>
+ <td>UpdateSetting</td>
+ <td>PATCH</td>
+ <td>/v1/{setting.name=settings/*}</td>
+ <td>setting</td>
</tr>
<tr>
- <td>ConfirmRecoveryCodes</td>
+ <td>TestEmailSetting</td>
<td>POST</td>
- <td>/v1/{name=users/*}:confirmRecoveryCodes</td>
+ <td>/v1/{parent=workspaces/*}/settings/EMAIL:test</td>
<td>*</td>
</tr>
@@ -16965,12 +16836,12 @@ Permissions required: None beyond being signed in as `name`.</p></td>
<div class="file-heading">
- <h2 id="v1/auth_service.proto">v1/auth_service.proto</h2><a href="#title">Top</a>
+ <h2 id="v1/user_service.proto">v1/user_service.proto</h2><a href="#title">Top</a>
</div>
<p></p>
- <h3 id="bytebase.v1.AuthenticationInfo">AuthenticationInfo</h3>
+ <h3 id="bytebase.v1.BatchGetUsersRequest">BatchGetUsersRequest</h3>
<p></p>
@@ -16981,18 +16852,11 @@ Permissions required: None beyond being signed in as `name`.</p></td>
<tbody>
<tr>
- <td>workspace</td>
+ <td>names</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The workspace used for authentication, when one can be resolved.
-Format: workspaces/{workspace} </p></td>
- </tr>
-
- <tr>
- <td>restriction</td>
- <td><a href="#bytebase.v1.Restriction">Restriction</a></td>
- <td></td>
- <td><p>The effective authentication restrictions. </p></td>
+ <td>repeated</td>
+ <td><p>The user names to retrieve.
+Format: users/{email} </p></td>
</tr>
</tbody>
@@ -17002,7 +16866,7 @@ Format: workspaces/{workspace} </p></td>
- <h3 id="bytebase.v1.ExchangeTokenRequest">ExchangeTokenRequest</h3>
+ <h3 id="bytebase.v1.BatchGetUsersResponse">BatchGetUsersResponse</h3>
<p></p>
@@ -17013,18 +16877,10 @@ Format: workspaces/{workspace} </p></td>
<tbody>
<tr>
- <td>token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>External OIDC token (JWT) from CI/CD platform. </p></td>
- </tr>
-
- <tr>
- <td>email</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Workload Identity email for identifying which identity to authenticate as.
-Format: {name}@workload.bytebase.com </p></td>
+ <td>users</td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td>repeated</td>
+ <td><p>One user per requested name, in the same order as `names`. </p></td>
</tr>
</tbody>
@@ -17034,7 +16890,7 @@ Format: {name}@workload.bytebase.com </p></td>
- <h3 id="bytebase.v1.ExchangeTokenResponse">ExchangeTokenResponse</h3>
+ <h3 id="bytebase.v1.ChangePasswordRequest">ChangePasswordRequest</h3>
<p></p>
@@ -17045,10 +16901,24 @@ Format: {name}@workload.bytebase.com </p></td>
<tbody>
<tr>
- <td>access_token</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Bytebase access token. </p></td>
+ <td><p>Format: users/{email}. Must be the caller&#39;s own name. </p></td>
+ </tr>
+
+ <tr>
+ <td>new_password</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>credential</td>
+ <td><a href="#bytebase.v1.CredentialProof">CredentialProof</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -17058,7 +16928,7 @@ Format: {name}@workload.bytebase.com </p></td>
- <h3 id="bytebase.v1.GetAuthenticationRestrictionRequest">GetAuthenticationRestrictionRequest</h3>
+ <h3 id="bytebase.v1.ConfirmRecoveryCodesRequest">ConfirmRecoveryCodesRequest</h3>
<p></p>
@@ -17069,44 +16939,33 @@ Format: {name}@workload.bytebase.com </p></td>
<tbody>
<tr>
- <td>workspace</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>Format: users/{email}. Must be the caller&#39;s own name. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.IdentityProviderContext">IdentityProviderContext</h3>
- <p>Context for identity provider authentication.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>pending_version</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>The pending_version of the codes being confirmed. Confirming promotes
+exactly the set this version identifies, or nothing. </p></td>
+ </tr>
<tr>
- <td>oauth2_context</td>
- <td><a href="#bytebase.v1.OAuth2IdentityProviderContext">OAuth2IdentityProviderContext</a></td>
+ <td>credential</td>
+ <td><a href="#bytebase.v1.CredentialProof">CredentialProof</a></td>
<td></td>
- <td><p>OAuth2 authentication context. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>oidc_context</td>
- <td><a href="#bytebase.v1.OIDCIdentityProviderContext">OIDCIdentityProviderContext</a></td>
+ <td>otp_code</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>OpenID Connect authentication context. </p></td>
+ <td><p>Required for first-time enrollment, rejected otherwise. A *fresh* code,
+not the one EnableMFA took. </p></td>
</tr>
</tbody>
@@ -17116,7 +16975,7 @@ the deployment-level defaults. </p></td>
- <h3 id="bytebase.v1.LoginRequest">LoginRequest</h3>
+ <h3 id="bytebase.v1.CreateUserRequest">CreateUserRequest</h3>
<p></p>
@@ -17127,84 +16986,10 @@ the deployment-level defaults. </p></td>
<tbody>
<tr>
- <td>email</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>User&#39;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. </p></td>
- </tr>
-
- <tr>
- <td>password</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>User&#39;s password for authentication. Bounded for abuse only: LDAP
-directories may accept passwords beyond bcrypt&#39;s 72-byte limit, and the
-local-password path rejects longer inputs itself. </p></td>
- </tr>
-
- <tr>
- <td>web</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>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. </p></td>
- </tr>
-
- <tr>
- <td>idp_name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the identity provider.
-Format: idps/{idp} </p></td>
- </tr>
-
- <tr>
- <td>idp_context</td>
- <td><a href="#bytebase.v1.IdentityProviderContext">IdentityProviderContext</a></td>
+ <td>user</td>
+ <td><a href="#bytebase.v1.User">User</a></td>
<td></td>
- <td><p>The idp_context is used to get the user information from identity provider. </p></td>
- </tr>
-
- <tr>
- <td>otp_code</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The otp_code is used to verify the user&#39;s identity by MFA. </p></td>
- </tr>
-
- <tr>
- <td>recovery_code</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The recovery_code is used to recovery the user&#39;s identity with MFA. </p></td>
- </tr>
-
- <tr>
- <td>mfa_temp_token</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The mfa_temp_token is used to verify the user&#39;s identity by MFA. </p></td>
- </tr>
-
- <tr>
- <td>email_code</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>6-digit code from email for passwordless login/signup.
-Pairs with `email`. Mutually exclusive with `password` and `idp_name`. </p></td>
- </tr>
-
- <tr>
- <td>workspace</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>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} </p></td>
+ <td><p>The user to create. </p></td>
</tr>
</tbody>
@@ -17214,8 +16999,8 @@ Format: workspaces/{workspace} </p></td>
- <h3 id="bytebase.v1.LoginResponse">LoginResponse</h3>
- <p></p>
+ <h3 id="bytebase.v1.CredentialProof">CredentialProof</h3>
+ <p>One proof that the caller currently controls a credential on the account.</p><p>Exactly one field must be set; enforced in the handler.</p>
<table class="field-table">
@@ -17225,32 +17010,33 @@ Format: workspaces/{workspace} </p></td>
<tbody>
<tr>
- <td>token</td>
+ <td>current_password</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Access token for authenticated requests.
-Only returned when web=false. For web=true, the token is set as an HTTP-only cookie. </p></td>
+ <td><p>The account&#39;s current password. Refused by a factor-touching method
+while a live MFA factor exists. </p></td>
</tr>
<tr>
- <td>mfa_temp_token</td>
+ <td>otp_code</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>Temporary token for MFA verification. </p></td>
+ <td></td>
+ <td><p>A live code from the account&#39;s enrolled TOTP authenticator. </p></td>
</tr>
<tr>
- <td>require_reset_password</td>
- <td><a href="#bool">bool</a></td>
+ <td>recovery_code</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether user must reset password before continuing. </p></td>
+ <td><p>A single-use MFA recovery code. </p></td>
</tr>
<tr>
- <td>user</td>
- <td><a href="#bytebase.v1.User">User</a></td>
+ <td>email_code</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The user from the successful login. </p></td>
+ <td><p>A one-time code from RequestReauthCode. Bytebase Cloud only, and only
+while the account has no live MFA factor. </p></td>
</tr>
</tbody>
@@ -17260,15 +17046,8 @@ Only returned when web=false. For web=true, the token is set as an HTTP-only coo
- <h3 id="bytebase.v1.LogoutRequest">LogoutRequest</h3>
- <p>Request to logout current user session.</p>
-
-
-
-
-
- <h3 id="bytebase.v1.OAuth2IdentityProviderContext">OAuth2IdentityProviderContext</h3>
- <p>OAuth2 authentication context.</p>
+ <h3 id="bytebase.v1.DeleteUserRequest">DeleteUserRequest</h3>
+ <p></p>
<table class="field-table">
@@ -17278,10 +17057,11 @@ Only returned when web=false. For web=true, the token is set as an HTTP-only coo
<tbody>
<tr>
- <td>code</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Authorization code from OAuth2 provider. </p></td>
+ <td><p>The name of the user to delete.
+Format: users/{email} </p></td>
</tr>
</tbody>
@@ -17291,8 +17071,8 @@ Only returned when web=false. For web=true, the token is set as an HTTP-only coo
- <h3 id="bytebase.v1.OIDCIdentityProviderContext">OIDCIdentityProviderContext</h3>
- <p>OpenID Connect authentication context.</p>
+ <h3 id="bytebase.v1.DisableMFARequest">DisableMFARequest</h3>
+ <p></p>
<table class="field-table">
@@ -17302,10 +17082,19 @@ Only returned when web=false. For web=true, the token is set as an HTTP-only coo
<tbody>
<tr>
- <td>code</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Authorization code from OIDC provider. </p></td>
+ <td><p>Format: users/{email}. The caller&#39;s own, or another user&#39;s with
+bb.users.update. </p></td>
+ </tr>
+
+ <tr>
+ <td>credential</td>
+ <td><a href="#bytebase.v1.CredentialProof">CredentialProof</a></td>
+ <td></td>
+ <td><p>Required for a self-service call against a live factor, and then only
+otp_code or recovery_code. Unused on an admin-assisted call. </p></td>
</tr>
</tbody>
@@ -17315,21 +17104,7 @@ Only returned when web=false. For web=true, the token is set as an HTTP-only coo
- <h3 id="bytebase.v1.RefreshRequest">RefreshRequest</h3>
- <p>Request to refresh the access token.</p>
-
-
-
-
-
- <h3 id="bytebase.v1.RefreshResponse">RefreshResponse</h3>
- <p>Response from refreshing the access token.</p>
-
-
-
-
-
- <h3 id="bytebase.v1.RequestPasswordResetRequest">RequestPasswordResetRequest</h3>
+ <h3 id="bytebase.v1.EnableMFARequest">EnableMFARequest</h3>
<p></p>
@@ -17340,22 +17115,32 @@ Only returned when web=false. For web=true, the token is set as an HTTP-only coo
<tbody>
<tr>
- <td>email</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>Format: users/{email}. Must be the caller&#39;s own name. </p></td>
</tr>
<tr>
- <td>workspace</td>
+ <td>otp_code</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>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} </p></td>
+ <td></td>
+ <td><p>A code from the authenticator the pending secret was just added to. </p></td>
+ </tr>
+
+ <tr>
+ <td>pending_version</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>The pending_version this enrollment was minted with. </p></td>
+ </tr>
+
+ <tr>
+ <td>credential</td>
+ <td><a href="#bytebase.v1.CredentialProof">CredentialProof</a></td>
+ <td></td>
+ <td><p>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. </p></td>
</tr>
</tbody>
@@ -17365,7 +17150,7 @@ Format: workspaces/{workspace} </p></td>
- <h3 id="bytebase.v1.ResetPasswordRequest">ResetPasswordRequest</h3>
+ <h3 id="bytebase.v1.GetUserRequest">GetUserRequest</h3>
<p></p>
@@ -17376,26 +17161,81 @@ Format: workspaces/{workspace} </p></td>
<tbody>
<tr>
- <td>email</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>The name of the user to retrieve.
+Format: users/{email} </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ListUsersRequest">ListUsersRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>code</td>
+ <td>page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The 6-digit code from the reset email. </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>new_password</td>
+ <td>show_deleted</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Show deleted users if specified. </p></td>
+ </tr>
+
+ <tr>
+ <td>filter</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The new password to set. </p></td>
+ <td><p>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 &#34;==&#34; and &#34;.contains()&#34; operator.
+- email: the user email, support &#34;==&#34; and &#34;.contains()&#34; operator.
+- state: check State enum for values, support &#34;==&#34; operator.
+- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
+
+For example:
+name == &#34;ed&#34;
+name.contains(&#34;ed&#34;)
+email == &#34;[email protected]&#34;
+email.contains(&#34;ed&#34;)
+state == &#34;DELETED&#34;
+project == &#34;projects/sample-project&#34;
+You can combine filter conditions like:
+name.contains(&#34;ed&#34;) &amp;&amp; project == &#34;projects/sample-project&#34;
+(name == &#34;ed&#34; || email == &#34;[email protected]&#34;) &amp;&amp; project == &#34;projects/sample-project&#34; </p></td>
</tr>
</tbody>
@@ -17405,7 +17245,7 @@ handler runs; the login-attempt lockout keys rows by this value. </p></td>
- <h3 id="bytebase.v1.Restriction">Restriction</h3>
+ <h3 id="bytebase.v1.ListUsersResponse">ListUsersResponse</h3>
<p></p>
@@ -17416,39 +17256,73 @@ handler runs; the login-attempt lockout keys rows by this value. </p></td>
<tbody>
<tr>
- <td>disallow_signup</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether self-service user signup is disabled. </p></td>
+ <td>users</td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td>repeated</td>
+ <td><p>The users from the specified request. </p></td>
</tr>
<tr>
- <td>disallow_password_signin</td>
- <td><a href="#bool">bool</a></td>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether password sign-in is disabled for all end users. </p></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.RegenerateRecoveryCodesRequest">RegenerateRecoveryCodesRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>password_restriction</td>
- <td><a href="#bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Password complexity and restriction requirements. </p></td>
+ <td><p>Format: users/{email}. Must be the caller&#39;s own name. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.RegenerateRecoveryCodesResponse">RegenerateRecoveryCodesResponse</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>allow_email_code_signin</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether email &#43; 6-digit code signin is enabled for this workspace. </p></td>
+ <td>recovery_codes</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The pending recovery codes, shown once for the caller to save. </p></td>
</tr>
<tr>
- <td>password_reset_enabled</td>
- <td><a href="#bool">bool</a></td>
+ <td>pending_version</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>Whether password reset via email is available for this workspace.
-True when the workspace (or deployment) has an email setting configured. </p></td>
+ <td><p>Identifies this mint; see StartMFAEnrollmentResponse.pending_version. </p></td>
</tr>
</tbody>
@@ -17458,7 +17332,7 @@ True when the workspace (or deployment) has an email setting configured. </p></t
- <h3 id="bytebase.v1.SendEmailLoginCodeRequest">SendEmailLoginCodeRequest</h3>
+ <h3 id="bytebase.v1.RequestReauthCodeRequest">RequestReauthCodeRequest</h3>
<p></p>
@@ -17469,22 +17343,34 @@ True when the workspace (or deployment) has an email setting configured. </p></t
<tbody>
<tr>
- <td>email</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>Format: users/{email}. Must be the caller&#39;s own name. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.StartMFAEnrollmentRequest">StartMFAEnrollmentRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>workspace</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>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} </p></td>
+ <td></td>
+ <td><p>Format: users/{email}. Must be the caller&#39;s own name. </p></td>
</tr>
</tbody>
@@ -17494,7 +17380,7 @@ Format: workspaces/{workspace} </p></td>
- <h3 id="bytebase.v1.SignupRequest">SignupRequest</h3>
+ <h3 id="bytebase.v1.StartMFAEnrollmentResponse">StartMFAEnrollmentResponse</h3>
<p></p>
@@ -17505,26 +17391,35 @@ Format: workspaces/{workspace} </p></td>
<tbody>
<tr>
- <td>email</td>
+ <td>otp_secret</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>The pending TOTP secret. The only response that carries it — it is never
+readable from the User resource. </p></td>
</tr>
<tr>
- <td>password</td>
+ <td>recovery_codes</td>
<td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The pending recovery codes, shown once for the caller to save. </p></td>
+ </tr>
+
+ <tr>
+ <td>expire_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>The password for the new account. </p></td>
+ <td><p>When this enrollment stops being confirmable. </p></td>
</tr>
<tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
+ <td>pending_version</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>The display name of the user. </p></td>
+ <td><p>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. </p></td>
</tr>
</tbody>
@@ -17534,7 +17429,7 @@ handler runs; the login-attempt lockout keys rows by this value. </p></td>
- <h3 id="bytebase.v1.SwitchWorkspaceRequest">SwitchWorkspaceRequest</h3>
+ <h3 id="bytebase.v1.UndeleteUserRequest">UndeleteUserRequest</h3>
<p></p>
@@ -17545,39 +17440,44 @@ handler runs; the login-attempt lockout keys rows by this value. </p></td>
<tbody>
<tr>
- <td>workspace</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The target workspace to switch to.
-Format: workspaces/{workspace} </p></td>
- </tr>
-
- <tr>
- <td>web</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>If true, sets tokens as HTTP-only cookies (browser clients). </p></td>
+ <td><p>The name of the deleted user.
+Format: users/{email} </p></td>
</tr>
- <tr>
- <td>otp_code</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>OTP code for MFA verification. Required if the target workspace enforces MFA. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.UpdateEmailRequest">UpdateEmailRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>recovery_code</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>Recovery code for MFA verification (alternative to otp_code). </p></td>
+ <td></td>
+ <td><p>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 &#39;email&#39; field. </p></td>
</tr>
<tr>
- <td>mfa_temp_token</td>
+ <td>email</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>Temporary MFA token from a previous SwitchWorkspace call that returned mfa_temp_token. </p></td>
+ <td></td>
+ <td><p>The new email address. </p></td>
</tr>
</tbody>
@@ -17587,14 +17487,186 @@ Format: workspaces/{workspace} </p></td>
+ <h3 id="bytebase.v1.UpdateUserRequest">UpdateUserRequest</h3>
+ <p></p>
-
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>user</td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td></td>
+ <td><p>The user to update.
+
+The user&#39;s `name` field is used to identify the user to update.
+Format: users/{email} </p></td>
+ </tr>
+
+ <tr>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td></td>
+ <td><p>The list of fields to update. </p></td>
+ </tr>
+
+ <tr>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>If set to true, and the user is not found, a new user will be created.
+In this situation, `update_mask` is ignored. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+ <h3 id="bytebase.v1.User">User</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the user.
+Format: users/{email} </p></td>
+ </tr>
+
+ <tr>
+ <td>state</td>
+ <td><a href="#bytebase.v1.State">State</a></td>
+ <td></td>
+ <td><p>The lifecycle state of the user account. </p></td>
+ </tr>
+
+ <tr>
+ <td>email</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The email address of the user, used for login and notifications. </p></td>
+ </tr>
+
+ <tr>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The display title or full name of the user. </p></td>
+ </tr>
+
+ <tr>
+ <td>password</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The password for authentication. Only used during user creation or password updates. </p></td>
+ </tr>
+
+ <tr>
+ <td>mfa_enabled</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether the user has a live MFA factor. Set by ConfirmRecoveryCodes and
+DisableMFA, never by an update. </p></td>
+ </tr>
+
+ <tr>
+ <td>phone</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Should be a valid E.164 compliant phone number.
+Could be empty. </p></td>
+ </tr>
+
+ <tr>
+ <td>profile</td>
+ <td><a href="#bytebase.v1.User.Profile">User.Profile</a></td>
+ <td></td>
+ <td><p>User profile metadata. </p></td>
+ </tr>
+
+ <tr>
+ <td>groups</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The groups for the user.
+Format: groups/{email} </p></td>
+ </tr>
+
+ <tr>
+ <td>workspace</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The current workspace.
+Format: workspaces/{id} </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
- <h3 id="bytebase.v1.AuthService">AuthService</h3>
- <p>AuthService handles user authentication operations.</p>
+ <h3 id="bytebase.v1.User.Profile">User.Profile</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>last_login_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>The last time the user successfully logged in. </p></td>
+ </tr>
+
+ <tr>
+ <td>last_change_password_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>The last time the user changed their password. </p></td>
+ </tr>
+
+ <tr>
+ <td>source</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>source means where the user comes from. For now we support Entra ID SCIM sync, so the source could be Entra ID. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+
+
+
+
+
+
+ <h3 id="bytebase.v1.UserService">UserService</h3>
+ <p>UserService manages user accounts and authentication.</p>
<table class="enum-table">
<thead>
<tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
@@ -17602,92 +17674,159 @@ Format: workspaces/{workspace} </p></td>
<tbody>
<tr>
- <td>GetAuthenticationRestriction</td>
- <td><a href="#bytebase.v1.GetAuthenticationRestrictionRequest">GetAuthenticationRestrictionRequest</a></td>
- <td><a href="#bytebase.v1.AuthenticationInfo">AuthenticationInfo</a></td>
- <td><p>Gets the effective restrictions needed to render authentication flows.
-Permissions required: None</p></td>
+ <td>GetUser</td>
+ <td><a href="#bytebase.v1.GetUserRequest">GetUserRequest</a></td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td><p>Get the user.
+Any authenticated user can get the user.
+Permissions required: bb.users.get</p></td>
</tr>
<tr>
- <td>Login</td>
- <td><a href="#bytebase.v1.LoginRequest">LoginRequest</a></td>
- <td><a href="#bytebase.v1.LoginResponse">LoginResponse</a></td>
- <td><p>Authenticates a user and returns access tokens.
-Permissions required: None</p></td>
+ <td>BatchGetUsers</td>
+ <td><a href="#bytebase.v1.BatchGetUsersRequest">BatchGetUsersRequest</a></td>
+ <td><a href="#bytebase.v1.BatchGetUsersResponse">BatchGetUsersResponse</a></td>
+ <td><p>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</p></td>
</tr>
<tr>
- <td>Logout</td>
- <td><a href="#bytebase.v1.LogoutRequest">LogoutRequest</a></td>
+ <td>GetCurrentUser</td>
<td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Logs out the current user session.
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td><p>Get the current authenticated user.
Permissions required: None</p></td>
</tr>
<tr>
- <td>ExchangeToken</td>
- <td><a href="#bytebase.v1.ExchangeTokenRequest">ExchangeTokenRequest</a></td>
- <td><a href="#bytebase.v1.ExchangeTokenResponse">ExchangeTokenResponse</a></td>
- <td><p>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)</p></td>
+ <td>ListUsers</td>
+ <td><a href="#bytebase.v1.ListUsersRequest">ListUsersRequest</a></td>
+ <td><a href="#bytebase.v1.ListUsersResponse">ListUsersResponse</a></td>
+ <td><p>List all users.
+Any authenticated user can list users.
+Permissions required: bb.users.list</p></td>
</tr>
<tr>
- <td>Signup</td>
- <td><a href="#bytebase.v1.SignupRequest">SignupRequest</a></td>
- <td><a href="#bytebase.v1.LoginResponse">LoginResponse</a></td>
- <td><p>Registers a new user account. Creates a principal and assigns a workspace:
-- If the user&#39;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.</p></td>
+ <td>CreateUser</td>
+ <td><a href="#bytebase.v1.CreateUserRequest">CreateUserRequest</a></td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td><p>Creates a user in the caller&#39;s workspace (admin action, self-hosted only).
+In SaaS mode, admins should add users via workspace IAM policy instead.
+Permissions required: bb.users.create</p></td>
</tr>
<tr>
- <td>Refresh</td>
- <td><a href="#bytebase.v1.RefreshRequest">RefreshRequest</a></td>
- <td><a href="#bytebase.v1.RefreshResponse">RefreshResponse</a></td>
- <td><p>Refreshes the access token using the refresh token cookie.
-Permissions required: None (validates via refresh token cookie)</p></td>
+ <td>UpdateUser</td>
+ <td><a href="#bytebase.v1.UpdateUserRequest">UpdateUserRequest</a></td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td><p>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)</p></td>
</tr>
<tr>
- <td>SwitchWorkspace</td>
- <td><a href="#bytebase.v1.SwitchWorkspaceRequest">SwitchWorkspaceRequest</a></td>
- <td><a href="#bytebase.v1.LoginResponse">LoginResponse</a></td>
- <td><p>Switches the current user&#39;s active workspace and issues new tokens.
-The user must be a member of the target workspace.</p></td>
+ <td>DeleteUser</td>
+ <td><a href="#bytebase.v1.DeleteUserRequest">DeleteUserRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Deletes a user. Requires bb.users.delete permission with additional validation: the last remaining workspace admin cannot be deleted.
+Permissions required: bb.users.delete</p></td>
</tr>
<tr>
- <td>RequestPasswordReset</td>
- <td><a href="#bytebase.v1.RequestPasswordResetRequest">RequestPasswordResetRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Requests a password reset email for the given email address.
-Always returns success to avoid leaking whether the email exists.
-Requires the workspace&#39;s SMTP mail delivery setting; without it the
-recovery route is an admin password reset.
-Permissions required: None</p></td>
+ <td>UndeleteUser</td>
+ <td><a href="#bytebase.v1.UndeleteUserRequest">UndeleteUserRequest</a></td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td><p>Restores a deleted user.
+Permissions required: bb.users.undelete</p></td>
</tr>
<tr>
- <td>ResetPassword</td>
- <td><a href="#bytebase.v1.ResetPasswordRequest">ResetPasswordRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Resets the user&#39;s password using a password reset token from email.
-Permissions required: None (validates via token)</p></td>
+ <td>UpdateEmail</td>
+ <td><a href="#bytebase.v1.UpdateEmailRequest">UpdateEmailRequest</a></td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td><p>Updates a user&#39;s email address.
+Permissions required: bb.users.updateEmail</p></td>
</tr>
<tr>
- <td>SendEmailLoginCode</td>
- <td><a href="#bytebase.v1.SendEmailLoginCodeRequest">SendEmailLoginCodeRequest</a></td>
+ <td>RequestReauthCode</td>
+ <td><a href="#bytebase.v1.RequestReauthCodeRequest">RequestReauthCodeRequest</a></td>
<td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>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</p></td>
+ <td><p>Sends a one-time code to the caller&#39;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`.</p></td>
+ </tr>
+
+ <tr>
+ <td>ChangePassword</td>
+ <td><a href="#bytebase.v1.ChangePasswordRequest">ChangePasswordRequest</a></td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td><p>Changes the caller&#39;s own password. An administrator resetting someone
+else&#39;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`.</p></td>
+ </tr>
+
+ <tr>
+ <td>StartMFAEnrollment</td>
+ <td><a href="#bytebase.v1.StartMFAEnrollmentRequest">StartMFAEnrollmentRequest</a></td>
+ <td><a href="#bytebase.v1.StartMFAEnrollmentResponse">StartMFAEnrollmentResponse</a></td>
+ <td><p>Mints a pending TOTP secret and recovery codes for the caller&#39;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`.</p></td>
+ </tr>
+
+ <tr>
+ <td>EnableMFA</td>
+ <td><a href="#bytebase.v1.EnableMFARequest">EnableMFARequest</a></td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td><p>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.</p></td>
+ </tr>
+
+ <tr>
+ <td>DisableMFA</td>
+ <td><a href="#bytebase.v1.DisableMFARequest">DisableMFARequest</a></td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td><p>Turns MFA off, clearing the entire MFA config — live and pending state
+alike. Callers may disable their own; an administrator may disable
+another user&#39;s with bb.users.update, which is how a locked-out user is
+recovered.
+Permissions required: bb.users.update, unless `name` is the caller&#39;s own.</p></td>
+ </tr>
+
+ <tr>
+ <td>RegenerateRecoveryCodes</td>
+ <td><a href="#bytebase.v1.RegenerateRecoveryCodesRequest">RegenerateRecoveryCodesRequest</a></td>
+ <td><a href="#bytebase.v1.RegenerateRecoveryCodesResponse">RegenerateRecoveryCodesResponse</a></td>
+ <td><p>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`.</p></td>
+ </tr>
+
+ <tr>
+ <td>ConfirmRecoveryCodes</td>
+ <td><a href="#bytebase.v1.ConfirmRecoveryCodesRequest">ConfirmRecoveryCodesRequest</a></td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td><p>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`.</p></td>
</tr>
</tbody>
@@ -17711,16 +17850,39 @@ Permissions required: None</p></td>
<tr>
- <td>GetAuthenticationRestriction</td>
+ <td>GetUser</td>
+ <td>GET</td>
+ <td>/v1/{name=users/*}</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>BatchGetUsers</td>
+ <td>GET</td>
+ <td>/v1/users:batchGet</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>GetCurrentUser</td>
<td>GET</td>
- <td>/v1/auth/restriction</td>
+ <td>/v1/users/me</td>
<td></td>
</tr>
+
+
+
<tr>
- <td>GetAuthenticationRestriction</td>
+ <td>ListUsers</td>
<td>GET</td>
- <td>/v1/{workspace=workspaces/*}/auth/restriction</td>
+ <td>/v1/users</td>
<td></td>
</tr>
@@ -17728,9 +17890,39 @@ Permissions required: None</p></td>
<tr>
- <td>Login</td>
+ <td>CreateUser</td>
<td>POST</td>
- <td>/v1/auth/login</td>
+ <td>/v1/users</td>
+ <td>user</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>UpdateUser</td>
+ <td>PATCH</td>
+ <td>/v1/{user.name=users/*}</td>
+ <td>user</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>DeleteUser</td>
+ <td>DELETE</td>
+ <td>/v1/{name=users/*}</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>UndeleteUser</td>
+ <td>POST</td>
+ <td>/v1/{name=users/*}:undelete</td>
<td>*</td>
</tr>
@@ -17738,9 +17930,9 @@ Permissions required: None</p></td>
<tr>
- <td>Logout</td>
+ <td>UpdateEmail</td>
<td>POST</td>
- <td>/v1/auth/logout</td>
+ <td>/v1/{name=users/*}:updateEmail</td>
<td>*</td>
</tr>
@@ -17748,9 +17940,9 @@ Permissions required: None</p></td>
<tr>
- <td>ExchangeToken</td>
+ <td>RequestReauthCode</td>
<td>POST</td>
- <td>/v1/auth:exchangeToken</td>
+ <td>/v1/{name=users/*}:requestReauthCode</td>
<td>*</td>
</tr>
@@ -17758,9 +17950,9 @@ Permissions required: None</p></td>
<tr>
- <td>Signup</td>
+ <td>ChangePassword</td>
<td>POST</td>
- <td>/v1/auth/signup</td>
+ <td>/v1/{name=users/*}:changePassword</td>
<td>*</td>
</tr>
@@ -17768,9 +17960,9 @@ Permissions required: None</p></td>
<tr>
- <td>Refresh</td>
+ <td>StartMFAEnrollment</td>
<td>POST</td>
- <td>/v1/auth/refresh</td>
+ <td>/v1/{name=users/*}:startMFAEnrollment</td>
<td>*</td>
</tr>
@@ -17778,9 +17970,9 @@ Permissions required: None</p></td>
<tr>
- <td>SwitchWorkspace</td>
+ <td>EnableMFA</td>
<td>POST</td>
- <td>/v1/auth:switchWorkspace</td>
+ <td>/v1/{name=users/*}:enableMFA</td>
<td>*</td>
</tr>
@@ -17788,9 +17980,9 @@ Permissions required: None</p></td>
<tr>
- <td>RequestPasswordReset</td>
+ <td>DisableMFA</td>
<td>POST</td>
- <td>/v1/auth:requestPasswordReset</td>
+ <td>/v1/{name=users/*}:disableMFA</td>
<td>*</td>
</tr>
@@ -17798,9 +17990,9 @@ Permissions required: None</p></td>
<tr>
- <td>ResetPassword</td>
+ <td>RegenerateRecoveryCodes</td>
<td>POST</td>
- <td>/v1/auth:resetPassword</td>
+ <td>/v1/{name=users/*}:regenerateRecoveryCodes</td>
<td>*</td>
</tr>
@@ -17808,9 +18000,9 @@ Permissions required: None</p></td>
<tr>
- <td>SendEmailLoginCode</td>
+ <td>ConfirmRecoveryCodes</td>
<td>POST</td>
- <td>/v1/auth:sendEmailLoginCode</td>
+ <td>/v1/{name=users/*}:confirmRecoveryCodes</td>
<td>*</td>
</tr>
@@ -17822,13 +18014,13 @@ Permissions required: None</p></td>
<div class="file-heading">
- <h2 id="v1/cel_service.proto">v1/cel_service.proto</h2><a href="#title">Top</a>
+ <h2 id="v1/auth_service.proto">v1/auth_service.proto</h2><a href="#title">Top</a>
</div>
<p></p>
- <h3 id="bytebase.v1.BatchDeparseRequest">BatchDeparseRequest</h3>
- <p>Request message for batch deparsing CEL expressions.</p>
+ <h3 id="bytebase.v1.AuthenticationInfo">AuthenticationInfo</h3>
+ <p></p>
<table class="field-table">
@@ -17838,10 +18030,25 @@ Permissions required: None</p></td>
<tbody>
<tr>
- <td>expressions</td>
- <td><a href="#google.api.expr.v1alpha1.Expr">google.api.expr.v1alpha1.Expr</a></td>
+ <td>workspace</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The workspace used for authentication, when one can be resolved.
+Format: workspaces/{workspace} </p></td>
+ </tr>
+
+ <tr>
+ <td>restriction</td>
+ <td><a href="#bytebase.v1.Restriction">Restriction</a></td>
+ <td></td>
+ <td><p>The effective authentication restrictions. </p></td>
+ </tr>
+
+ <tr>
+ <td>identity_providers</td>
+ <td><a href="#bytebase.v1.LoginIdentityProvider">LoginIdentityProvider</a></td>
<td>repeated</td>
- <td><p>The CEL expression ASTs to deparse. </p></td>
+ <td><p>The identity providers the login page renders, in display order. </p></td>
</tr>
</tbody>
@@ -17851,8 +18058,8 @@ Permissions required: None</p></td>
- <h3 id="bytebase.v1.BatchDeparseResponse">BatchDeparseResponse</h3>
- <p>Response message for batch deparsing CEL expressions.</p>
+ <h3 id="bytebase.v1.AuthorizationRequest">AuthorizationRequest</h3>
+ <p>AuthorizationRequest is what a browser needs to start an SSO redirect.</p>
<table class="field-table">
@@ -17862,10 +18069,25 @@ Permissions required: None</p></td>
<tbody>
<tr>
- <td>expressions</td>
+ <td>endpoint</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The OAuth2 auth_url, or the authorization endpoint from the OIDC issuer&#39;s
+discovery document. </p></td>
+ </tr>
+
+ <tr>
+ <td>client_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The OAuth2 or OIDC client identifier. </p></td>
+ </tr>
+
+ <tr>
+ <td>scopes</td>
<td><a href="#string">string</a></td>
<td>repeated</td>
- <td><p>The deparsed CEL expressions as strings. </p></td>
+ <td><p>The scopes to request. </p></td>
</tr>
</tbody>
@@ -17875,8 +18097,8 @@ Permissions required: None</p></td>
- <h3 id="bytebase.v1.BatchParseRequest">BatchParseRequest</h3>
- <p>Request message for batch parsing CEL expressions.</p>
+ <h3 id="bytebase.v1.ExchangeTokenRequest">ExchangeTokenRequest</h3>
+ <p></p>
<table class="field-table">
@@ -17886,10 +18108,18 @@ Permissions required: None</p></td>
<tbody>
<tr>
- <td>expressions</td>
+ <td>token</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The CEL expression strings to parse. </p></td>
+ <td></td>
+ <td><p>External OIDC token (JWT) from CI/CD platform. </p></td>
+ </tr>
+
+ <tr>
+ <td>email</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Workload Identity email for identifying which identity to authenticate as.
+Format: {name}@workload.bytebase.com </p></td>
</tr>
</tbody>
@@ -17899,8 +18129,8 @@ Permissions required: None</p></td>
- <h3 id="bytebase.v1.BatchParseResponse">BatchParseResponse</h3>
- <p>Response message for batch parsing CEL expressions.</p>
+ <h3 id="bytebase.v1.ExchangeTokenResponse">ExchangeTokenResponse</h3>
+ <p></p>
<table class="field-table">
@@ -17910,10 +18140,10 @@ Permissions required: None</p></td>
<tbody>
<tr>
- <td>expressions</td>
- <td><a href="#google.api.expr.v1alpha1.Expr">google.api.expr.v1alpha1.Expr</a></td>
- <td>repeated</td>
- <td><p>The parsed CEL expressions as AST. </p></td>
+ <td>access_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Bytebase access token. </p></td>
</tr>
</tbody>
@@ -17923,88 +18153,35 @@ Permissions required: None</p></td>
-
-
-
-
-
-
- <h3 id="bytebase.v1.CelService">CelService</h3>
- <p>CelService manages CEL (Common Expression Language) parsing and formatting operations.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>BatchParse</td>
- <td><a href="#bytebase.v1.BatchParseRequest">BatchParseRequest</a></td>
- <td><a href="#bytebase.v1.BatchParseResponse">BatchParseResponse</a></td>
- <td><p>Parses multiple CEL expression strings into AST representations.
-Permissions required: None</p></td>
- </tr>
-
- <tr>
- <td>BatchDeparse</td>
- <td><a href="#bytebase.v1.BatchDeparseRequest">BatchDeparseRequest</a></td>
- <td><a href="#bytebase.v1.BatchDeparseResponse">BatchDeparseResponse</a></td>
- <td><p>Converts multiple CEL AST representations back into expression strings.
-Permissions required: None</p></td>
- </tr>
-
- </tbody>
- </table>
+ <h3 id="bytebase.v1.GetAuthenticationInfoRequest">GetAuthenticationInfoRequest</h3>
+ <p></p>
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
+ <table class="field-table">
<thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>
-
-
-
- <tr>
- <td>BatchParse</td>
- <td>POST</td>
- <td>/v1/cel/batchParse</td>
- <td>*</td>
- </tr>
-
-
+ <tr>
+ <td>workspace</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>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. </p></td>
+ </tr>
- <tr>
- <td>BatchDeparse</td>
- <td>POST</td>
- <td>/v1/cel/batchDeparse</td>
- <td>*</td>
- </tr>
-
-
</tbody>
</table>
+
-
-
-
- <div class="file-heading">
- <h2 id="v1/changelog_service.proto">v1/changelog_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
+
- <h3 id="bytebase.v1.Changelog">Changelog</h3>
- <p></p>
+ <h3 id="bytebase.v1.IdentityProviderContext">IdentityProviderContext</h3>
+ <p>Context for identity provider authentication.</p>
<table class="field-table">
@@ -18014,53 +18191,64 @@ Permissions required: None</p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>oauth2_context</td>
+ <td><a href="#bytebase.v1.OAuth2IdentityProviderContext">OAuth2IdentityProviderContext</a></td>
<td></td>
- <td><p>Format: instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
+ <td><p>OAuth2 authentication context. </p></td>
</tr>
<tr>
- <td>create_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>oidc_context</td>
+ <td><a href="#bytebase.v1.OIDCIdentityProviderContext">OIDCIdentityProviderContext</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>OpenID Connect authentication context. </p></td>
</tr>
- <tr>
- <td>status</td>
- <td><a href="#bytebase.v1.Changelog.Status">Changelog.Status</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.LoginIdentityProvider">LoginIdentityProvider</h3>
+ <p>LoginIdentityProvider is an identity provider as the login page sees it.</p><p>Deliberately not a view of IdentityProvider: this message is served without</p><p>a credential, so every field it exposes is published by hand and no</p><p>provider configuration reaches it by default.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>schema</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name of the identity provider.
+Format: idps/{idp} </p></td>
</tr>
<tr>
- <td>schema_size</td>
- <td><a href="#int64">int64</a></td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.IdentityProviderType">IdentityProviderType</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The type of identity provider protocol. </p></td>
</tr>
<tr>
- <td>task_run</td>
+ <td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>
+ <td><p>The display title of the identity provider. </p></td>
</tr>
<tr>
- <td>plan_title</td>
- <td><a href="#string">string</a></td>
+ <td>authorization_request</td>
+ <td><a href="#bytebase.v1.AuthorizationRequest">AuthorizationRequest</a></td>
<td></td>
- <td><p>The title of the plan associated with this changelog&#39;s task run.
-This field is populated by deriving the plan from task_run for display purposes. </p></td>
+ <td><p>The parameters the browser needs to start the authorization redirect.
+Set for OAUTH2 and OIDC, absent for LDAP, whose bind happens server-side. </p></td>
</tr>
</tbody>
@@ -18070,7 +18258,7 @@ This field is populated by deriving the plan from task_run for display purposes.
- <h3 id="bytebase.v1.GetChangelogRequest">GetChangelogRequest</h3>
+ <h3 id="bytebase.v1.LoginRequest">LoginRequest</h3>
<p></p>
@@ -18081,88 +18269,84 @@ This field is populated by deriving the plan from task_run for display purposes.
<tbody>
<tr>
- <td>name</td>
+ <td>email</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the changelog to retrieve.
-Format: instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
+ <td><p>User&#39;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. </p></td>
</tr>
<tr>
- <td>view</td>
- <td><a href="#bytebase.v1.ChangelogView">ChangelogView</a></td>
+ <td>password</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>User&#39;s password for authentication. Bounded for abuse only: LDAP
+directories may accept passwords beyond bcrypt&#39;s 72-byte limit, and the
+local-password path rejects longer inputs itself. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ListChangelogsRequest">ListChangelogsRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>web</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>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. </p></td>
+ </tr>
<tr>
- <td>parent</td>
+ <td>idp_name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent of the changelogs.
-Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} </p></td>
+ <td><p>The name of the identity provider.
+Format: idps/{idp} </p></td>
</tr>
<tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
+ <td>idp_context</td>
+ <td><a href="#bytebase.v1.IdentityProviderContext">IdentityProviderContext</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>The idp_context is used to get the user information from identity provider. </p></td>
</tr>
<tr>
- <td>page_token</td>
+ <td>otp_code</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>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. </p></td>
+ <td>optional</td>
+ <td><p>The otp_code is used to verify the user&#39;s identity by MFA. </p></td>
</tr>
<tr>
- <td>view</td>
- <td><a href="#bytebase.v1.ChangelogView">ChangelogView</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>recovery_code</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>The recovery_code is used to recovery the user&#39;s identity with MFA. </p></td>
</tr>
<tr>
- <td>filter</td>
+ <td>mfa_temp_token</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>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 &#34;==&#34; operation. check Changelog.Status for available values.
-- has_schema_snapshot: filters to changelogs with a schema snapshot; only &#34;has_schema_snapshot == true&#34; is supported.
-- create_time: the changelog create time in RFC 3339 format, supports &#34;&gt;=&#34;, &#34;&lt;=&#34;, or &#34;&lt;&#34; operator.
-
-Example:
-status == &#34;DONE&#34;
-status == &#34;FAILED&#34;
-has_schema_snapshot == true &amp;&amp; create_time &lt; &#34;2024-01-02T00:00:00Z&#34; </p></td>
+ <td>optional</td>
+ <td><p>The mfa_temp_token is used to verify the user&#39;s identity by MFA. </p></td>
+ </tr>
+
+ <tr>
+ <td>email_code</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>6-digit code from email for passwordless login/signup.
+Pairs with `email`. Mutually exclusive with `password` and `idp_name`. </p></td>
+ </tr>
+
+ <tr>
+ <td>workspace</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>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} </p></td>
</tr>
</tbody>
@@ -18172,7 +18356,7 @@ has_schema_snapshot == true &amp;&amp; create_time &lt; &#34;2024-01-02T00:00:00
- <h3 id="bytebase.v1.ListChangelogsResponse">ListChangelogsResponse</h3>
+ <h3 id="bytebase.v1.LoginResponse">LoginResponse</h3>
<p></p>
@@ -18183,18 +18367,32 @@ has_schema_snapshot == true &amp;&amp; create_time &lt; &#34;2024-01-02T00:00:00
<tbody>
<tr>
- <td>changelogs</td>
- <td><a href="#bytebase.v1.Changelog">Changelog</a></td>
- <td>repeated</td>
- <td><p>The list of changelogs. </p></td>
- </tr>
+ <td>token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Access token for authenticated requests.
+Only returned when web=false. For web=true, the token is set as an HTTP-only cookie. </p></td>
+ </tr>
<tr>
- <td>next_page_token</td>
+ <td>mfa_temp_token</td>
<td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>Temporary token for MFA verification. </p></td>
+ </tr>
+
+ <tr>
+ <td>require_reset_password</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td><p>Whether user must reset password before continuing. </p></td>
+ </tr>
+
+ <tr>
+ <td>user</td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td></td>
+ <td><p>The user from the successful login. </p></td>
</tr>
</tbody>
@@ -18204,167 +18402,39 @@ If this field is omitted, there are no subsequent pages. </p></td>
+ <h3 id="bytebase.v1.LogoutRequest">LogoutRequest</h3>
+ <p>Request to logout current user session.</p>
-
- <h3 id="bytebase.v1.Changelog.Status">Changelog.Status</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>STATUS_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>PENDING</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DONE</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>FAILED</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.ChangelogView">ChangelogView</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>CHANGELOG_VIEW_UNSPECIFIED</td>
- <td>0</td>
- <td><p>The default / unset value.
-The API will default to the BASIC view.</p></td>
- </tr>
-
- <tr>
- <td>CHANGELOG_VIEW_BASIC</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>CHANGELOG_VIEW_FULL</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
+
+
- <h3 id="bytebase.v1.ChangelogService">ChangelogService</h3>
- <p>ChangelogService manages database migration history.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>ListChangelogs</td>
- <td><a href="#bytebase.v1.ListChangelogsRequest">ListChangelogsRequest</a></td>
- <td><a href="#bytebase.v1.ListChangelogsResponse">ListChangelogsResponse</a></td>
- <td><p>Lists migration history for a database.
-Permissions required: bb.changelogs.list</p></td>
- </tr>
-
- <tr>
- <td>GetChangelog</td>
- <td><a href="#bytebase.v1.GetChangelogRequest">GetChangelogRequest</a></td>
- <td><a href="#bytebase.v1.Changelog">Changelog</a></td>
- <td><p>Retrieves a specific changelog entry.
-Permissions required: bb.changelogs.get</p></td>
- </tr>
-
- </tbody>
- </table>
+ <h3 id="bytebase.v1.OAuth2IdentityProviderContext">OAuth2IdentityProviderContext</h3>
+ <p>OAuth2 authentication context.</p>
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
+ <table class="field-table">
<thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>
-
-
-
- <tr>
- <td>ListChangelogs</td>
- <td>GET</td>
- <td>/v1/{parent=instances/*/databases/*}/changelogs</td>
- <td></td>
- </tr>
-
- <tr>
- <td>ListChangelogs</td>
- <td>GET</td>
- <td>/v1/{parent=projects/*/instances/*/databases/*}/changelogs</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>GetChangelog</td>
- <td>GET</td>
- <td>/v1/{name=instances/*/databases/*/changelogs/*}</td>
- <td></td>
- </tr>
- <tr>
- <td>GetChangelog</td>
- <td>GET</td>
- <td>/v1/{name=projects/*/instances/*/databases/*/changelogs/*}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>code</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Authorization code from OAuth2 provider. </p></td>
+ </tr>
-
</tbody>
</table>
+
-
-
-
- <div class="file-heading">
- <h2 id="v1/database_catalog_service.proto">v1/database_catalog_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
+
- <h3 id="bytebase.v1.ColumnCatalog">ColumnCatalog</h3>
- <p>Column metadata within a table.</p>
+ <h3 id="bytebase.v1.OIDCIdentityProviderContext">OIDCIdentityProviderContext</h3>
+ <p>OpenID Connect authentication context.</p>
<table class="field-table">
@@ -18374,38 +18444,10 @@ Permissions required: bb.changelogs.get</p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The column name. </p></td>
- </tr>
-
- <tr>
- <td>semantic_type</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The semantic type describing the data purpose. </p></td>
- </tr>
-
- <tr>
- <td>labels</td>
- <td><a href="#bytebase.v1.ColumnCatalog.LabelsEntry">ColumnCatalog.LabelsEntry</a></td>
- <td>repeated</td>
- <td><p>User-defined labels for this column. </p></td>
- </tr>
-
- <tr>
- <td>classification</td>
+ <td>code</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The data classification level for this column. </p></td>
- </tr>
-
- <tr>
- <td>object_schema</td>
- <td><a href="#bytebase.v1.ObjectSchema">ObjectSchema</a></td>
- <td>optional</td>
- <td><p>Object schema for complex column types like JSON. </p></td>
+ <td><p>Authorization code from OIDC provider. </p></td>
</tr>
</tbody>
@@ -18415,7 +18457,21 @@ Permissions required: bb.changelogs.get</p></td>
- <h3 id="bytebase.v1.ColumnCatalog.LabelsEntry">ColumnCatalog.LabelsEntry</h3>
+ <h3 id="bytebase.v1.RefreshRequest">RefreshRequest</h3>
+ <p>Request to refresh the access token.</p>
+
+
+
+
+
+ <h3 id="bytebase.v1.RefreshResponse">RefreshResponse</h3>
+ <p>Response from refreshing the access token.</p>
+
+
+
+
+
+ <h3 id="bytebase.v1.RequestPasswordResetRequest">RequestPasswordResetRequest</h3>
<p></p>
@@ -18426,17 +18482,22 @@ Permissions required: bb.changelogs.get</p></td>
<tbody>
<tr>
- <td>key</td>
+ <td>email</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>value</td>
+ <td>workspace</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>optional</td>
+ <td><p>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} </p></td>
</tr>
</tbody>
@@ -18446,8 +18507,8 @@ Permissions required: bb.changelogs.get</p></td>
- <h3 id="bytebase.v1.DatabaseCatalog">DatabaseCatalog</h3>
- <p>Catalog metadata for a database including schemas, tables, and columns.</p>
+ <h3 id="bytebase.v1.ResetPasswordRequest">ResetPasswordRequest</h3>
+ <p></p>
<table class="field-table">
@@ -18457,43 +18518,26 @@ Permissions required: bb.changelogs.get</p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>email</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the database catalog.
-Format: instances/{instance}/databases/{database}/catalog or projects/{project}/instances/{instance}/databases/{database}/catalog </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>schemas</td>
- <td><a href="#bytebase.v1.SchemaCatalog">SchemaCatalog</a></td>
- <td>repeated</td>
- <td><p>The schemas in the database. </p></td>
+ <td>code</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The 6-digit code from the reset email. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.GetDatabaseCatalogRequest">GetDatabaseCatalogRequest</h3>
- <p>Request message for getting a database catalog.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>name</td>
+ <td>new_password</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the database catalog to retrieve.
-Format: instances/{instance}/databases/{database}/catalog or projects/{project}/instances/{instance}/databases/{database}/catalog </p></td>
+ <td><p>The new password to set. </p></td>
</tr>
</tbody>
@@ -18503,8 +18547,8 @@ Format: instances/{instance}/databases/{database}/catalog or projects/{project}/
- <h3 id="bytebase.v1.ObjectSchema">ObjectSchema</h3>
- <p>Schema definition for object-type columns.</p>
+ <h3 id="bytebase.v1.Restriction">Restriction</h3>
+ <p></p>
<table class="field-table">
@@ -18514,55 +18558,39 @@ Format: instances/{instance}/databases/{database}/catalog or projects/{project}/
<tbody>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.ObjectSchema.Type">ObjectSchema.Type</a></td>
+ <td>disallow_signup</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The data type of this object. </p></td>
+ <td><p>Whether self-service user signup is disabled. </p></td>
</tr>
<tr>
- <td>struct_kind</td>
- <td><a href="#bytebase.v1.ObjectSchema.StructKind">ObjectSchema.StructKind</a></td>
+ <td>disallow_password_signin</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Struct schema. </p></td>
+ <td><p>Whether password sign-in is disabled for all end users. </p></td>
</tr>
<tr>
- <td>array_kind</td>
- <td><a href="#bytebase.v1.ObjectSchema.ArrayKind">ObjectSchema.ArrayKind</a></td>
+ <td>password_restriction</td>
+ <td><a href="#bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</a></td>
<td></td>
- <td><p>Array schema. </p></td>
+ <td><p>Password complexity and restriction requirements. </p></td>
</tr>
<tr>
- <td>semantic_type</td>
- <td><a href="#string">string</a></td>
+ <td>allow_email_code_signin</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The semantic type of this object. </p></td>
+ <td><p>Whether email &#43; 6-digit code signin is enabled for this workspace. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ObjectSchema.ArrayKind">ObjectSchema.ArrayKind</h3>
- <p>Array type with element schema.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>kind</td>
- <td><a href="#bytebase.v1.ObjectSchema">ObjectSchema</a></td>
+ <td>password_reset_enabled</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The schema of array elements. </p></td>
+ <td><p>Whether password reset via email is available for this workspace.
+True when the workspace (or deployment) has an email setting configured. </p></td>
</tr>
</tbody>
@@ -18572,8 +18600,8 @@ Format: instances/{instance}/databases/{database}/catalog or projects/{project}/
- <h3 id="bytebase.v1.ObjectSchema.StructKind">ObjectSchema.StructKind</h3>
- <p>Structure type with named properties.</p>
+ <h3 id="bytebase.v1.SendEmailLoginCodeRequest">SendEmailLoginCodeRequest</h3>
+ <p></p>
<table class="field-table">
@@ -18583,10 +18611,22 @@ Format: instances/{instance}/databases/{database}/catalog or projects/{project}/
<tbody>
<tr>
- <td>properties</td>
- <td><a href="#bytebase.v1.ObjectSchema.StructKind.PropertiesEntry">ObjectSchema.StructKind.PropertiesEntry</a></td>
- <td>repeated</td>
- <td><p>Properties of the struct. </p></td>
+ <td>email</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>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. </p></td>
+ </tr>
+
+ <tr>
+ <td>workspace</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>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} </p></td>
</tr>
</tbody>
@@ -18596,7 +18636,7 @@ Format: instances/{instance}/databases/{database}/catalog or projects/{project}/
- <h3 id="bytebase.v1.ObjectSchema.StructKind.PropertiesEntry">ObjectSchema.StructKind.PropertiesEntry</h3>
+ <h3 id="bytebase.v1.SignupRequest">SignupRequest</h3>
<p></p>
@@ -18607,48 +18647,26 @@ Format: instances/{instance}/databases/{database}/catalog or projects/{project}/
<tbody>
<tr>
- <td>key</td>
+ <td>email</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>value</td>
- <td><a href="#bytebase.v1.ObjectSchema">ObjectSchema</a></td>
+ <td>password</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The password for the new account. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.SchemaCatalog">SchemaCatalog</h3>
- <p>Schema metadata within a database.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>name</td>
+ <td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The schema name. </p></td>
- </tr>
-
- <tr>
- <td>tables</td>
- <td><a href="#bytebase.v1.TableCatalog">TableCatalog</a></td>
- <td>repeated</td>
- <td><p>The tables in the schema. </p></td>
+ <td><p>The display name of the user. </p></td>
</tr>
</tbody>
@@ -18658,8 +18676,8 @@ Format: instances/{instance}/databases/{database}/catalog or projects/{project}/
- <h3 id="bytebase.v1.TableCatalog">TableCatalog</h3>
- <p>Table metadata within a schema.</p>
+ <h3 id="bytebase.v1.SwitchWorkspaceRequest">SwitchWorkspaceRequest</h3>
+ <p></p>
<table class="field-table">
@@ -18669,55 +18687,39 @@ Format: instances/{instance}/databases/{database}/catalog or projects/{project}/
<tbody>
<tr>
- <td>name</td>
+ <td>workspace</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The table name. </p></td>
+ <td><p>The target workspace to switch to.
+Format: workspaces/{workspace} </p></td>
</tr>
<tr>
- <td>columns</td>
- <td><a href="#bytebase.v1.TableCatalog.Columns">TableCatalog.Columns</a></td>
+ <td>web</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Regular table columns. </p></td>
+ <td><p>If true, sets tokens as HTTP-only cookies (browser clients). </p></td>
</tr>
<tr>
- <td>object_schema</td>
- <td><a href="#bytebase.v1.ObjectSchema">ObjectSchema</a></td>
- <td></td>
- <td><p>Object schema for JSON/XML columns. </p></td>
+ <td>otp_code</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>OTP code for MFA verification. Required if the target workspace enforces MFA. </p></td>
</tr>
<tr>
- <td>classification</td>
+ <td>recovery_code</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The data classification level for this table. </p></td>
+ <td>optional</td>
+ <td><p>Recovery code for MFA verification (alternative to otp_code). </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.TableCatalog.Columns">TableCatalog.Columns</h3>
- <p>Column list for regular tables.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>columns</td>
- <td><a href="#bytebase.v1.ColumnCatalog">ColumnCatalog</a></td>
- <td>repeated</td>
- <td><p>The columns in the table. </p></td>
+ <td>mfa_temp_token</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>Temporary MFA token from a previous SwitchWorkspace call that returned mfa_temp_token. </p></td>
</tr>
</tbody>
@@ -18727,110 +18729,108 @@ Format: instances/{instance}/databases/{database}/catalog or projects/{project}/
- <h3 id="bytebase.v1.UpdateDatabaseCatalogRequest">UpdateDatabaseCatalogRequest</h3>
- <p>Request message for updating a database catalog.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>catalog</td>
- <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>
- <td></td>
- <td><p>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. </p></td>
- </tr>
-
- </tbody>
- </table>
-
+
-
- <h3 id="bytebase.v1.ObjectSchema.Type">ObjectSchema.Type</h3>
- <p>Object schema data types.</p>
+ <h3 id="bytebase.v1.AuthService">AuthService</h3>
+ <p>AuthService handles user authentication operations.</p>
<table class="enum-table">
<thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
</thead>
<tbody>
<tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified type.</p></td>
+ <td>GetAuthenticationInfo</td>
+ <td><a href="#bytebase.v1.GetAuthenticationInfoRequest">GetAuthenticationInfoRequest</a></td>
+ <td><a href="#bytebase.v1.AuthenticationInfo">AuthenticationInfo</a></td>
+ <td><p>Gets everything the login page renders: the sign-in restrictions and the
+identity providers it offers.
+Permissions required: None</p></td>
</tr>
<tr>
- <td>STRING</td>
- <td>1</td>
- <td><p>String type.</p></td>
+ <td>Login</td>
+ <td><a href="#bytebase.v1.LoginRequest">LoginRequest</a></td>
+ <td><a href="#bytebase.v1.LoginResponse">LoginResponse</a></td>
+ <td><p>Authenticates a user and returns access tokens.
+Permissions required: None</p></td>
</tr>
<tr>
- <td>NUMBER</td>
- <td>2</td>
- <td><p>Number type.</p></td>
+ <td>Logout</td>
+ <td><a href="#bytebase.v1.LogoutRequest">LogoutRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Logs out the current user session.
+Permissions required: None</p></td>
</tr>
<tr>
- <td>BOOLEAN</td>
- <td>3</td>
- <td><p>Boolean type.</p></td>
+ <td>ExchangeToken</td>
+ <td><a href="#bytebase.v1.ExchangeTokenRequest">ExchangeTokenRequest</a></td>
+ <td><a href="#bytebase.v1.ExchangeTokenResponse">ExchangeTokenResponse</a></td>
+ <td><p>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)</p></td>
</tr>
<tr>
- <td>OBJECT</td>
- <td>4</td>
- <td><p>Object/struct type.</p></td>
+ <td>Signup</td>
+ <td><a href="#bytebase.v1.SignupRequest">SignupRequest</a></td>
+ <td><a href="#bytebase.v1.LoginResponse">LoginResponse</a></td>
+ <td><p>Registers a new user account. Creates a principal and assigns a workspace:
+- If the user&#39;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.</p></td>
</tr>
<tr>
- <td>ARRAY</td>
- <td>5</td>
- <td><p>Array type.</p></td>
+ <td>Refresh</td>
+ <td><a href="#bytebase.v1.RefreshRequest">RefreshRequest</a></td>
+ <td><a href="#bytebase.v1.RefreshResponse">RefreshResponse</a></td>
+ <td><p>Refreshes the access token using the refresh token cookie.
+Permissions required: None (validates via refresh token cookie)</p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.DatabaseCatalogService">DatabaseCatalogService</h3>
- <p>DatabaseCatalogService manages database schema metadata and classification.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>SwitchWorkspace</td>
+ <td><a href="#bytebase.v1.SwitchWorkspaceRequest">SwitchWorkspaceRequest</a></td>
+ <td><a href="#bytebase.v1.LoginResponse">LoginResponse</a></td>
+ <td><p>Switches the current user&#39;s active workspace and issues new tokens.
+The user must be a member of the target workspace.</p></td>
+ </tr>
<tr>
- <td>GetDatabaseCatalog</td>
- <td><a href="#bytebase.v1.GetDatabaseCatalogRequest">GetDatabaseCatalogRequest</a></td>
- <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>
- <td><p>Gets the catalog metadata for a database.
-Permissions required: bb.databaseCatalogs.get</p></td>
+ <td>RequestPasswordReset</td>
+ <td><a href="#bytebase.v1.RequestPasswordResetRequest">RequestPasswordResetRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Requests a password reset email for the given email address.
+Always returns success to avoid leaking whether the email exists.
+Requires the workspace&#39;s SMTP mail delivery setting; without it the
+recovery route is an admin password reset.
+Permissions required: None</p></td>
</tr>
<tr>
- <td>UpdateDatabaseCatalog</td>
- <td><a href="#bytebase.v1.UpdateDatabaseCatalogRequest">UpdateDatabaseCatalogRequest</a></td>
- <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>
- <td><p>Updates catalog metadata such as classifications and labels.
-Permissions required: bb.databaseCatalogs.update</p></td>
+ <td>ResetPassword</td>
+ <td><a href="#bytebase.v1.ResetPasswordRequest">ResetPasswordRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Resets the user&#39;s password using a password reset token from email.
+Permissions required: None (validates via token)</p></td>
+ </tr>
+
+ <tr>
+ <td>SendEmailLoginCode</td>
+ <td><a href="#bytebase.v1.SendEmailLoginCodeRequest">SendEmailLoginCodeRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>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</p></td>
</tr>
</tbody>
@@ -18854,16 +18854,16 @@ Permissions required: bb.databaseCatalogs.update</p></td>
<tr>
- <td>GetDatabaseCatalog</td>
+ <td>GetAuthenticationInfo</td>
<td>GET</td>
- <td>/v1/{name=instances/*/databases/*/catalog}</td>
+ <td>/v1/auth/info</td>
<td></td>
</tr>
<tr>
- <td>GetDatabaseCatalog</td>
+ <td>GetAuthenticationInfo</td>
<td>GET</td>
- <td>/v1/{name=projects/*/instances/*/databases/*/catalog}</td>
+ <td>/v1/{workspace=workspaces/*}/auth/info</td>
<td></td>
</tr>
@@ -18871,17 +18871,90 @@ Permissions required: bb.databaseCatalogs.update</p></td>
<tr>
- <td>UpdateDatabaseCatalog</td>
- <td>PATCH</td>
- <td>/v1/{catalog.name=instances/*/databases/*/catalog}</td>
- <td>catalog</td>
+ <td>Login</td>
+ <td>POST</td>
+ <td>/v1/auth/login</td>
+ <td>*</td>
</tr>
+
+
+
<tr>
- <td>UpdateDatabaseCatalog</td>
- <td>PATCH</td>
- <td>/v1/{catalog.name=projects/*/instances/*/databases/*/catalog}</td>
- <td>catalog</td>
+ <td>Logout</td>
+ <td>POST</td>
+ <td>/v1/auth/logout</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>ExchangeToken</td>
+ <td>POST</td>
+ <td>/v1/auth:exchangeToken</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>Signup</td>
+ <td>POST</td>
+ <td>/v1/auth/signup</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>Refresh</td>
+ <td>POST</td>
+ <td>/v1/auth/refresh</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>SwitchWorkspace</td>
+ <td>POST</td>
+ <td>/v1/auth:switchWorkspace</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>RequestPasswordReset</td>
+ <td>POST</td>
+ <td>/v1/auth:requestPasswordReset</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>ResetPassword</td>
+ <td>POST</td>
+ <td>/v1/auth:resetPassword</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>SendEmailLoginCode</td>
+ <td>POST</td>
+ <td>/v1/auth:sendEmailLoginCode</td>
+ <td>*</td>
</tr>
@@ -18892,13 +18965,13 @@ Permissions required: bb.databaseCatalogs.update</p></td>
<div class="file-heading">
- <h2 id="v1/database_group_service.proto">v1/database_group_service.proto</h2><a href="#title">Top</a>
+ <h2 id="v1/cel_service.proto">v1/cel_service.proto</h2><a href="#title">Top</a>
</div>
<p></p>
- <h3 id="bytebase.v1.CreateDatabaseGroupRequest">CreateDatabaseGroupRequest</h3>
- <p>Request message for creating a database group.</p>
+ <h3 id="bytebase.v1.BatchDeparseRequest">BatchDeparseRequest</h3>
+ <p>Request message for batch deparsing CEL expressions.</p>
<table class="field-table">
@@ -18908,36 +18981,34 @@ Permissions required: bb.databaseCatalogs.update</p></td>
<tbody>
<tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The parent resource where this database group will be created.
-Format: projects/{project} </p></td>
- </tr>
-
- <tr>
- <td>database_group</td>
- <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
- <td></td>
- <td><p>The database group to create. </p></td>
+ <td>expressions</td>
+ <td><a href="#google.api.expr.v1alpha1.Expr">google.api.expr.v1alpha1.Expr</a></td>
+ <td>repeated</td>
+ <td><p>The CEL expression ASTs to deparse. </p></td>
</tr>
- <tr>
- <td>database_group_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The ID to use for the database group, which will become the final component of
-the database group&#39;s resource name.
+ </tbody>
+ </table>
-This value should be 4-63 characters, and valid characters
-are /[a-z][0-9]-/. </p></td>
- </tr>
+
+
+
+
+ <h3 id="bytebase.v1.BatchDeparseResponse">BatchDeparseResponse</h3>
+ <p>Response message for batch deparsing CEL expressions.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>validate_only</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>If set, validate the create request and preview the full database group response, but do not actually create it. </p></td>
+ <td>expressions</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The deparsed CEL expressions as strings. </p></td>
</tr>
</tbody>
@@ -18947,8 +19018,8 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.v1.DatabaseGroup">DatabaseGroup</h3>
- <p>A group of databases matched by expressions.</p>
+ <h3 id="bytebase.v1.BatchParseRequest">BatchParseRequest</h3>
+ <p>Request message for batch parsing CEL expressions.</p>
<table class="field-table">
@@ -18958,44 +19029,10 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the database group.
-Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
- </tr>
-
- <tr>
- <td>title</td>
+ <td>expressions</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The short name used in actual databases specified by users. </p></td>
- </tr>
-
- <tr>
- <td>database_expr</td>
- <td><a href="#google.type.Expr">google.type.Expr</a></td>
- <td></td>
- <td><p>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 &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34; operations.
-resource.instance_id: the instance resource id. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34;, &#34;contains&#34;, &#34;matches&#34;, &#34;startsWith&#34;, &#34;endsWith&#34; operations.
-resource.database_name: the database name. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34;, &#34;contains&#34;, &#34;matches&#34;, &#34;startsWith&#34;, &#34;endsWith&#34; operations.
-resource.database_labels: the database labels. Support map access operations.
-All variables should join with &#34;&amp;&amp;&#34; condition.
-
-For example:
-resource.environment_id == &#34;test&#34; &amp;&amp; resource.database_name.startsWith(&#34;sample_&#34;)
-resource.database_labels[&#34;tenant&#34;] == &#34;tenant1&#34; </p></td>
- </tr>
-
- <tr>
- <td>matched_databases</td>
- <td><a href="#bytebase.v1.DatabaseGroup.Database">DatabaseGroup.Database</a></td>
- <td>repeated</td>
- <td><p>The list of databases that match the database group condition. </p></td>
+ <td>repeated</td>
+ <td><p>The CEL expression strings to parse. </p></td>
</tr>
</tbody>
@@ -19005,8 +19042,8 @@ resource.database_labels[&#34;tenant&#34;] == &#34;tenant1&#34; </p></td>
- <h3 id="bytebase.v1.DatabaseGroup.Database">DatabaseGroup.Database</h3>
- <p>A database within a database group.</p>
+ <h3 id="bytebase.v1.BatchParseResponse">BatchParseResponse</h3>
+ <p>Response message for batch parsing CEL expressions.</p>
<table class="field-table">
@@ -19016,11 +19053,10 @@ resource.database_labels[&#34;tenant&#34;] == &#34;tenant1&#34; </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The resource name of the database.
-Format: instances/{instance}/databases/{database} </p></td>
+ <td>expressions</td>
+ <td><a href="#google.api.expr.v1alpha1.Expr">google.api.expr.v1alpha1.Expr</a></td>
+ <td>repeated</td>
+ <td><p>The parsed CEL expressions as AST. </p></td>
</tr>
</tbody>
@@ -19030,33 +19066,88 @@ Format: instances/{instance}/databases/{database} </p></td>
- <h3 id="bytebase.v1.DeleteDatabaseGroupRequest">DeleteDatabaseGroupRequest</h3>
- <p>Request message for deleting a database group.</p>
+
+
+
+
+
+
+ <h3 id="bytebase.v1.CelService">CelService</h3>
+ <p>CelService manages CEL (Common Expression Language) parsing and formatting operations.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>BatchParse</td>
+ <td><a href="#bytebase.v1.BatchParseRequest">BatchParseRequest</a></td>
+ <td><a href="#bytebase.v1.BatchParseResponse">BatchParseResponse</a></td>
+ <td><p>Parses multiple CEL expression strings into AST representations.
+Permissions required: None</p></td>
+ </tr>
+
+ <tr>
+ <td>BatchDeparse</td>
+ <td><a href="#bytebase.v1.BatchDeparseRequest">BatchDeparseRequest</a></td>
+ <td><a href="#bytebase.v1.BatchDeparseResponse">BatchDeparseResponse</a></td>
+ <td><p>Converts multiple CEL AST representations back into expression strings.
+Permissions required: None</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <table class="field-table">
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
<thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
</thead>
<tbody>
+
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the database group to delete.
-Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
- </tr>
+ <tr>
+ <td>BatchParse</td>
+ <td>POST</td>
+ <td>/v1/cel/batchParse</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>BatchDeparse</td>
+ <td>POST</td>
+ <td>/v1/cel/batchDeparse</td>
+ <td>*</td>
+ </tr>
+
+
</tbody>
</table>
-
-
+
- <h3 id="bytebase.v1.GetDatabaseGroupRequest">GetDatabaseGroupRequest</h3>
- <p>Request message for getting a database group.</p>
+ <div class="file-heading">
+ <h2 id="v1/changelog_service.proto">v1/changelog_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.Changelog">Changelog</h3>
+ <p></p>
<table class="field-table">
@@ -19069,15 +19160,50 @@ Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the database group to retrieve.
-Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
+ <td><p>Format: instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
</tr>
<tr>
- <td>view</td>
- <td><a href="#bytebase.v1.DatabaseGroupView">DatabaseGroupView</a></td>
+ <td>create_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. </p></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>status</td>
+ <td><a href="#bytebase.v1.Changelog.Status">Changelog.Status</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>schema</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>schema_size</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>task_run</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>
+ </tr>
+
+ <tr>
+ <td>plan_title</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The title of the plan associated with this changelog&#39;s task run.
+This field is populated by deriving the plan from task_run for display purposes. </p></td>
</tr>
</tbody>
@@ -19087,8 +19213,8 @@ Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
- <h3 id="bytebase.v1.ListDatabaseGroupsRequest">ListDatabaseGroupsRequest</h3>
- <p>Request message for listing database groups.</p>
+ <h3 id="bytebase.v1.GetChangelogRequest">GetChangelogRequest</h3>
+ <p></p>
<table class="field-table">
@@ -19098,18 +19224,18 @@ Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent resource whose database groups are to be listed.
-Format: projects/{project} </p></td>
+ <td><p>The name of the changelog to retrieve.
+Format: instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
</tr>
<tr>
<td>view</td>
- <td><a href="#bytebase.v1.DatabaseGroupView">DatabaseGroupView</a></td>
+ <td><a href="#bytebase.v1.ChangelogView">ChangelogView</a></td>
<td></td>
- <td><p>The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -19119,8 +19245,8 @@ Format: projects/{project} </p></td>
- <h3 id="bytebase.v1.ListDatabaseGroupsResponse">ListDatabaseGroupsResponse</h3>
- <p>Response message for listing database groups.</p>
+ <h3 id="bytebase.v1.ListChangelogsRequest">ListChangelogsRequest</h3>
+ <p></p>
<table class="field-table">
@@ -19130,52 +19256,56 @@ Format: projects/{project} </p></td>
<tbody>
<tr>
- <td>database_groups</td>
- <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
- <td>repeated</td>
- <td><p>The database groups from the specified request. </p></td>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The parent of the changelogs.
+Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.UpdateDatabaseGroupRequest">UpdateDatabaseGroupRequest</h3>
- <p>Request message for updating a database group.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>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. </p></td>
+ </tr>
<tr>
- <td>database_group</td>
- <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
+ <td>page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The database group to update.
+ <td><p>A page token, received from the previous call.
+Provide this to retrieve the subsequent page.
-The database group&#39;s `name` field is used to identify the database group to update.
-Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
+When paginating, all other parameters provided must match
+the call that provided the page token. </p></td>
</tr>
<tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td>view</td>
+ <td><a href="#bytebase.v1.ChangelogView">ChangelogView</a></td>
<td></td>
- <td><p>The list of fields to update. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>allow_missing</td>
- <td><a href="#bool">bool</a></td>
+ <td>filter</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>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 &#34;==&#34; operation. check Changelog.Status for available values.
+- has_schema_snapshot: filters to changelogs with a schema snapshot; only &#34;has_schema_snapshot == true&#34; is supported.
+- create_time: the changelog create time in RFC 3339 format, supports &#34;&gt;=&#34;, &#34;&lt;=&#34;, or &#34;&lt;&#34; operator.
+
+Example:
+status == &#34;DONE&#34;
+status == &#34;FAILED&#34;
+has_schema_snapshot == true &amp;&amp; create_time &lt; &#34;2024-01-02T00:00:00Z&#34; </p></td>
</tr>
</tbody>
@@ -19185,10 +19315,42 @@ In this situation, `update_mask` is ignored. </p></td>
+ <h3 id="bytebase.v1.ListChangelogsResponse">ListChangelogsResponse</h3>
+ <p></p>
-
- <h3 id="bytebase.v1.DatabaseGroupView">DatabaseGroupView</h3>
- <p>View options for database group responses.</p>
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>changelogs</td>
+ <td><a href="#bytebase.v1.Changelog">Changelog</a></td>
+ <td>repeated</td>
+ <td><p>The list of changelogs. </p></td>
+ </tr>
+
+ <tr>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+
+
+ <h3 id="bytebase.v1.Changelog.Status">Changelog.Status</h3>
+ <p></p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -19196,78 +19358,88 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>DATABASE_GROUP_VIEW_UNSPECIFIED</td>
+ <td>STATUS_UNSPECIFIED</td>
<td>0</td>
- <td><p>The default / unset value.
-The API will default to the BASIC view.</p></td>
+ <td><p></p></td>
</tr>
<tr>
- <td>DATABASE_GROUP_VIEW_BASIC</td>
+ <td>PENDING</td>
<td>1</td>
- <td><p>Include basic information about the database group, but exclude the list of matched databases and unmatched databases.</p></td>
+ <td><p></p></td>
</tr>
<tr>
- <td>DATABASE_GROUP_VIEW_FULL</td>
+ <td>DONE</td>
<td>2</td>
- <td><p>Include everything.</p></td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>FAILED</td>
+ <td>3</td>
+ <td><p></p></td>
</tr>
</tbody>
</table>
-
-
-
-
- <h3 id="bytebase.v1.DatabaseGroupService">DatabaseGroupService</h3>
- <p>DatabaseGroupService manages database groups for organizing databases by criteria.</p>
+ <h3 id="bytebase.v1.ChangelogView">ChangelogView</h3>
+ <p></p>
<table class="enum-table">
<thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
</thead>
<tbody>
<tr>
- <td>ListDatabaseGroups</td>
- <td><a href="#bytebase.v1.ListDatabaseGroupsRequest">ListDatabaseGroupsRequest</a></td>
- <td><a href="#bytebase.v1.ListDatabaseGroupsResponse">ListDatabaseGroupsResponse</a></td>
- <td><p>Lists database groups in a project.
-Permissions required: bb.databaseGroups.list</p></td>
+ <td>CHANGELOG_VIEW_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>The default / unset value.
+The API will default to the BASIC view.</p></td>
</tr>
<tr>
- <td>GetDatabaseGroup</td>
- <td><a href="#bytebase.v1.GetDatabaseGroupRequest">GetDatabaseGroupRequest</a></td>
- <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
- <td><p>Gets a database group by name.
-Permissions required: bb.databaseGroups.get</p></td>
+ <td>CHANGELOG_VIEW_BASIC</td>
+ <td>1</td>
+ <td><p></p></td>
</tr>
<tr>
- <td>CreateDatabaseGroup</td>
- <td><a href="#bytebase.v1.CreateDatabaseGroupRequest">CreateDatabaseGroupRequest</a></td>
- <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
- <td><p>Creates a new database group.
-Permissions required: bb.databaseGroups.create</p></td>
+ <td>CHANGELOG_VIEW_FULL</td>
+ <td>2</td>
+ <td><p></p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ChangelogService">ChangelogService</h3>
+ <p>ChangelogService manages database migration history.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>UpdateDatabaseGroup</td>
- <td><a href="#bytebase.v1.UpdateDatabaseGroupRequest">UpdateDatabaseGroupRequest</a></td>
- <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
- <td><p>Updates a database group.
-Permissions required: bb.databaseGroups.update
-When allow_missing=true, also requires: bb.databaseGroups.create</p></td>
+ <td>ListChangelogs</td>
+ <td><a href="#bytebase.v1.ListChangelogsRequest">ListChangelogsRequest</a></td>
+ <td><a href="#bytebase.v1.ListChangelogsResponse">ListChangelogsResponse</a></td>
+ <td><p>Lists migration history for a database.
+Permissions required: bb.changelogs.list</p></td>
</tr>
<tr>
- <td>DeleteDatabaseGroup</td>
- <td><a href="#bytebase.v1.DeleteDatabaseGroupRequest">DeleteDatabaseGroupRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Deletes a database group.
-Permissions required: bb.databaseGroups.delete</p></td>
+ <td>GetChangelog</td>
+ <td><a href="#bytebase.v1.GetChangelogRequest">GetChangelogRequest</a></td>
+ <td><a href="#bytebase.v1.Changelog">Changelog</a></td>
+ <td><p>Retrieves a specific changelog entry.
+Permissions required: bb.changelogs.get</p></td>
</tr>
</tbody>
@@ -19291,19 +19463,16 @@ Permissions required: bb.databaseGroups.delete</p></td>
<tr>
- <td>ListDatabaseGroups</td>
+ <td>ListChangelogs</td>
<td>GET</td>
- <td>/v1/{parent=projects/*}/databaseGroups</td>
+ <td>/v1/{parent=instances/*/databases/*}/changelogs</td>
<td></td>
</tr>
-
-
-
<tr>
- <td>GetDatabaseGroup</td>
+ <td>ListChangelogs</td>
<td>GET</td>
- <td>/v1/{name=projects/*/databaseGroups/*}</td>
+ <td>/v1/{parent=projects/*/instances/*/databases/*}/changelogs</td>
<td></td>
</tr>
@@ -19311,29 +19480,16 @@ Permissions required: bb.databaseGroups.delete</p></td>
<tr>
- <td>CreateDatabaseGroup</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*}/databaseGroups</td>
- <td>database_group</td>
- </tr>
-
-
-
-
- <tr>
- <td>UpdateDatabaseGroup</td>
- <td>PATCH</td>
- <td>/v1/{database_group.name=projects/*/databaseGroups/*}</td>
- <td>database_group</td>
+ <td>GetChangelog</td>
+ <td>GET</td>
+ <td>/v1/{name=instances/*/databases/*/changelogs/*}</td>
+ <td></td>
</tr>
-
-
-
<tr>
- <td>DeleteDatabaseGroup</td>
- <td>DELETE</td>
- <td>/v1/{name=projects/*/databaseGroups/*}</td>
+ <td>GetChangelog</td>
+ <td>GET</td>
+ <td>/v1/{name=projects/*/instances/*/databases/*/changelogs/*}</td>
<td></td>
</tr>
@@ -19345,13 +19501,13 @@ Permissions required: bb.databaseGroups.delete</p></td>
<div class="file-heading">
- <h2 id="v1/instance_role_service.proto">v1/instance_role_service.proto</h2><a href="#title">Top</a>
+ <h2 id="v1/database_catalog_service.proto">v1/database_catalog_service.proto</h2><a href="#title">Top</a>
</div>
<p></p>
- <h3 id="bytebase.v1.InstanceRole">InstanceRole</h3>
- <p>InstanceRole is the API message for instance role.</p>
+ <h3 id="bytebase.v1.ColumnCatalog">ColumnCatalog</h3>
+ <p>Column metadata within a table.</p>
<table class="field-table">
@@ -19364,46 +19520,35 @@ Permissions required: bb.databaseGroups.delete</p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>The column name. </p></td>
</tr>
<tr>
- <td>role_name</td>
+ <td>semantic_type</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The role name. It&#39;s unique within the instance. </p></td>
- </tr>
-
- <tr>
- <td>password</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The role password. </p></td>
+ <td><p>The semantic type describing the data purpose. </p></td>
</tr>
<tr>
- <td>connection_limit</td>
- <td><a href="#int32">int32</a></td>
- <td>optional</td>
- <td><p>The connection count limit for this role. </p></td>
+ <td>labels</td>
+ <td><a href="#bytebase.v1.ColumnCatalog.LabelsEntry">ColumnCatalog.LabelsEntry</a></td>
+ <td>repeated</td>
+ <td><p>User-defined labels for this column. </p></td>
</tr>
<tr>
- <td>valid_until</td>
+ <td>classification</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The expiration for the role&#39;s password. </p></td>
+ <td></td>
+ <td><p>The data classification level for this column. </p></td>
</tr>
<tr>
- <td>attribute</td>
- <td><a href="#string">string</a></td>
+ <td>object_schema</td>
+ <td><a href="#bytebase.v1.ObjectSchema">ObjectSchema</a></td>
<td>optional</td>
- <td><p>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&#39;s the global privileges as GRANT statements, which means it only contains &#34;GRANT ... ON *.* TO ...&#34;. Docs: https://dev.mysql.com/doc/refman/8.0/en/grant.html </p></td>
+ <td><p>Object schema for complex column types like JSON. </p></td>
</tr>
</tbody>
@@ -19413,7 +19558,7 @@ For MySQL, it&#39;s the global privileges as GRANT statements, which means it on
- <h3 id="bytebase.v1.ListInstanceRolesRequest">ListInstanceRolesRequest</h3>
+ <h3 id="bytebase.v1.ColumnCatalog.LabelsEntry">ColumnCatalog.LabelsEntry</h3>
<p></p>
@@ -19424,41 +19569,17 @@ For MySQL, it&#39;s the global privileges as GRANT statements, which means it on
<tbody>
<tr>
- <td>parent</td>
+ <td>key</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent, which owns this collection of roles.
-Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>
- </tr>
-
- <tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>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. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>page_token</td>
+ <td>value</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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. </p></td>
- </tr>
-
- <tr>
- <td>refresh</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Refresh will refresh and return the latest data. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -19468,8 +19589,8 @@ the call that provided the page token. </p></td>
- <h3 id="bytebase.v1.ListInstanceRolesResponse">ListInstanceRolesResponse</h3>
- <p></p>
+ <h3 id="bytebase.v1.DatabaseCatalog">DatabaseCatalog</h3>
+ <p>Catalog metadata for a database including schemas, tables, and columns.</p>
<table class="field-table">
@@ -19479,18 +19600,18 @@ the call that provided the page token. </p></td>
<tbody>
<tr>
- <td>roles</td>
- <td><a href="#bytebase.v1.InstanceRole">InstanceRole</a></td>
- <td>repeated</td>
- <td><p>The roles from the specified request. </p></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the database catalog.
+Format: instances/{instance}/databases/{database}/catalog or projects/{project}/instances/{instance}/databases/{database}/catalog </p></td>
</tr>
<tr>
- <td>next_page_token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td>schemas</td>
+ <td><a href="#bytebase.v1.SchemaCatalog">SchemaCatalog</a></td>
+ <td>repeated</td>
+ <td><p>The schemas in the database. </p></td>
</tr>
</tbody>
@@ -19500,77 +19621,33 @@ If this field is omitted, there are no subsequent pages. </p></td>
-
-
-
-
-
-
- <h3 id="bytebase.v1.InstanceRoleService">InstanceRoleService</h3>
- <p>InstanceRoleService manages database roles within instances.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>ListInstanceRoles</td>
- <td><a href="#bytebase.v1.ListInstanceRolesRequest">ListInstanceRolesRequest</a></td>
- <td><a href="#bytebase.v1.ListInstanceRolesResponse">ListInstanceRolesResponse</a></td>
- <td><p>Lists all database roles in an instance.
-Permissions required: bb.instanceRoles.list</p></td>
- </tr>
-
- </tbody>
- </table>
+ <h3 id="bytebase.v1.GetDatabaseCatalogRequest">GetDatabaseCatalogRequest</h3>
+ <p>Request message for getting a database catalog.</p>
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
+ <table class="field-table">
<thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>
-
-
-
- <tr>
- <td>ListInstanceRoles</td>
- <td>GET</td>
- <td>/v1/{parent=instances/*}/roles</td>
- <td></td>
- </tr>
- <tr>
- <td>ListInstanceRoles</td>
- <td>GET</td>
- <td>/v1/{parent=projects/*/instances/*}/roles</td>
- <td></td>
- </tr>
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the database catalog to retrieve.
+Format: instances/{instance}/databases/{database}/catalog or projects/{project}/instances/{instance}/databases/{database}/catalog </p></td>
+ </tr>
-
</tbody>
</table>
+
-
-
-
- <div class="file-heading">
- <h2 id="v1/instance_service.proto">v1/instance_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
+
- <h3 id="bytebase.v1.AddDataSourceRequest">AddDataSourceRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.ObjectSchema">ObjectSchema</h3>
+ <p>Schema definition for object-type columns.</p>
<table class="field-table">
@@ -19580,26 +19657,31 @@ Permissions required: bb.instanceRoles.list</p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.ObjectSchema.Type">ObjectSchema.Type</a></td>
<td></td>
- <td><p>The name of the instance to add a data source to.
-Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>
+ <td><p>The data type of this object. </p></td>
</tr>
<tr>
- <td>data_source</td>
- <td><a href="#bytebase.v1.DataSource">DataSource</a></td>
+ <td>struct_kind</td>
+ <td><a href="#bytebase.v1.ObjectSchema.StructKind">ObjectSchema.StructKind</a></td>
<td></td>
- <td><p>Identified by data source ID.
-Only READ_ONLY data source can be added. </p></td>
+ <td><p>Struct schema. </p></td>
</tr>
<tr>
- <td>validate_only</td>
- <td><a href="#bool">bool</a></td>
+ <td>array_kind</td>
+ <td><a href="#bytebase.v1.ObjectSchema.ArrayKind">ObjectSchema.ArrayKind</a></td>
<td></td>
- <td><p>Validate only also tests the data source connection. </p></td>
+ <td><p>Array schema. </p></td>
+ </tr>
+
+ <tr>
+ <td>semantic_type</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The semantic type of this object. </p></td>
</tr>
</tbody>
@@ -19609,8 +19691,8 @@ Only READ_ONLY data source can be added. </p></td>
- <h3 id="bytebase.v1.BatchSyncInstancesRequest">BatchSyncInstancesRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.ObjectSchema.ArrayKind">ObjectSchema.ArrayKind</h3>
+ <p>Array type with element schema.</p>
<table class="field-table">
@@ -19620,20 +19702,10 @@ Only READ_ONLY data source can be added. </p></td>
<tbody>
<tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>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. </p></td>
- </tr>
-
- <tr>
- <td>requests</td>
- <td><a href="#bytebase.v1.SyncInstanceRequest">SyncInstanceRequest</a></td>
- <td>repeated</td>
- <td><p>The request message specifying the instances to sync.
-A maximum of 1000 instances can be synced in a batch. </p></td>
+ <td>kind</td>
+ <td><a href="#bytebase.v1.ObjectSchema">ObjectSchema</a></td>
+ <td></td>
+ <td><p>The schema of array elements. </p></td>
</tr>
</tbody>
@@ -19643,15 +19715,8 @@ A maximum of 1000 instances can be synced in a batch. </p></td>
- <h3 id="bytebase.v1.BatchSyncInstancesResponse">BatchSyncInstancesResponse</h3>
- <p></p>
-
-
-
-
-
- <h3 id="bytebase.v1.BatchUpdateInstancesRequest">BatchUpdateInstancesRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.ObjectSchema.StructKind">ObjectSchema.StructKind</h3>
+ <p>Structure type with named properties.</p>
<table class="field-table">
@@ -19661,19 +19726,10 @@ A maximum of 1000 instances can be synced in a batch. </p></td>
<tbody>
<tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>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. </p></td>
- </tr>
-
- <tr>
- <td>requests</td>
- <td><a href="#bytebase.v1.UpdateInstanceRequest">UpdateInstanceRequest</a></td>
+ <td>properties</td>
+ <td><a href="#bytebase.v1.ObjectSchema.StructKind.PropertiesEntry">ObjectSchema.StructKind.PropertiesEntry</a></td>
<td>repeated</td>
- <td><p>The request message specifying the resources to update. </p></td>
+ <td><p>Properties of the struct. </p></td>
</tr>
</tbody>
@@ -19683,7 +19739,7 @@ instances; otherwise, every target must belong to this project collection. </p><
- <h3 id="bytebase.v1.BatchUpdateInstancesResponse">BatchUpdateInstancesResponse</h3>
+ <h3 id="bytebase.v1.ObjectSchema.StructKind.PropertiesEntry">ObjectSchema.StructKind.PropertiesEntry</h3>
<p></p>
@@ -19694,9 +19750,16 @@ instances; otherwise, every target must belong to this project collection. </p><
<tbody>
<tr>
- <td>instances</td>
- <td><a href="#bytebase.v1.Instance">Instance</a></td>
- <td>repeated</td>
+ <td>key</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>value</td>
+ <td><a href="#bytebase.v1.ObjectSchema">ObjectSchema</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
@@ -19707,8 +19770,8 @@ instances; otherwise, every target must belong to this project collection. </p><
- <h3 id="bytebase.v1.CreateInstanceRequest">CreateInstanceRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.SchemaCatalog">SchemaCatalog</h3>
+ <p>Schema metadata within a database.</p>
<table class="field-table">
@@ -19718,37 +19781,17 @@ instances; otherwise, every target must belong to this project collection. </p><
<tbody>
<tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The parent, which owns this collection of instances.
-Format: projects/{project}. If omitted, the instance is created in the
-workspace collection. </p></td>
- </tr>
-
- <tr>
- <td>instance</td>
- <td><a href="#bytebase.v1.Instance">Instance</a></td>
- <td></td>
- <td><p>The instance to create. </p></td>
- </tr>
-
- <tr>
- <td>instance_id</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The ID to use for the instance, which will become the final component of
-the instance&#39;s resource name.
-
-This value should be 4-63 characters, and valid characters
-are /[a-z][0-9]-/. </p></td>
+ <td><p>The schema name. </p></td>
</tr>
<tr>
- <td>validate_only</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Validate only also tests the data source connection. </p></td>
+ <td>tables</td>
+ <td><a href="#bytebase.v1.TableCatalog">TableCatalog</a></td>
+ <td>repeated</td>
+ <td><p>The tables in the schema. </p></td>
</tr>
</tbody>
@@ -19758,8 +19801,8 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.v1.DataSource">DataSource</h3>
- <p></p>
+ <h3 id="bytebase.v1.TableCatalog">TableCatalog</h3>
+ <p>Table metadata within a schema.</p>
<table class="field-table">
@@ -19769,387 +19812,689 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>id</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The unique identifier for this data source. </p></td>
+ <td><p>The table name. </p></td>
</tr>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.DataSourceType">DataSourceType</a></td>
+ <td>columns</td>
+ <td><a href="#bytebase.v1.TableCatalog.Columns">TableCatalog.Columns</a></td>
<td></td>
- <td><p>The type of data source (ADMIN or READ_ONLY). </p></td>
+ <td><p>Regular table columns. </p></td>
</tr>
<tr>
- <td>username</td>
- <td><a href="#string">string</a></td>
+ <td>object_schema</td>
+ <td><a href="#bytebase.v1.ObjectSchema">ObjectSchema</a></td>
<td></td>
- <td><p>The username for database authentication. </p></td>
+ <td><p>Object schema for JSON/XML columns. </p></td>
</tr>
<tr>
- <td>password</td>
+ <td>classification</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The password for database authentication. </p></td>
+ <td><p>The data classification level for this table. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.TableCatalog.Columns">TableCatalog.Columns</h3>
+ <p>Column list for regular tables.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>use_ssl</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Use SSL to connect to the data source. By default, we use system default SSL configuration. </p></td>
+ <td>columns</td>
+ <td><a href="#bytebase.v1.ColumnCatalog">ColumnCatalog</a></td>
+ <td>repeated</td>
+ <td><p>The columns in the table. </p></td>
</tr>
- <tr>
- <td>ssl_ca</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The SSL certificate authority certificate. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.UpdateDatabaseCatalogRequest">UpdateDatabaseCatalogRequest</h3>
+ <p>Request message for updating a database catalog.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>ssl_cert</td>
- <td><a href="#string">string</a></td>
+ <td>catalog</td>
+ <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>
<td></td>
- <td><p>The SSL client certificate. </p></td>
+ <td><p>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. </p></td>
</tr>
- <tr>
- <td>ssl_key</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The SSL client private key. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+
+
+ <h3 id="bytebase.v1.ObjectSchema.Type">ObjectSchema.Type</h3>
+ <p>Object schema data types.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified type.</p></td>
+ </tr>
+
+ <tr>
+ <td>STRING</td>
+ <td>1</td>
+ <td><p>String type.</p></td>
+ </tr>
+
+ <tr>
+ <td>NUMBER</td>
+ <td>2</td>
+ <td><p>Number type.</p></td>
+ </tr>
+
+ <tr>
+ <td>BOOLEAN</td>
+ <td>3</td>
+ <td><p>Boolean type.</p></td>
+ </tr>
+
+ <tr>
+ <td>OBJECT</td>
+ <td>4</td>
+ <td><p>Object/struct type.</p></td>
+ </tr>
+
+ <tr>
+ <td>ARRAY</td>
+ <td>5</td>
+ <td><p>Array type.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DatabaseCatalogService">DatabaseCatalogService</h3>
+ <p>DatabaseCatalogService manages database schema metadata and classification.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>GetDatabaseCatalog</td>
+ <td><a href="#bytebase.v1.GetDatabaseCatalogRequest">GetDatabaseCatalogRequest</a></td>
+ <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>
+ <td><p>Gets the catalog metadata for a database.
+Permissions required: bb.databaseCatalogs.get</p></td>
+ </tr>
+
+ <tr>
+ <td>UpdateDatabaseCatalog</td>
+ <td><a href="#bytebase.v1.UpdateDatabaseCatalogRequest">UpdateDatabaseCatalogRequest</a></td>
+ <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>
+ <td><p>Updates catalog metadata such as classifications and labels.
+Permissions required: bb.databaseCatalogs.update</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
+ <thead>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
+ </thead>
+ <tbody>
+
+
+
+ <tr>
+ <td>GetDatabaseCatalog</td>
+ <td>GET</td>
+ <td>/v1/{name=instances/*/databases/*/catalog}</td>
+ <td></td>
+ </tr>
+
+ <tr>
+ <td>GetDatabaseCatalog</td>
+ <td>GET</td>
+ <td>/v1/{name=projects/*/instances/*/databases/*/catalog}</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>UpdateDatabaseCatalog</td>
+ <td>PATCH</td>
+ <td>/v1/{catalog.name=instances/*/databases/*/catalog}</td>
+ <td>catalog</td>
+ </tr>
+
+ <tr>
+ <td>UpdateDatabaseCatalog</td>
+ <td>PATCH</td>
+ <td>/v1/{catalog.name=projects/*/instances/*/databases/*/catalog}</td>
+ <td>catalog</td>
+ </tr>
+
+
+ </tbody>
+ </table>
+
+
+
+
+ <div class="file-heading">
+ <h2 id="v1/database_group_service.proto">v1/database_group_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.CreateDatabaseGroupRequest">CreateDatabaseGroupRequest</h3>
+ <p>Request message for creating a database group.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>ssl_ca_path</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The local filesystem path to the SSL certificate authority certificate. </p></td>
+ <td><p>The parent resource where this database group will be created.
+Format: projects/{project} </p></td>
</tr>
<tr>
- <td>ssl_cert_path</td>
- <td><a href="#string">string</a></td>
+ <td>database_group</td>
+ <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
<td></td>
- <td><p>The local filesystem path to the SSL client certificate. </p></td>
+ <td><p>The database group to create. </p></td>
</tr>
<tr>
- <td>ssl_key_path</td>
+ <td>database_group_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The local filesystem path to the SSL client private key. </p></td>
+ <td><p>The ID to use for the database group, which will become the final component of
+the database group&#39;s resource name.
+
+This value should be 4-63 characters, and valid characters
+are /[a-z][0-9]-/. </p></td>
</tr>
<tr>
- <td>ssl_ca_set</td>
+ <td>validate_only</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Whether an SSL certificate authority certificate has been configured. </p></td>
+ <td><p>If set, validate the create request and preview the full database group response, but do not actually create it. </p></td>
</tr>
- <tr>
- <td>ssl_cert_set</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether an SSL client certificate has been configured. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DatabaseGroup">DatabaseGroup</h3>
+ <p>A group of databases matched by expressions.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>ssl_key_set</td>
- <td><a href="#bool">bool</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether an SSL client private key has been configured. </p></td>
+ <td><p>The name of the database group.
+Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
</tr>
<tr>
- <td>ssl_ca_path_set</td>
- <td><a href="#bool">bool</a></td>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether an SSL certificate authority path has been configured. </p></td>
+ <td><p>The short name used in actual databases specified by users. </p></td>
</tr>
<tr>
- <td>ssl_cert_path_set</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether an SSL client certificate path has been configured. </p></td>
- </tr>
-
- <tr>
- <td>ssl_key_path_set</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether an SSL client private key path has been configured. </p></td>
- </tr>
-
- <tr>
- <td>verify_tls_certificate</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>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). </p></td>
- </tr>
-
- <tr>
- <td>host</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The hostname or IP address of the database server. </p></td>
- </tr>
-
- <tr>
- <td>port</td>
- <td><a href="#string">string</a></td>
+ <td>database_expr</td>
+ <td><a href="#google.type.Expr">google.type.Expr</a></td>
<td></td>
- <td><p>The port number of the database server. </p></td>
+ <td><p>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 &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34; operations.
+resource.instance_id: the instance resource id. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34;, &#34;contains&#34;, &#34;matches&#34;, &#34;startsWith&#34;, &#34;endsWith&#34; operations.
+resource.database_name: the database name. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34;, &#34;contains&#34;, &#34;matches&#34;, &#34;startsWith&#34;, &#34;endsWith&#34; operations.
+resource.database_labels: the database labels. Support map access operations.
+All variables should join with &#34;&amp;&amp;&#34; condition.
+
+For example:
+resource.environment_id == &#34;test&#34; &amp;&amp; resource.database_name.startsWith(&#34;sample_&#34;)
+resource.database_labels[&#34;tenant&#34;] == &#34;tenant1&#34; </p></td>
</tr>
<tr>
- <td>database</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the database to connect to. </p></td>
+ <td>matched_databases</td>
+ <td><a href="#bytebase.v1.DatabaseGroup.Database">DatabaseGroup.Database</a></td>
+ <td>repeated</td>
+ <td><p>The list of databases that match the database group condition. </p></td>
</tr>
- <tr>
- <td>srv</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>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. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DatabaseGroup.Database">DatabaseGroup.Database</h3>
+ <p>A database within a database group.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>authentication_database</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>authentication_database is the database name to authenticate against, which stores the user credentials. </p></td>
+ <td><p>The resource name of the database.
+Format: instances/{instance}/databases/{database} </p></td>
</tr>
- <tr>
- <td>replica_set</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>replica_set is used for MongoDB replica set. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DeleteDatabaseGroupRequest">DeleteDatabaseGroupRequest</h3>
+ <p>Request message for deleting a database group.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>sid</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>sid and service_name are used for Oracle. </p></td>
+ <td><p>The name of the database group to delete.
+Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
</tr>
- <tr>
- <td>service_name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.GetDatabaseGroupRequest">GetDatabaseGroupRequest</h3>
+ <p>Request message for getting a database group.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>ssh_host</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Connection over SSH.
-The hostname of the SSH server agent.
-Required. </p></td>
+ <td><p>The name of the database group to retrieve.
+Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
</tr>
<tr>
- <td>ssh_port</td>
- <td><a href="#string">string</a></td>
+ <td>view</td>
+ <td><a href="#bytebase.v1.DatabaseGroupView">DatabaseGroupView</a></td>
<td></td>
- <td><p>The port of the SSH server agent. It&#39;s 22 typically.
-Required. </p></td>
+ <td><p>The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. </p></td>
</tr>
- <tr>
- <td>ssh_user</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The user to login the server.
-Required. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ListDatabaseGroupsRequest">ListDatabaseGroupsRequest</h3>
+ <p>Request message for listing database groups.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>ssh_password</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The password to login the server. If it&#39;s empty string, no password is required. </p></td>
+ <td><p>The parent resource whose database groups are to be listed.
+Format: projects/{project} </p></td>
</tr>
<tr>
- <td>ssh_private_key</td>
- <td><a href="#string">string</a></td>
+ <td>view</td>
+ <td><a href="#bytebase.v1.DatabaseGroupView">DatabaseGroupView</a></td>
<td></td>
- <td><p>The private key to login the server. If it&#39;s empty string, we will use the system default private key from os.Getenv(&#34;SSH_AUTH_SOCK&#34;). </p></td>
+ <td><p>The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. </p></td>
</tr>
- <tr>
- <td>authentication_private_key</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>PKCS#8 private key in PEM format. If it&#39;s empty string, no private key is required.
-Used for authentication when connecting to the data source. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ListDatabaseGroupsResponse">ListDatabaseGroupsResponse</h3>
+ <p>Response message for listing database groups.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>authentication_private_key_passphrase</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Passphrase for the encrypted PKCS#8 private key. Only used when the private key is encrypted. </p></td>
+ <td>database_groups</td>
+ <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
+ <td>repeated</td>
+ <td><p>The database groups from the specified request. </p></td>
</tr>
- <tr>
- <td>external_secret</td>
- <td><a href="#bytebase.v1.DataSourceExternalSecret">DataSourceExternalSecret</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.UpdateDatabaseGroupRequest">UpdateDatabaseGroupRequest</h3>
+ <p>Request message for updating a database group.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>authentication_type</td>
- <td><a href="#bytebase.v1.DataSource.AuthenticationType">DataSource.AuthenticationType</a></td>
+ <td>database_group</td>
+ <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The database group to update.
+
+The database group&#39;s `name` field is used to identify the database group to update.
+Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
</tr>
<tr>
- <td>cloud_sql_ip_type</td>
- <td><a href="#bytebase.v1.DataSource.CloudSQLIPType">DataSource.CloudSQLIPType</a></td>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>The list of fields to update. </p></td>
</tr>
<tr>
- <td>azure_credential</td>
- <td><a href="#bytebase.v1.DataSource.AzureCredential">DataSource.AzureCredential</a></td>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>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. </p></td>
</tr>
- <tr>
- <td>aws_credential</td>
- <td><a href="#bytebase.v1.DataSource.AWSCredential">DataSource.AWSCredential</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+
+
+ <h3 id="bytebase.v1.DatabaseGroupView">DatabaseGroupView</h3>
+ <p>View options for database group responses.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>DATABASE_GROUP_VIEW_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>The default / unset value.
+The API will default to the BASIC view.</p></td>
+ </tr>
+
+ <tr>
+ <td>DATABASE_GROUP_VIEW_BASIC</td>
+ <td>1</td>
+ <td><p>Include basic information about the database group, but exclude the list of matched databases and unmatched databases.</p></td>
+ </tr>
+
+ <tr>
+ <td>DATABASE_GROUP_VIEW_FULL</td>
+ <td>2</td>
+ <td><p>Include everything.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DatabaseGroupService">DatabaseGroupService</h3>
+ <p>DatabaseGroupService manages database groups for organizing databases by criteria.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>ListDatabaseGroups</td>
+ <td><a href="#bytebase.v1.ListDatabaseGroupsRequest">ListDatabaseGroupsRequest</a></td>
+ <td><a href="#bytebase.v1.ListDatabaseGroupsResponse">ListDatabaseGroupsResponse</a></td>
+ <td><p>Lists database groups in a project.
+Permissions required: bb.databaseGroups.list</p></td>
+ </tr>
+
+ <tr>
+ <td>GetDatabaseGroup</td>
+ <td><a href="#bytebase.v1.GetDatabaseGroupRequest">GetDatabaseGroupRequest</a></td>
+ <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
+ <td><p>Gets a database group by name.
+Permissions required: bb.databaseGroups.get</p></td>
+ </tr>
+
+ <tr>
+ <td>CreateDatabaseGroup</td>
+ <td><a href="#bytebase.v1.CreateDatabaseGroupRequest">CreateDatabaseGroupRequest</a></td>
+ <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
+ <td><p>Creates a new database group.
+Permissions required: bb.databaseGroups.create</p></td>
+ </tr>
+
+ <tr>
+ <td>UpdateDatabaseGroup</td>
+ <td><a href="#bytebase.v1.UpdateDatabaseGroupRequest">UpdateDatabaseGroupRequest</a></td>
+ <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
+ <td><p>Updates a database group.
+Permissions required: bb.databaseGroups.update
+When allow_missing=true, also requires: bb.databaseGroups.create</p></td>
+ </tr>
+
+ <tr>
+ <td>DeleteDatabaseGroup</td>
+ <td><a href="#bytebase.v1.DeleteDatabaseGroupRequest">DeleteDatabaseGroupRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Deletes a database group.
+Permissions required: bb.databaseGroups.delete</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
+ <thead>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
+ </thead>
+ <tbody>
+
- <tr>
- <td>gcp_credential</td>
- <td><a href="#bytebase.v1.DataSource.GCPCredential">DataSource.GCPCredential</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
- <tr>
- <td>sasl_config</td>
- <td><a href="#bytebase.v1.SASLConfig">SASLConfig</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ <tr>
+ <td>ListDatabaseGroups</td>
+ <td>GET</td>
+ <td>/v1/{parent=projects/*}/databaseGroups</td>
+ <td></td>
+ </tr>
- <tr>
- <td>additional_addresses</td>
- <td><a href="#bytebase.v1.DataSource.Address">DataSource.Address</a></td>
- <td>repeated</td>
- <td><p>additional_addresses is used for MongoDB replica set. </p></td>
- </tr>
+
- <tr>
- <td>direct_connection</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string. </p></td>
- </tr>
- <tr>
- <td>region</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>region is the location of where the DB is, works for AWS RDS. For example, us-east-1. </p></td>
- </tr>
+ <tr>
+ <td>GetDatabaseGroup</td>
+ <td>GET</td>
+ <td>/v1/{name=projects/*/databaseGroups/*}</td>
+ <td></td>
+ </tr>
- <tr>
- <td>warehouse_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>warehouse_id is used by Databricks. </p></td>
- </tr>
+
- <tr>
- <td>master_name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>master_name is the master name used by connecting redis-master via redis sentinel. </p></td>
- </tr>
- <tr>
- <td>master_username</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>master_username and master_password are master credentials used by redis sentinel mode. </p></td>
- </tr>
+ <tr>
+ <td>CreateDatabaseGroup</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*}/databaseGroups</td>
+ <td>database_group</td>
+ </tr>
- <tr>
- <td>master_password</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+
- <tr>
- <td>redis_type</td>
- <td><a href="#bytebase.v1.DataSource.RedisType">DataSource.RedisType</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
- <tr>
- <td>extra_connection_parameters</td>
- <td><a href="#bytebase.v1.DataSource.ExtraConnectionParametersEntry">DataSource.ExtraConnectionParametersEntry</a></td>
- <td>repeated</td>
- <td><p>Extra connection parameters for the database connection.
-For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p></td>
- </tr>
+ <tr>
+ <td>UpdateDatabaseGroup</td>
+ <td>PATCH</td>
+ <td>/v1/{database_group.name=projects/*/databaseGroups/*}</td>
+ <td>database_group</td>
+ </tr>
- <tr>
- <td>project_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>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). </p></td>
- </tr>
+
- <tr>
- <td>instance_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ <tr>
+ <td>DeleteDatabaseGroup</td>
+ <td>DELETE</td>
+ <td>/v1/{name=projects/*/databaseGroups/*}</td>
+ <td></td>
+ </tr>
+
+
</tbody>
</table>
-
-
+
- <h3 id="bytebase.v1.DataSource.AWSCredential">DataSource.AWSCredential</h3>
- <p></p>
+ <div class="file-heading">
+ <h2 id="v1/instance_role_service.proto">v1/instance_role_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.InstanceRole">InstanceRole</h3>
+ <p>InstanceRole is the API message for instance role.</p>
<table class="field-table">
@@ -20159,40 +20504,49 @@ spanner-nonprod.p.googleapis.com). </p></td>
<tbody>
<tr>
- <td>access_key_id</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>secret_access_key</td>
+ <td>role_name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The role name. It&#39;s unique within the instance. </p></td>
</tr>
<tr>
- <td>session_token</td>
+ <td>password</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>optional</td>
+ <td><p>The role password. </p></td>
</tr>
<tr>
- <td>role_arn</td>
+ <td>connection_limit</td>
+ <td><a href="#int32">int32</a></td>
+ <td>optional</td>
+ <td><p>The connection count limit for this role. </p></td>
+ </tr>
+
+ <tr>
+ <td>valid_until</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>ARN of IAM role to assume for cross-account access.
-See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html </p></td>
+ <td>optional</td>
+ <td><p>The expiration for the role&#39;s password. </p></td>
</tr>
<tr>
- <td>external_id</td>
+ <td>attribute</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>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 </p></td>
+ <td>optional</td>
+ <td><p>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&#39;s the global privileges as GRANT statements, which means it only contains &#34;GRANT ... ON *.* TO ...&#34;. Docs: https://dev.mysql.com/doc/refman/8.0/en/grant.html </p></td>
</tr>
</tbody>
@@ -20202,7 +20556,7 @@ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_e
- <h3 id="bytebase.v1.DataSource.Address">DataSource.Address</h3>
+ <h3 id="bytebase.v1.ListInstanceRolesRequest">ListInstanceRolesRequest</h3>
<p></p>
@@ -20213,17 +20567,41 @@ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_e
<tbody>
<tr>
- <td>host</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The parent, which owns this collection of roles.
+Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>
</tr>
<tr>
- <td>port</td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>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. </p></td>
+ </tr>
+
+ <tr>
+ <td>page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>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. </p></td>
+ </tr>
+
+ <tr>
+ <td>refresh</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Refresh will refresh and return the latest data. </p></td>
</tr>
</tbody>
@@ -20233,7 +20611,7 @@ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_e
- <h3 id="bytebase.v1.DataSource.AzureCredential">DataSource.AzureCredential</h3>
+ <h3 id="bytebase.v1.ListInstanceRolesResponse">ListInstanceRolesResponse</h3>
<p></p>
@@ -20244,24 +20622,18 @@ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_e
<tbody>
<tr>
- <td>tenant_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>client_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>roles</td>
+ <td><a href="#bytebase.v1.InstanceRole">InstanceRole</a></td>
+ <td>repeated</td>
+ <td><p>The roles from the specified request. </p></td>
</tr>
<tr>
- <td>client_secret</td>
+ <td>next_page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
</tr>
</tbody>
@@ -20271,7 +20643,76 @@ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_e
- <h3 id="bytebase.v1.DataSource.ExtraConnectionParametersEntry">DataSource.ExtraConnectionParametersEntry</h3>
+
+
+
+
+
+
+ <h3 id="bytebase.v1.InstanceRoleService">InstanceRoleService</h3>
+ <p>InstanceRoleService manages database roles within instances.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>ListInstanceRoles</td>
+ <td><a href="#bytebase.v1.ListInstanceRolesRequest">ListInstanceRolesRequest</a></td>
+ <td><a href="#bytebase.v1.ListInstanceRolesResponse">ListInstanceRolesResponse</a></td>
+ <td><p>Lists all database roles in an instance.
+Permissions required: bb.instanceRoles.list</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
+ <thead>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
+ </thead>
+ <tbody>
+
+
+
+ <tr>
+ <td>ListInstanceRoles</td>
+ <td>GET</td>
+ <td>/v1/{parent=instances/*}/roles</td>
+ <td></td>
+ </tr>
+
+ <tr>
+ <td>ListInstanceRoles</td>
+ <td>GET</td>
+ <td>/v1/{parent=projects/*/instances/*}/roles</td>
+ <td></td>
+ </tr>
+
+
+ </tbody>
+ </table>
+
+
+
+
+ <div class="file-heading">
+ <h2 id="v1/instance_service.proto">v1/instance_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.AddDataSourceRequest">AddDataSourceRequest</h3>
<p></p>
@@ -20282,17 +20723,26 @@ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_e
<tbody>
<tr>
- <td>key</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name of the instance to add a data source to.
+Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>
</tr>
<tr>
- <td>value</td>
- <td><a href="#string">string</a></td>
+ <td>data_source</td>
+ <td><a href="#bytebase.v1.DataSource">DataSource</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Identified by data source ID.
+Only READ_ONLY data source can be added. </p></td>
+ </tr>
+
+ <tr>
+ <td>validate_only</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Validate only also tests the data source connection. </p></td>
</tr>
</tbody>
@@ -20302,7 +20752,7 @@ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_e
- <h3 id="bytebase.v1.DataSource.GCPCredential">DataSource.GCPCredential</h3>
+ <h3 id="bytebase.v1.BatchSyncInstancesRequest">BatchSyncInstancesRequest</h3>
<p></p>
@@ -20313,10 +20763,20 @@ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_e
<tbody>
<tr>
- <td>content</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>optional</td>
+ <td><p>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. </p></td>
+ </tr>
+
+ <tr>
+ <td>requests</td>
+ <td><a href="#bytebase.v1.SyncInstanceRequest">SyncInstanceRequest</a></td>
+ <td>repeated</td>
+ <td><p>The request message specifying the instances to sync.
+A maximum of 1000 instances can be synced in a batch. </p></td>
</tr>
</tbody>
@@ -20326,7 +20786,14 @@ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_e
- <h3 id="bytebase.v1.DataSourceExternalSecret">DataSourceExternalSecret</h3>
+ <h3 id="bytebase.v1.BatchSyncInstancesResponse">BatchSyncInstancesResponse</h3>
+ <p></p>
+
+
+
+
+
+ <h3 id="bytebase.v1.BatchUpdateInstancesRequest">BatchUpdateInstancesRequest</h3>
<p></p>
@@ -20337,100 +20804,43 @@ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_e
<tbody>
<tr>
- <td>secret_type</td>
- <td><a href="#bytebase.v1.DataSourceExternalSecret.SecretType">DataSourceExternalSecret.SecretType</a></td>
- <td></td>
- <td><p>The type of external secret store. </p></td>
- </tr>
-
- <tr>
- <td>url</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The URL of the external secret store. </p></td>
+ <td>optional</td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>auth_type</td>
- <td><a href="#bytebase.v1.DataSourceExternalSecret.AuthType">DataSourceExternalSecret.AuthType</a></td>
- <td></td>
- <td><p>The authentication method for accessing the secret store. </p></td>
+ <td>requests</td>
+ <td><a href="#bytebase.v1.UpdateInstanceRequest">UpdateInstanceRequest</a></td>
+ <td>repeated</td>
+ <td><p>The request message specifying the resources to update. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.BatchUpdateInstancesResponse">BatchUpdateInstancesResponse</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>app_role</td>
- <td><a href="#bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption">DataSourceExternalSecret.AppRoleAuthOption</a></td>
- <td></td>
- <td><p>AppRole authentication configuration. </p></td>
- </tr>
-
- <tr>
- <td>token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Token for direct authentication. Interpreted according to token_type:
-the literal token (PLAIN), an environment variable name (ENVIRONMENT),
-or a file path (FILE). </p></td>
- </tr>
-
- <tr>
- <td>token_type</td>
- <td><a href="#bytebase.v1.DataSourceExternalSecret.TokenType">DataSourceExternalSecret.TokenType</a></td>
- <td></td>
- <td><p>How to interpret the token field when auth_type is TOKEN. </p></td>
- </tr>
-
- <tr>
- <td>engine_name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>engine name is the name for secret engine. </p></td>
- </tr>
-
- <tr>
- <td>secret_name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>the secret name in the engine to store the password. </p></td>
- </tr>
-
- <tr>
- <td>password_key_name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>the key name for the password. </p></td>
- </tr>
-
- <tr>
- <td>skip_vault_tls_verification</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>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. </p></td>
- </tr>
-
- <tr>
- <td>vault_ssl_ca</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>CA certificate for Vault server verification. </p></td>
- </tr>
-
- <tr>
- <td>vault_ssl_cert</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Client certificate for mutual TLS authentication with Vault. </p></td>
- </tr>
-
- <tr>
- <td>vault_ssl_key</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Client private key for mutual TLS authentication with Vault. </p></td>
+ <td>instances</td>
+ <td><a href="#bytebase.v1.Instance">Instance</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -20440,7 +20850,7 @@ Only set to true for development or when certificates cannot be properly validat
- <h3 id="bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption">DataSourceExternalSecret.AppRoleAuthOption</h3>
+ <h3 id="bytebase.v1.CreateInstanceRequest">CreateInstanceRequest</h3>
<p></p>
@@ -20451,31 +20861,37 @@ Only set to true for development or when certificates cannot be properly validat
<tbody>
<tr>
- <td>role_id</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The role ID for Vault AppRole authentication. </p></td>
+ <td>optional</td>
+ <td><p>The parent, which owns this collection of instances.
+Format: projects/{project}. If omitted, the instance is created in the
+workspace collection. </p></td>
</tr>
<tr>
- <td>secret_id</td>
- <td><a href="#string">string</a></td>
+ <td>instance</td>
+ <td><a href="#bytebase.v1.Instance">Instance</a></td>
<td></td>
- <td><p>the secret id for the role without ttl. </p></td>
+ <td><p>The instance to create. </p></td>
</tr>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType">DataSourceExternalSecret.AppRoleAuthOption.SecretType</a></td>
+ <td>instance_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The type of secret for AppRole authentication. </p></td>
+ <td><p>The ID to use for the instance, which will become the final component of
+the instance&#39;s resource name.
+
+This value should be 4-63 characters, and valid characters
+are /[a-z][0-9]-/. </p></td>
</tr>
<tr>
- <td>mount_path</td>
- <td><a href="#string">string</a></td>
+ <td>validate_only</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The path where the approle auth method is mounted. </p></td>
+ <td><p>Validate only also tests the data source connection. </p></td>
</tr>
</tbody>
@@ -20485,7 +20901,7 @@ Only set to true for development or when certificates cannot be properly validat
- <h3 id="bytebase.v1.DeleteInstanceRequest">DeleteInstanceRequest</h3>
+ <h3 id="bytebase.v1.DataSource">DataSource</h3>
<p></p>
@@ -20496,560 +20912,376 @@ Only set to true for development or when certificates cannot be properly validat
<tbody>
<tr>
- <td>name</td>
+ <td>id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the instance to delete.
-Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>
+ <td><p>The unique identifier for this data source. </p></td>
</tr>
<tr>
- <td>force</td>
- <td><a href="#bool">bool</a></td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.DataSourceType">DataSourceType</a></td>
<td></td>
- <td><p>If set to true, a workspace instance&#39;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. </p></td>
+ <td><p>The type of data source (ADMIN or READ_ONLY). </p></td>
</tr>
<tr>
- <td>purge</td>
- <td><a href="#bool">bool</a></td>
+ <td>username</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>The username for database authentication. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.GetInstanceRequest">GetInstanceRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>name</td>
+ <td>password</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the instance to retrieve.
-Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>
+ <td><p>The password for database authentication. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.Instance">Instance</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>use_ssl</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Use SSL to connect to the data source. By default, we use system default SSL configuration. </p></td>
+ </tr>
<tr>
- <td>name</td>
+ <td>ssl_ca</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the instance.
-Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>
+ <td><p>The SSL certificate authority certificate. </p></td>
</tr>
<tr>
- <td>state</td>
- <td><a href="#bytebase.v1.State">State</a></td>
+ <td>ssl_cert</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The lifecycle state of the instance. </p></td>
+ <td><p>The SSL client certificate. </p></td>
</tr>
<tr>
- <td>title</td>
+ <td>ssl_key</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The display title of the instance. </p></td>
+ <td><p>The SSL client private key. </p></td>
</tr>
<tr>
- <td>engine</td>
- <td><a href="#bytebase.v1.Engine">Engine</a></td>
+ <td>ssl_ca_path</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The database engine type. </p></td>
+ <td><p>The local filesystem path to the SSL certificate authority certificate. </p></td>
</tr>
<tr>
- <td>engine_version</td>
+ <td>ssl_cert_path</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The version of the database engine. </p></td>
+ <td><p>The local filesystem path to the SSL client certificate. </p></td>
</tr>
<tr>
- <td>external_link</td>
+ <td>ssl_key_path</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>External URL to the database instance console. </p></td>
+ <td><p>The local filesystem path to the SSL client private key. </p></td>
</tr>
<tr>
- <td>data_sources</td>
- <td><a href="#bytebase.v1.DataSource">DataSource</a></td>
- <td>repeated</td>
- <td><p>Data source configurations for connecting to the instance. </p></td>
+ <td>ssl_ca_set</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether an SSL certificate authority certificate has been configured. </p></td>
</tr>
<tr>
- <td>environment</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The environment resource.
-Format: environments/prod where prod is the environment resource ID. </p></td>
+ <td>ssl_cert_set</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether an SSL client certificate has been configured. </p></td>
</tr>
<tr>
- <td>activation</td>
+ <td>ssl_key_set</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Whether the instance is activated for use. </p></td>
+ <td><p>Whether an SSL client private key has been configured. </p></td>
</tr>
<tr>
- <td>roles</td>
- <td><a href="#bytebase.v1.InstanceRole">InstanceRole</a></td>
- <td>repeated</td>
- <td><p>Database roles available in this instance. </p></td>
+ <td>ssl_ca_path_set</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether an SSL certificate authority path has been configured. </p></td>
</tr>
<tr>
- <td>sync_interval</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td>ssl_cert_path_set</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>How often the instance is synced. </p></td>
+ <td><p>Whether an SSL client certificate path has been configured. </p></td>
</tr>
<tr>
- <td>sync_databases</td>
- <td><a href="#bytebase.v1.SyncDatabases">SyncDatabases</a></td>
+ <td>ssl_key_path_set</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Enable sync for following databases.
-Not set means sync all schemas &amp; databases. </p></td>
+ <td><p>Whether an SSL client private key path has been configured. </p></td>
</tr>
<tr>
- <td>last_sync_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>verify_tls_certificate</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The last time the instance was synced. </p></td>
+ <td><p>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). </p></td>
</tr>
<tr>
- <td>labels</td>
- <td><a href="#bytebase.v1.Instance.LabelsEntry">Instance.LabelsEntry</a></td>
- <td>repeated</td>
- <td><p>Labels are key-value pairs that can be attached to the instance.
-For example, { &#34;org_group&#34;: &#34;infrastructure&#34;, &#34;environment&#34;: &#34;production&#34; } </p></td>
+ <td>host</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The hostname or IP address of the database server. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.Instance.LabelsEntry">Instance.LabelsEntry</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>key</td>
+ <td>port</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The port number of the database server. </p></td>
</tr>
<tr>
- <td>value</td>
+ <td>database</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name of the database to connect to. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.InstanceResource">InstanceResource</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
+ <td>srv</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The display title of the instance. </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>engine</td>
- <td><a href="#bytebase.v1.Engine">Engine</a></td>
+ <td>authentication_database</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The database engine type. </p></td>
+ <td><p>authentication_database is the database name to authenticate against, which stores the user credentials. </p></td>
</tr>
<tr>
- <td>engine_version</td>
+ <td>replica_set</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The version of the database engine. </p></td>
+ <td><p>replica_set is used for MongoDB replica set. </p></td>
</tr>
<tr>
- <td>data_sources</td>
- <td><a href="#bytebase.v1.DataSource">DataSource</a></td>
- <td>repeated</td>
- <td><p>Data source configurations for the instance. </p></td>
+ <td>sid</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>sid and service_name are used for Oracle. </p></td>
</tr>
<tr>
- <td>activation</td>
- <td><a href="#bool">bool</a></td>
+ <td>service_name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether the instance is activated. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>name</td>
+ <td>ssh_host</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the instance.
-Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>
+ <td><p>Connection over SSH.
+The hostname of the SSH server agent.
+Required. </p></td>
</tr>
<tr>
- <td>environment</td>
+ <td>ssh_port</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The environment resource.
-Format: environments/prod where prod is the environment resource ID. </p></td>
+ <td></td>
+ <td><p>The port of the SSH server agent. It&#39;s 22 typically.
+Required. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.KerberosConfig">KerberosConfig</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>primary</td>
+ <td>ssh_user</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The primary component of the Kerberos principal. </p></td>
+ <td><p>The user to login the server.
+Required. </p></td>
</tr>
<tr>
- <td>instance</td>
+ <td>ssh_password</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The instance component of the Kerberos principal. </p></td>
+ <td><p>The password to login the server. If it&#39;s empty string, no password is required. </p></td>
</tr>
<tr>
- <td>realm</td>
+ <td>ssh_private_key</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The Kerberos realm. </p></td>
+ <td><p>The private key to login the server. If it&#39;s empty string, we will use the system default private key from os.Getenv(&#34;SSH_AUTH_SOCK&#34;). </p></td>
</tr>
<tr>
- <td>keytab</td>
- <td><a href="#bytes">bytes</a></td>
+ <td>authentication_private_key</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The keytab file contents for authentication. </p></td>
+ <td><p>PKCS#8 private key in PEM format. If it&#39;s empty string, no private key is required.
+Used for authentication when connecting to the data source. </p></td>
</tr>
<tr>
- <td>kdc_host</td>
+ <td>authentication_private_key_passphrase</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The hostname of the Key Distribution Center (KDC). </p></td>
+ <td><p>Passphrase for the encrypted PKCS#8 private key. Only used when the private key is encrypted. </p></td>
</tr>
<tr>
- <td>kdc_port</td>
- <td><a href="#string">string</a></td>
+ <td>external_secret</td>
+ <td><a href="#bytebase.v1.DataSourceExternalSecret">DataSourceExternalSecret</a></td>
<td></td>
- <td><p>The port of the Key Distribution Center (KDC). </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>kdc_transport_protocol</td>
- <td><a href="#string">string</a></td>
+ <td>authentication_type</td>
+ <td><a href="#bytebase.v1.DataSource.AuthenticationType">DataSource.AuthenticationType</a></td>
<td></td>
- <td><p>The transport protocol for KDC communication (tcp or udp). </p></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ListInstanceDatabaseRequest">ListInstanceDatabaseRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>cloud_sql_ip_type</td>
+ <td><a href="#bytebase.v1.DataSource.CloudSQLIPType">DataSource.CloudSQLIPType</a></td>
<td></td>
- <td><p>The name of the instance.
-Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>instance</td>
- <td><a href="#bytebase.v1.Instance">Instance</a></td>
- <td>optional</td>
- <td><p>The target instance. We need to set this field if the target instance is not created yet. </p></td>
+ <td>azure_credential</td>
+ <td><a href="#bytebase.v1.DataSource.AzureCredential">DataSource.AzureCredential</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ListInstanceDatabaseResponse">ListInstanceDatabaseResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>databases</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>All database name list in the instance. </p></td>
+ <td>aws_credential</td>
+ <td><a href="#bytebase.v1.DataSource.AWSCredential">DataSource.AWSCredential</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ListInstancesRequest">ListInstancesRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>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. </p></td>
+ <td>gcp_credential</td>
+ <td><a href="#bytebase.v1.DataSource.GCPCredential">DataSource.GCPCredential</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
+ <td>sasl_config</td>
+ <td><a href="#bytebase.v1.SASLConfig">SASLConfig</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>page_token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>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. </p></td>
+ <td>additional_addresses</td>
+ <td><a href="#bytebase.v1.DataSource.Address">DataSource.Address</a></td>
+ <td>repeated</td>
+ <td><p>additional_addresses is used for MongoDB replica set. </p></td>
</tr>
<tr>
- <td>show_deleted</td>
+ <td>direct_connection</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Show deleted instances if specified. </p></td>
+ <td><p>direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string. </p></td>
</tr>
<tr>
- <td>filter</td>
+ <td>region</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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 &#34;==&#34; and &#34;.contains()&#34; operator.
-- resource_id: the instance id, support &#34;==&#34; and &#34;.contains()&#34; operator.
-- environment: the environment full name in &#34;environments/{id}&#34; format, support &#34;==&#34; operator.
-- state: the instance state, check State enum for values, support &#34;==&#34; operator.
-- engine: the instance engine, check Engine enum for values. Support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator.
-- host: the instance host, support &#34;==&#34; and &#34;.contains()&#34; operator.
-- port: the instance port, support &#34;==&#34; and &#34;.contains()&#34; operator.
-- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
-- labels.{key}: the instance label, support &#34;==&#34; and &#34;in&#34; operators.
-
-For example:
-name == &#34;sample instance&#34;
-name.contains(&#34;sample&#34;)
-resource_id == &#34;sample-instance&#34;
-resource_id.contains(&#34;sample&#34;)
-state == &#34;DELETED&#34;
-environment == &#34;environments/test&#34;
-environment == &#34;&#34; (find instances which environment is not set)
-engine == &#34;MYSQL&#34;
-engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;]
-!(engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;])
-host == &#34;127.0.0.1&#34;
-host.contains(&#34;127.0&#34;)
-port == &#34;54321&#34;
-port.contains(&#34;543&#34;)
-labels.org_group == &#34;infrastructure&#34;
-labels.environment in [&#34;prod&#34;, &#34;production&#34;]
-project == &#34;projects/sample-project&#34;
-You can combine filter conditions like:
-name.contains(&#34;sample&#34;) &amp;&amp; environment == &#34;environments/test&#34;
-host == &#34;127.0.0.1&#34; &amp;&amp; port == &#34;54321&#34; </p></td>
+ <td><p>region is the location of where the DB is, works for AWS RDS. For example, us-east-1. </p></td>
</tr>
<tr>
- <td>order_by</td>
+ <td>warehouse_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The order by of instances.
-Support title, environment. The default sorting order is ascending.
-For example:
-- order_by = &#34;title&#34;
-- order_by = &#34;title desc&#34;
-- order_by = &#34;title desc, environment asc&#34; </p></td>
+ <td><p>warehouse_id is used by Databricks. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ListInstancesResponse">ListInstancesResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>master_name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>master_name is the master name used by connecting redis-master via redis sentinel. </p></td>
+ </tr>
<tr>
- <td>instances</td>
- <td><a href="#bytebase.v1.Instance">Instance</a></td>
- <td>repeated</td>
- <td><p>The instances from the specified request. </p></td>
+ <td>master_username</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>master_username and master_password are master credentials used by redis sentinel mode. </p></td>
</tr>
<tr>
- <td>next_page_token</td>
+ <td>master_password</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.PrepareSampleProjectInstanceRequest">PrepareSampleProjectInstanceRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>redis_type</td>
+ <td><a href="#bytebase.v1.DataSource.RedisType">DataSource.RedisType</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
<tr>
- <td>parent</td>
+ <td>extra_connection_parameters</td>
+ <td><a href="#bytebase.v1.DataSource.ExtraConnectionParametersEntry">DataSource.ExtraConnectionParametersEntry</a></td>
+ <td>repeated</td>
+ <td><p>Extra connection parameters for the database connection.
+For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p></td>
+ </tr>
+
+ <tr>
+ <td>project_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The project that owns the sample instance.
-Format: projects/{project} </p></td>
+ <td><p>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). </p></td>
+ </tr>
+
+ <tr>
+ <td>instance_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -21059,7 +21291,7 @@ Format: projects/{project} </p></td>
- <h3 id="bytebase.v1.RemoveDataSourceRequest">RemoveDataSourceRequest</h3>
+ <h3 id="bytebase.v1.DataSource.AWSCredential">DataSource.AWSCredential</h3>
<p></p>
@@ -21070,43 +21302,40 @@ Format: projects/{project} </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>access_key_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the instance to remove a data source from.
-Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>data_source</td>
- <td><a href="#bytebase.v1.DataSource">DataSource</a></td>
+ <td>secret_access_key</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Identified by data source ID.
-Only READ_ONLY data source can be removed. </p></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.SASLConfig">SASLConfig</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>session_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
<tr>
- <td>krb_config</td>
- <td><a href="#bytebase.v1.KerberosConfig">KerberosConfig</a></td>
+ <td>role_arn</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Kerberos authentication configuration. </p></td>
+ <td><p>ARN of IAM role to assume for cross-account access.
+See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html </p></td>
+ </tr>
+
+ <tr>
+ <td>external_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>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 </p></td>
</tr>
</tbody>
@@ -21116,7 +21345,7 @@ Only READ_ONLY data source can be removed. </p></td>
- <h3 id="bytebase.v1.SyncDatabases">SyncDatabases</h3>
+ <h3 id="bytebase.v1.DataSource.Address">DataSource.Address</h3>
<p></p>
@@ -21127,9 +21356,16 @@ Only READ_ONLY data source can be removed. </p></td>
<tbody>
<tr>
- <td>databases</td>
+ <td>host</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>port</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
@@ -21140,7 +21376,7 @@ Only READ_ONLY data source can be removed. </p></td>
- <h3 id="bytebase.v1.SyncInstanceRequest">SyncInstanceRequest</h3>
+ <h3 id="bytebase.v1.DataSource.AzureCredential">DataSource.AzureCredential</h3>
<p></p>
@@ -21151,19 +21387,24 @@ Only READ_ONLY data source can be removed. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>tenant_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of instance.
-Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>enable_full_sync</td>
- <td><a href="#bool">bool</a></td>
+ <td>client_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>client_secret</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -21173,7 +21414,7 @@ the instance metadata (such as the database list) and any newly discovered datab
- <h3 id="bytebase.v1.SyncInstanceResponse">SyncInstanceResponse</h3>
+ <h3 id="bytebase.v1.DataSource.ExtraConnectionParametersEntry">DataSource.ExtraConnectionParametersEntry</h3>
<p></p>
@@ -21184,10 +21425,17 @@ the instance metadata (such as the database list) and any newly discovered datab
<tbody>
<tr>
- <td>databases</td>
+ <td>key</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>All database name list in the instance. </p></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>value</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -21197,7 +21445,7 @@ the instance metadata (such as the database list) and any newly discovered datab
- <h3 id="bytebase.v1.UndeleteInstanceRequest">UndeleteInstanceRequest</h3>
+ <h3 id="bytebase.v1.DataSource.GCPCredential">DataSource.GCPCredential</h3>
<p></p>
@@ -21208,11 +21456,10 @@ the instance metadata (such as the database list) and any newly discovered datab
<tbody>
<tr>
- <td>name</td>
+ <td>content</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the deleted instance.
-Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -21222,7 +21469,7 @@ Format: instances/{instance} or projects/{project}/instances/{instance} </p></td
- <h3 id="bytebase.v1.UpdateDataSourceRequest">UpdateDataSourceRequest</h3>
+ <h3 id="bytebase.v1.DataSourceExternalSecret">DataSourceExternalSecret</h3>
<p></p>
@@ -21233,40 +21480,100 @@ Format: instances/{instance} or projects/{project}/instances/{instance} </p></td
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>secret_type</td>
+ <td><a href="#bytebase.v1.DataSourceExternalSecret.SecretType">DataSourceExternalSecret.SecretType</a></td>
<td></td>
- <td><p>The name of the instance to update a data source.
-Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>
+ <td><p>The type of external secret store. </p></td>
</tr>
<tr>
- <td>data_source</td>
- <td><a href="#bytebase.v1.DataSource">DataSource</a></td>
+ <td>url</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Identified by data source ID. </p></td>
+ <td><p>The URL of the external secret store. </p></td>
</tr>
<tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td>auth_type</td>
+ <td><a href="#bytebase.v1.DataSourceExternalSecret.AuthType">DataSourceExternalSecret.AuthType</a></td>
<td></td>
- <td><p>The list of fields to update. </p></td>
+ <td><p>The authentication method for accessing the secret store. </p></td>
</tr>
<tr>
- <td>validate_only</td>
- <td><a href="#bool">bool</a></td>
+ <td>app_role</td>
+ <td><a href="#bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption">DataSourceExternalSecret.AppRoleAuthOption</a></td>
<td></td>
- <td><p>Validate only also tests the data source connection. </p></td>
+ <td><p>AppRole authentication configuration. </p></td>
</tr>
<tr>
- <td>allow_missing</td>
+ <td>token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Token for direct authentication. Interpreted according to token_type:
+the literal token (PLAIN), an environment variable name (ENVIRONMENT),
+or a file path (FILE). </p></td>
+ </tr>
+
+ <tr>
+ <td>token_type</td>
+ <td><a href="#bytebase.v1.DataSourceExternalSecret.TokenType">DataSourceExternalSecret.TokenType</a></td>
+ <td></td>
+ <td><p>How to interpret the token field when auth_type is TOKEN. </p></td>
+ </tr>
+
+ <tr>
+ <td>engine_name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>engine name is the name for secret engine. </p></td>
+ </tr>
+
+ <tr>
+ <td>secret_name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>the secret name in the engine to store the password. </p></td>
+ </tr>
+
+ <tr>
+ <td>password_key_name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>the key name for the password. </p></td>
+ </tr>
+
+ <tr>
+ <td>skip_vault_tls_verification</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>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. </p></td>
+ </tr>
+
+ <tr>
+ <td>vault_ssl_ca</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>CA certificate for Vault server verification. </p></td>
+ </tr>
+
+ <tr>
+ <td>vault_ssl_cert</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Client certificate for mutual TLS authentication with Vault. </p></td>
+ </tr>
+
+ <tr>
+ <td>vault_ssl_key</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Client private key for mutual TLS authentication with Vault. </p></td>
</tr>
</tbody>
@@ -21276,7 +21583,7 @@ In this situation, `update_mask` is ignored. </p></td>
- <h3 id="bytebase.v1.UpdateInstanceRequest">UpdateInstanceRequest</h3>
+ <h3 id="bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption">DataSourceExternalSecret.AppRoleAuthOption</h3>
<p></p>
@@ -21287,30 +21594,75 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>instance</td>
- <td><a href="#bytebase.v1.Instance">Instance</a></td>
+ <td>role_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The instance to update.
+ <td><p>The role ID for Vault AppRole authentication. </p></td>
+ </tr>
+
+ <tr>
+ <td>secret_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>the secret id for the role without ttl. </p></td>
+ </tr>
+
+ <tr>
+ <td>type</td>
+ <td><a href="#bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType">DataSourceExternalSecret.AppRoleAuthOption.SecretType</a></td>
+ <td></td>
+ <td><p>The type of secret for AppRole authentication. </p></td>
+ </tr>
+
+ <tr>
+ <td>mount_path</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The path where the approle auth method is mounted. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
-The instance&#39;s `name` field is used to identify the instance to update.
+
+
+
+
+ <h3 id="bytebase.v1.DeleteInstanceRequest">DeleteInstanceRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the instance to delete.
Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>
</tr>
<tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td>force</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The list of fields to update. </p></td>
+ <td><p>If set to true, a workspace instance&#39;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. </p></td>
</tr>
<tr>
- <td>allow_missing</td>
+ <td>purge</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>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. </p></td>
</tr>
</tbody>
@@ -21320,699 +21672,240 @@ falls back to a workspace instance. </p></td>
-
-
- <h3 id="bytebase.v1.DataSource.AuthenticationType">DataSource.AuthenticationType</h3>
+ <h3 id="bytebase.v1.GetInstanceRequest">GetInstanceRequest</h3>
<p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>AUTHENTICATION_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>PASSWORD</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>GOOGLE_CLOUD_SQL_IAM</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>AWS_RDS_IAM</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>AZURE_IAM</td>
- <td>4</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.DataSource.CloudSQLIPType">DataSource.CloudSQLIPType</h3>
- <p>CloudSQLIPType selects which Cloud SQL IP to dial for Google Cloud SQL IAM connections.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>CLOUD_SQL_IP_TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>PUBLIC</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>PRIVATE</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>PSC</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the instance to retrieve.
+Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
- <h3 id="bytebase.v1.DataSource.RedisType">DataSource.RedisType</h3>
+ <h3 id="bytebase.v1.Instance">Instance</h3>
<p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>REDIS_TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>STANDALONE</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>SENTINEL</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>CLUSTER</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType">DataSourceExternalSecret.AppRoleAuthOption.SecretType</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>SECRET_TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified secret type.</p></td>
- </tr>
-
- <tr>
- <td>PLAIN</td>
- <td>1</td>
- <td><p>Plain text secret.</p></td>
- </tr>
-
- <tr>
- <td>ENVIRONMENT</td>
- <td>2</td>
- <td><p>Secret from environment variable.</p></td>
- </tr>
-
- </tbody>
- </table>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the instance.
+Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>
+ </tr>
+
+ <tr>
+ <td>state</td>
+ <td><a href="#bytebase.v1.State">State</a></td>
+ <td></td>
+ <td><p>The lifecycle state of the instance. </p></td>
+ </tr>
+
+ <tr>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The display title of the instance. </p></td>
+ </tr>
+
+ <tr>
+ <td>engine</td>
+ <td><a href="#bytebase.v1.Engine">Engine</a></td>
+ <td></td>
+ <td><p>The database engine type. </p></td>
+ </tr>
+
+ <tr>
+ <td>engine_version</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The version of the database engine. </p></td>
+ </tr>
+
+ <tr>
+ <td>external_link</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>External URL to the database instance console. </p></td>
+ </tr>
+
+ <tr>
+ <td>data_sources</td>
+ <td><a href="#bytebase.v1.DataSource">DataSource</a></td>
+ <td>repeated</td>
+ <td><p>Data source configurations for connecting to the instance. </p></td>
+ </tr>
+
+ <tr>
+ <td>environment</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>The environment resource.
+Format: environments/prod where prod is the environment resource ID. </p></td>
+ </tr>
+
+ <tr>
+ <td>activation</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether the instance is activated for use. </p></td>
+ </tr>
+
+ <tr>
+ <td>roles</td>
+ <td><a href="#bytebase.v1.InstanceRole">InstanceRole</a></td>
+ <td>repeated</td>
+ <td><p>Database roles available in this instance. </p></td>
+ </tr>
+
+ <tr>
+ <td>sync_interval</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td></td>
+ <td><p>How often the instance is synced. </p></td>
+ </tr>
+
+ <tr>
+ <td>sync_databases</td>
+ <td><a href="#bytebase.v1.SyncDatabases">SyncDatabases</a></td>
+ <td></td>
+ <td><p>Enable sync for following databases.
+Not set means sync all schemas &amp; databases. </p></td>
+ </tr>
+
+ <tr>
+ <td>last_sync_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>The last time the instance was synced. </p></td>
+ </tr>
+
+ <tr>
+ <td>labels</td>
+ <td><a href="#bytebase.v1.Instance.LabelsEntry">Instance.LabelsEntry</a></td>
+ <td>repeated</td>
+ <td><p>Labels are key-value pairs that can be attached to the instance.
+For example, { &#34;org_group&#34;: &#34;infrastructure&#34;, &#34;environment&#34;: &#34;production&#34; } </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
- <h3 id="bytebase.v1.DataSourceExternalSecret.AuthType">DataSourceExternalSecret.AuthType</h3>
+ <h3 id="bytebase.v1.Instance.LabelsEntry">Instance.LabelsEntry</h3>
<p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>AUTH_TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified authentication type.</p></td>
- </tr>
-
- <tr>
- <td>TOKEN</td>
- <td>1</td>
- <td><p>ref: https://developer.hashicorp.com/vault/docs/auth/token</p></td>
- </tr>
-
- <tr>
- <td>VAULT_APP_ROLE</td>
- <td>2</td>
- <td><p>ref: https://developer.hashicorp.com/vault/docs/auth/approle</p></td>
- </tr>
-
- </tbody>
- </table>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>key</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>value</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
- <h3 id="bytebase.v1.DataSourceExternalSecret.SecretType">DataSourceExternalSecret.SecretType</h3>
+ <h3 id="bytebase.v1.InstanceResource">InstanceResource</h3>
<p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>SECRET_TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified secret type.</p></td>
- </tr>
-
- <tr>
- <td>VAULT_KV_V2</td>
- <td>1</td>
- <td><p>ref: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2</p></td>
- </tr>
-
- <tr>
- <td>AWS_SECRETS_MANAGER</td>
- <td>2</td>
- <td><p>ref: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html</p></td>
- </tr>
-
- <tr>
- <td>GCP_SECRET_MANAGER</td>
- <td>3</td>
- <td><p>ref: https://cloud.google.com/secret-manager/docs</p></td>
- </tr>
-
- <tr>
- <td>AZURE_KEY_VAULT</td>
- <td>4</td>
- <td><p>ref: https://learn.microsoft.com/en-us/azure/key-vault/secrets/about-secrets</p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.DataSourceExternalSecret.TokenType">DataSourceExternalSecret.TokenType</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>TOKEN_TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified token type, treated as PLAIN for backward compatibility.</p></td>
- </tr>
-
- <tr>
- <td>PLAIN</td>
- <td>1</td>
- <td><p>The token field holds the literal token value.</p></td>
- </tr>
-
- <tr>
- <td>ENVIRONMENT</td>
- <td>2</td>
- <td><p>The token field holds the name of an environment variable on the
-Bytebase server that holds the token value.</p></td>
- </tr>
-
- <tr>
- <td>FILE</td>
- <td>3</td>
- <td><p>The token field holds a path to a file on the Bytebase server that
-holds the token value.</p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.DataSourceType">DataSourceType</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>DATA_SOURCE_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified data source type.</p></td>
- </tr>
-
- <tr>
- <td>ADMIN</td>
- <td>1</td>
- <td><p>Admin data source with write permissions.</p></td>
- </tr>
-
- <tr>
- <td>READ_ONLY</td>
- <td>2</td>
- <td><p>Read-only data source for query operations.</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.InstanceService">InstanceService</h3>
- <p>InstanceService manages database instances and their connections.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>GetInstance</td>
- <td><a href="#bytebase.v1.GetInstanceRequest">GetInstanceRequest</a></td>
- <td><a href="#bytebase.v1.Instance">Instance</a></td>
- <td><p>Gets a database instance by name.
-Permissions required: bb.instances.get</p></td>
- </tr>
-
- <tr>
- <td>ListInstances</td>
- <td><a href="#bytebase.v1.ListInstancesRequest">ListInstancesRequest</a></td>
- <td><a href="#bytebase.v1.ListInstancesResponse">ListInstancesResponse</a></td>
- <td><p>Lists database instances, optionally within a project.
-Permissions required: bb.instances.list</p></td>
- </tr>
-
- <tr>
- <td>CreateInstance</td>
- <td><a href="#bytebase.v1.CreateInstanceRequest">CreateInstanceRequest</a></td>
- <td><a href="#bytebase.v1.Instance">Instance</a></td>
- <td><p>Creates a new database instance.
-Permissions required: bb.instances.create</p></td>
- </tr>
-
- <tr>
- <td>PrepareSampleProjectInstance</td>
- <td><a href="#bytebase.v1.PrepareSampleProjectInstanceRequest">PrepareSampleProjectInstanceRequest</a></td>
- <td><a href="#bytebase.v1.Instance">Instance</a></td>
- <td><p>Prepares a Sample Project Instance for a project.
-Permissions required: bb.instances.create</p></td>
- </tr>
-
- <tr>
- <td>UpdateInstance</td>
- <td><a href="#bytebase.v1.UpdateInstanceRequest">UpdateInstanceRequest</a></td>
- <td><a href="#bytebase.v1.Instance">Instance</a></td>
- <td><p>Updates a database instance.
-Permissions required: bb.instances.update</p></td>
- </tr>
-
- <tr>
- <td>DeleteInstance</td>
- <td><a href="#bytebase.v1.DeleteInstanceRequest">DeleteInstanceRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>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</p></td>
- </tr>
-
- <tr>
- <td>UndeleteInstance</td>
- <td><a href="#bytebase.v1.UndeleteInstanceRequest">UndeleteInstanceRequest</a></td>
- <td><a href="#bytebase.v1.Instance">Instance</a></td>
- <td><p>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</p></td>
- </tr>
-
- <tr>
- <td>SyncInstance</td>
- <td><a href="#bytebase.v1.SyncInstanceRequest">SyncInstanceRequest</a></td>
- <td><a href="#bytebase.v1.SyncInstanceResponse">SyncInstanceResponse</a></td>
- <td><p>Syncs database schemas and metadata from an instance.
-Permissions required: bb.instances.sync</p></td>
- </tr>
-
- <tr>
- <td>ListInstanceDatabase</td>
- <td><a href="#bytebase.v1.ListInstanceDatabaseRequest">ListInstanceDatabaseRequest</a></td>
- <td><a href="#bytebase.v1.ListInstanceDatabaseResponse">ListInstanceDatabaseResponse</a></td>
- <td><p>Lists all databases within an instance without creating them.
-Permissions required: bb.instances.get</p></td>
- </tr>
-
- <tr>
- <td>BatchSyncInstances</td>
- <td><a href="#bytebase.v1.BatchSyncInstancesRequest">BatchSyncInstancesRequest</a></td>
- <td><a href="#bytebase.v1.BatchSyncInstancesResponse">BatchSyncInstancesResponse</a></td>
- <td><p>Syncs multiple instances in a single request.
-Permissions required: bb.instances.sync</p></td>
- </tr>
-
- <tr>
- <td>BatchUpdateInstances</td>
- <td><a href="#bytebase.v1.BatchUpdateInstancesRequest">BatchUpdateInstancesRequest</a></td>
- <td><a href="#bytebase.v1.BatchUpdateInstancesResponse">BatchUpdateInstancesResponse</a></td>
- <td><p>Updates multiple instances in a single request.
-Permissions required: bb.instances.update</p></td>
- </tr>
-
- <tr>
- <td>AddDataSource</td>
- <td><a href="#bytebase.v1.AddDataSourceRequest">AddDataSourceRequest</a></td>
- <td><a href="#bytebase.v1.Instance">Instance</a></td>
- <td><p>Adds a read-only data source to an instance.
-Permissions required: bb.instances.update</p></td>
- </tr>
-
- <tr>
- <td>RemoveDataSource</td>
- <td><a href="#bytebase.v1.RemoveDataSourceRequest">RemoveDataSourceRequest</a></td>
- <td><a href="#bytebase.v1.Instance">Instance</a></td>
- <td><p>Removes a read-only data source from an instance.
-Permissions required: bb.instances.update</p></td>
- </tr>
-
- <tr>
- <td>UpdateDataSource</td>
- <td><a href="#bytebase.v1.UpdateDataSourceRequest">UpdateDataSourceRequest</a></td>
- <td><a href="#bytebase.v1.Instance">Instance</a></td>
- <td><p>Updates a data source configuration.
-Permissions required: bb.instances.update</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
+ <table class="field-table">
<thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>
-
+ <tr>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The display title of the instance. </p></td>
+ </tr>
- <tr>
- <td>GetInstance</td>
- <td>GET</td>
- <td>/v1/{name=instances/*}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>engine</td>
+ <td><a href="#bytebase.v1.Engine">Engine</a></td>
+ <td></td>
+ <td><p>The database engine type. </p></td>
+ </tr>
- <tr>
- <td>GetInstance</td>
- <td>GET</td>
- <td>/v1/{name=projects/*/instances/*}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>engine_version</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The version of the database engine. </p></td>
+ </tr>
-
+ <tr>
+ <td>data_sources</td>
+ <td><a href="#bytebase.v1.DataSource">DataSource</a></td>
+ <td>repeated</td>
+ <td><p>Data source configurations for the instance. </p></td>
+ </tr>
-
- <tr>
- <td>ListInstances</td>
- <td>GET</td>
- <td>/v1/instances</td>
- <td></td>
- </tr>
-
- <tr>
- <td>ListInstances</td>
- <td>GET</td>
- <td>/v1/{parent=projects/*}/instances</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>CreateInstance</td>
- <td>POST</td>
- <td>/v1/instances</td>
- <td>instance</td>
- </tr>
-
- <tr>
- <td>CreateInstance</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*}/instances</td>
- <td>instance</td>
- </tr>
-
-
-
-
- <tr>
- <td>PrepareSampleProjectInstance</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*}/instances:prepareSampleProjectInstance</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>UpdateInstance</td>
- <td>PATCH</td>
- <td>/v1/{instance.name=instances/*}</td>
- <td>instance</td>
- </tr>
-
- <tr>
- <td>UpdateInstance</td>
- <td>PATCH</td>
- <td>/v1/{instance.name=projects/*/instances/*}</td>
- <td>instance</td>
- </tr>
-
-
-
-
- <tr>
- <td>DeleteInstance</td>
- <td>DELETE</td>
- <td>/v1/{name=instances/*}</td>
- <td></td>
- </tr>
-
- <tr>
- <td>DeleteInstance</td>
- <td>DELETE</td>
- <td>/v1/{name=projects/*/instances/*}</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>UndeleteInstance</td>
- <td>POST</td>
- <td>/v1/{name=instances/*}:undelete</td>
- <td>*</td>
- </tr>
-
- <tr>
- <td>UndeleteInstance</td>
- <td>POST</td>
- <td>/v1/{name=projects/*/instances/*}:undelete</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>SyncInstance</td>
- <td>POST</td>
- <td>/v1/{name=instances/*}:sync</td>
- <td>*</td>
- </tr>
-
- <tr>
- <td>SyncInstance</td>
- <td>POST</td>
- <td>/v1/{name=projects/*/instances/*}:sync</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>ListInstanceDatabase</td>
- <td>POST</td>
- <td>/v1/{name=instances/*}:databases</td>
- <td>*</td>
- </tr>
-
- <tr>
- <td>ListInstanceDatabase</td>
- <td>POST</td>
- <td>/v1/{name=projects/*/instances/*}:databases</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>BatchSyncInstances</td>
- <td>POST</td>
- <td>/v1/instances:batchSync</td>
- <td>*</td>
- </tr>
-
- <tr>
- <td>BatchSyncInstances</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*}/instances:batchSync</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>BatchUpdateInstances</td>
- <td>POST</td>
- <td>/v1/instances:batchUpdate</td>
- <td>*</td>
- </tr>
-
- <tr>
- <td>BatchUpdateInstances</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*}/instances:batchUpdate</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>AddDataSource</td>
- <td>POST</td>
- <td>/v1/{name=instances/*}:addDataSource</td>
- <td>*</td>
- </tr>
-
- <tr>
- <td>AddDataSource</td>
- <td>POST</td>
- <td>/v1/{name=projects/*/instances/*}:addDataSource</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>RemoveDataSource</td>
- <td>POST</td>
- <td>/v1/{name=instances/*}:removeDataSource</td>
- <td>*</td>
- </tr>
-
- <tr>
- <td>RemoveDataSource</td>
- <td>POST</td>
- <td>/v1/{name=projects/*/instances/*}:removeDataSource</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>UpdateDataSource</td>
- <td>PATCH</td>
- <td>/v1/{name=instances/*}:updateDataSource</td>
- <td>data_source</td>
- </tr>
-
- <tr>
- <td>UpdateDataSource</td>
- <td>PATCH</td>
- <td>/v1/{name=projects/*/instances/*}:updateDataSource</td>
- <td>data_source</td>
- </tr>
-
-
- </tbody>
- </table>
-
-
-
-
- <div class="file-heading">
- <h2 id="v1/database_service.proto">v1/database_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.v1.BatchGetDatabasesRequest">BatchGetDatabasesRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>activation</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether the instance is activated. </p></td>
+ </tr>
<tr>
- <td>parent</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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 &#34;-&#34; as wildcard to batch get databases across parent. </p></td>
+ <td><p>The name of the instance.
+Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>
</tr>
<tr>
- <td>names</td>
+ <td>environment</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The list of database names to retrieve. </p></td>
+ <td>optional</td>
+ <td><p>The environment resource.
+Format: environments/prod where prod is the environment resource ID. </p></td>
</tr>
</tbody>
@@ -22022,7 +21915,7 @@ Use &#34;-&#34; as wildcard to batch get databases across parent. </p></td>
- <h3 id="bytebase.v1.BatchGetDatabasesResponse">BatchGetDatabasesResponse</h3>
+ <h3 id="bytebase.v1.KerberosConfig">KerberosConfig</h3>
<p></p>
@@ -22033,43 +21926,52 @@ Use &#34;-&#34; as wildcard to batch get databases across parent. </p></td>
<tbody>
<tr>
- <td>databases</td>
- <td><a href="#bytebase.v1.Database">Database</a></td>
- <td>repeated</td>
- <td><p>One database per requested name, in the same order as `names`. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.BatchSyncDatabasesRequest">BatchSyncDatabasesRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <td>primary</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The primary component of the Kerberos principal. </p></td>
+ </tr>
<tr>
- <td>parent</td>
+ <td>instance</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>The instance component of the Kerberos principal. </p></td>
</tr>
<tr>
- <td>names</td>
+ <td>realm</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The list of database names to sync. </p></td>
+ <td></td>
+ <td><p>The Kerberos realm. </p></td>
+ </tr>
+
+ <tr>
+ <td>keytab</td>
+ <td><a href="#bytes">bytes</a></td>
+ <td></td>
+ <td><p>The keytab file contents for authentication. </p></td>
+ </tr>
+
+ <tr>
+ <td>kdc_host</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The hostname of the Key Distribution Center (KDC). </p></td>
+ </tr>
+
+ <tr>
+ <td>kdc_port</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The port of the Key Distribution Center (KDC). </p></td>
+ </tr>
+
+ <tr>
+ <td>kdc_transport_protocol</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The transport protocol for KDC communication (tcp or udp). </p></td>
</tr>
</tbody>
@@ -22079,14 +21981,7 @@ If the operation spans parents, a dash (-) may be accepted as a wildcard. </p></
- <h3 id="bytebase.v1.BatchSyncDatabasesResponse">BatchSyncDatabasesResponse</h3>
- <p></p>
-
-
-
-
-
- <h3 id="bytebase.v1.BatchUpdateDatabasesRequest">BatchUpdateDatabasesRequest</h3>
+ <h3 id="bytebase.v1.ListInstanceDatabaseRequest">ListInstanceDatabaseRequest</h3>
<p></p>
@@ -22097,21 +21992,18 @@ If the operation spans parents, a dash (-) may be accepted as a wildcard. </p></
<tbody>
<tr>
- <td>parent</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>The name of the instance.
+Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>
</tr>
<tr>
- <td>requests</td>
- <td><a href="#bytebase.v1.UpdateDatabaseRequest">UpdateDatabaseRequest</a></td>
- <td>repeated</td>
- <td><p>The request message specifying the resources to update.
-A maximum of 1000 databases can be modified in a batch. </p></td>
+ <td>instance</td>
+ <td><a href="#bytebase.v1.Instance">Instance</a></td>
+ <td>optional</td>
+ <td><p>The target instance. We need to set this field if the target instance is not created yet. </p></td>
</tr>
</tbody>
@@ -22121,7 +22013,7 @@ A maximum of 1000 databases can be modified in a batch. </p></td>
- <h3 id="bytebase.v1.BatchUpdateDatabasesResponse">BatchUpdateDatabasesResponse</h3>
+ <h3 id="bytebase.v1.ListInstanceDatabaseResponse">ListInstanceDatabaseResponse</h3>
<p></p>
@@ -22133,9 +22025,9 @@ A maximum of 1000 databases can be modified in a batch. </p></td>
<tr>
<td>databases</td>
- <td><a href="#bytebase.v1.Database">Database</a></td>
+ <td><a href="#string">string</a></td>
<td>repeated</td>
- <td><p>Databases updated. </p></td>
+ <td><p>All database name list in the instance. </p></td>
</tr>
</tbody>
@@ -22145,8 +22037,8 @@ A maximum of 1000 databases can be modified in a batch. </p></td>
- <h3 id="bytebase.v1.BoundingBox">BoundingBox</h3>
- <p>BoundingBox defines the spatial bounds for GEOMETRY spatial indexes.</p>
+ <h3 id="bytebase.v1.ListInstancesRequest">ListInstancesRequest</h3>
+ <p></p>
<table class="field-table">
@@ -22156,31 +22048,94 @@ A maximum of 1000 databases can be modified in a batch. </p></td>
<tbody>
<tr>
- <td>xmin</td>
- <td><a href="#double">double</a></td>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>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. </p></td>
+ </tr>
+
+ <tr>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>Minimum X coordinate </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>ymin</td>
- <td><a href="#double">double</a></td>
+ <td>page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Minimum Y coordinate </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>xmax</td>
- <td><a href="#double">double</a></td>
+ <td>show_deleted</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Maximum X coordinate </p></td>
+ <td><p>Show deleted instances if specified. </p></td>
</tr>
<tr>
- <td>ymax</td>
- <td><a href="#double">double</a></td>
+ <td>filter</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Maximum Y coordinate </p></td>
+ <td><p>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 &#34;==&#34; and &#34;.contains()&#34; operator.
+- resource_id: the instance id, support &#34;==&#34; and &#34;.contains()&#34; operator.
+- environment: the environment full name in &#34;environments/{id}&#34; format, support &#34;==&#34; operator.
+- state: the instance state, check State enum for values, support &#34;==&#34; operator.
+- engine: the instance engine, check Engine enum for values. Support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator.
+- host: the instance host, support &#34;==&#34; and &#34;.contains()&#34; operator.
+- port: the instance port, support &#34;==&#34; and &#34;.contains()&#34; operator.
+- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
+- labels.{key}: the instance label, support &#34;==&#34; and &#34;in&#34; operators.
+
+For example:
+name == &#34;sample instance&#34;
+name.contains(&#34;sample&#34;)
+resource_id == &#34;sample-instance&#34;
+resource_id.contains(&#34;sample&#34;)
+state == &#34;DELETED&#34;
+environment == &#34;environments/test&#34;
+environment == &#34;&#34; (find instances which environment is not set)
+engine == &#34;MYSQL&#34;
+engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;]
+!(engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;])
+host == &#34;127.0.0.1&#34;
+host.contains(&#34;127.0&#34;)
+port == &#34;54321&#34;
+port.contains(&#34;543&#34;)
+labels.org_group == &#34;infrastructure&#34;
+labels.environment in [&#34;prod&#34;, &#34;production&#34;]
+project == &#34;projects/sample-project&#34;
+You can combine filter conditions like:
+name.contains(&#34;sample&#34;) &amp;&amp; environment == &#34;environments/test&#34;
+host == &#34;127.0.0.1&#34; &amp;&amp; port == &#34;54321&#34; </p></td>
+ </tr>
+
+ <tr>
+ <td>order_by</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The order by of instances.
+Support title, environment. The default sorting order is ascending.
+For example:
+- order_by = &#34;title&#34;
+- order_by = &#34;title desc&#34;
+- order_by = &#34;title desc, environment asc&#34; </p></td>
</tr>
</tbody>
@@ -22190,8 +22145,8 @@ A maximum of 1000 databases can be modified in a batch. </p></td>
- <h3 id="bytebase.v1.CheckConstraintMetadata">CheckConstraintMetadata</h3>
- <p>CheckConstraintMetadata is the metadata for check constraints.</p>
+ <h3 id="bytebase.v1.ListInstancesResponse">ListInstancesResponse</h3>
+ <p></p>
<table class="field-table">
@@ -22201,17 +22156,18 @@ A maximum of 1000 databases can be modified in a batch. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the name of a check constraint. </p></td>
+ <td>instances</td>
+ <td><a href="#bytebase.v1.Instance">Instance</a></td>
+ <td>repeated</td>
+ <td><p>The instances from the specified request. </p></td>
</tr>
<tr>
- <td>expression</td>
+ <td>next_page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The expression is the expression of a check constraint. </p></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
</tr>
</tbody>
@@ -22221,8 +22177,8 @@ A maximum of 1000 databases can be modified in a batch. </p></td>
- <h3 id="bytebase.v1.ColumnMetadata">ColumnMetadata</h3>
- <p>ColumnMetadata is the metadata for columns.</p>
+ <h3 id="bytebase.v1.PrepareSampleProjectInstanceRequest">PrepareSampleProjectInstanceRequest</h3>
+ <p></p>
<table class="field-table">
@@ -22232,161 +22188,149 @@ A maximum of 1000 databases can be modified in a batch. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of a column. </p></td>
- </tr>
-
- <tr>
- <td>position</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The position is the position in columns. </p></td>
+ <td><p>The project that owns the sample instance.
+Format: projects/{project} </p></td>
</tr>
- <tr>
- <td>has_default</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.RemoveDataSourceRequest">RemoveDataSourceRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>default</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The default value of column. </p></td>
+ <td><p>The name of the instance to remove a data source from.
+Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>
</tr>
<tr>
- <td>default_on_null</td>
- <td><a href="#bool">bool</a></td>
+ <td>data_source</td>
+ <td><a href="#bytebase.v1.DataSource">DataSource</a></td>
<td></td>
- <td><p>Oracle specific metadata.
-The default_on_null is the default on null of a column. </p></td>
+ <td><p>Identified by data source ID.
+Only READ_ONLY data source can be removed. </p></td>
</tr>
- <tr>
- <td>on_update</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The on_update is the on update action of a column.
-For MySQL like databases, it&#39;s only supported for TIMESTAMP columns with
-CURRENT_TIMESTAMP as on update value. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.SASLConfig">SASLConfig</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>nullable</td>
- <td><a href="#bool">bool</a></td>
+ <td>krb_config</td>
+ <td><a href="#bytebase.v1.KerberosConfig">KerberosConfig</a></td>
<td></td>
- <td><p>The nullable is the nullable of a column. </p></td>
+ <td><p>Kerberos authentication configuration. </p></td>
</tr>
- <tr>
- <td>type</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The type is the type of a column. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.SyncDatabases">SyncDatabases</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>character_set</td>
+ <td>databases</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The character_set is the character_set of a column. </p></td>
+ <td>repeated</td>
+ <td><p> </p></td>
</tr>
- <tr>
- <td>collation</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The collation is the collation of a column. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.SyncInstanceRequest">SyncInstanceRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>comment</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The comment is the comment of a column. </p></td>
- </tr>
-
- <tr>
- <td>generation</td>
- <td><a href="#bytebase.v1.GenerationMetadata">GenerationMetadata</a></td>
- <td></td>
- <td><p>The generation is the generation of a column. </p></td>
+ <td><p>The name of instance.
+Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>
</tr>
<tr>
- <td>is_identity</td>
+ <td>enable_full_sync</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>identity_generation</td>
- <td><a href="#bytebase.v1.ColumnMetadata.IdentityGeneration">ColumnMetadata.IdentityGeneration</a></td>
- <td></td>
- <td><p>The identity_generation is for identity columns, PG only. </p></td>
- </tr>
-
- <tr>
- <td>identity_seed</td>
- <td><a href="#int64">int64</a></td>
- <td></td>
- <td><p>The identity_seed is for identity columns, MSSQL only. </p></td>
- </tr>
-
- <tr>
- <td>identity_increment</td>
- <td><a href="#int64">int64</a></td>
- <td></td>
- <td><p>The identity_increment is for identity columns, MSSQL only. </p></td>
+ <td><p>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. </p></td>
</tr>
- <tr>
- <td>default_constraint_name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>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&#39;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 &#39;active&#39;
- )
+ </tbody>
+ </table>
-Will create a constraint with an auto-generated name like &#39;DF__employees__statu__3B75D760&#39;
-or a user-defined name if specified:
- ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT &#39;active&#39; 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 &#39;inactive&#39; FOR status
+
+
+ <h3 id="bytebase.v1.SyncInstanceResponse">SyncInstanceResponse</h3>
+ <p></p>
-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. </p></td>
- </tr>
-
- <tr>
- <td>srid</td>
- <td><a href="#uint32">uint32</a></td>
- <td>optional</td>
- <td><p>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). </p></td>
- </tr>
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>is_invisible</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether the column is invisible (hidden from SELECT *), MySQL 8.0.23&#43; only. </p></td>
+ <td>databases</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>All database name list in the instance. </p></td>
</tr>
</tbody>
@@ -22396,7 +22340,7 @@ int32). </p></td>
- <h3 id="bytebase.v1.CompositeTypeAttribute">CompositeTypeAttribute</h3>
+ <h3 id="bytebase.v1.UndeleteInstanceRequest">UndeleteInstanceRequest</h3>
<p></p>
@@ -22410,30 +22354,8 @@ int32). </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the attribute. </p></td>
- </tr>
-
- <tr>
- <td>type</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The attribute type. User-defined types are always schema-qualified. </p></td>
- </tr>
-
- <tr>
- <td>collation</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>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. `&#34;C&#34;` or `locale.en_us`. </p></td>
- </tr>
-
- <tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The comment describing the attribute. </p></td>
+ <td><p>The name of the deleted instance.
+Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>
</tr>
</tbody>
@@ -22443,7 +22365,7 @@ pg_catalog), empty otherwise. e.g. `&#34;C&#34;` or `locale.en_us`. </p></td>
- <h3 id="bytebase.v1.CompositeTypeMetadata">CompositeTypeMetadata</h3>
+ <h3 id="bytebase.v1.UpdateDataSourceRequest">UpdateDataSourceRequest</h3>
<p></p>
@@ -22457,21 +22379,37 @@ pg_catalog), empty otherwise. e.g. `&#34;C&#34;` or `locale.en_us`. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the composite type. </p></td>
+ <td><p>The name of the instance to update a data source.
+Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>
</tr>
<tr>
- <td>attributes</td>
- <td><a href="#bytebase.v1.CompositeTypeAttribute">CompositeTypeAttribute</a></td>
- <td>repeated</td>
- <td><p>The ordered attributes of the composite type. </p></td>
+ <td>data_source</td>
+ <td><a href="#bytebase.v1.DataSource">DataSource</a></td>
+ <td></td>
+ <td><p>Identified by data source ID. </p></td>
</tr>
<tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
<td></td>
- <td><p>The comment describing the composite type. </p></td>
+ <td><p>The list of fields to update. </p></td>
+ </tr>
+
+ <tr>
+ <td>validate_only</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Validate only also tests the data source connection. </p></td>
+ </tr>
+
+ <tr>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>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. </p></td>
</tr>
</tbody>
@@ -22481,7 +22419,7 @@ pg_catalog), empty otherwise. e.g. `&#34;C&#34;` or `locale.en_us`. </p></td>
- <h3 id="bytebase.v1.Database">Database</h3>
+ <h3 id="bytebase.v1.UpdateInstanceRequest">UpdateInstanceRequest</h3>
<p></p>
@@ -22492,126 +22430,30 @@ pg_catalog), empty otherwise. e.g. `&#34;C&#34;` or `locale.en_us`. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>instance</td>
+ <td><a href="#bytebase.v1.Instance">Instance</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>The instance to update.
+
+The instance&#39;s `name` field is used to identify the instance to update.
+Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>
</tr>
<tr>
- <td>state</td>
- <td><a href="#bytebase.v1.State">State</a></td>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
<td></td>
- <td><p>The existence of a database. </p></td>
+ <td><p>The list of fields to update. </p></td>
</tr>
<tr>
- <td>successful_sync_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The latest synchronization time. </p></td>
- </tr>
-
- <tr>
- <td>project</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The project for a database.
-Format: projects/{project} </p></td>
- </tr>
-
- <tr>
- <td>release</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The release that was last applied to this database.
-Format: projects/{project}/releases/{release_id}
-Example: projects/my-project/releases/release_20260115-RC00 </p></td>
- </tr>
-
- <tr>
- <td>environment</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The environment resource.
-Format: environments/prod where prod is the environment resource ID. </p></td>
- </tr>
-
- <tr>
- <td>effective_environment</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>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. </p></td>
- </tr>
-
- <tr>
- <td>labels</td>
- <td><a href="#bytebase.v1.Database.LabelsEntry">Database.LabelsEntry</a></td>
- <td>repeated</td>
- <td><p>Labels will be used for deployment and policy control. </p></td>
- </tr>
-
- <tr>
- <td>instance_resource</td>
- <td><a href="#bytebase.v1.InstanceResource">InstanceResource</a></td>
- <td></td>
- <td><p>The instance resource. </p></td>
- </tr>
-
- <tr>
- <td>backup_available</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>The database is available for DML prior backup. </p></td>
- </tr>
-
- <tr>
- <td>sync_status</td>
- <td><a href="#bytebase.v1.SyncStatus">SyncStatus</a></td>
- <td></td>
- <td><p>The sync status of the database. </p></td>
- </tr>
-
- <tr>
- <td>sync_error</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The error message if sync failed. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.Database.LabelsEntry">Database.LabelsEntry</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>key</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>value</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td><p>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. </p></td>
</tr>
</tbody>
@@ -22621,536 +22463,677 @@ https://cloud.google.com/resource-manager/docs/tags/tags-overview. </p></td>
- <h3 id="bytebase.v1.DatabaseMetadata">DatabaseMetadata</h3>
- <p>DatabaseMetadata is the metadata for databases.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The database metadata name.
-
-Format: instances/{instance}/databases/{database}/metadata or projects/{project}/instances/{instance}/databases/{database}/metadata </p></td>
- </tr>
-
- <tr>
- <td>schemas</td>
- <td><a href="#bytebase.v1.SchemaMetadata">SchemaMetadata</a></td>
- <td>repeated</td>
- <td><p>The schemas is the list of schemas in a database. </p></td>
- </tr>
-
- <tr>
- <td>character_set</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The character_set is the character set of a database. </p></td>
- </tr>
-
- <tr>
- <td>collation</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The collation is the collation of a database. </p></td>
- </tr>
-
- <tr>
- <td>extensions</td>
- <td><a href="#bytebase.v1.ExtensionMetadata">ExtensionMetadata</a></td>
- <td>repeated</td>
- <td><p>The extensions is the list of extensions in a database. </p></td>
- </tr>
-
- <tr>
- <td>owner</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The owner of the database. </p></td>
- </tr>
-
- <tr>
- <td>search_path</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The search_path is the search path of a PostgreSQL database. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
- <h3 id="bytebase.v1.DatabaseSDLSchema">DatabaseSDLSchema</h3>
- <p>DatabaseSDLSchema contains the schema in SDL format.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>schema</td>
- <td><a href="#bytes">bytes</a></td>
- <td></td>
- <td><p>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. </p></td>
- </tr>
-
- <tr>
- <td>content_type</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The MIME type of the schema content.
-Indicates how the client should interpret the schema field.
-Examples:
-- &#34;text/plain; charset=utf-8&#34; for SINGLE_FILE format
-- &#34;application/zip&#34; for MULTI_FILE format </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
+ <h3 id="bytebase.v1.DataSource.AuthenticationType">DataSource.AuthenticationType</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>AUTHENTICATION_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>PASSWORD</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>GOOGLE_CLOUD_SQL_IAM</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>AWS_RDS_IAM</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>AZURE_IAM</td>
+ <td>4</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.v1.DatabaseSchema">DatabaseSchema</h3>
- <p>DatabaseSchema is the metadata for databases.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>schema</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The schema dump from database. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.DependencyColumn">DependencyColumn</h3>
- <p>DependencyColumn is the metadata for dependency columns.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>schema</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The schema is the schema of a reference column. </p></td>
- </tr>
-
- <tr>
- <td>table</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The table is the table of a reference column. </p></td>
- </tr>
-
- <tr>
- <td>column</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The column is the name of a reference column. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
+ <h3 id="bytebase.v1.DataSource.CloudSQLIPType">DataSource.CloudSQLIPType</h3>
+ <p>CloudSQLIPType selects which Cloud SQL IP to dial for Google Cloud SQL IAM connections.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>CLOUD_SQL_IP_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>PUBLIC</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>PRIVATE</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>PSC</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.v1.DependencyTable">DependencyTable</h3>
+ <h3 id="bytebase.v1.DataSource.RedisType">DataSource.RedisType</h3>
<p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>schema</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The schema is the schema of a reference table. </p></td>
- </tr>
-
- <tr>
- <td>table</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The table is the name of a reference table. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>REDIS_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>STANDALONE</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>SENTINEL</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>CLUSTER</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</h3>
+ <h3 id="bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType">DataSourceExternalSecret.AppRoleAuthOption.SecretType</h3>
<p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The database whose current schema is the diff source.
-Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} </p></td>
- </tr>
-
- <tr>
- <td>target_metadata</td>
- <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
- <td></td>
- <td><p>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. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>SECRET_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified secret type.</p></td>
+ </tr>
+
+ <tr>
+ <td>PLAIN</td>
+ <td>1</td>
+ <td><p>Plain text secret.</p></td>
+ </tr>
+
+ <tr>
+ <td>ENVIRONMENT</td>
+ <td>2</td>
+ <td><p>Secret from environment variable.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.v1.DiffMetadataResponse">DiffMetadataResponse</h3>
+ <h3 id="bytebase.v1.DataSourceExternalSecret.AuthType">DataSourceExternalSecret.AuthType</h3>
<p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>diff</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The generated migration statements. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>AUTH_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified authentication type.</p></td>
+ </tr>
+
+ <tr>
+ <td>TOKEN</td>
+ <td>1</td>
+ <td><p>ref: https://developer.hashicorp.com/vault/docs/auth/token</p></td>
+ </tr>
+
+ <tr>
+ <td>VAULT_APP_ROLE</td>
+ <td>2</td>
+ <td><p>ref: https://developer.hashicorp.com/vault/docs/auth/approle</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.v1.DiffSchemaRequest">DiffSchemaRequest</h3>
+ <h3 id="bytebase.v1.DataSourceExternalSecret.SecretType">DataSourceExternalSecret.SecretType</h3>
<p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>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} </p></td>
- </tr>
-
- <tr>
- <td>schema</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The target schema. </p></td>
- </tr>
-
- <tr>
- <td>changelog</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The resource name of the changelog
-Format:
-instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>SECRET_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified secret type.</p></td>
+ </tr>
+
+ <tr>
+ <td>VAULT_KV_V2</td>
+ <td>1</td>
+ <td><p>ref: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2</p></td>
+ </tr>
+
+ <tr>
+ <td>AWS_SECRETS_MANAGER</td>
+ <td>2</td>
+ <td><p>ref: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html</p></td>
+ </tr>
+
+ <tr>
+ <td>GCP_SECRET_MANAGER</td>
+ <td>3</td>
+ <td><p>ref: https://cloud.google.com/secret-manager/docs</p></td>
+ </tr>
+
+ <tr>
+ <td>AZURE_KEY_VAULT</td>
+ <td>4</td>
+ <td><p>ref: https://learn.microsoft.com/en-us/azure/key-vault/secrets/about-secrets</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.v1.DiffSchemaResponse">DiffSchemaResponse</h3>
+ <h3 id="bytebase.v1.DataSourceExternalSecret.TokenType">DataSourceExternalSecret.TokenType</h3>
<p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>diff</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>TOKEN_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified token type, treated as PLAIN for backward compatibility.</p></td>
+ </tr>
+
+ <tr>
+ <td>PLAIN</td>
+ <td>1</td>
+ <td><p>The token field holds the literal token value.</p></td>
+ </tr>
+
+ <tr>
+ <td>ENVIRONMENT</td>
+ <td>2</td>
+ <td><p>The token field holds the name of an environment variable on the
+Bytebase server that holds the token value.</p></td>
+ </tr>
+
+ <tr>
+ <td>FILE</td>
+ <td>3</td>
+ <td><p>The token field holds a path to a file on the Bytebase server that
+holds the token value.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.v1.DimensionConstraint">DimensionConstraint</h3>
- <p>DimensionConstraint defines constraints for a spatial dimension.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>dimension</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Dimension name/type (X, Y, Z, M, etc.) </p></td>
- </tr>
-
- <tr>
- <td>min_value</td>
- <td><a href="#double">double</a></td>
- <td></td>
- <td><p>Minimum value for this dimension </p></td>
- </tr>
-
- <tr>
- <td>max_value</td>
- <td><a href="#double">double</a></td>
- <td></td>
- <td><p>Maximum value for this dimension </p></td>
- </tr>
-
- <tr>
- <td>tolerance</td>
- <td><a href="#double">double</a></td>
- <td></td>
- <td><p>Tolerance for this dimension </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
+ <h3 id="bytebase.v1.DataSourceType">DataSourceType</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>DATA_SOURCE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified data source type.</p></td>
+ </tr>
+
+ <tr>
+ <td>ADMIN</td>
+ <td>1</td>
+ <td><p>Admin data source with write permissions.</p></td>
+ </tr>
+
+ <tr>
+ <td>READ_ONLY</td>
+ <td>2</td>
+ <td><p>Read-only data source for query operations.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.v1.DimensionalConfig">DimensionalConfig</h3>
- <p>DimensionalConfig defines dimensional and constraint parameters for spatial indexes.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>dimensions</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>Number of dimensions (2-4, default 2) </p></td>
- </tr>
-
- <tr>
- <td>data_type</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Spatial data type (GEOMETRY, GEOGRAPHY, POINT, POLYGON, etc.) </p></td>
- </tr>
-
- <tr>
- <td>srid</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>Spatial reference system identifier (SRID) </p></td>
- </tr>
-
- <tr>
- <td>constraints</td>
- <td><a href="#bytebase.v1.DimensionConstraint">DimensionConstraint</a></td>
- <td>repeated</td>
- <td><p>Coordinate system constraints </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
- <h3 id="bytebase.v1.EnumTypeMetadata">EnumTypeMetadata</h3>
- <p></p>
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of a type. </p></td>
- </tr>
-
- <tr>
- <td>values</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The enum values of a type. </p></td>
- </tr>
-
- <tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The comment describing the enum type. </p></td>
- </tr>
-
- <tr>
- <td>skip_dump</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether to skip this enum type during schema dump operations. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
- <h3 id="bytebase.v1.EventMetadata">EventMetadata</h3>
- <p></p>
+ <h3 id="bytebase.v1.InstanceService">InstanceService</h3>
+ <p>InstanceService manages database instances and their connections.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>GetInstance</td>
+ <td><a href="#bytebase.v1.GetInstanceRequest">GetInstanceRequest</a></td>
+ <td><a href="#bytebase.v1.Instance">Instance</a></td>
+ <td><p>Gets a database instance by name.
+Permissions required: bb.instances.get</p></td>
+ </tr>
+
+ <tr>
+ <td>ListInstances</td>
+ <td><a href="#bytebase.v1.ListInstancesRequest">ListInstancesRequest</a></td>
+ <td><a href="#bytebase.v1.ListInstancesResponse">ListInstancesResponse</a></td>
+ <td><p>Lists database instances, optionally within a project.
+Permissions required: bb.instances.list</p></td>
+ </tr>
+
+ <tr>
+ <td>CreateInstance</td>
+ <td><a href="#bytebase.v1.CreateInstanceRequest">CreateInstanceRequest</a></td>
+ <td><a href="#bytebase.v1.Instance">Instance</a></td>
+ <td><p>Creates a new database instance.
+Permissions required: bb.instances.create</p></td>
+ </tr>
+
+ <tr>
+ <td>PrepareSampleProjectInstance</td>
+ <td><a href="#bytebase.v1.PrepareSampleProjectInstanceRequest">PrepareSampleProjectInstanceRequest</a></td>
+ <td><a href="#bytebase.v1.Instance">Instance</a></td>
+ <td><p>Prepares a Sample Project Instance for a project.
+Permissions required: bb.instances.create</p></td>
+ </tr>
+
+ <tr>
+ <td>UpdateInstance</td>
+ <td><a href="#bytebase.v1.UpdateInstanceRequest">UpdateInstanceRequest</a></td>
+ <td><a href="#bytebase.v1.Instance">Instance</a></td>
+ <td><p>Updates a database instance.
+Permissions required: bb.instances.update</p></td>
+ </tr>
+
+ <tr>
+ <td>DeleteInstance</td>
+ <td><a href="#bytebase.v1.DeleteInstanceRequest">DeleteInstanceRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>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</p></td>
+ </tr>
+
+ <tr>
+ <td>UndeleteInstance</td>
+ <td><a href="#bytebase.v1.UndeleteInstanceRequest">UndeleteInstanceRequest</a></td>
+ <td><a href="#bytebase.v1.Instance">Instance</a></td>
+ <td><p>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</p></td>
+ </tr>
+
+ <tr>
+ <td>SyncInstance</td>
+ <td><a href="#bytebase.v1.SyncInstanceRequest">SyncInstanceRequest</a></td>
+ <td><a href="#bytebase.v1.SyncInstanceResponse">SyncInstanceResponse</a></td>
+ <td><p>Syncs database schemas and metadata from an instance.
+Permissions required: bb.instances.sync</p></td>
+ </tr>
+
+ <tr>
+ <td>ListInstanceDatabase</td>
+ <td><a href="#bytebase.v1.ListInstanceDatabaseRequest">ListInstanceDatabaseRequest</a></td>
+ <td><a href="#bytebase.v1.ListInstanceDatabaseResponse">ListInstanceDatabaseResponse</a></td>
+ <td><p>Lists all databases within an instance without creating them.
+Permissions required: bb.instances.get</p></td>
+ </tr>
+
+ <tr>
+ <td>BatchSyncInstances</td>
+ <td><a href="#bytebase.v1.BatchSyncInstancesRequest">BatchSyncInstancesRequest</a></td>
+ <td><a href="#bytebase.v1.BatchSyncInstancesResponse">BatchSyncInstancesResponse</a></td>
+ <td><p>Syncs multiple instances in a single request.
+Permissions required: bb.instances.sync</p></td>
+ </tr>
+
+ <tr>
+ <td>BatchUpdateInstances</td>
+ <td><a href="#bytebase.v1.BatchUpdateInstancesRequest">BatchUpdateInstancesRequest</a></td>
+ <td><a href="#bytebase.v1.BatchUpdateInstancesResponse">BatchUpdateInstancesResponse</a></td>
+ <td><p>Updates multiple instances in a single request.
+Permissions required: bb.instances.update</p></td>
+ </tr>
+
+ <tr>
+ <td>AddDataSource</td>
+ <td><a href="#bytebase.v1.AddDataSourceRequest">AddDataSourceRequest</a></td>
+ <td><a href="#bytebase.v1.Instance">Instance</a></td>
+ <td><p>Adds a read-only data source to an instance.
+Permissions required: bb.instances.update</p></td>
+ </tr>
+
+ <tr>
+ <td>RemoveDataSource</td>
+ <td><a href="#bytebase.v1.RemoveDataSourceRequest">RemoveDataSourceRequest</a></td>
+ <td><a href="#bytebase.v1.Instance">Instance</a></td>
+ <td><p>Removes a read-only data source from an instance.
+Permissions required: bb.instances.update</p></td>
+ </tr>
+
+ <tr>
+ <td>UpdateDataSource</td>
+ <td><a href="#bytebase.v1.UpdateDataSourceRequest">UpdateDataSourceRequest</a></td>
+ <td><a href="#bytebase.v1.Instance">Instance</a></td>
+ <td><p>Updates a data source configuration.
+Permissions required: bb.instances.update</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <table class="field-table">
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
<thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
</thead>
<tbody>
+
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the event. </p></td>
- </tr>
- <tr>
- <td>definition</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The schedule of the event. </p></td>
- </tr>
+ <tr>
+ <td>GetInstance</td>
+ <td>GET</td>
+ <td>/v1/{name=instances/*}</td>
+ <td></td>
+ </tr>
- <tr>
- <td>time_zone</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The time zone of the event. </p></td>
- </tr>
+ <tr>
+ <td>GetInstance</td>
+ <td>GET</td>
+ <td>/v1/{name=projects/*/instances/*}</td>
+ <td></td>
+ </tr>
- <tr>
- <td>sql_mode</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The SQL mode setting for the event. </p></td>
- </tr>
+
- <tr>
- <td>character_set_client</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The character set used by the client creating the event. </p></td>
- </tr>
- <tr>
- <td>collation_connection</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The collation used for the connection when creating the event. </p></td>
- </tr>
+ <tr>
+ <td>ListInstances</td>
+ <td>GET</td>
+ <td>/v1/instances</td>
+ <td></td>
+ </tr>
- <tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The comment is the comment of an event. </p></td>
- </tr>
+ <tr>
+ <td>ListInstances</td>
+ <td>GET</td>
+ <td>/v1/{parent=projects/*}/instances</td>
+ <td></td>
+ </tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ExtensionMetadata">ExtensionMetadata</h3>
- <p>ExtensionMetadata is the metadata for extensions.</p>
-
-
+
+
+
+ <tr>
+ <td>CreateInstance</td>
+ <td>POST</td>
+ <td>/v1/instances</td>
+ <td>instance</td>
+ </tr>
+
+ <tr>
+ <td>CreateInstance</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*}/instances</td>
+ <td>instance</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>PrepareSampleProjectInstance</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*}/instances:prepareSampleProjectInstance</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>UpdateInstance</td>
+ <td>PATCH</td>
+ <td>/v1/{instance.name=instances/*}</td>
+ <td>instance</td>
+ </tr>
+
+ <tr>
+ <td>UpdateInstance</td>
+ <td>PATCH</td>
+ <td>/v1/{instance.name=projects/*/instances/*}</td>
+ <td>instance</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>DeleteInstance</td>
+ <td>DELETE</td>
+ <td>/v1/{name=instances/*}</td>
+ <td></td>
+ </tr>
+
+ <tr>
+ <td>DeleteInstance</td>
+ <td>DELETE</td>
+ <td>/v1/{name=projects/*/instances/*}</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>UndeleteInstance</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*}:undelete</td>
+ <td>*</td>
+ </tr>
+
+ <tr>
+ <td>UndeleteInstance</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/instances/*}:undelete</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>SyncInstance</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*}:sync</td>
+ <td>*</td>
+ </tr>
+
+ <tr>
+ <td>SyncInstance</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/instances/*}:sync</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>ListInstanceDatabase</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*}:databases</td>
+ <td>*</td>
+ </tr>
+
+ <tr>
+ <td>ListInstanceDatabase</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/instances/*}:databases</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>BatchSyncInstances</td>
+ <td>POST</td>
+ <td>/v1/instances:batchSync</td>
+ <td>*</td>
+ </tr>
+
+ <tr>
+ <td>BatchSyncInstances</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*}/instances:batchSync</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>BatchUpdateInstances</td>
+ <td>POST</td>
+ <td>/v1/instances:batchUpdate</td>
+ <td>*</td>
+ </tr>
+
+ <tr>
+ <td>BatchUpdateInstances</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*}/instances:batchUpdate</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>AddDataSource</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*}:addDataSource</td>
+ <td>*</td>
+ </tr>
+
+ <tr>
+ <td>AddDataSource</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/instances/*}:addDataSource</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>RemoveDataSource</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*}:removeDataSource</td>
+ <td>*</td>
+ </tr>
+
+ <tr>
+ <td>RemoveDataSource</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/instances/*}:removeDataSource</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>UpdateDataSource</td>
+ <td>PATCH</td>
+ <td>/v1/{name=instances/*}:updateDataSource</td>
+ <td>data_source</td>
+ </tr>
+
+ <tr>
+ <td>UpdateDataSource</td>
+ <td>PATCH</td>
+ <td>/v1/{name=projects/*/instances/*}:updateDataSource</td>
+ <td>data_source</td>
+ </tr>
+
+
+ </tbody>
+ </table>
+
+
+
+
+ <div class="file-heading">
+ <h2 id="v1/database_service.proto">v1/database_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.BatchGetDatabasesRequest">BatchGetDatabasesRequest</h3>
+ <p></p>
+
+
<table class="field-table">
<thead>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
@@ -23158,32 +23141,21 @@ instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{pr
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the name of an extension. </p></td>
- </tr>
-
- <tr>
- <td>schema</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The schema is the extension that is installed to. But the extension usage
-is not limited to the schema. </p></td>
- </tr>
-
- <tr>
- <td>version</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The version is the version of an extension. </p></td>
+ <td><p>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 &#34;-&#34; as wildcard to batch get databases across parent. </p></td>
</tr>
<tr>
- <td>description</td>
+ <td>names</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The description is the description of an extension. </p></td>
+ <td>repeated</td>
+ <td><p>The list of database names to retrieve. </p></td>
</tr>
</tbody>
@@ -23193,7 +23165,7 @@ is not limited to the schema. </p></td>
- <h3 id="bytebase.v1.ExternalTableMetadata">ExternalTableMetadata</h3>
+ <h3 id="bytebase.v1.BatchGetDatabasesResponse">BatchGetDatabasesResponse</h3>
<p></p>
@@ -23204,31 +23176,10 @@ is not limited to the schema. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the name of a external table. </p></td>
- </tr>
-
- <tr>
- <td>external_server_name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The external_server_name is the name of the external server. </p></td>
- </tr>
-
- <tr>
- <td>external_database_name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The external_database_name is the name of the external database. </p></td>
- </tr>
-
- <tr>
- <td>columns</td>
- <td><a href="#bytebase.v1.ColumnMetadata">ColumnMetadata</a></td>
- <td>repeated</td>
- <td><p>The columns is the ordered list of columns in a foreign table. </p></td>
+ <td>databases</td>
+ <td><a href="#bytebase.v1.Database">Database</a></td>
+ <td>repeated</td>
+ <td><p>One database per requested name, in the same order as `names`. </p></td>
</tr>
</tbody>
@@ -23238,8 +23189,8 @@ is not limited to the schema. </p></td>
- <h3 id="bytebase.v1.ForeignKeyMetadata">ForeignKeyMetadata</h3>
- <p>ForeignKeyMetadata is the metadata for foreign keys.</p>
+ <h3 id="bytebase.v1.BatchSyncDatabasesRequest">BatchSyncDatabasesRequest</h3>
+ <p></p>
<table class="field-table">
@@ -23249,62 +23200,19 @@ is not limited to the schema. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the name of a foreign key. </p></td>
- </tr>
-
- <tr>
- <td>columns</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The columns are the ordered referencing columns of a foreign key. </p></td>
- </tr>
-
- <tr>
- <td>referenced_schema</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>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. </p></td>
- </tr>
-
- <tr>
- <td>referenced_table</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The referenced_table is the referenced table name of a foreign key. </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>referenced_columns</td>
+ <td>names</td>
<td><a href="#string">string</a></td>
<td>repeated</td>
- <td><p>The referenced_columns are the ordered referenced columns of a foreign key. </p></td>
- </tr>
-
- <tr>
- <td>on_delete</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The on_delete is the on delete action of a foreign key. </p></td>
- </tr>
-
- <tr>
- <td>on_update</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The on_update is the on update action of a foreign key. </p></td>
- </tr>
-
- <tr>
- <td>match_type</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The match_type is the match type of a foreign key.
-The match_type is the PostgreSQL specific field.
-It&#39;s empty string for other databases. </p></td>
+ <td><p>The list of database names to sync. </p></td>
</tr>
</tbody>
@@ -23314,8 +23222,15 @@ It&#39;s empty string for other databases. </p></td>
- <h3 id="bytebase.v1.FunctionMetadata">FunctionMetadata</h3>
- <p>FunctionMetadata is the metadata for functions.</p>
+ <h3 id="bytebase.v1.BatchSyncDatabasesResponse">BatchSyncDatabasesResponse</h3>
+ <p></p>
+
+
+
+
+
+ <h3 id="bytebase.v1.BatchUpdateDatabasesRequest">BatchUpdateDatabasesRequest</h3>
+ <p></p>
<table class="field-table">
@@ -23325,75 +23240,21 @@ It&#39;s empty string for other databases. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the name of a function. </p></td>
- </tr>
-
- <tr>
- <td>definition</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The definition is the definition of a function. </p></td>
- </tr>
-
- <tr>
- <td>signature</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The signature is the name with the number and type of input arguments the
-function takes. </p></td>
- </tr>
-
- <tr>
- <td>character_set_client</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>MySQL specific metadata. </p></td>
- </tr>
-
- <tr>
- <td>collation_connection</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>database_collation</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>sql_mode</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>comment</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>dependency_tables</td>
- <td><a href="#bytebase.v1.DependencyTable">DependencyTable</a></td>
+ <td>requests</td>
+ <td><a href="#bytebase.v1.UpdateDatabaseRequest">UpdateDatabaseRequest</a></td>
<td>repeated</td>
- <td><p>The dependency_tables is the list of dependency tables of a function.
-For PostgreSQL, it&#39;s the list of tables that the function depends on the return type definition. </p></td>
- </tr>
-
- <tr>
- <td>skip_dump</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
+ <td><p>The request message specifying the resources to update.
+A maximum of 1000 databases can be modified in a batch. </p></td>
</tr>
</tbody>
@@ -23403,7 +23264,7 @@ For PostgreSQL, it&#39;s the list of tables that the function depends on the ret
- <h3 id="bytebase.v1.GenerationMetadata">GenerationMetadata</h3>
+ <h3 id="bytebase.v1.BatchUpdateDatabasesResponse">BatchUpdateDatabasesResponse</h3>
<p></p>
@@ -23414,17 +23275,10 @@ For PostgreSQL, it&#39;s the list of tables that the function depends on the ret
<tbody>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.GenerationMetadata.Type">GenerationMetadata.Type</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>expression</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>databases</td>
+ <td><a href="#bytebase.v1.Database">Database</a></td>
+ <td>repeated</td>
+ <td><p>Databases updated. </p></td>
</tr>
</tbody>
@@ -23434,8 +23288,8 @@ For PostgreSQL, it&#39;s the list of tables that the function depends on the ret
- <h3 id="bytebase.v1.GetDatabaseMetadataRequest">GetDatabaseMetadataRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.BoundingBox">BoundingBox</h3>
+ <p>BoundingBox defines the spatial bounds for GEOMETRY spatial indexes.</p>
<table class="field-table">
@@ -23445,41 +23299,31 @@ For PostgreSQL, it&#39;s the list of tables that the function depends on the ret
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>xmin</td>
+ <td><a href="#double">double</a></td>
<td></td>
- <td><p>The name of the database to retrieve metadata.
-Format: instances/{instance}/databases/{database}/metadata or projects/{project}/instances/{instance}/databases/{database}/metadata </p></td>
+ <td><p>Minimum X coordinate </p></td>
</tr>
<tr>
- <td>filter</td>
- <td><a href="#string">string</a></td>
+ <td>ymin</td>
+ <td><a href="#double">double</a></td>
<td></td>
- <td><p>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 &#34;==&#34; operator.
-- table: the table name, support &#34;==&#34; and &#34;.contains()&#34; operator.
-
-For example:
-schema == &#34;schema-a&#34;
-table == &#34;table-a&#34;
-table.contains(&#34;table-a&#34;)
-schema == &#34;schema-a&#34; &amp;&amp; table.contains(&#34;sample&#34;)
-The filter is used to search for tables containing &#34;sample&#34; in the schema &#34;schemas/schema-a&#34;.
-The column masking level will only be returned when a table filter is used. </p></td>
+ <td><p>Minimum Y coordinate </p></td>
</tr>
<tr>
- <td>limit</td>
- <td><a href="#int32">int32</a></td>
+ <td>xmax</td>
+ <td><a href="#double">double</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>Maximum X coordinate </p></td>
+ </tr>
+
+ <tr>
+ <td>ymax</td>
+ <td><a href="#double">double</a></td>
+ <td></td>
+ <td><p>Maximum Y coordinate </p></td>
</tr>
</tbody>
@@ -23489,8 +23333,8 @@ Default 0, means no limit. </p></td>
- <h3 id="bytebase.v1.GetDatabaseRequest">GetDatabaseRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.CheckConstraintMetadata">CheckConstraintMetadata</h3>
+ <p>CheckConstraintMetadata is the metadata for check constraints.</p>
<table class="field-table">
@@ -23503,8 +23347,14 @@ Default 0, means no limit. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the database to retrieve.
-Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} </p></td>
+ <td><p>The name is the name of a check constraint. </p></td>
+ </tr>
+
+ <tr>
+ <td>expression</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The expression is the expression of a check constraint. </p></td>
</tr>
</tbody>
@@ -23514,8 +23364,8 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance
- <h3 id="bytebase.v1.GetDatabaseSDLSchemaRequest">GetDatabaseSDLSchemaRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.ColumnMetadata">ColumnMetadata</h3>
+ <p>ColumnMetadata is the metadata for columns.</p>
<table class="field-table">
@@ -23528,94 +23378,158 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the database to retrieve SDL schema.
-Format: instances/{instance}/databases/{database}/sdlSchema or projects/{project}/instances/{instance}/databases/{database}/sdlSchema </p></td>
+ <td><p>The name is the name of a column. </p></td>
</tr>
<tr>
- <td>format</td>
- <td><a href="#bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat">GetDatabaseSDLSchemaRequest.SDLFormat</a></td>
+ <td>position</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The format of the SDL schema output. </p></td>
+ <td><p>The position is the position in columns. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.GetDatabaseSchemaRequest">GetDatabaseSchemaRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>has_default</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
<tr>
- <td>name</td>
+ <td>default</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the database to retrieve schema.
-Format: instances/{instance}/databases/{database}/schema or projects/{project}/instances/{instance}/databases/{database}/schema </p></td>
+ <td><p>The default value of column. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.GetSchemaStringRequest">GetSchemaStringRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>default_on_null</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Oracle specific metadata.
+The default_on_null is the default on null of a column. </p></td>
+ </tr>
<tr>
- <td>name</td>
+ <td>on_update</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the database.
-Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} </p></td>
+ <td><p>The on_update is the on update action of a column.
+For MySQL like databases, it&#39;s only supported for TIMESTAMP columns with
+CURRENT_TIMESTAMP as on update value. </p></td>
+ </tr>
+
+ <tr>
+ <td>nullable</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>The nullable is the nullable of a column. </p></td>
</tr>
<tr>
<td>type</td>
- <td><a href="#bytebase.v1.GetSchemaStringRequest.ObjectType">GetSchemaStringRequest.ObjectType</a></td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The type is the type of a column. </p></td>
</tr>
<tr>
- <td>schema</td>
+ <td>character_set</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>It&#39;s empty for DATABASE. </p></td>
+ <td><p>The character_set is the character_set of a column. </p></td>
</tr>
<tr>
- <td>object</td>
+ <td>collation</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>It&#39;s empty for DATABASE and SCHEMA. </p></td>
+ <td><p>The collation is the collation of a column. </p></td>
</tr>
<tr>
- <td>metadata</td>
- <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>If use the metadata to generate the schema string, the type is OBJECT_TYPE_UNSPECIFIED.
-Also the schema and object are empty. </p></td>
+ <td><p>The comment is the comment of a column. </p></td>
+ </tr>
+
+ <tr>
+ <td>generation</td>
+ <td><a href="#bytebase.v1.GenerationMetadata">GenerationMetadata</a></td>
+ <td></td>
+ <td><p>The generation is the generation of a column. </p></td>
+ </tr>
+
+ <tr>
+ <td>is_identity</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>identity_generation</td>
+ <td><a href="#bytebase.v1.ColumnMetadata.IdentityGeneration">ColumnMetadata.IdentityGeneration</a></td>
+ <td></td>
+ <td><p>The identity_generation is for identity columns, PG only. </p></td>
+ </tr>
+
+ <tr>
+ <td>identity_seed</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p>The identity_seed is for identity columns, MSSQL only. </p></td>
+ </tr>
+
+ <tr>
+ <td>identity_increment</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p>The identity_increment is for identity columns, MSSQL only. </p></td>
+ </tr>
+
+ <tr>
+ <td>default_constraint_name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>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&#39;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 &#39;active&#39;
+ )
+
+Will create a constraint with an auto-generated name like &#39;DF__employees__statu__3B75D760&#39;
+or a user-defined name if specified:
+ ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT &#39;active&#39; 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 &#39;inactive&#39; 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. </p></td>
+ </tr>
+
+ <tr>
+ <td>srid</td>
+ <td><a href="#uint32">uint32</a></td>
+ <td>optional</td>
+ <td><p>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). </p></td>
+ </tr>
+
+ <tr>
+ <td>is_invisible</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether the column is invisible (hidden from SELECT *), MySQL 8.0.23&#43; only. </p></td>
</tr>
</tbody>
@@ -23625,7 +23539,7 @@ Also the schema and object are empty. </p></td>
- <h3 id="bytebase.v1.GetSchemaStringResponse">GetSchemaStringResponse</h3>
+ <h3 id="bytebase.v1.CompositeTypeAttribute">CompositeTypeAttribute</h3>
<p></p>
@@ -23636,10 +23550,33 @@ Also the schema and object are empty. </p></td>
<tbody>
<tr>
- <td>schema_string</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name of the attribute. </p></td>
+ </tr>
+
+ <tr>
+ <td>type</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The attribute type. User-defined types are always schema-qualified. </p></td>
+ </tr>
+
+ <tr>
+ <td>collation</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>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. `&#34;C&#34;` or `locale.en_us`. </p></td>
+ </tr>
+
+ <tr>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The comment describing the attribute. </p></td>
</tr>
</tbody>
@@ -23649,8 +23586,8 @@ Also the schema and object are empty. </p></td>
- <h3 id="bytebase.v1.GridLevel">GridLevel</h3>
- <p>GridLevel defines a tessellation grid level with its density.</p>
+ <h3 id="bytebase.v1.CompositeTypeMetadata">CompositeTypeMetadata</h3>
+ <p></p>
<table class="field-table">
@@ -23660,17 +23597,24 @@ Also the schema and object are empty. </p></td>
<tbody>
<tr>
- <td>level</td>
- <td><a href="#int32">int32</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Grid level number (1-4 for SQL Server) </p></td>
+ <td><p>The name of the composite type. </p></td>
</tr>
<tr>
- <td>density</td>
+ <td>attributes</td>
+ <td><a href="#bytebase.v1.CompositeTypeAttribute">CompositeTypeAttribute</a></td>
+ <td>repeated</td>
+ <td><p>The ordered attributes of the composite type. </p></td>
+ </tr>
+
+ <tr>
+ <td>comment</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Grid density (LOW, MEDIUM, HIGH) </p></td>
+ <td><p>The comment describing the composite type. </p></td>
</tr>
</tbody>
@@ -23680,8 +23624,8 @@ Also the schema and object are empty. </p></td>
- <h3 id="bytebase.v1.IndexMetadata">IndexMetadata</h3>
- <p>IndexMetadata is the metadata for indexes.</p>
+ <h3 id="bytebase.v1.Database">Database</h3>
+ <p></p>
<table class="field-table">
@@ -23694,123 +23638,123 @@ Also the schema and object are empty. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of an index. </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>expressions</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The expressions are the ordered columns or expressions of an index.
-This could refer to a column or an expression. </p></td>
+ <td>state</td>
+ <td><a href="#bytebase.v1.State">State</a></td>
+ <td></td>
+ <td><p>The existence of a database. </p></td>
</tr>
<tr>
- <td>key_length</td>
- <td><a href="#int64">int64</a></td>
- <td>repeated</td>
- <td><p>The key_lengths are the ordered key lengths of an index.
-If the key length is not specified, it&#39;s -1. </p></td>
+ <td>successful_sync_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>The latest synchronization time. </p></td>
</tr>
<tr>
- <td>descending</td>
- <td><a href="#bool">bool</a></td>
- <td>repeated</td>
- <td><p>The descending is the ordered descending of an index. </p></td>
+ <td>project</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The project for a database.
+Format: projects/{project} </p></td>
</tr>
<tr>
- <td>type</td>
+ <td>release</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The type is the type of an index. </p></td>
+ <td><p>The release that was last applied to this database.
+Format: projects/{project}/releases/{release_id}
+Example: projects/my-project/releases/release_20260115-RC00 </p></td>
</tr>
<tr>
- <td>unique</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>The unique is whether the index is unique. </p></td>
+ <td>environment</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>The environment resource.
+Format: environments/prod where prod is the environment resource ID. </p></td>
</tr>
<tr>
- <td>primary</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>The primary is whether the index is a primary key index. </p></td>
+ <td>effective_environment</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>visible</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>The visible is whether the index is visible. </p></td>
+ <td>labels</td>
+ <td><a href="#bytebase.v1.Database.LabelsEntry">Database.LabelsEntry</a></td>
+ <td>repeated</td>
+ <td><p>Labels will be used for deployment and policy control. </p></td>
</tr>
<tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
+ <td>instance_resource</td>
+ <td><a href="#bytebase.v1.InstanceResource">InstanceResource</a></td>
<td></td>
- <td><p>The comment is the comment of an index. </p></td>
+ <td><p>The instance resource. </p></td>
</tr>
<tr>
- <td>definition</td>
- <td><a href="#string">string</a></td>
+ <td>backup_available</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The definition of an index. </p></td>
+ <td><p>The database is available for DML prior backup. </p></td>
</tr>
<tr>
- <td>parent_index_schema</td>
- <td><a href="#string">string</a></td>
+ <td>sync_status</td>
+ <td><a href="#bytebase.v1.SyncStatus">SyncStatus</a></td>
<td></td>
- <td><p>The schema name of the parent index. </p></td>
+ <td><p>The sync status of the database. </p></td>
</tr>
<tr>
- <td>parent_index_name</td>
+ <td>sync_error</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The index name of the parent index. </p></td>
- </tr>
-
- <tr>
- <td>granularity</td>
- <td><a href="#int64">int64</a></td>
- <td></td>
- <td><p>The number of granules in the block. It&#39;s a ClickHouse specific field. </p></td>
+ <td><p>The error message if sync failed. </p></td>
</tr>
- <tr>
- <td>is_constraint</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>It&#39;s a PostgreSQL specific field.
-The unique constraint and unique index are not the same thing in PostgreSQL. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.Database.LabelsEntry">Database.LabelsEntry</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>spatial_config</td>
- <td><a href="#bytebase.v1.SpatialIndexConfig">SpatialIndexConfig</a></td>
+ <td>key</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Spatial index configuration for spatial databases like SQL Server, PostgreSQL with PostGIS, etc. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>opclass_names</td>
+ <td>value</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>https://www.postgresql.org/docs/current/catalog-pg-opclass.html
-Name of the operator class for each column. (PostgreSQL specific). </p></td>
- </tr>
-
- <tr>
- <td>opclass_defaults</td>
- <td><a href="#bool">bool</a></td>
- <td>repeated</td>
- <td><p>True if the operator class is the default. (PostgreSQL specific). </p></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -23820,8 +23764,8 @@ Name of the operator class for each column. (PostgreSQL specific). </p></td>
- <h3 id="bytebase.v1.ListDatabasesRequest">ListDatabasesRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.DatabaseMetadata">DatabaseMetadata</h3>
+ <p>DatabaseMetadata is the metadata for databases.</p>
<table class="field-table">
@@ -23831,91 +23775,54 @@ Name of the operator class for each column. (PostgreSQL specific). </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>- projects/{project}: list databases in a project, require &#34;bb.projects.get&#34; permission.
-- workspaces/{id}: list databases in the workspace, require &#34;bb.databases.list&#34; permission.
-- instances/{instance}: list databases in an instance, require &#34;bb.instances.get&#34; permission.
-- projects/{project}/instances/{instance}: list databases in a project instance, require &#34;bb.instances.get&#34; permission. </p></td>
+ <td><p>The database metadata name.
+
+Format: instances/{instance}/databases/{database}/metadata or projects/{project}/instances/{instance}/databases/{database}/metadata </p></td>
</tr>
<tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>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. </p></td>
+ <td>schemas</td>
+ <td><a href="#bytebase.v1.SchemaMetadata">SchemaMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The schemas is the list of schemas in a database. </p></td>
</tr>
<tr>
- <td>page_token</td>
+ <td>character_set</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>The character_set is the character set of a database. </p></td>
</tr>
<tr>
- <td>filter</td>
+ <td>collation</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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 &#34;environments/{id}&#34; format, support &#34;==&#34; operator.
-- name: the database name, support &#34;.contains()&#34; operator.
-- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
-- instance: the instance full name in &#34;instances/{id}&#34; or &#34;projects/{project}/instances/{id}&#34; format, support &#34;==&#34; operator.
-- engine: the database engine, check Engine enum for values. Support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator.
-- exclude_unassigned: should be &#34;true&#34; or &#34;false&#34;, will not show unassigned databases if it&#39;s true, support &#34;==&#34; operator.
-- table: filter by the database table, support &#34;==&#34; and &#34;.contains()&#34; operator.
-- labels.{key}: the database label, support &#34;==&#34; and &#34;in&#34; operators.
-
-For example:
-environment == &#34;environments/{environment resource id}&#34;
-environment == &#34;&#34; (find databases which environment is not set)
-project == &#34;projects/{project resource id}&#34;
-instance == &#34;instances/{instance resource id}&#34;
-instance == &#34;projects/{project resource id}/instances/{instance resource id}&#34;
-name.contains(&#34;database name&#34;)
-engine == &#34;MYSQL&#34;
-engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;]
-!(engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;])
-exclude_unassigned == true
-table == &#34;sample&#34;
-table.contains(&#34;sam&#34;)
-labels.environment == &#34;production&#34;
-labels.region == &#34;asia&#34;
-labels.region in [&#34;asia&#34;, &#34;europe&#34;]
-
-You can combine filter conditions like:
-environment == &#34;environments/prod&#34; &amp;&amp; name.contains(&#34;employee&#34;) </p></td>
+ <td><p>The collation is the collation of a database. </p></td>
</tr>
<tr>
- <td>show_deleted</td>
- <td><a href="#bool">bool</a></td>
+ <td>extensions</td>
+ <td><a href="#bytebase.v1.ExtensionMetadata">ExtensionMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The extensions is the list of extensions in a database. </p></td>
+ </tr>
+
+ <tr>
+ <td>owner</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Show deleted database if specified. </p></td>
+ <td><p>The owner of the database. </p></td>
</tr>
<tr>
- <td>order_by</td>
+ <td>search_path</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The order by of databases.
-Support name, project, instance. The default sorting order is ascending.
-For example:
-- order_by = &#34;name&#34; - order by name ascending
-- order_by = &#34;name desc&#34;
-- order_by = &#34;name desc, project asc&#34; </p></td>
+ <td><p>The search_path is the search path of a PostgreSQL database. </p></td>
</tr>
</tbody>
@@ -23925,8 +23832,8 @@ For example:
- <h3 id="bytebase.v1.ListDatabasesResponse">ListDatabasesResponse</h3>
- <p></p>
+ <h3 id="bytebase.v1.DatabaseSDLSchema">DatabaseSDLSchema</h3>
+ <p>DatabaseSDLSchema contains the schema in SDL format.</p>
<table class="field-table">
@@ -23936,18 +23843,23 @@ For example:
<tbody>
<tr>
- <td>databases</td>
- <td><a href="#bytebase.v1.Database">Database</a></td>
- <td>repeated</td>
- <td><p>The databases from the specified request. </p></td>
+ <td>schema</td>
+ <td><a href="#bytes">bytes</a></td>
+ <td></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>next_page_token</td>
+ <td>content_type</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td><p>The MIME type of the schema content.
+Indicates how the client should interpret the schema field.
+Examples:
+- &#34;text/plain; charset=utf-8&#34; for SINGLE_FILE format
+- &#34;application/zip&#34; for MULTI_FILE format </p></td>
</tr>
</tbody>
@@ -23957,8 +23869,8 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.MaterializedViewMetadata">MaterializedViewMetadata</h3>
- <p>MaterializedViewMetadata is the metadata for materialized views.</p>
+ <h3 id="bytebase.v1.DatabaseSchema">DatabaseSchema</h3>
+ <p>DatabaseSchema is the metadata for databases.</p>
<table class="field-table">
@@ -23968,53 +23880,10 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the name of a materialized view. </p></td>
- </tr>
-
- <tr>
- <td>definition</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The definition is the definition of a materialized view. </p></td>
- </tr>
-
- <tr>
- <td>comment</td>
+ <td>schema</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The comment is the comment of a materialized view. </p></td>
- </tr>
-
- <tr>
- <td>dependency_columns</td>
- <td><a href="#bytebase.v1.DependencyColumn">DependencyColumn</a></td>
- <td>repeated</td>
- <td><p>The dependency_columns is the list of dependency columns of a materialized
-view. </p></td>
- </tr>
-
- <tr>
- <td>triggers</td>
- <td><a href="#bytebase.v1.TriggerMetadata">TriggerMetadata</a></td>
- <td>repeated</td>
- <td><p>The columns is the ordered list of columns in a table. </p></td>
- </tr>
-
- <tr>
- <td>indexes</td>
- <td><a href="#bytebase.v1.IndexMetadata">IndexMetadata</a></td>
- <td>repeated</td>
- <td><p>The indexes is the list of indexes in a table. </p></td>
- </tr>
-
- <tr>
- <td>skip_dump</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
+ <td><p>The schema dump from database. </p></td>
</tr>
</tbody>
@@ -24024,8 +23893,8 @@ view. </p></td>
- <h3 id="bytebase.v1.PackageMetadata">PackageMetadata</h3>
- <p>PackageMetadata is the metadata for packages.</p>
+ <h3 id="bytebase.v1.DependencyColumn">DependencyColumn</h3>
+ <p>DependencyColumn is the metadata for dependency columns.</p>
<table class="field-table">
@@ -24035,17 +23904,24 @@ view. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>schema</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of a package. </p></td>
+ <td><p>The schema is the schema of a reference column. </p></td>
</tr>
<tr>
- <td>definition</td>
+ <td>table</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The definition is the definition of a package. </p></td>
+ <td><p>The table is the table of a reference column. </p></td>
+ </tr>
+
+ <tr>
+ <td>column</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The column is the name of a reference column. </p></td>
</tr>
</tbody>
@@ -24055,8 +23931,8 @@ view. </p></td>
- <h3 id="bytebase.v1.ProcedureMetadata">ProcedureMetadata</h3>
- <p>ProcedureMetadata is the metadata for procedures.</p>
+ <h3 id="bytebase.v1.DependencyTable">DependencyTable</h3>
+ <p></p>
<table class="field-table">
@@ -24066,65 +23942,142 @@ view. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>schema</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of a procedure. </p></td>
+ <td><p>The schema is the schema of a reference table. </p></td>
</tr>
<tr>
- <td>definition</td>
+ <td>table</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The definition is the definition of a procedure. </p></td>
+ <td><p>The table is the name of a reference table. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>signature</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The signature is the name with the number and type of input arguments the
-procedure takes. </p></td>
+ <td><p>The database whose current schema is the diff source.
+Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} </p></td>
</tr>
<tr>
- <td>character_set_client</td>
- <td><a href="#string">string</a></td>
+ <td>target_metadata</td>
+ <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
<td></td>
- <td><p>MySQL specific metadata. </p></td>
+ <td><p>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. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DiffMetadataResponse">DiffMetadataResponse</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>collation_connection</td>
+ <td>diff</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The generated migration statements. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DiffSchemaRequest">DiffSchemaRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>database_collation</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>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} </p></td>
</tr>
<tr>
- <td>sql_mode</td>
+ <td>schema</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The target schema. </p></td>
</tr>
<tr>
- <td>comment</td>
+ <td>changelog</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The comment is the comment of a procedure. </p></td>
+ <td><p>The resource name of the changelog
+Format:
+instances/{instance}/databases/{database}/changelogs/{changelog} or projects/{project}/instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DiffSchemaResponse">DiffSchemaResponse</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>skip_dump</td>
- <td><a href="#bool">bool</a></td>
+ <td>diff</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -24136,8 +24089,8 @@ procedure takes. </p></td>
- <h3 id="bytebase.v1.SchemaMetadata">SchemaMetadata</h3>
- <p>SchemaMetadata is the metadata for schemas.</p><p>This is the concept of schema in Postgres, but it's a no-op for MySQL.</p>
+ <h3 id="bytebase.v1.DimensionConstraint">DimensionConstraint</h3>
+ <p>DimensionConstraint defines constraints for a spatial dimension.</p>
<table class="field-table">
@@ -24147,127 +24100,121 @@ procedure takes. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>dimension</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the schema name.
-It is an empty string for databases without such concept such as MySQL. </p></td>
+ <td><p>Dimension name/type (X, Y, Z, M, etc.) </p></td>
</tr>
<tr>
- <td>tables</td>
- <td><a href="#bytebase.v1.TableMetadata">TableMetadata</a></td>
- <td>repeated</td>
- <td><p>The tables is the list of tables in a schema. </p></td>
+ <td>min_value</td>
+ <td><a href="#double">double</a></td>
+ <td></td>
+ <td><p>Minimum value for this dimension </p></td>
</tr>
<tr>
- <td>external_tables</td>
- <td><a href="#bytebase.v1.ExternalTableMetadata">ExternalTableMetadata</a></td>
- <td>repeated</td>
- <td><p>The external_tables is the list of external tables in a schema. </p></td>
+ <td>max_value</td>
+ <td><a href="#double">double</a></td>
+ <td></td>
+ <td><p>Maximum value for this dimension </p></td>
</tr>
<tr>
- <td>views</td>
- <td><a href="#bytebase.v1.ViewMetadata">ViewMetadata</a></td>
- <td>repeated</td>
- <td><p>The views is the list of views in a schema. </p></td>
+ <td>tolerance</td>
+ <td><a href="#double">double</a></td>
+ <td></td>
+ <td><p>Tolerance for this dimension </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DimensionalConfig">DimensionalConfig</h3>
+ <p>DimensionalConfig defines dimensional and constraint parameters for spatial indexes.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>functions</td>
- <td><a href="#bytebase.v1.FunctionMetadata">FunctionMetadata</a></td>
- <td>repeated</td>
- <td><p>The functions is the list of functions in a schema. </p></td>
+ <td>dimensions</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>Number of dimensions (2-4, default 2) </p></td>
</tr>
<tr>
- <td>procedures</td>
- <td><a href="#bytebase.v1.ProcedureMetadata">ProcedureMetadata</a></td>
- <td>repeated</td>
- <td><p>The procedures is the list of procedures in a schema. </p></td>
+ <td>data_type</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Spatial data type (GEOMETRY, GEOGRAPHY, POINT, POLYGON, etc.) </p></td>
</tr>
<tr>
- <td>streams</td>
- <td><a href="#bytebase.v1.StreamMetadata">StreamMetadata</a></td>
- <td>repeated</td>
- <td><p>The streams is the list of streams in a schema, currently, only used for
-Snowflake. </p></td>
+ <td>srid</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>Spatial reference system identifier (SRID) </p></td>
</tr>
<tr>
- <td>tasks</td>
- <td><a href="#bytebase.v1.TaskMetadata">TaskMetadata</a></td>
+ <td>constraints</td>
+ <td><a href="#bytebase.v1.DimensionConstraint">DimensionConstraint</a></td>
<td>repeated</td>
- <td><p>The routines is the list of routines in a schema, currently, only used for
-Snowflake. </p></td>
+ <td><p>Coordinate system constraints </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.EnumTypeMetadata">EnumTypeMetadata</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>materialized_views</td>
- <td><a href="#bytebase.v1.MaterializedViewMetadata">MaterializedViewMetadata</a></td>
- <td>repeated</td>
- <td><p>The materialized_views is the list of materialized views in a schema. </p></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of a type. </p></td>
</tr>
<tr>
- <td>packages</td>
- <td><a href="#bytebase.v1.PackageMetadata">PackageMetadata</a></td>
+ <td>values</td>
+ <td><a href="#string">string</a></td>
<td>repeated</td>
- <td><p>The packages is the list of packages in a schema. </p></td>
+ <td><p>The enum values of a type. </p></td>
</tr>
<tr>
- <td>owner</td>
+ <td>comment</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The owner of the schema. </p></td>
- </tr>
-
- <tr>
- <td>sequences</td>
- <td><a href="#bytebase.v1.SequenceMetadata">SequenceMetadata</a></td>
- <td>repeated</td>
- <td><p>The sequences is the list of sequences in a schema, sorted by name. </p></td>
- </tr>
-
- <tr>
- <td>events</td>
- <td><a href="#bytebase.v1.EventMetadata">EventMetadata</a></td>
- <td>repeated</td>
- <td><p>The events is the list of scheduled events in a schema. </p></td>
- </tr>
-
- <tr>
- <td>enum_types</td>
- <td><a href="#bytebase.v1.EnumTypeMetadata">EnumTypeMetadata</a></td>
- <td>repeated</td>
- <td><p>The enum_types is the list of user-defined enum types in a schema. </p></td>
+ <td><p>The comment describing the enum type. </p></td>
</tr>
<tr>
<td>skip_dump</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Whether to skip this schema during schema dump operations. </p></td>
- </tr>
-
- <tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The comment is the comment of a schema. </p></td>
- </tr>
-
- <tr>
- <td>composite_types</td>
- <td><a href="#bytebase.v1.CompositeTypeMetadata">CompositeTypeMetadata</a></td>
- <td>repeated</td>
- <td><p>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. </p></td>
+ <td><p>Whether to skip this enum type during schema dump operations. </p></td>
</tr>
</tbody>
@@ -24277,7 +24224,7 @@ types and derived types. </p></td>
- <h3 id="bytebase.v1.SequenceMetadata">SequenceMetadata</h3>
+ <h3 id="bytebase.v1.EventMetadata">EventMetadata</h3>
<p></p>
@@ -24291,91 +24238,95 @@ types and derived types. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of a sequence. </p></td>
+ <td><p>The name of the event. </p></td>
</tr>
<tr>
- <td>data_type</td>
+ <td>definition</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The data type of a sequence. </p></td>
+ <td><p>The schedule of the event. </p></td>
</tr>
<tr>
- <td>start</td>
+ <td>time_zone</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The start value of a sequence. </p></td>
+ <td><p>The time zone of the event. </p></td>
</tr>
<tr>
- <td>min_value</td>
+ <td>sql_mode</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The minimum value of a sequence. </p></td>
+ <td><p>The SQL mode setting for the event. </p></td>
</tr>
<tr>
- <td>max_value</td>
+ <td>character_set_client</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The maximum value of a sequence. </p></td>
+ <td><p>The character set used by the client creating the event. </p></td>
</tr>
<tr>
- <td>increment</td>
+ <td>collation_connection</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Increment value of a sequence. </p></td>
- </tr>
-
- <tr>
- <td>cycle</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Cycle is whether the sequence cycles. </p></td>
+ <td><p>The collation used for the connection when creating the event. </p></td>
</tr>
<tr>
- <td>cache_size</td>
+ <td>comment</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Cache size of a sequence. </p></td>
+ <td><p>The comment is the comment of an event. </p></td>
</tr>
- <tr>
- <td>last_value</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Last value of a sequence. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ExtensionMetadata">ExtensionMetadata</h3>
+ <p>ExtensionMetadata is the metadata for extensions.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>owner_table</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The owner table of the sequence. </p></td>
+ <td><p>The name is the name of an extension. </p></td>
</tr>
<tr>
- <td>owner_column</td>
+ <td>schema</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The owner column of the sequence. </p></td>
+ <td><p>The schema is the extension that is installed to. But the extension usage
+is not limited to the schema. </p></td>
</tr>
<tr>
- <td>comment</td>
+ <td>version</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The comment describing the sequence. </p></td>
+ <td><p>The version is the version of an extension. </p></td>
</tr>
<tr>
- <td>skip_dump</td>
- <td><a href="#bool">bool</a></td>
+ <td>description</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether to skip this sequence during schema dump operations. </p></td>
+ <td><p>The description is the description of an extension. </p></td>
</tr>
</tbody>
@@ -24385,8 +24336,8 @@ types and derived types. </p></td>
- <h3 id="bytebase.v1.SpatialIndexConfig">SpatialIndexConfig</h3>
- <p>SpatialIndexConfig defines the spatial index configuration for spatial databases.</p>
+ <h3 id="bytebase.v1.ExternalTableMetadata">ExternalTableMetadata</h3>
+ <p></p>
<table class="field-table">
@@ -24396,31 +24347,31 @@ types and derived types. </p></td>
<tbody>
<tr>
- <td>method</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Spatial indexing method (e.g., &#34;SPATIAL&#34;, &#34;R-TREE&#34;, &#34;GIST&#34;) </p></td>
+ <td><p>The name is the name of a external table. </p></td>
</tr>
<tr>
- <td>tessellation</td>
- <td><a href="#bytebase.v1.TessellationConfig">TessellationConfig</a></td>
+ <td>external_server_name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Tessellation configuration for grid-based spatial indexes </p></td>
+ <td><p>The external_server_name is the name of the external server. </p></td>
</tr>
<tr>
- <td>storage</td>
- <td><a href="#bytebase.v1.StorageConfig">StorageConfig</a></td>
+ <td>external_database_name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Storage and performance configuration </p></td>
+ <td><p>The external_database_name is the name of the external database. </p></td>
</tr>
<tr>
- <td>dimensional</td>
- <td><a href="#bytebase.v1.DimensionalConfig">DimensionalConfig</a></td>
- <td></td>
- <td><p>Dimensional configuration </p></td>
+ <td>columns</td>
+ <td><a href="#bytebase.v1.ColumnMetadata">ColumnMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The columns is the ordered list of columns in a foreign table. </p></td>
</tr>
</tbody>
@@ -24430,8 +24381,8 @@ types and derived types. </p></td>
- <h3 id="bytebase.v1.StorageConfig">StorageConfig</h3>
- <p>StorageConfig defines storage and performance parameters for spatial indexes.</p>
+ <h3 id="bytebase.v1.ForeignKeyMetadata">ForeignKeyMetadata</h3>
+ <p>ForeignKeyMetadata is the metadata for foreign keys.</p>
<table class="field-table">
@@ -24441,101 +24392,62 @@ types and derived types. </p></td>
<tbody>
<tr>
- <td>fillfactor</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>Fill factor percentage (1-100) </p></td>
- </tr>
-
- <tr>
- <td>buffering</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Buffering mode for PostgreSQL (auto, on, off) </p></td>
+ <td><p>The name is the name of a foreign key. </p></td>
</tr>
<tr>
- <td>tablespace</td>
+ <td>columns</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>Tablespace configuration for Oracle </p></td>
+ <td>repeated</td>
+ <td><p>The columns are the ordered referencing columns of a foreign key. </p></td>
</tr>
<tr>
- <td>work_tablespace</td>
+ <td>referenced_schema</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>sdo_level</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>commit_interval</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>pad_index</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>SQL Server specific parameters </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>sort_in_tempdb</td>
+ <td>referenced_table</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>ON, OFF </p></td>
- </tr>
-
- <tr>
- <td>drop_existing</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>online</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
+ <td><p>The referenced_table is the referenced table name of a foreign key. </p></td>
</tr>
<tr>
- <td>allow_row_locks</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>referenced_columns</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The referenced_columns are the ordered referenced columns of a foreign key. </p></td>
</tr>
<tr>
- <td>allow_page_locks</td>
- <td><a href="#bool">bool</a></td>
+ <td>on_delete</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The on_delete is the on delete action of a foreign key. </p></td>
</tr>
<tr>
- <td>maxdop</td>
- <td><a href="#int32">int32</a></td>
+ <td>on_update</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The on_update is the on update action of a foreign key. </p></td>
</tr>
<tr>
- <td>data_compression</td>
+ <td>match_type</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>NONE, ROW, PAGE </p></td>
+ <td><p>The match_type is the match type of a foreign key.
+The match_type is the PostgreSQL specific field.
+It&#39;s empty string for other databases. </p></td>
</tr>
</tbody>
@@ -24545,8 +24457,8 @@ types and derived types. </p></td>
- <h3 id="bytebase.v1.StreamMetadata">StreamMetadata</h3>
- <p></p>
+ <h3 id="bytebase.v1.FunctionMetadata">FunctionMetadata</h3>
+ <p>FunctionMetadata is the metadata for functions.</p>
<table class="field-table">
@@ -24559,56 +24471,72 @@ types and derived types. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of a stream. </p></td>
+ <td><p>The name is the name of a function. </p></td>
</tr>
<tr>
- <td>table_name</td>
+ <td>definition</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The table_name is the name of the table/view that the stream is created on. </p></td>
+ <td><p>The definition is the definition of a function. </p></td>
</tr>
<tr>
- <td>owner</td>
+ <td>signature</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The owner of the stream. </p></td>
+ <td><p>The signature is the name with the number and type of input arguments the
+function takes. </p></td>
</tr>
<tr>
- <td>comment</td>
+ <td>character_set_client</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The comment of the stream. </p></td>
+ <td><p>MySQL specific metadata. </p></td>
</tr>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.StreamMetadata.Type">StreamMetadata.Type</a></td>
+ <td>collation_connection</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The type of the stream. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>stale</td>
- <td><a href="#bool">bool</a></td>
+ <td>database_collation</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Indicates whether the stream was last read before the `stale_after` time. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>mode</td>
- <td><a href="#bytebase.v1.StreamMetadata.Mode">StreamMetadata.Mode</a></td>
+ <td>sql_mode</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The mode of the stream. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>definition</td>
+ <td>comment</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The definition of the stream. </p></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>dependency_tables</td>
+ <td><a href="#bytebase.v1.DependencyTable">DependencyTable</a></td>
+ <td>repeated</td>
+ <td><p>The dependency_tables is the list of dependency tables of a function.
+For PostgreSQL, it&#39;s the list of tables that the function depends on the return type definition. </p></td>
+ </tr>
+
+ <tr>
+ <td>skip_dump</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -24618,7 +24546,7 @@ types and derived types. </p></td>
- <h3 id="bytebase.v1.SyncDatabaseRequest">SyncDatabaseRequest</h3>
+ <h3 id="bytebase.v1.GenerationMetadata">GenerationMetadata</h3>
<p></p>
@@ -24629,11 +24557,17 @@ types and derived types. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.GenerationMetadata.Type">GenerationMetadata.Type</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>expression</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the database to sync.
-Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -24643,17 +24577,10 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance
- <h3 id="bytebase.v1.SyncDatabaseResponse">SyncDatabaseResponse</h3>
+ <h3 id="bytebase.v1.GetDatabaseMetadataRequest">GetDatabaseMetadataRequest</h3>
<p></p>
-
-
-
- <h3 id="bytebase.v1.TableMetadata">TableMetadata</h3>
- <p>TableMetadata is the metadata for tables.</p>
-
-
<table class="field-table">
<thead>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
@@ -24664,149 +24591,120 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of a table. </p></td>
- </tr>
-
- <tr>
- <td>columns</td>
- <td><a href="#bytebase.v1.ColumnMetadata">ColumnMetadata</a></td>
- <td>repeated</td>
- <td><p>The columns is the ordered list of columns in a table. </p></td>
- </tr>
-
- <tr>
- <td>indexes</td>
- <td><a href="#bytebase.v1.IndexMetadata">IndexMetadata</a></td>
- <td>repeated</td>
- <td><p>The indexes is the list of indexes in a table. </p></td>
- </tr>
-
- <tr>
- <td>engine</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The engine is the engine of a table. </p></td>
- </tr>
-
- <tr>
- <td>collation</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The collation is the collation of a table. </p></td>
+ <td><p>The name of the database to retrieve metadata.
+Format: instances/{instance}/databases/{database}/metadata or projects/{project}/instances/{instance}/databases/{database}/metadata </p></td>
</tr>
<tr>
- <td>charset</td>
+ <td>filter</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The character set of table. </p></td>
- </tr>
-
- <tr>
- <td>row_count</td>
- <td><a href="#int64">int64</a></td>
- <td></td>
- <td><p>The row_count is the estimated number of rows of a table. </p></td>
- </tr>
-
- <tr>
- <td>data_size</td>
- <td><a href="#int64">int64</a></td>
- <td></td>
- <td><p>The data_size is the estimated data size of a table. </p></td>
- </tr>
-
- <tr>
- <td>index_size</td>
- <td><a href="#int64">int64</a></td>
- <td></td>
- <td><p>The index_size is the estimated index size of a table. </p></td>
+ <td><p>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 &#34;==&#34; operator.
+- table: the table name, support &#34;==&#34; and &#34;.contains()&#34; operator.
+
+For example:
+schema == &#34;schema-a&#34;
+table == &#34;table-a&#34;
+table.contains(&#34;table-a&#34;)
+schema == &#34;schema-a&#34; &amp;&amp; table.contains(&#34;sample&#34;)
+The filter is used to search for tables containing &#34;sample&#34; in the schema &#34;schemas/schema-a&#34;.
+The column masking level will only be returned when a table filter is used. </p></td>
</tr>
<tr>
- <td>data_free</td>
- <td><a href="#int64">int64</a></td>
+ <td>limit</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The data_free is the estimated free data size of a table. </p></td>
+ <td><p>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. </p></td>
</tr>
- <tr>
- <td>create_options</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The create_options is the create option of a table. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.GetDatabaseRequest">GetDatabaseRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>comment</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The comment is the comment of a table. </p></td>
- </tr>
-
- <tr>
- <td>foreign_keys</td>
- <td><a href="#bytebase.v1.ForeignKeyMetadata">ForeignKeyMetadata</a></td>
- <td>repeated</td>
- <td><p>The foreign_keys is the list of foreign keys in a table. </p></td>
- </tr>
-
- <tr>
- <td>partitions</td>
- <td><a href="#bytebase.v1.TablePartitionMetadata">TablePartitionMetadata</a></td>
- <td>repeated</td>
- <td><p>The partitions is the list of partitions in a table. </p></td>
+ <td><p>The name of the database to retrieve.
+Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} </p></td>
</tr>
- <tr>
- <td>check_constraints</td>
- <td><a href="#bytebase.v1.CheckConstraintMetadata">CheckConstraintMetadata</a></td>
- <td>repeated</td>
- <td><p>The check_constraints is the list of check constraints in a table. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.GetDatabaseSDLSchemaRequest">GetDatabaseSDLSchemaRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>owner</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The owner of the table. </p></td>
- </tr>
-
- <tr>
- <td>sorting_keys</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>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 </p></td>
- </tr>
-
- <tr>
- <td>triggers</td>
- <td><a href="#bytebase.v1.TriggerMetadata">TriggerMetadata</a></td>
- <td>repeated</td>
- <td><p>The triggers is the list of triggers associated with the table. </p></td>
+ <td><p>The name of the database to retrieve SDL schema.
+Format: instances/{instance}/databases/{database}/sdlSchema or projects/{project}/instances/{instance}/databases/{database}/sdlSchema </p></td>
</tr>
<tr>
- <td>skip_dump</td>
- <td><a href="#bool">bool</a></td>
+ <td>format</td>
+ <td><a href="#bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat">GetDatabaseSDLSchemaRequest.SDLFormat</a></td>
<td></td>
- <td><p>Whether to skip this table during schema dump operations. </p></td>
+ <td><p>The format of the SDL schema output. </p></td>
</tr>
- <tr>
- <td>sharding_info</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>https://docs.pingcap.com/tidb/stable/information-schema-tables/ </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.GetDatabaseSchemaRequest">GetDatabaseSchemaRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>primary_key_type</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>https://docs.pingcap.com/tidb/stable/clustered-indexes/#clustered-indexes
-CLUSTERED or NONCLUSTERED. </p></td>
+ <td><p>The name of the database to retrieve schema.
+Format: instances/{instance}/databases/{database}/schema or projects/{project}/instances/{instance}/databases/{database}/schema </p></td>
</tr>
</tbody>
@@ -24816,8 +24714,8 @@ CLUSTERED or NONCLUSTERED. </p></td>
- <h3 id="bytebase.v1.TablePartitionMetadata">TablePartitionMetadata</h3>
- <p>TablePartitionMetadata is the metadata for table partitions.</p>
+ <h3 id="bytebase.v1.GetSchemaStringRequest">GetSchemaStringRequest</h3>
+ <p></p>
<table class="field-table">
@@ -24830,75 +24728,92 @@ CLUSTERED or NONCLUSTERED. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of a table partition. </p></td>
+ <td><p>The name of the database.
+Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} </p></td>
</tr>
<tr>
<td>type</td>
- <td><a href="#bytebase.v1.TablePartitionMetadata.Type">TablePartitionMetadata.Type</a></td>
+ <td><a href="#bytebase.v1.GetSchemaStringRequest.ObjectType">GetSchemaStringRequest.ObjectType</a></td>
<td></td>
- <td><p>The type of a table partition. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>expression</td>
+ <td>schema</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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)} }. </p></td>
+ <td><p>It&#39;s empty for DATABASE. </p></td>
</tr>
<tr>
- <td>value</td>
+ <td>object</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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&#39;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&#39;s VALUES IN clause, which is a list of comma-separated integer
-values.
-- For others, it&#39;s an empty string. </p></td>
+ <td><p>It&#39;s empty for DATABASE and SCHEMA. </p></td>
</tr>
<tr>
- <td>use_default</td>
- <td><a href="#string">string</a></td>
+ <td>metadata</td>
+ <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
<td></td>
- <td><p>The use_default is whether the users use the default partition, it stores
-the different value for different database engines. For MySQL, it&#39;s [INT]
-type, 0 means not use default partition, otherwise, it&#39;s equals to number
-in syntax [SUB]PARTITION {number}. </p></td>
+ <td><p>If use the metadata to generate the schema string, the type is OBJECT_TYPE_UNSPECIFIED.
+Also the schema and object are empty. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.GetSchemaStringResponse">GetSchemaStringResponse</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>subpartitions</td>
- <td><a href="#bytebase.v1.TablePartitionMetadata">TablePartitionMetadata</a></td>
- <td>repeated</td>
- <td><p>The subpartitions is the list of subpartitions in a table partition. </p></td>
+ <td>schema_string</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.GridLevel">GridLevel</h3>
+ <p>GridLevel defines a tessellation grid level with its density.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>indexes</td>
- <td><a href="#bytebase.v1.IndexMetadata">IndexMetadata</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td>level</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>Grid level number (1-4 for SQL Server) </p></td>
</tr>
<tr>
- <td>check_constraints</td>
- <td><a href="#bytebase.v1.CheckConstraintMetadata">CheckConstraintMetadata</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td>density</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Grid density (LOW, MEDIUM, HIGH) </p></td>
</tr>
</tbody>
@@ -24908,8 +24823,8 @@ in syntax [SUB]PARTITION {number}. </p></td>
- <h3 id="bytebase.v1.TaskMetadata">TaskMetadata</h3>
- <p></p>
+ <h3 id="bytebase.v1.IndexMetadata">IndexMetadata</h3>
+ <p>IndexMetadata is the metadata for indexes.</p>
<table class="field-table">
@@ -24922,116 +24837,123 @@ in syntax [SUB]PARTITION {number}. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of a task. </p></td>
+ <td><p>The name is the name of an index. </p></td>
</tr>
<tr>
- <td>id</td>
+ <td>expressions</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The id is the snowflake-generated id of a task.
-Example: 01ad32a0-1bb6-5e93-0000-000000000001 </p></td>
+ <td>repeated</td>
+ <td><p>The expressions are the ordered columns or expressions of an index.
+This could refer to a column or an expression. </p></td>
</tr>
<tr>
- <td>owner</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The owner of the task. </p></td>
+ <td>key_length</td>
+ <td><a href="#int64">int64</a></td>
+ <td>repeated</td>
+ <td><p>The key_lengths are the ordered key lengths of an index.
+If the key length is not specified, it&#39;s -1. </p></td>
</tr>
<tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The comment of the task. </p></td>
+ <td>descending</td>
+ <td><a href="#bool">bool</a></td>
+ <td>repeated</td>
+ <td><p>The descending is the ordered descending of an index. </p></td>
</tr>
<tr>
- <td>warehouse</td>
+ <td>type</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The warehouse of the task. </p></td>
+ <td><p>The type is the type of an index. </p></td>
</tr>
<tr>
- <td>schedule</td>
- <td><a href="#string">string</a></td>
+ <td>unique</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The schedule interval of the task. </p></td>
+ <td><p>The unique is whether the index is unique. </p></td>
</tr>
<tr>
- <td>predecessors</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The predecessor tasks of the task. </p></td>
+ <td>primary</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>The primary is whether the index is a primary key index. </p></td>
</tr>
<tr>
- <td>state</td>
- <td><a href="#bytebase.v1.TaskMetadata.State">TaskMetadata.State</a></td>
+ <td>visible</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The state of the task. </p></td>
+ <td><p>The visible is whether the index is visible. </p></td>
</tr>
<tr>
- <td>condition</td>
+ <td>comment</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The condition of the task. </p></td>
+ <td><p>The comment is the comment of an index. </p></td>
</tr>
<tr>
<td>definition</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The definition of the task. </p></td>
+ <td><p>The definition of an index. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.TessellationConfig">TessellationConfig</h3>
- <p>TessellationConfig defines tessellation parameters for spatial indexes.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>parent_index_schema</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The schema name of the parent index. </p></td>
+ </tr>
<tr>
- <td>scheme</td>
+ <td>parent_index_name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Tessellation scheme (e.g., &#34;GEOMETRY_GRID&#34;, &#34;GEOGRAPHY_GRID&#34;, &#34;GEOMETRY_AUTO_GRID&#34;) </p></td>
+ <td><p>The index name of the parent index. </p></td>
</tr>
<tr>
- <td>grid_levels</td>
- <td><a href="#bytebase.v1.GridLevel">GridLevel</a></td>
- <td>repeated</td>
- <td><p>Grid levels and densities for multi-level tessellation </p></td>
+ <td>granularity</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p>The number of granules in the block. It&#39;s a ClickHouse specific field. </p></td>
</tr>
<tr>
- <td>cells_per_object</td>
- <td><a href="#int32">int32</a></td>
+ <td>is_constraint</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Number of cells per object (1-8192 for SQL Server) </p></td>
+ <td><p>It&#39;s a PostgreSQL specific field.
+The unique constraint and unique index are not the same thing in PostgreSQL. </p></td>
</tr>
<tr>
- <td>bounding_box</td>
- <td><a href="#bytebase.v1.BoundingBox">BoundingBox</a></td>
+ <td>spatial_config</td>
+ <td><a href="#bytebase.v1.SpatialIndexConfig">SpatialIndexConfig</a></td>
<td></td>
- <td><p>Bounding box for GEOMETRY tessellation (not used for GEOGRAPHY) </p></td>
+ <td><p>Spatial index configuration for spatial databases like SQL Server, PostgreSQL with PostGIS, etc. </p></td>
+ </tr>
+
+ <tr>
+ <td>opclass_names</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>https://www.postgresql.org/docs/current/catalog-pg-opclass.html
+Name of the operator class for each column. (PostgreSQL specific). </p></td>
+ </tr>
+
+ <tr>
+ <td>opclass_defaults</td>
+ <td><a href="#bool">bool</a></td>
+ <td>repeated</td>
+ <td><p>True if the operator class is the default. (PostgreSQL specific). </p></td>
</tr>
</tbody>
@@ -25041,7 +24963,7 @@ Example: 01ad32a0-1bb6-5e93-0000-000000000001 </p></td>
- <h3 id="bytebase.v1.TriggerMetadata">TriggerMetadata</h3>
+ <h3 id="bytebase.v1.ListDatabasesRequest">ListDatabasesRequest</h3>
<p></p>
@@ -25052,919 +24974,827 @@ Example: 01ad32a0-1bb6-5e93-0000-000000000001 </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the name of the trigger. </p></td>
- </tr>
-
- <tr>
- <td>event</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The event is the event of the trigger, such as INSERT, UPDATE, DELETE,
-TRUNCATE. </p></td>
+ <td><p>- projects/{project}: list databases in a project, require &#34;bb.projects.get&#34; permission.
+- workspaces/{id}: list databases in the workspace, require &#34;bb.databases.list&#34; permission.
+- instances/{instance}: list databases in an instance, require &#34;bb.instances.get&#34; permission.
+- projects/{project}/instances/{instance}: list databases in a project instance, require &#34;bb.instances.get&#34; permission. </p></td>
</tr>
<tr>
- <td>timing</td>
- <td><a href="#string">string</a></td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The timing is the timing of the trigger, such as BEFORE, AFTER. </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>body</td>
+ <td>page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The body is the body of the trigger. </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>sql_mode</td>
+ <td>filter</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The SQL mode setting for the trigger. </p></td>
- </tr>
-
- <tr>
- <td>character_set_client</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The character set used by the client creating the trigger. </p></td>
- </tr>
-
- <tr>
- <td>collation_connection</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The collation used for the connection when creating the trigger. </p></td>
- </tr>
-
- <tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The comment describing the trigger. </p></td>
- </tr>
-
- <tr>
- <td>skip_dump</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether to skip this trigger during schema dump operations. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.UpdateDatabaseRequest">UpdateDatabaseRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>database</td>
- <td><a href="#bytebase.v1.Database">Database</a></td>
- <td></td>
- <td><p>The database to update.
-
-The database&#39;s `name` field is used to identify the database to update.
-Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} </p></td>
- </tr>
-
- <tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
- <td></td>
- <td><p>The list of fields to update. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ViewMetadata">ViewMetadata</h3>
- <p>ViewMetadata is the metadata for views.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the name of a view. </p></td>
- </tr>
-
- <tr>
- <td>definition</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The definition is the definition of a view. </p></td>
- </tr>
-
- <tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The comment is the comment of a view. </p></td>
- </tr>
-
- <tr>
- <td>dependency_columns</td>
- <td><a href="#bytebase.v1.DependencyColumn">DependencyColumn</a></td>
- <td>repeated</td>
- <td><p>The dependency_columns is the list of dependency columns of a view. </p></td>
- </tr>
-
- <tr>
- <td>columns</td>
- <td><a href="#bytebase.v1.ColumnMetadata">ColumnMetadata</a></td>
- <td>repeated</td>
- <td><p>The columns is the ordered list of columns in a table. </p></td>
- </tr>
-
- <tr>
- <td>triggers</td>
- <td><a href="#bytebase.v1.TriggerMetadata">TriggerMetadata</a></td>
- <td>repeated</td>
- <td><p>The triggers is the list of triggers in a view. </p></td>
- </tr>
-
- <tr>
- <td>skip_dump</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
+ <td><p>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 &#34;environments/{id}&#34; format, support &#34;==&#34; operator.
+- name: the database name, support &#34;.contains()&#34; operator.
+- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
+- instance: the instance full name in &#34;instances/{id}&#34; or &#34;projects/{project}/instances/{id}&#34; format, support &#34;==&#34; operator.
+- engine: the database engine, check Engine enum for values. Support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator.
+- exclude_unassigned: should be &#34;true&#34; or &#34;false&#34;, will not show unassigned databases if it&#39;s true, support &#34;==&#34; operator.
+- table: filter by the database table, support &#34;==&#34; and &#34;.contains()&#34; operator.
+- labels.{key}: the database label, support &#34;==&#34; and &#34;in&#34; operators.
+
+For example:
+environment == &#34;environments/{environment resource id}&#34;
+environment == &#34;&#34; (find databases which environment is not set)
+project == &#34;projects/{project resource id}&#34;
+instance == &#34;instances/{instance resource id}&#34;
+instance == &#34;projects/{project resource id}/instances/{instance resource id}&#34;
+name.contains(&#34;database name&#34;)
+engine == &#34;MYSQL&#34;
+engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;]
+!(engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;])
+exclude_unassigned == true
+table == &#34;sample&#34;
+table.contains(&#34;sam&#34;)
+labels.environment == &#34;production&#34;
+labels.region == &#34;asia&#34;
+labels.region in [&#34;asia&#34;, &#34;europe&#34;]
+
+You can combine filter conditions like:
+environment == &#34;environments/prod&#34; &amp;&amp; name.contains(&#34;employee&#34;) </p></td>
+ </tr>
+
+ <tr>
+ <td>show_deleted</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Show deleted database if specified. </p></td>
+ </tr>
+
+ <tr>
+ <td>order_by</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The order by of databases.
+Support name, project, instance. The default sorting order is ascending.
+For example:
+- order_by = &#34;name&#34; - order by name ascending
+- order_by = &#34;name desc&#34;
+- order_by = &#34;name desc, project asc&#34; </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
- <h3 id="bytebase.v1.ColumnMetadata.IdentityGeneration">ColumnMetadata.IdentityGeneration</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>IDENTITY_GENERATION_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>ALWAYS</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>BY_DEFAULT</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.GenerationMetadata.Type">GenerationMetadata.Type</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>VIRTUAL</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>STORED</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat">GetDatabaseSDLSchemaRequest.SDLFormat</h3>
- <p>SDLFormat specifies the output format for SDL schema.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>SDL_FORMAT_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified format. Defaults to SINGLE_FILE.</p></td>
- </tr>
-
- <tr>
- <td>SINGLE_FILE</td>
- <td>1</td>
- <td><p>Single file format: returns the complete SDL schema as a single file.</p></td>
- </tr>
-
- <tr>
- <td>MULTI_FILE</td>
- <td>2</td>
- <td><p>Multi-file format: returns the SDL schema as a ZIP archive containing
-multiple files organized by schema objects (tables, views, functions, etc.).</p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.GetSchemaStringRequest.ObjectType">GetSchemaStringRequest.ObjectType</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>OBJECT_TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DATABASE</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>SCHEMA</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>TABLE</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>VIEW</td>
- <td>4</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>MATERIALIZED_VIEW</td>
- <td>5</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>FUNCTION</td>
- <td>6</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>PROCEDURE</td>
- <td>7</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>SEQUENCE</td>
- <td>8</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.StreamMetadata.Mode">StreamMetadata.Mode</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>MODE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DEFAULT</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>APPEND_ONLY</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>INSERT_ONLY</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.StreamMetadata.Type">StreamMetadata.Type</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DELTA</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.SyncStatus">SyncStatus</h3>
- <p>SyncStatus is the status of the database sync operation.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>SYNC_STATUS_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>OK</td>
- <td>1</td>
- <td><p>The database was synced successfully.</p></td>
- </tr>
-
- <tr>
- <td>FAILED</td>
- <td>2</td>
- <td><p>The database sync failed.</p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.TablePartitionMetadata.Type">TablePartitionMetadata.Type</h3>
- <p>Type is the type of a table partition, some database engines may not</p><p>support all types. Only avilable for the following database engines now:</p><p>MySQL: RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, LINEAR HASH, KEY,</p><p>LINEAR_KEY</p><p>(https://dev.mysql.com/doc/refman/8.0/en/partitioning-types.html) TiDB:</p><p>RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, KEY PostgreSQL: RANGE,</p><p>LIST, HASH (https://www.postgresql.org/docs/current/ddl-partitioning.html)</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>RANGE</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>RANGE_COLUMNS</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>LIST</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>LIST_COLUMNS</td>
- <td>4</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>HASH</td>
- <td>5</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>LINEAR_HASH</td>
- <td>6</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>KEY</td>
- <td>7</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>LINEAR_KEY</td>
- <td>8</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.TaskMetadata.State">TaskMetadata.State</h3>
+ <h3 id="bytebase.v1.ListDatabasesResponse">ListDatabasesResponse</h3>
<p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>STATE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>STARTED</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>SUSPENDED</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>databases</td>
+ <td><a href="#bytebase.v1.Database">Database</a></td>
+ <td>repeated</td>
+ <td><p>The databases from the specified request. </p></td>
+ </tr>
+
+ <tr>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.MaterializedViewMetadata">MaterializedViewMetadata</h3>
+ <p>MaterializedViewMetadata is the metadata for materialized views.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name is the name of a materialized view. </p></td>
+ </tr>
+
+ <tr>
+ <td>definition</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The definition is the definition of a materialized view. </p></td>
+ </tr>
+
+ <tr>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The comment is the comment of a materialized view. </p></td>
+ </tr>
+
+ <tr>
+ <td>dependency_columns</td>
+ <td><a href="#bytebase.v1.DependencyColumn">DependencyColumn</a></td>
+ <td>repeated</td>
+ <td><p>The dependency_columns is the list of dependency columns of a materialized
+view. </p></td>
+ </tr>
+
+ <tr>
+ <td>triggers</td>
+ <td><a href="#bytebase.v1.TriggerMetadata">TriggerMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The columns is the ordered list of columns in a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>indexes</td>
+ <td><a href="#bytebase.v1.IndexMetadata">IndexMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The indexes is the list of indexes in a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>skip_dump</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.PackageMetadata">PackageMetadata</h3>
+ <p>PackageMetadata is the metadata for packages.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name is the name of a package. </p></td>
+ </tr>
+
+ <tr>
+ <td>definition</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The definition is the definition of a package. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+ <h3 id="bytebase.v1.ProcedureMetadata">ProcedureMetadata</h3>
+ <p>ProcedureMetadata is the metadata for procedures.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name is the name of a procedure. </p></td>
+ </tr>
+
+ <tr>
+ <td>definition</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The definition is the definition of a procedure. </p></td>
+ </tr>
+
+ <tr>
+ <td>signature</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The signature is the name with the number and type of input arguments the
+procedure takes. </p></td>
+ </tr>
+
+ <tr>
+ <td>character_set_client</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>MySQL specific metadata. </p></td>
+ </tr>
+
+ <tr>
+ <td>collation_connection</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>database_collation</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>sql_mode</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The comment is the comment of a procedure. </p></td>
+ </tr>
+
+ <tr>
+ <td>skip_dump</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
-
+
+
- <h3 id="bytebase.v1.DatabaseService">DatabaseService</h3>
- <p>DatabaseService manages databases and their schemas.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>GetDatabase</td>
- <td><a href="#bytebase.v1.GetDatabaseRequest">GetDatabaseRequest</a></td>
- <td><a href="#bytebase.v1.Database">Database</a></td>
- <td><p>Retrieves a database by name.
-Permissions required: bb.databases.get</p></td>
- </tr>
-
- <tr>
- <td>BatchGetDatabases</td>
- <td><a href="#bytebase.v1.BatchGetDatabasesRequest">BatchGetDatabasesRequest</a></td>
- <td><a href="#bytebase.v1.BatchGetDatabasesResponse">BatchGetDatabasesResponse</a></td>
- <td><p>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&#39;s project)</p></td>
- </tr>
-
- <tr>
- <td>ListDatabases</td>
- <td><a href="#bytebase.v1.ListDatabasesRequest">ListDatabasesRequest</a></td>
- <td><a href="#bytebase.v1.ListDatabasesResponse">ListDatabasesResponse</a></td>
- <td><p>Lists databases in a project, instance, or workspace.
-Permissions required: bb.projects.get (for project parent), bb.databases.list (for workspace parent), or bb.instances.get (for instance parent)</p></td>
- </tr>
-
- <tr>
- <td>UpdateDatabase</td>
- <td><a href="#bytebase.v1.UpdateDatabaseRequest">UpdateDatabaseRequest</a></td>
- <td><a href="#bytebase.v1.Database">Database</a></td>
- <td><p>Updates database properties such as labels and project assignment.
-Permissions required: bb.databases.update</p></td>
- </tr>
-
- <tr>
- <td>BatchUpdateDatabases</td>
- <td><a href="#bytebase.v1.BatchUpdateDatabasesRequest">BatchUpdateDatabasesRequest</a></td>
- <td><a href="#bytebase.v1.BatchUpdateDatabasesResponse">BatchUpdateDatabasesResponse</a></td>
- <td><p>Updates multiple databases in a single batch operation.
-Permissions required: bb.databases.update</p></td>
- </tr>
-
- <tr>
- <td>SyncDatabase</td>
- <td><a href="#bytebase.v1.SyncDatabaseRequest">SyncDatabaseRequest</a></td>
- <td><a href="#bytebase.v1.SyncDatabaseResponse">SyncDatabaseResponse</a></td>
- <td><p>Synchronizes database schema from the instance.
-Permissions required: bb.databases.sync</p></td>
- </tr>
-
- <tr>
- <td>BatchSyncDatabases</td>
- <td><a href="#bytebase.v1.BatchSyncDatabasesRequest">BatchSyncDatabasesRequest</a></td>
- <td><a href="#bytebase.v1.BatchSyncDatabasesResponse">BatchSyncDatabasesResponse</a></td>
- <td><p>Synchronizes multiple databases in a single batch operation.
-Permissions required: bb.databases.sync</p></td>
- </tr>
-
- <tr>
- <td>GetDatabaseMetadata</td>
- <td><a href="#bytebase.v1.GetDatabaseMetadataRequest">GetDatabaseMetadataRequest</a></td>
- <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
- <td><p>Retrieves database metadata including tables, columns, and indexes.
-Permissions required: bb.databases.getSchema</p></td>
- </tr>
-
- <tr>
- <td>GetDatabaseSchema</td>
- <td><a href="#bytebase.v1.GetDatabaseSchemaRequest">GetDatabaseSchemaRequest</a></td>
- <td><a href="#bytebase.v1.DatabaseSchema">DatabaseSchema</a></td>
- <td><p>Retrieves database schema as DDL statements.
-Permissions required: bb.databases.getSchema</p></td>
- </tr>
-
- <tr>
- <td>GetDatabaseSDLSchema</td>
- <td><a href="#bytebase.v1.GetDatabaseSDLSchemaRequest">GetDatabaseSDLSchemaRequest</a></td>
- <td><a href="#bytebase.v1.DatabaseSDLSchema">DatabaseSDLSchema</a></td>
- <td><p>Retrieves database schema in SDL (Schema Definition Language) format.
-Permissions required: bb.databases.getSchema</p></td>
- </tr>
-
- <tr>
- <td>DiffSchema</td>
- <td><a href="#bytebase.v1.DiffSchemaRequest">DiffSchemaRequest</a></td>
- <td><a href="#bytebase.v1.DiffSchemaResponse">DiffSchemaResponse</a></td>
- <td><p>Compares and generates migration statements between two schemas.
-Permissions required: bb.databases.get</p></td>
- </tr>
-
- <tr>
- <td>DiffMetadata</td>
- <td><a href="#bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</a></td>
- <td><a href="#bytebase.v1.DiffMetadataResponse">DiffMetadataResponse</a></td>
- <td><p>Generates migration statements from the database&#39;s current schema to the
-given target metadata.
-Permissions required: bb.databases.diffMetadata</p></td>
- </tr>
-
- <tr>
- <td>GetSchemaString</td>
- <td><a href="#bytebase.v1.GetSchemaStringRequest">GetSchemaStringRequest</a></td>
- <td><a href="#bytebase.v1.GetSchemaStringResponse">GetSchemaStringResponse</a></td>
- <td><p>Generates schema DDL for a database object.
-Permissions required: bb.databases.getSchema</p></td>
- </tr>
-
- </tbody>
- </table>
+ <h3 id="bytebase.v1.SchemaMetadata">SchemaMetadata</h3>
+ <p>SchemaMetadata is the metadata for schemas.</p><p>This is the concept of schema in Postgres, but it's a no-op for MySQL.</p>
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
+ <table class="field-table">
<thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>
-
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name is the schema name.
+It is an empty string for databases without such concept such as MySQL. </p></td>
+ </tr>
- <tr>
- <td>GetDatabase</td>
- <td>GET</td>
- <td>/v1/{name=instances/*/databases/*}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>tables</td>
+ <td><a href="#bytebase.v1.TableMetadata">TableMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The tables is the list of tables in a schema. </p></td>
+ </tr>
- <tr>
- <td>GetDatabase</td>
- <td>GET</td>
- <td>/v1/{name=projects/*/instances/*/databases/*}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>external_tables</td>
+ <td><a href="#bytebase.v1.ExternalTableMetadata">ExternalTableMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The external_tables is the list of external tables in a schema. </p></td>
+ </tr>
-
+ <tr>
+ <td>views</td>
+ <td><a href="#bytebase.v1.ViewMetadata">ViewMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The views is the list of views in a schema. </p></td>
+ </tr>
+ <tr>
+ <td>functions</td>
+ <td><a href="#bytebase.v1.FunctionMetadata">FunctionMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The functions is the list of functions in a schema. </p></td>
+ </tr>
- <tr>
- <td>BatchGetDatabases</td>
- <td>GET</td>
- <td>/v1/{parent=projects/*}/databases:batchGet</td>
- <td></td>
- </tr>
+ <tr>
+ <td>procedures</td>
+ <td><a href="#bytebase.v1.ProcedureMetadata">ProcedureMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The procedures is the list of procedures in a schema. </p></td>
+ </tr>
+
+ <tr>
+ <td>streams</td>
+ <td><a href="#bytebase.v1.StreamMetadata">StreamMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The streams is the list of streams in a schema, currently, only used for
+Snowflake. </p></td>
+ </tr>
+
+ <tr>
+ <td>tasks</td>
+ <td><a href="#bytebase.v1.TaskMetadata">TaskMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The routines is the list of routines in a schema, currently, only used for
+Snowflake. </p></td>
+ </tr>
+
+ <tr>
+ <td>materialized_views</td>
+ <td><a href="#bytebase.v1.MaterializedViewMetadata">MaterializedViewMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The materialized_views is the list of materialized views in a schema. </p></td>
+ </tr>
+
+ <tr>
+ <td>packages</td>
+ <td><a href="#bytebase.v1.PackageMetadata">PackageMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The packages is the list of packages in a schema. </p></td>
+ </tr>
+
+ <tr>
+ <td>owner</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The owner of the schema. </p></td>
+ </tr>
+
+ <tr>
+ <td>sequences</td>
+ <td><a href="#bytebase.v1.SequenceMetadata">SequenceMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The sequences is the list of sequences in a schema, sorted by name. </p></td>
+ </tr>
- <tr>
- <td>BatchGetDatabases</td>
- <td>GET</td>
- <td>/v1/{parent=instances/*}/databases:batchGet</td>
- <td></td>
- </tr>
+ <tr>
+ <td>events</td>
+ <td><a href="#bytebase.v1.EventMetadata">EventMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The events is the list of scheduled events in a schema. </p></td>
+ </tr>
- <tr>
- <td>BatchGetDatabases</td>
- <td>GET</td>
- <td>/v1/{parent=projects/*/instances/*}/databases:batchGet</td>
- <td></td>
- </tr>
+ <tr>
+ <td>enum_types</td>
+ <td><a href="#bytebase.v1.EnumTypeMetadata">EnumTypeMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The enum_types is the list of user-defined enum types in a schema. </p></td>
+ </tr>
-
+ <tr>
+ <td>skip_dump</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to skip this schema during schema dump operations. </p></td>
+ </tr>
+ <tr>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The comment is the comment of a schema. </p></td>
+ </tr>
- <tr>
- <td>ListDatabases</td>
- <td>GET</td>
- <td>/v1/{parent=projects/*}/databases</td>
- <td></td>
- </tr>
+ <tr>
+ <td>composite_types</td>
+ <td><a href="#bytebase.v1.CompositeTypeMetadata">CompositeTypeMetadata</a></td>
+ <td>repeated</td>
+ <td><p>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. </p></td>
+ </tr>
- <tr>
- <td>ListDatabases</td>
- <td>GET</td>
- <td>/v1/{parent=instances/*}/databases</td>
- <td></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.SequenceMetadata">SequenceMetadata</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
- <tr>
- <td>ListDatabases</td>
- <td>GET</td>
- <td>/v1/{parent=workspaces/*}/databases</td>
- <td></td>
- </tr>
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of a sequence. </p></td>
+ </tr>
- <tr>
- <td>ListDatabases</td>
- <td>GET</td>
- <td>/v1/{parent=projects/*/instances/*}/databases</td>
- <td></td>
- </tr>
+ <tr>
+ <td>data_type</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The data type of a sequence. </p></td>
+ </tr>
-
+ <tr>
+ <td>start</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The start value of a sequence. </p></td>
+ </tr>
+ <tr>
+ <td>min_value</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The minimum value of a sequence. </p></td>
+ </tr>
- <tr>
- <td>UpdateDatabase</td>
- <td>PATCH</td>
- <td>/v1/{database.name=instances/*/databases/*}</td>
- <td>database</td>
- </tr>
+ <tr>
+ <td>max_value</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The maximum value of a sequence. </p></td>
+ </tr>
- <tr>
- <td>UpdateDatabase</td>
- <td>PATCH</td>
- <td>/v1/{database.name=projects/*/instances/*/databases/*}</td>
- <td>database</td>
- </tr>
+ <tr>
+ <td>increment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Increment value of a sequence. </p></td>
+ </tr>
-
+ <tr>
+ <td>cycle</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Cycle is whether the sequence cycles. </p></td>
+ </tr>
+ <tr>
+ <td>cache_size</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Cache size of a sequence. </p></td>
+ </tr>
- <tr>
- <td>BatchUpdateDatabases</td>
- <td>POST</td>
- <td>/v1/{parent=instances/*}/databases:batchUpdate</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>last_value</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Last value of a sequence. </p></td>
+ </tr>
- <tr>
- <td>BatchUpdateDatabases</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*/instances/*}/databases:batchUpdate</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>owner_table</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The owner table of the sequence. </p></td>
+ </tr>
-
+ <tr>
+ <td>owner_column</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The owner column of the sequence. </p></td>
+ </tr>
+ <tr>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The comment describing the sequence. </p></td>
+ </tr>
- <tr>
- <td>SyncDatabase</td>
- <td>POST</td>
- <td>/v1/{name=instances/*/databases/*}:sync</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>skip_dump</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to skip this sequence during schema dump operations. </p></td>
+ </tr>
- <tr>
- <td>SyncDatabase</td>
- <td>POST</td>
- <td>/v1/{name=projects/*/instances/*/databases/*}:sync</td>
- <td>*</td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.SpatialIndexConfig">SpatialIndexConfig</h3>
+ <p>SpatialIndexConfig defines the spatial index configuration for spatial databases.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
-
+ <tr>
+ <td>method</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Spatial indexing method (e.g., &#34;SPATIAL&#34;, &#34;R-TREE&#34;, &#34;GIST&#34;) </p></td>
+ </tr>
+ <tr>
+ <td>tessellation</td>
+ <td><a href="#bytebase.v1.TessellationConfig">TessellationConfig</a></td>
+ <td></td>
+ <td><p>Tessellation configuration for grid-based spatial indexes </p></td>
+ </tr>
- <tr>
- <td>BatchSyncDatabases</td>
- <td>POST</td>
- <td>/v1/{parent=instances/*}/databases:batchSync</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>storage</td>
+ <td><a href="#bytebase.v1.StorageConfig">StorageConfig</a></td>
+ <td></td>
+ <td><p>Storage and performance configuration </p></td>
+ </tr>
- <tr>
- <td>BatchSyncDatabases</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*/instances/*}/databases:batchSync</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>dimensional</td>
+ <td><a href="#bytebase.v1.DimensionalConfig">DimensionalConfig</a></td>
+ <td></td>
+ <td><p>Dimensional configuration </p></td>
+ </tr>
-
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.StorageConfig">StorageConfig</h3>
+ <p>StorageConfig defines storage and performance parameters for spatial indexes.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>fillfactor</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>Fill factor percentage (1-100) </p></td>
+ </tr>
- <tr>
- <td>GetDatabaseMetadata</td>
- <td>GET</td>
- <td>/v1/{name=instances/*/databases/*/metadata}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>buffering</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Buffering mode for PostgreSQL (auto, on, off) </p></td>
+ </tr>
- <tr>
- <td>GetDatabaseMetadata</td>
- <td>GET</td>
- <td>/v1/{name=projects/*/instances/*/databases/*/metadata}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>tablespace</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Tablespace configuration for Oracle </p></td>
+ </tr>
-
+ <tr>
+ <td>work_tablespace</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+ <tr>
+ <td>sdo_level</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
- <tr>
- <td>GetDatabaseSchema</td>
- <td>GET</td>
- <td>/v1/{name=instances/*/databases/*/schema}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>commit_interval</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
- <tr>
- <td>GetDatabaseSchema</td>
- <td>GET</td>
- <td>/v1/{name=projects/*/instances/*/databases/*/schema}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>pad_index</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>SQL Server specific parameters </p></td>
+ </tr>
-
+ <tr>
+ <td>sort_in_tempdb</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>ON, OFF </p></td>
+ </tr>
+ <tr>
+ <td>drop_existing</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
- <tr>
- <td>GetDatabaseSDLSchema</td>
- <td>GET</td>
- <td>/v1/{name=instances/*/databases/*/sdlSchema}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>online</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
- <tr>
- <td>GetDatabaseSDLSchema</td>
- <td>GET</td>
- <td>/v1/{name=projects/*/instances/*/databases/*/sdlSchema}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>allow_row_locks</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
-
+ <tr>
+ <td>allow_page_locks</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+ <tr>
+ <td>maxdop</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
- <tr>
- <td>DiffSchema</td>
- <td>POST</td>
- <td>/v1/{name=instances/*/databases/*}:diffSchema</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>data_compression</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>NONE, ROW, PAGE </p></td>
+ </tr>
- <tr>
- <td>DiffSchema</td>
- <td>POST</td>
- <td>/v1/{name=projects/*/instances/*/databases/*}:diffSchema</td>
- <td>*</td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.StreamMetadata">StreamMetadata</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
- <tr>
- <td>DiffSchema</td>
- <td>POST</td>
- <td>/v1/{name=instances/*/databases/*/changelogs/*}:diffSchema</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name is the name of a stream. </p></td>
+ </tr>
- <tr>
- <td>DiffSchema</td>
- <td>POST</td>
- <td>/v1/{name=projects/*/instances/*/databases/*/changelogs/*}:diffSchema</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>table_name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The table_name is the name of the table/view that the stream is created on. </p></td>
+ </tr>
-
+ <tr>
+ <td>owner</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The owner of the stream. </p></td>
+ </tr>
+ <tr>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The comment of the stream. </p></td>
+ </tr>
- <tr>
- <td>DiffMetadata</td>
- <td>POST</td>
- <td>/v1/{name=instances/*/databases/*}:diffMetadata</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>type</td>
+ <td><a href="#bytebase.v1.StreamMetadata.Type">StreamMetadata.Type</a></td>
+ <td></td>
+ <td><p>The type of the stream. </p></td>
+ </tr>
- <tr>
- <td>DiffMetadata</td>
- <td>POST</td>
- <td>/v1/{name=projects/*/instances/*/databases/*}:diffMetadata</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>stale</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Indicates whether the stream was last read before the `stale_after` time. </p></td>
+ </tr>
-
+ <tr>
+ <td>mode</td>
+ <td><a href="#bytebase.v1.StreamMetadata.Mode">StreamMetadata.Mode</a></td>
+ <td></td>
+ <td><p>The mode of the stream. </p></td>
+ </tr>
+ <tr>
+ <td>definition</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The definition of the stream. </p></td>
+ </tr>
- <tr>
- <td>GetSchemaString</td>
- <td>GET</td>
- <td>/v1/{name=instances/*/databases/*/schemaString}</td>
- <td></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.SyncDatabaseRequest">SyncDatabaseRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
- <tr>
- <td>GetSchemaString</td>
- <td>GET</td>
- <td>/v1/{name=projects/*/instances/*/databases/*/schemaString}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the database to sync.
+Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} </p></td>
+ </tr>
-
</tbody>
</table>
+
+
-
- <div class="file-heading">
- <h2 id="v1/group_service.proto">v1/group_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
+ <h3 id="bytebase.v1.SyncDatabaseResponse">SyncDatabaseResponse</h3>
+ <p></p>
+
+
+
- <h3 id="bytebase.v1.BatchGetGroupsRequest">BatchGetGroupsRequest</h3>
- <p>Request message for batch getting groups.</p>
+ <h3 id="bytebase.v1.TableMetadata">TableMetadata</h3>
+ <p>TableMetadata is the metadata for tables.</p>
<table class="field-table">
@@ -25974,11 +25804,152 @@ Permissions required: bb.databases.getSchema</p></td>
<tbody>
<tr>
- <td>names</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name is the name of a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>columns</td>
+ <td><a href="#bytebase.v1.ColumnMetadata">ColumnMetadata</a></td>
<td>repeated</td>
- <td><p>The group names to retrieve.
-Format: groups/{email} </p></td>
+ <td><p>The columns is the ordered list of columns in a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>indexes</td>
+ <td><a href="#bytebase.v1.IndexMetadata">IndexMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The indexes is the list of indexes in a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>engine</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The engine is the engine of a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>collation</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The collation is the collation of a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>charset</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The character set of table. </p></td>
+ </tr>
+
+ <tr>
+ <td>row_count</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p>The row_count is the estimated number of rows of a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>data_size</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p>The data_size is the estimated data size of a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>index_size</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p>The index_size is the estimated index size of a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>data_free</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p>The data_free is the estimated free data size of a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>create_options</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The create_options is the create option of a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The comment is the comment of a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>foreign_keys</td>
+ <td><a href="#bytebase.v1.ForeignKeyMetadata">ForeignKeyMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The foreign_keys is the list of foreign keys in a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>partitions</td>
+ <td><a href="#bytebase.v1.TablePartitionMetadata">TablePartitionMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The partitions is the list of partitions in a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>check_constraints</td>
+ <td><a href="#bytebase.v1.CheckConstraintMetadata">CheckConstraintMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The check_constraints is the list of check constraints in a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>owner</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The owner of the table. </p></td>
+ </tr>
+
+ <tr>
+ <td>sorting_keys</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>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 </p></td>
+ </tr>
+
+ <tr>
+ <td>triggers</td>
+ <td><a href="#bytebase.v1.TriggerMetadata">TriggerMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The triggers is the list of triggers associated with the table. </p></td>
+ </tr>
+
+ <tr>
+ <td>skip_dump</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to skip this table during schema dump operations. </p></td>
+ </tr>
+
+ <tr>
+ <td>sharding_info</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>https://docs.pingcap.com/tidb/stable/information-schema-tables/ </p></td>
+ </tr>
+
+ <tr>
+ <td>primary_key_type</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>https://docs.pingcap.com/tidb/stable/clustered-indexes/#clustered-indexes
+CLUSTERED or NONCLUSTERED. </p></td>
</tr>
</tbody>
@@ -25988,8 +25959,8 @@ Format: groups/{email} </p></td>
- <h3 id="bytebase.v1.BatchGetGroupsResponse">BatchGetGroupsResponse</h3>
- <p>Response message for batch getting groups.</p>
+ <h3 id="bytebase.v1.TablePartitionMetadata">TablePartitionMetadata</h3>
+ <p>TablePartitionMetadata is the metadata for table partitions.</p>
<table class="field-table">
@@ -25999,10 +25970,78 @@ Format: groups/{email} </p></td>
<tbody>
<tr>
- <td>groups</td>
- <td><a href="#bytebase.v1.Group">Group</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name is the name of a table partition. </p></td>
+ </tr>
+
+ <tr>
+ <td>type</td>
+ <td><a href="#bytebase.v1.TablePartitionMetadata.Type">TablePartitionMetadata.Type</a></td>
+ <td></td>
+ <td><p>The type of a table partition. </p></td>
+ </tr>
+
+ <tr>
+ <td>expression</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>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)} }. </p></td>
+ </tr>
+
+ <tr>
+ <td>value</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>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&#39;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&#39;s VALUES IN clause, which is a list of comma-separated integer
+values.
+- For others, it&#39;s an empty string. </p></td>
+ </tr>
+
+ <tr>
+ <td>use_default</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The use_default is whether the users use the default partition, it stores
+the different value for different database engines. For MySQL, it&#39;s [INT]
+type, 0 means not use default partition, otherwise, it&#39;s equals to number
+in syntax [SUB]PARTITION {number}. </p></td>
+ </tr>
+
+ <tr>
+ <td>subpartitions</td>
+ <td><a href="#bytebase.v1.TablePartitionMetadata">TablePartitionMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The subpartitions is the list of subpartitions in a table partition. </p></td>
+ </tr>
+
+ <tr>
+ <td>indexes</td>
+ <td><a href="#bytebase.v1.IndexMetadata">IndexMetadata</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>check_constraints</td>
+ <td><a href="#bytebase.v1.CheckConstraintMetadata">CheckConstraintMetadata</a></td>
<td>repeated</td>
- <td><p>One group per requested name, in the same order as `names`. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -26012,8 +26051,8 @@ Format: groups/{email} </p></td>
- <h3 id="bytebase.v1.CreateGroupRequest">CreateGroupRequest</h3>
- <p>Request message for creating a group.</p>
+ <h3 id="bytebase.v1.TaskMetadata">TaskMetadata</h3>
+ <p></p>
<table class="field-table">
@@ -26023,128 +26062,74 @@ Format: groups/{email} </p></td>
<tbody>
<tr>
- <td>group</td>
- <td><a href="#bytebase.v1.Group">Group</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The group to create. </p></td>
+ <td><p>The name is the name of a task. </p></td>
</tr>
<tr>
- <td>group_email</td>
+ <td>id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The email to use for the group, which will become the final component
-of the group&#39;s resource name. </p></td>
+ <td><p>The id is the snowflake-generated id of a task.
+Example: 01ad32a0-1bb6-5e93-0000-000000000001 </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.DeleteGroupRequest">DeleteGroupRequest</h3>
- <p>Request message for deleting a group.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>name</td>
+ <td>owner</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the group to delete.
-Format: groups/{email} </p></td>
+ <td><p>The owner of the task. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.GetGroupRequest">GetGroupRequest</h3>
- <p>Request message for getting a group.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>name</td>
+ <td>comment</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the group to retrieve.
-Format: groups/{email} </p></td>
+ <td><p>The comment of the task. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.Group">Group</h3>
- <p>A group of users within the workspace.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>name</td>
+ <td>warehouse</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the group to retrieve.
-Format: groups/{group}, the group should be email or uuid. </p></td>
+ <td><p>The warehouse of the task. </p></td>
</tr>
<tr>
- <td>title</td>
+ <td>schedule</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The display title of the group. </p></td>
+ <td><p>The schedule interval of the task. </p></td>
</tr>
<tr>
- <td>description</td>
+ <td>predecessors</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The description of the group. </p></td>
+ <td>repeated</td>
+ <td><p>The predecessor tasks of the task. </p></td>
</tr>
<tr>
- <td>members</td>
- <td><a href="#bytebase.v1.GroupMember">GroupMember</a></td>
- <td>repeated</td>
- <td><p>The members of the group. </p></td>
+ <td>state</td>
+ <td><a href="#bytebase.v1.TaskMetadata.State">TaskMetadata.State</a></td>
+ <td></td>
+ <td><p>The state of the task. </p></td>
</tr>
<tr>
- <td>source</td>
+ <td>condition</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The source system where the group originated (e.g., Entra ID for SCIM sync). </p></td>
+ <td><p>The condition of the task. </p></td>
</tr>
<tr>
- <td>email</td>
+ <td>definition</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The unique email for the group. </p></td>
+ <td><p>The definition of the task. </p></td>
</tr>
</tbody>
@@ -26154,8 +26139,8 @@ Format: groups/{group}, the group should be email or uuid. </p></td>
- <h3 id="bytebase.v1.GroupMember">GroupMember</h3>
- <p>A member of a group with a role.</p>
+ <h3 id="bytebase.v1.TessellationConfig">TessellationConfig</h3>
+ <p>TessellationConfig defines tessellation parameters for spatial indexes.</p>
<table class="field-table">
@@ -26165,19 +26150,31 @@ Format: groups/{group}, the group should be email or uuid. </p></td>
<tbody>
<tr>
- <td>member</td>
+ <td>scheme</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Member is the principal who belong to this group.
-
-Format: users/[email protected] </p></td>
+ <td><p>Tessellation scheme (e.g., &#34;GEOMETRY_GRID&#34;, &#34;GEOGRAPHY_GRID&#34;, &#34;GEOMETRY_AUTO_GRID&#34;) </p></td>
</tr>
<tr>
- <td>role</td>
- <td><a href="#bytebase.v1.GroupMember.Role">GroupMember.Role</a></td>
+ <td>grid_levels</td>
+ <td><a href="#bytebase.v1.GridLevel">GridLevel</a></td>
+ <td>repeated</td>
+ <td><p>Grid levels and densities for multi-level tessellation </p></td>
+ </tr>
+
+ <tr>
+ <td>cells_per_object</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The member&#39;s role in the group. </p></td>
+ <td><p>Number of cells per object (1-8192 for SQL Server) </p></td>
+ </tr>
+
+ <tr>
+ <td>bounding_box</td>
+ <td><a href="#bytebase.v1.BoundingBox">BoundingBox</a></td>
+ <td></td>
+ <td><p>Bounding box for GEOMETRY tessellation (not used for GEOGRAPHY) </p></td>
</tr>
</tbody>
@@ -26187,8 +26184,8 @@ Format: users/[email protected] </p></td>
- <h3 id="bytebase.v1.ListGroupsRequest">ListGroupsRequest</h3>
- <p>Request message for listing groups.</p>
+ <h3 id="bytebase.v1.TriggerMetadata">TriggerMetadata</h3>
+ <p></p>
<table class="field-table">
@@ -26198,46 +26195,67 @@ Format: users/[email protected] </p></td>
<tbody>
<tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>The name is the name of the trigger. </p></td>
</tr>
<tr>
- <td>page_token</td>
+ <td>event</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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. </p></td>
+ <td><p>The event is the event of the trigger, such as INSERT, UPDATE, DELETE,
+TRUNCATE. </p></td>
</tr>
<tr>
- <td>filter</td>
+ <td>timing</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>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 &#34;==&#34; and &#34;.contains()&#34; operator.
-- email: the group email, support &#34;==&#34; and &#34;.contains()&#34; operator.
-- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
-
-For example:
-title == &#34;dba&#34;
-email == &#34;[email protected]&#34;
-title.contains(&#34;dba&#34;)
-email.contains(&#34;dba&#34;)
-project == &#34;projects/sample-project&#34;
-You can combine filter conditions like:
-title.contains(&#34;dba&#34;) || email.contains(&#34;dba&#34;) </p></td>
+ <td><p>The timing is the timing of the trigger, such as BEFORE, AFTER. </p></td>
+ </tr>
+
+ <tr>
+ <td>body</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The body is the body of the trigger. </p></td>
+ </tr>
+
+ <tr>
+ <td>sql_mode</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The SQL mode setting for the trigger. </p></td>
+ </tr>
+
+ <tr>
+ <td>character_set_client</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The character set used by the client creating the trigger. </p></td>
+ </tr>
+
+ <tr>
+ <td>collation_connection</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The collation used for the connection when creating the trigger. </p></td>
+ </tr>
+
+ <tr>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The comment describing the trigger. </p></td>
+ </tr>
+
+ <tr>
+ <td>skip_dump</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to skip this trigger during schema dump operations. </p></td>
</tr>
</tbody>
@@ -26247,8 +26265,8 @@ title.contains(&#34;dba&#34;) || email.contains(&#34;dba&#34;) </p></td>
- <h3 id="bytebase.v1.ListGroupsResponse">ListGroupsResponse</h3>
- <p>Response message for listing groups.</p>
+ <h3 id="bytebase.v1.UpdateDatabaseRequest">UpdateDatabaseRequest</h3>
+ <p></p>
<table class="field-table">
@@ -26258,18 +26276,20 @@ title.contains(&#34;dba&#34;) || email.contains(&#34;dba&#34;) </p></td>
<tbody>
<tr>
- <td>groups</td>
- <td><a href="#bytebase.v1.Group">Group</a></td>
- <td>repeated</td>
- <td><p>The groups from the specified request. </p></td>
+ <td>database</td>
+ <td><a href="#bytebase.v1.Database">Database</a></td>
+ <td></td>
+ <td><p>The database to update.
+
+The database&#39;s `name` field is used to identify the database to update.
+Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} </p></td>
</tr>
<tr>
- <td>next_page_token</td>
- <td><a href="#string">string</a></td>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
<td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td><p>The list of fields to update. </p></td>
</tr>
</tbody>
@@ -26279,8 +26299,8 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.UpdateGroupRequest">UpdateGroupRequest</h3>
- <p>Request message for updating a group.</p>
+ <h3 id="bytebase.v1.ViewMetadata">ViewMetadata</h3>
+ <p>ViewMetadata is the metadata for views.</p>
<table class="field-table">
@@ -26290,28 +26310,52 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>group</td>
- <td><a href="#bytebase.v1.Group">Group</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The group to update.
-
-The group&#39;s `name` field is used to identify the group to update.
-Format: groups/{email} </p></td>
+ <td><p>The name is the name of a view. </p></td>
</tr>
<tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td>definition</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The list of fields to update. </p></td>
+ <td><p>The definition is the definition of a view. </p></td>
</tr>
<tr>
- <td>allow_missing</td>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The comment is the comment of a view. </p></td>
+ </tr>
+
+ <tr>
+ <td>dependency_columns</td>
+ <td><a href="#bytebase.v1.DependencyColumn">DependencyColumn</a></td>
+ <td>repeated</td>
+ <td><p>The dependency_columns is the list of dependency columns of a view. </p></td>
+ </tr>
+
+ <tr>
+ <td>columns</td>
+ <td><a href="#bytebase.v1.ColumnMetadata">ColumnMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The columns is the ordered list of columns in a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>triggers</td>
+ <td><a href="#bytebase.v1.TriggerMetadata">TriggerMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The triggers is the list of triggers in a view. </p></td>
+ </tr>
+
+ <tr>
+ <td>skip_dump</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>If set to true, and the group is not found, a new group will be created.
-In this situation, `update_mask` is ignored. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -26321,10 +26365,250 @@ In this situation, `update_mask` is ignored. </p></td>
-
+
+
+ <h3 id="bytebase.v1.ColumnMetadata.IdentityGeneration">ColumnMetadata.IdentityGeneration</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>IDENTITY_GENERATION_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>ALWAYS</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>BY_DEFAULT</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.GenerationMetadata.Type">GenerationMetadata.Type</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>VIRTUAL</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>STORED</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat">GetDatabaseSDLSchemaRequest.SDLFormat</h3>
+ <p>SDLFormat specifies the output format for SDL schema.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>SDL_FORMAT_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified format. Defaults to SINGLE_FILE.</p></td>
+ </tr>
+
+ <tr>
+ <td>SINGLE_FILE</td>
+ <td>1</td>
+ <td><p>Single file format: returns the complete SDL schema as a single file.</p></td>
+ </tr>
+
+ <tr>
+ <td>MULTI_FILE</td>
+ <td>2</td>
+ <td><p>Multi-file format: returns the SDL schema as a ZIP archive containing
+multiple files organized by schema objects (tables, views, functions, etc.).</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.GetSchemaStringRequest.ObjectType">GetSchemaStringRequest.ObjectType</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>OBJECT_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DATABASE</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>SCHEMA</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>TABLE</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>VIEW</td>
+ <td>4</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>MATERIALIZED_VIEW</td>
+ <td>5</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>FUNCTION</td>
+ <td>6</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>PROCEDURE</td>
+ <td>7</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>SEQUENCE</td>
+ <td>8</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.StreamMetadata.Mode">StreamMetadata.Mode</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>MODE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DEFAULT</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>APPEND_ONLY</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>INSERT_ONLY</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.StreamMetadata.Type">StreamMetadata.Type</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DELTA</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.SyncStatus">SyncStatus</h3>
+ <p>SyncStatus is the status of the database sync operation.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>SYNC_STATUS_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>OK</td>
+ <td>1</td>
+ <td><p>The database was synced successfully.</p></td>
+ </tr>
+
+ <tr>
+ <td>FAILED</td>
+ <td>2</td>
+ <td><p>The database sync failed.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.v1.GroupMember.Role">GroupMember.Role</h3>
- <p>The role of a group member.</p>
+ <h3 id="bytebase.v1.TablePartitionMetadata.Type">TablePartitionMetadata.Type</h3>
+ <p>Type is the type of a table partition, some database engines may not</p><p>support all types. Only avilable for the following database engines now:</p><p>MySQL: RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, LINEAR HASH, KEY,</p><p>LINEAR_KEY</p><p>(https://dev.mysql.com/doc/refman/8.0/en/partitioning-types.html) TiDB:</p><p>RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, KEY PostgreSQL: RANGE,</p><p>LIST, HASH (https://www.postgresql.org/docs/current/ddl-partitioning.html)</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -26332,21 +26616,86 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>ROLE_UNSPECIFIED</td>
+ <td>TYPE_UNSPECIFIED</td>
<td>0</td>
- <td><p>Unspecified role.</p></td>
+ <td><p></p></td>
</tr>
<tr>
- <td>OWNER</td>
+ <td>RANGE</td>
<td>1</td>
- <td><p>Group owner.</p></td>
+ <td><p></p></td>
</tr>
<tr>
- <td>MEMBER</td>
+ <td>RANGE_COLUMNS</td>
<td>2</td>
- <td><p>Group member.</p></td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>LIST</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>LIST_COLUMNS</td>
+ <td>4</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>HASH</td>
+ <td>5</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>LINEAR_HASH</td>
+ <td>6</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>KEY</td>
+ <td>7</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>LINEAR_KEY</td>
+ <td>8</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.TaskMetadata.State">TaskMetadata.State</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>STATE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>STARTED</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>SUSPENDED</td>
+ <td>2</td>
+ <td><p></p></td>
</tr>
</tbody>
@@ -26356,8 +26705,8 @@ In this situation, `update_mask` is ignored. </p></td>
- <h3 id="bytebase.v1.GroupService">GroupService</h3>
- <p>GroupService manages user groups for organizing users and permissions.</p>
+ <h3 id="bytebase.v1.DatabaseService">DatabaseService</h3>
+ <p>DatabaseService manages databases and their schemas.</p>
<table class="enum-table">
<thead>
<tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
@@ -26365,56 +26714,110 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>GetGroup</td>
- <td><a href="#bytebase.v1.GetGroupRequest">GetGroupRequest</a></td>
- <td><a href="#bytebase.v1.Group">Group</a></td>
- <td><p>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</p></td>
+ <td>GetDatabase</td>
+ <td><a href="#bytebase.v1.GetDatabaseRequest">GetDatabaseRequest</a></td>
+ <td><a href="#bytebase.v1.Database">Database</a></td>
+ <td><p>Retrieves a database by name.
+Permissions required: bb.databases.get</p></td>
</tr>
<tr>
- <td>BatchGetGroups</td>
- <td><a href="#bytebase.v1.BatchGetGroupsRequest">BatchGetGroupsRequest</a></td>
- <td><a href="#bytebase.v1.BatchGetGroupsResponse">BatchGetGroupsResponse</a></td>
- <td><p>Gets multiple groups in a single request.
-Group members or users with bb.groups.get permission can get the group.
+ <td>BatchGetDatabases</td>
+ <td><a href="#bytebase.v1.BatchGetDatabasesRequest">BatchGetDatabasesRequest</a></td>
+ <td><a href="#bytebase.v1.BatchGetDatabasesResponse">BatchGetDatabasesResponse</a></td>
+ <td><p>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.groups.get OR caller is the group member</p></td>
+Permissions required: bb.databases.get (on each named database&#39;s project)</p></td>
</tr>
<tr>
- <td>ListGroups</td>
- <td><a href="#bytebase.v1.ListGroupsRequest">ListGroupsRequest</a></td>
- <td><a href="#bytebase.v1.ListGroupsResponse">ListGroupsResponse</a></td>
- <td><p>Lists all groups in the workspace.
-Permissions required: bb.groups.list</p></td>
+ <td>ListDatabases</td>
+ <td><a href="#bytebase.v1.ListDatabasesRequest">ListDatabasesRequest</a></td>
+ <td><a href="#bytebase.v1.ListDatabasesResponse">ListDatabasesResponse</a></td>
+ <td><p>Lists databases in a project, instance, or workspace.
+Permissions required: bb.projects.get (for project parent), bb.databases.list (for workspace parent), or bb.instances.get (for instance parent)</p></td>
</tr>
<tr>
- <td>CreateGroup</td>
- <td><a href="#bytebase.v1.CreateGroupRequest">CreateGroupRequest</a></td>
- <td><a href="#bytebase.v1.Group">Group</a></td>
- <td><p>Creates a new group.
-Permissions required: bb.groups.create</p></td>
+ <td>UpdateDatabase</td>
+ <td><a href="#bytebase.v1.UpdateDatabaseRequest">UpdateDatabaseRequest</a></td>
+ <td><a href="#bytebase.v1.Database">Database</a></td>
+ <td><p>Updates database properties such as labels and project assignment.
+Permissions required: bb.databases.update</p></td>
</tr>
<tr>
- <td>UpdateGroup</td>
- <td><a href="#bytebase.v1.UpdateGroupRequest">UpdateGroupRequest</a></td>
- <td><a href="#bytebase.v1.Group">Group</a></td>
- <td><p>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</p></td>
+ <td>BatchUpdateDatabases</td>
+ <td><a href="#bytebase.v1.BatchUpdateDatabasesRequest">BatchUpdateDatabasesRequest</a></td>
+ <td><a href="#bytebase.v1.BatchUpdateDatabasesResponse">BatchUpdateDatabasesResponse</a></td>
+ <td><p>Updates multiple databases in a single batch operation.
+Permissions required: bb.databases.update</p></td>
</tr>
<tr>
- <td>DeleteGroup</td>
- <td><a href="#bytebase.v1.DeleteGroupRequest">DeleteGroupRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Deletes a group. Group owners or users with bb.groups.delete permission can delete.
-Permissions required: bb.groups.delete OR caller is group owner</p></td>
+ <td>SyncDatabase</td>
+ <td><a href="#bytebase.v1.SyncDatabaseRequest">SyncDatabaseRequest</a></td>
+ <td><a href="#bytebase.v1.SyncDatabaseResponse">SyncDatabaseResponse</a></td>
+ <td><p>Synchronizes database schema from the instance.
+Permissions required: bb.databases.sync</p></td>
+ </tr>
+
+ <tr>
+ <td>BatchSyncDatabases</td>
+ <td><a href="#bytebase.v1.BatchSyncDatabasesRequest">BatchSyncDatabasesRequest</a></td>
+ <td><a href="#bytebase.v1.BatchSyncDatabasesResponse">BatchSyncDatabasesResponse</a></td>
+ <td><p>Synchronizes multiple databases in a single batch operation.
+Permissions required: bb.databases.sync</p></td>
+ </tr>
+
+ <tr>
+ <td>GetDatabaseMetadata</td>
+ <td><a href="#bytebase.v1.GetDatabaseMetadataRequest">GetDatabaseMetadataRequest</a></td>
+ <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
+ <td><p>Retrieves database metadata including tables, columns, and indexes.
+Permissions required: bb.databases.getSchema</p></td>
+ </tr>
+
+ <tr>
+ <td>GetDatabaseSchema</td>
+ <td><a href="#bytebase.v1.GetDatabaseSchemaRequest">GetDatabaseSchemaRequest</a></td>
+ <td><a href="#bytebase.v1.DatabaseSchema">DatabaseSchema</a></td>
+ <td><p>Retrieves database schema as DDL statements.
+Permissions required: bb.databases.getSchema</p></td>
+ </tr>
+
+ <tr>
+ <td>GetDatabaseSDLSchema</td>
+ <td><a href="#bytebase.v1.GetDatabaseSDLSchemaRequest">GetDatabaseSDLSchemaRequest</a></td>
+ <td><a href="#bytebase.v1.DatabaseSDLSchema">DatabaseSDLSchema</a></td>
+ <td><p>Retrieves database schema in SDL (Schema Definition Language) format.
+Permissions required: bb.databases.getSchema</p></td>
+ </tr>
+
+ <tr>
+ <td>DiffSchema</td>
+ <td><a href="#bytebase.v1.DiffSchemaRequest">DiffSchemaRequest</a></td>
+ <td><a href="#bytebase.v1.DiffSchemaResponse">DiffSchemaResponse</a></td>
+ <td><p>Compares and generates migration statements between two schemas.
+Permissions required: bb.databases.get</p></td>
+ </tr>
+
+ <tr>
+ <td>DiffMetadata</td>
+ <td><a href="#bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</a></td>
+ <td><a href="#bytebase.v1.DiffMetadataResponse">DiffMetadataResponse</a></td>
+ <td><p>Generates migration statements from the database&#39;s current schema to the
+given target metadata.
+Permissions required: bb.databases.diffMetadata</p></td>
+ </tr>
+
+ <tr>
+ <td>GetSchemaString</td>
+ <td><a href="#bytebase.v1.GetSchemaStringRequest">GetSchemaStringRequest</a></td>
+ <td><a href="#bytebase.v1.GetSchemaStringResponse">GetSchemaStringResponse</a></td>
+ <td><p>Generates schema DDL for a database object.
+Permissions required: bb.databases.getSchema</p></td>
</tr>
</tbody>
@@ -26427,30 +26830,51 @@ Permissions required: bb.groups.delete OR caller is group owner</p></td>
<table>
<thead>
<tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
+ </thead>
+ <tbody>
+
+
+
+ <tr>
+ <td>GetDatabase</td>
+ <td>GET</td>
+ <td>/v1/{name=instances/*/databases/*}</td>
+ <td></td>
+ </tr>
+
+ <tr>
+ <td>GetDatabase</td>
+ <td>GET</td>
+ <td>/v1/{name=projects/*/instances/*/databases/*}</td>
+ <td></td>
</tr>
- </thead>
- <tbody>
+
<tr>
- <td>GetGroup</td>
+ <td>BatchGetDatabases</td>
<td>GET</td>
- <td>/v1/{name=groups/*}</td>
+ <td>/v1/{parent=projects/*}/databases:batchGet</td>
<td></td>
</tr>
-
-
+ <tr>
+ <td>BatchGetDatabases</td>
+ <td>GET</td>
+ <td>/v1/{parent=instances/*}/databases:batchGet</td>
+ <td></td>
+ </tr>
<tr>
- <td>BatchGetGroups</td>
+ <td>BatchGetDatabases</td>
<td>GET</td>
- <td>/v1/groups:batchGet</td>
+ <td>/v1/{parent=projects/*/instances/*}/databases:batchGet</td>
<td></td>
</tr>
@@ -26458,403 +26882,232 @@ Permissions required: bb.groups.delete OR caller is group owner</p></td>
<tr>
- <td>ListGroups</td>
+ <td>ListDatabases</td>
<td>GET</td>
- <td>/v1/groups</td>
+ <td>/v1/{parent=projects/*}/databases</td>
<td></td>
</tr>
-
+ <tr>
+ <td>ListDatabases</td>
+ <td>GET</td>
+ <td>/v1/{parent=instances/*}/databases</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>ListDatabases</td>
+ <td>GET</td>
+ <td>/v1/{parent=workspaces/*}/databases</td>
+ <td></td>
+ </tr>
<tr>
- <td>CreateGroup</td>
- <td>POST</td>
- <td>/v1/groups</td>
- <td>group</td>
+ <td>ListDatabases</td>
+ <td>GET</td>
+ <td>/v1/{parent=projects/*/instances/*}/databases</td>
+ <td></td>
</tr>
<tr>
- <td>UpdateGroup</td>
+ <td>UpdateDatabase</td>
<td>PATCH</td>
- <td>/v1/{group.name=groups/*}</td>
- <td>group</td>
+ <td>/v1/{database.name=instances/*/databases/*}</td>
+ <td>database</td>
</tr>
-
-
-
<tr>
- <td>DeleteGroup</td>
- <td>DELETE</td>
- <td>/v1/{name=groups/*}</td>
- <td></td>
+ <td>UpdateDatabase</td>
+ <td>PATCH</td>
+ <td>/v1/{database.name=projects/*/instances/*/databases/*}</td>
+ <td>database</td>
</tr>
- </tbody>
- </table>
-
-
-
-
- <div class="file-heading">
- <h2 id="v1/idp_service.proto">v1/idp_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.v1.CreateIdentityProviderRequest">CreateIdentityProviderRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
- <tr>
- <td>identity_provider</td>
- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
- <td></td>
- <td><p>The identity provider to create. </p></td>
- </tr>
- <tr>
- <td>identity_provider_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The ID to use for the identity provider, which will become the final component of
-the identity provider&#39;s resource name.
-
-This value should be 4-63 characters, and valid characters
-are /[a-z][0-9]-/. </p></td>
- </tr>
+ <tr>
+ <td>BatchUpdateDatabases</td>
+ <td>POST</td>
+ <td>/v1/{parent=instances/*}/databases:batchUpdate</td>
+ <td>*</td>
+ </tr>
- <tr>
- <td>validate_only</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>If set to true, the request will be validated without actually creating the identity provider. </p></td>
- </tr>
+ <tr>
+ <td>BatchUpdateDatabases</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*/instances/*}/databases:batchUpdate</td>
+ <td>*</td>
+ </tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.DeleteIdentityProviderRequest">DeleteIdentityProviderRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the identity provider to delete.
-Format: idps/{identity_provider} </p></td>
- </tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.FieldMapping">FieldMapping</h3>
- <p>FieldMapping saves the field names from user info API of identity provider.</p><p>As we save all raw json string of user info response data into `principal.idp_user_info`,</p><p>we can extract the relevant data based with `FieldMapping`.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>SyncDatabase</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*/databases/*}:sync</td>
+ <td>*</td>
+ </tr>
- <tr>
- <td>identifier</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Identifier is the field name of the unique identifier in 3rd-party idp user info. Required. </p></td>
- </tr>
+ <tr>
+ <td>SyncDatabase</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/instances/*/databases/*}:sync</td>
+ <td>*</td>
+ </tr>
- <tr>
- <td>display_name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>DisplayName is the field name of display name in 3rd-party idp user info. Optional. </p></td>
- </tr>
+
- <tr>
- <td>phone</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Phone is the field name of primary phone in 3rd-party idp user info. Optional. </p></td>
- </tr>
- <tr>
- <td>groups</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>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/ </p></td>
- </tr>
+ <tr>
+ <td>BatchSyncDatabases</td>
+ <td>POST</td>
+ <td>/v1/{parent=instances/*}/databases:batchSync</td>
+ <td>*</td>
+ </tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.GetIdentityProviderRequest">GetIdentityProviderRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>BatchSyncDatabases</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*/instances/*}/databases:batchSync</td>
+ <td>*</td>
+ </tr>
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the identity provider to retrieve.
-Format: idps/{idp} </p></td>
- </tr>
+
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.IdentityProvider">IdentityProvider</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the identity provider.
-Format: idps/{idp} </p></td>
- </tr>
+ <tr>
+ <td>GetDatabaseMetadata</td>
+ <td>GET</td>
+ <td>/v1/{name=instances/*/databases/*/metadata}</td>
+ <td></td>
+ </tr>
+
+ <tr>
+ <td>GetDatabaseMetadata</td>
+ <td>GET</td>
+ <td>/v1/{name=projects/*/instances/*/databases/*/metadata}</td>
+ <td></td>
+ </tr>
- <tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The display title of the identity provider. </p></td>
- </tr>
+
- <tr>
- <td>domain</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The domain for email matching when using this identity provider. </p></td>
- </tr>
- <tr>
- <td>type</td>
- <td><a href="#bytebase.v1.IdentityProviderType">IdentityProviderType</a></td>
- <td></td>
- <td><p>The type of identity provider protocol. </p></td>
- </tr>
+ <tr>
+ <td>GetDatabaseSchema</td>
+ <td>GET</td>
+ <td>/v1/{name=instances/*/databases/*/schema}</td>
+ <td></td>
+ </tr>
- <tr>
- <td>config</td>
- <td><a href="#bytebase.v1.IdentityProviderConfig">IdentityProviderConfig</a></td>
- <td></td>
- <td><p>The configuration details for the identity provider. </p></td>
- </tr>
+ <tr>
+ <td>GetDatabaseSchema</td>
+ <td>GET</td>
+ <td>/v1/{name=projects/*/instances/*/databases/*/schema}</td>
+ <td></td>
+ </tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.IdentityProviderConfig">IdentityProviderConfig</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+
- <tr>
- <td>oauth2_config</td>
- <td><a href="#bytebase.v1.OAuth2IdentityProviderConfig">OAuth2IdentityProviderConfig</a></td>
- <td></td>
- <td><p>OAuth2 protocol configuration. </p></td>
- </tr>
- <tr>
- <td>oidc_config</td>
- <td><a href="#bytebase.v1.OIDCIdentityProviderConfig">OIDCIdentityProviderConfig</a></td>
- <td></td>
- <td><p>OIDC protocol configuration. </p></td>
- </tr>
+ <tr>
+ <td>GetDatabaseSDLSchema</td>
+ <td>GET</td>
+ <td>/v1/{name=instances/*/databases/*/sdlSchema}</td>
+ <td></td>
+ </tr>
- <tr>
- <td>ldap_config</td>
- <td><a href="#bytebase.v1.LDAPIdentityProviderConfig">LDAPIdentityProviderConfig</a></td>
- <td></td>
- <td><p>LDAP protocol configuration. </p></td>
- </tr>
+ <tr>
+ <td>GetDatabaseSDLSchema</td>
+ <td>GET</td>
+ <td>/v1/{name=projects/*/instances/*/databases/*/sdlSchema}</td>
+ <td></td>
+ </tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.LDAPIdentityProviderConfig">LDAPIdentityProviderConfig</h3>
- <p>LDAPIdentityProviderConfig is the structure for LDAP identity provider config.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+
- <tr>
- <td>host</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Host is the hostname or IP address of the LDAP server, e.g.,
-&#34;ldap.example.com&#34;. </p></td>
- </tr>
- <tr>
- <td>port</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>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. </p></td>
- </tr>
+ <tr>
+ <td>DiffSchema</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*/databases/*}:diffSchema</td>
+ <td>*</td>
+ </tr>
- <tr>
- <td>skip_tls_verify</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>SkipTLSVerify controls whether to skip TLS certificate verification. </p></td>
- </tr>
+ <tr>
+ <td>DiffSchema</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/instances/*/databases/*}:diffSchema</td>
+ <td>*</td>
+ </tr>
- <tr>
- <td>bind_dn</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>BindDN is the DN of the user to bind as a service account to perform
-search requests. </p></td>
- </tr>
+ <tr>
+ <td>DiffSchema</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*/databases/*/changelogs/*}:diffSchema</td>
+ <td>*</td>
+ </tr>
- <tr>
- <td>bind_password</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>BindPassword is the password of the user to bind as a service account. </p></td>
- </tr>
+ <tr>
+ <td>DiffSchema</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/instances/*/databases/*/changelogs/*}:diffSchema</td>
+ <td>*</td>
+ </tr>
- <tr>
- <td>base_dn</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>BaseDN is the base DN to search for users, e.g., &#34;ou=users,dc=example,dc=com&#34;. </p></td>
- </tr>
+
- <tr>
- <td>user_filter</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>UserFilter is the filter to search for users, e.g., &#34;(uid=%s)&#34;. </p></td>
- </tr>
- <tr>
- <td>security_protocol</td>
- <td><a href="#bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol">LDAPIdentityProviderConfig.SecurityProtocol</a></td>
- <td></td>
- <td><p>SecurityProtocol is the security protocol to be used for establishing
-connections with the LDAP server. </p></td>
- </tr>
+ <tr>
+ <td>DiffMetadata</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*/databases/*}:diffMetadata</td>
+ <td>*</td>
+ </tr>
- <tr>
- <td>field_mapping</td>
- <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td>
- <td></td>
- <td><p>FieldMapping is the mapping of the user attributes returned by the LDAP
-server. </p></td>
- </tr>
+ <tr>
+ <td>DiffMetadata</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/instances/*/databases/*}:diffMetadata</td>
+ <td>*</td>
+ </tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.LDAPIdentityProviderTestRequestContext">LDAPIdentityProviderTestRequestContext</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+
- <tr>
- <td>username</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The username of a directory user, substituted into the user filter. </p></td>
- </tr>
- <tr>
- <td>password</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The password of the directory user. </p></td>
- </tr>
+ <tr>
+ <td>GetSchemaString</td>
+ <td>GET</td>
+ <td>/v1/{name=instances/*/databases/*/schemaString}</td>
+ <td></td>
+ </tr>
+
+ <tr>
+ <td>GetSchemaString</td>
+ <td>GET</td>
+ <td>/v1/{name=projects/*/instances/*/databases/*/schemaString}</td>
+ <td></td>
+ </tr>
+
</tbody>
</table>
-
-
+
- <h3 id="bytebase.v1.ListIdentityProvidersRequest">ListIdentityProvidersRequest</h3>
- <p></p>
+ <div class="file-heading">
+ <h2 id="v1/group_service.proto">v1/group_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.BatchGetGroupsRequest">BatchGetGroupsRequest</h3>
+ <p>Request message for batch getting groups.</p>
<table class="field-table">
@@ -26864,12 +27117,11 @@ server. </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>names</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The parent workspace whose identity providers should be listed.
-Format: workspaces/{workspace}
-When unset, the workspace is resolved from the request context. </p></td>
+ <td>repeated</td>
+ <td><p>The group names to retrieve.
+Format: groups/{email} </p></td>
</tr>
</tbody>
@@ -26879,8 +27131,8 @@ When unset, the workspace is resolved from the request context. </p></td>
- <h3 id="bytebase.v1.ListIdentityProvidersResponse">ListIdentityProvidersResponse</h3>
- <p></p>
+ <h3 id="bytebase.v1.BatchGetGroupsResponse">BatchGetGroupsResponse</h3>
+ <p>Response message for batch getting groups.</p>
<table class="field-table">
@@ -26890,10 +27142,10 @@ When unset, the workspace is resolved from the request context. </p></td>
<tbody>
<tr>
- <td>identity_providers</td>
- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
+ <td>groups</td>
+ <td><a href="#bytebase.v1.Group">Group</a></td>
<td>repeated</td>
- <td><p>The identity providers from the specified request. </p></td>
+ <td><p>One group per requested name, in the same order as `names`. </p></td>
</tr>
</tbody>
@@ -26903,8 +27155,8 @@ When unset, the workspace is resolved from the request context. </p></td>
- <h3 id="bytebase.v1.OAuth2IdentityProviderConfig">OAuth2IdentityProviderConfig</h3>
- <p>OAuth2IdentityProviderConfig is the structure for OAuth2 identity provider config.</p>
+ <h3 id="bytebase.v1.CreateGroupRequest">CreateGroupRequest</h3>
+ <p>Request message for creating a group.</p>
<table class="field-table">
@@ -26914,66 +27166,18 @@ When unset, the workspace is resolved from the request context. </p></td>
<tbody>
<tr>
- <td>auth_url</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The authorization endpoint URL for OAuth2 flow. </p></td>
- </tr>
-
- <tr>
- <td>token_url</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The token endpoint URL for exchanging authorization code. </p></td>
- </tr>
-
- <tr>
- <td>user_info_url</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The user information endpoint URL. </p></td>
- </tr>
-
- <tr>
- <td>client_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The OAuth2 client identifier. </p></td>
- </tr>
-
- <tr>
- <td>client_secret</td>
- <td><a href="#string">string</a></td>
+ <td>group</td>
+ <td><a href="#bytebase.v1.Group">Group</a></td>
<td></td>
- <td><p>The OAuth2 client secret for authentication. </p></td>
+ <td><p>The group to create. </p></td>
</tr>
<tr>
- <td>scopes</td>
+ <td>group_email</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The list of OAuth2 scopes to request. </p></td>
- </tr>
-
- <tr>
- <td>field_mapping</td>
- <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td>
- <td></td>
- <td><p>Mapping configuration for user attributes from OAuth2 response. </p></td>
- </tr>
-
- <tr>
- <td>skip_tls_verify</td>
- <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Whether to skip TLS certificate verification. </p></td>
- </tr>
-
- <tr>
- <td>auth_style</td>
- <td><a href="#bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</a></td>
- <td></td>
- <td><p>The authentication style for client credentials. </p></td>
+ <td><p>The email to use for the group, which will become the final component
+of the group&#39;s resource name. </p></td>
</tr>
</tbody>
@@ -26983,8 +27187,8 @@ When unset, the workspace is resolved from the request context. </p></td>
- <h3 id="bytebase.v1.OAuth2IdentityProviderTestRequestContext">OAuth2IdentityProviderTestRequestContext</h3>
- <p></p>
+ <h3 id="bytebase.v1.DeleteGroupRequest">DeleteGroupRequest</h3>
+ <p>Request message for deleting a group.</p>
<table class="field-table">
@@ -26994,10 +27198,11 @@ When unset, the workspace is resolved from the request context. </p></td>
<tbody>
<tr>
- <td>code</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Authorize code from website. </p></td>
+ <td><p>The name of the group to delete.
+Format: groups/{email} </p></td>
</tr>
</tbody>
@@ -27007,8 +27212,8 @@ When unset, the workspace is resolved from the request context. </p></td>
- <h3 id="bytebase.v1.OIDCIdentityProviderConfig">OIDCIdentityProviderConfig</h3>
- <p>OIDCIdentityProviderConfig is the structure for OIDC identity provider config.</p>
+ <h3 id="bytebase.v1.GetGroupRequest">GetGroupRequest</h3>
+ <p>Request message for getting a group.</p>
<table class="field-table">
@@ -27018,61 +27223,11 @@ When unset, the workspace is resolved from the request context. </p></td>
<tbody>
<tr>
- <td>issuer</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The OIDC issuer URL for the identity provider. </p></td>
- </tr>
-
- <tr>
- <td>client_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The OIDC client identifier. </p></td>
- </tr>
-
- <tr>
- <td>client_secret</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The OIDC client secret for authentication. </p></td>
- </tr>
-
- <tr>
- <td>scopes</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The scopes that the OIDC provider supports.
-Should be fetched from the well-known configuration file of the OIDC provider. </p></td>
- </tr>
-
- <tr>
- <td>field_mapping</td>
- <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td>
- <td></td>
- <td><p>Mapping configuration for user attributes from OIDC claims. </p></td>
- </tr>
-
- <tr>
- <td>skip_tls_verify</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether to skip TLS certificate verification. </p></td>
- </tr>
-
- <tr>
- <td>auth_style</td>
- <td><a href="#bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</a></td>
- <td></td>
- <td><p>The authentication style for client credentials. </p></td>
- </tr>
-
- <tr>
- <td>auth_endpoint</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The authorization endpoint of the OIDC provider.
-Should be fetched from the well-known configuration file of the OIDC provider. </p></td>
+ <td><p>The name of the group to retrieve.
+Format: groups/{email} </p></td>
</tr>
</tbody>
@@ -27082,8 +27237,8 @@ Should be fetched from the well-known configuration file of the OIDC provider. <
- <h3 id="bytebase.v1.OIDCIdentityProviderTestRequestContext">OIDCIdentityProviderTestRequestContext</h3>
- <p></p>
+ <h3 id="bytebase.v1.Group">Group</h3>
+ <p>A group of users within the workspace.</p>
<table class="field-table">
@@ -27093,55 +27248,46 @@ Should be fetched from the well-known configuration file of the OIDC provider. <
<tbody>
<tr>
- <td>code</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Authorize code from OIDC provider. </p></td>
+ <td><p>The name of the group to retrieve.
+Format: groups/{group}, the group should be email or uuid. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.TestIdentityProviderRequest">TestIdentityProviderRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>identity_provider</td>
- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The identity provider to test connection including uncreated. </p></td>
+ <td><p>The display title of the group. </p></td>
</tr>
<tr>
- <td>oauth2_context</td>
- <td><a href="#bytebase.v1.OAuth2IdentityProviderTestRequestContext">OAuth2IdentityProviderTestRequestContext</a></td>
+ <td>description</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The description of the group. </p></td>
</tr>
<tr>
- <td>oidc_context</td>
- <td><a href="#bytebase.v1.OIDCIdentityProviderTestRequestContext">OIDCIdentityProviderTestRequestContext</a></td>
+ <td>members</td>
+ <td><a href="#bytebase.v1.GroupMember">GroupMember</a></td>
+ <td>repeated</td>
+ <td><p>The members of the group. </p></td>
+ </tr>
+
+ <tr>
+ <td>source</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>OIDC authentication context for test connection. </p></td>
+ <td><p>The source system where the group originated (e.g., Entra ID for SCIM sync). </p></td>
</tr>
<tr>
- <td>ldap_context</td>
- <td><a href="#bytebase.v1.LDAPIdentityProviderTestRequestContext">LDAPIdentityProviderTestRequestContext</a></td>
+ <td>email</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>LDAP credentials context for test connection. </p></td>
+ <td><p>The unique email for the group. </p></td>
</tr>
</tbody>
@@ -27151,8 +27297,8 @@ Should be fetched from the well-known configuration file of the OIDC provider. <
- <h3 id="bytebase.v1.TestIdentityProviderResponse">TestIdentityProviderResponse</h3>
- <p></p>
+ <h3 id="bytebase.v1.GroupMember">GroupMember</h3>
+ <p>A member of a group with a role.</p>
<table class="field-table">
@@ -27162,17 +27308,19 @@ Should be fetched from the well-known configuration file of the OIDC provider. <
<tbody>
<tr>
- <td>claims</td>
- <td><a href="#bytebase.v1.TestIdentityProviderResponse.ClaimsEntry">TestIdentityProviderResponse.ClaimsEntry</a></td>
- <td>repeated</td>
- <td><p>The map of claims returned by the identity provider. </p></td>
+ <td>member</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Member is the principal who belong to this group.
+
+Format: users/[email protected] </p></td>
</tr>
<tr>
- <td>user_info</td>
- <td><a href="#bytebase.v1.TestIdentityProviderResponse.UserInfoEntry">TestIdentityProviderResponse.UserInfoEntry</a></td>
- <td>repeated</td>
- <td><p>The matched user info from the claims. </p></td>
+ <td>role</td>
+ <td><a href="#bytebase.v1.GroupMember.Role">GroupMember.Role</a></td>
+ <td></td>
+ <td><p>The member&#39;s role in the group. </p></td>
</tr>
</tbody>
@@ -27182,8 +27330,8 @@ Should be fetched from the well-known configuration file of the OIDC provider. <
- <h3 id="bytebase.v1.TestIdentityProviderResponse.ClaimsEntry">TestIdentityProviderResponse.ClaimsEntry</h3>
- <p></p>
+ <h3 id="bytebase.v1.ListGroupsRequest">ListGroupsRequest</h3>
+ <p>Request message for listing groups.</p>
<table class="field-table">
@@ -27193,17 +27341,46 @@ Should be fetched from the well-known configuration file of the OIDC provider. <
<tbody>
<tr>
- <td>key</td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>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. </p></td>
+ </tr>
+
+ <tr>
+ <td>page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>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. </p></td>
</tr>
<tr>
- <td>value</td>
+ <td>filter</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>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 &#34;==&#34; and &#34;.contains()&#34; operator.
+- email: the group email, support &#34;==&#34; and &#34;.contains()&#34; operator.
+- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
+
+For example:
+title == &#34;dba&#34;
+email == &#34;[email protected]&#34;
+title.contains(&#34;dba&#34;)
+email.contains(&#34;dba&#34;)
+project == &#34;projects/sample-project&#34;
+You can combine filter conditions like:
+title.contains(&#34;dba&#34;) || email.contains(&#34;dba&#34;) </p></td>
</tr>
</tbody>
@@ -27213,8 +27390,8 @@ Should be fetched from the well-known configuration file of the OIDC provider. <
- <h3 id="bytebase.v1.TestIdentityProviderResponse.UserInfoEntry">TestIdentityProviderResponse.UserInfoEntry</h3>
- <p></p>
+ <h3 id="bytebase.v1.ListGroupsResponse">ListGroupsResponse</h3>
+ <p>Response message for listing groups.</p>
<table class="field-table">
@@ -27224,17 +27401,18 @@ Should be fetched from the well-known configuration file of the OIDC provider. <
<tbody>
<tr>
- <td>key</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>groups</td>
+ <td><a href="#bytebase.v1.Group">Group</a></td>
+ <td>repeated</td>
+ <td><p>The groups from the specified request. </p></td>
</tr>
<tr>
- <td>value</td>
+ <td>next_page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
</tr>
</tbody>
@@ -27244,8 +27422,8 @@ Should be fetched from the well-known configuration file of the OIDC provider. <
- <h3 id="bytebase.v1.UpdateIdentityProviderRequest">UpdateIdentityProviderRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.UpdateGroupRequest">UpdateGroupRequest</h3>
+ <p>Request message for updating a group.</p>
<table class="field-table">
@@ -27255,13 +27433,13 @@ Should be fetched from the well-known configuration file of the OIDC provider. <
<tbody>
<tr>
- <td>identity_provider</td>
- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
+ <td>group</td>
+ <td><a href="#bytebase.v1.Group">Group</a></td>
<td></td>
- <td><p>The identity provider to update.
+ <td><p>The group to update.
-The identity provider&#39;s `name` field is used to identify the identity provider to update.
-Format: idps/{identity_provider} </p></td>
+The group&#39;s `name` field is used to identify the group to update.
+Format: groups/{email} </p></td>
</tr>
<tr>
@@ -27275,7 +27453,7 @@ Format: idps/{identity_provider} </p></td>
<td>allow_missing</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>If set to true, and the identity provider is not found, a new identity provider will be created.
+ <td><p>If set to true, and the group is not found, a new group will be created.
In this situation, `update_mask` is ignored. </p></td>
</tr>
@@ -27288,72 +27466,8 @@ In this situation, `update_mask` is ignored. </p></td>
- <h3 id="bytebase.v1.IdentityProviderType">IdentityProviderType</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>IDENTITY_PROVIDER_TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified identity provider type.</p></td>
- </tr>
-
- <tr>
- <td>OAUTH2</td>
- <td>1</td>
- <td><p>OAuth 2.0 authentication protocol.</p></td>
- </tr>
-
- <tr>
- <td>OIDC</td>
- <td>2</td>
- <td><p>OpenID Connect authentication protocol.</p></td>
- </tr>
-
- <tr>
- <td>LDAP</td>
- <td>3</td>
- <td><p>LDAP directory service authentication.</p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol">LDAPIdentityProviderConfig.SecurityProtocol</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>SECURITY_PROTOCOL_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>START_TLS</td>
- <td>1</td>
- <td><p>StartTLS is the security protocol that starts with an unencrypted connection and then upgrades to TLS.</p></td>
- </tr>
-
- <tr>
- <td>LDAPS</td>
- <td>2</td>
- <td><p>LDAPS is the security protocol that uses TLS from the beginning.</p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</h3>
- <p></p>
+ <h3 id="bytebase.v1.GroupMember.Role">GroupMember.Role</h3>
+ <p>The role of a group member.</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -27361,23 +27475,21 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>OAUTH2_AUTH_STYLE_UNSPECIFIED</td>
+ <td>ROLE_UNSPECIFIED</td>
<td>0</td>
- <td><p></p></td>
+ <td><p>Unspecified role.</p></td>
</tr>
<tr>
- <td>IN_PARAMS</td>
+ <td>OWNER</td>
<td>1</td>
- <td><p>IN_PARAMS sends the &#34;client_id&#34; and &#34;client_secret&#34; in the POST body
-as application/x-www-form-urlencoded parameters.</p></td>
+ <td><p>Group owner.</p></td>
</tr>
<tr>
- <td>IN_HEADER</td>
+ <td>MEMBER</td>
<td>2</td>
- <td><p>IN_HEADER sends the client_id and client_password using HTTP Basic Authorization.
-This is an optional style described in the OAuth2 RFC 6749 section 2.3.1.</p></td>
+ <td><p>Group member.</p></td>
</tr>
</tbody>
@@ -27387,8 +27499,8 @@ This is an optional style described in the OAuth2 RFC 6749 section 2.3.1.</p></t
- <h3 id="bytebase.v1.IdentityProviderService">IdentityProviderService</h3>
- <p>IdentityProviderService manages external identity providers for SSO authentication.</p>
+ <h3 id="bytebase.v1.GroupService">GroupService</h3>
+ <p>GroupService manages user groups for organizing users and permissions.</p>
<table class="enum-table">
<thead>
<tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
@@ -27396,52 +27508,56 @@ This is an optional style described in the OAuth2 RFC 6749 section 2.3.1.</p></t
<tbody>
<tr>
- <td>GetIdentityProvider</td>
- <td><a href="#bytebase.v1.GetIdentityProviderRequest">GetIdentityProviderRequest</a></td>
- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
- <td><p>Gets an identity provider by name.
-Permissions required: bb.identityProviders.get</p></td>
+ <td>GetGroup</td>
+ <td><a href="#bytebase.v1.GetGroupRequest">GetGroupRequest</a></td>
+ <td><a href="#bytebase.v1.Group">Group</a></td>
+ <td><p>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</p></td>
</tr>
<tr>
- <td>ListIdentityProviders</td>
- <td><a href="#bytebase.v1.ListIdentityProvidersRequest">ListIdentityProvidersRequest</a></td>
- <td><a href="#bytebase.v1.ListIdentityProvidersResponse">ListIdentityProvidersResponse</a></td>
- <td><p>Lists all configured identity providers (public endpoint for login page).
-Permissions required: None</p></td>
+ <td>BatchGetGroups</td>
+ <td><a href="#bytebase.v1.BatchGetGroupsRequest">BatchGetGroupsRequest</a></td>
+ <td><a href="#bytebase.v1.BatchGetGroupsResponse">BatchGetGroupsResponse</a></td>
+ <td><p>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</p></td>
</tr>
<tr>
- <td>CreateIdentityProvider</td>
- <td><a href="#bytebase.v1.CreateIdentityProviderRequest">CreateIdentityProviderRequest</a></td>
- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
- <td><p>Creates a new identity provider.
-Permissions required: bb.identityProviders.create</p></td>
+ <td>ListGroups</td>
+ <td><a href="#bytebase.v1.ListGroupsRequest">ListGroupsRequest</a></td>
+ <td><a href="#bytebase.v1.ListGroupsResponse">ListGroupsResponse</a></td>
+ <td><p>Lists all groups in the workspace.
+Permissions required: bb.groups.list</p></td>
</tr>
<tr>
- <td>UpdateIdentityProvider</td>
- <td><a href="#bytebase.v1.UpdateIdentityProviderRequest">UpdateIdentityProviderRequest</a></td>
- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
- <td><p>Updates an identity provider.
-Permissions required: bb.identityProviders.update
-When allow_missing=true, also requires: bb.identityProviders.create</p></td>
+ <td>CreateGroup</td>
+ <td><a href="#bytebase.v1.CreateGroupRequest">CreateGroupRequest</a></td>
+ <td><a href="#bytebase.v1.Group">Group</a></td>
+ <td><p>Creates a new group.
+Permissions required: bb.groups.create</p></td>
</tr>
<tr>
- <td>DeleteIdentityProvider</td>
- <td><a href="#bytebase.v1.DeleteIdentityProviderRequest">DeleteIdentityProviderRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Deletes an identity provider.
-Permissions required: bb.identityProviders.delete</p></td>
+ <td>UpdateGroup</td>
+ <td><a href="#bytebase.v1.UpdateGroupRequest">UpdateGroupRequest</a></td>
+ <td><a href="#bytebase.v1.Group">Group</a></td>
+ <td><p>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</p></td>
</tr>
<tr>
- <td>TestIdentityProvider</td>
- <td><a href="#bytebase.v1.TestIdentityProviderRequest">TestIdentityProviderRequest</a></td>
- <td><a href="#bytebase.v1.TestIdentityProviderResponse">TestIdentityProviderResponse</a></td>
- <td><p>Tests the connection and configuration of an identity provider.
-Permissions required: bb.identityProviders.update</p></td>
+ <td>DeleteGroup</td>
+ <td><a href="#bytebase.v1.DeleteGroupRequest">DeleteGroupRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Deletes a group. Group owners or users with bb.groups.delete permission can delete.
+Permissions required: bb.groups.delete OR caller is group owner</p></td>
</tr>
</tbody>
@@ -27465,9 +27581,9 @@ Permissions required: bb.identityProviders.update</p></td>
<tr>
- <td>GetIdentityProvider</td>
+ <td>GetGroup</td>
<td>GET</td>
- <td>/v1/{name=idps/*}</td>
+ <td>/v1/{name=groups/*}</td>
<td></td>
</tr>
@@ -27475,16 +27591,19 @@ Permissions required: bb.identityProviders.update</p></td>
<tr>
- <td>ListIdentityProviders</td>
+ <td>BatchGetGroups</td>
<td>GET</td>
- <td>/v1/idps</td>
+ <td>/v1/groups:batchGet</td>
<td></td>
</tr>
+
+
+
<tr>
- <td>ListIdentityProviders</td>
+ <td>ListGroups</td>
<td>GET</td>
- <td>/v1/{parent=workspaces/*}/idps</td>
+ <td>/v1/groups</td>
<td></td>
</tr>
@@ -27492,43 +27611,33 @@ Permissions required: bb.identityProviders.update</p></td>
<tr>
- <td>CreateIdentityProvider</td>
+ <td>CreateGroup</td>
<td>POST</td>
- <td>/v1/idps</td>
- <td>identity_provider</td>
+ <td>/v1/groups</td>
+ <td>group</td>
</tr>
<tr>
- <td>UpdateIdentityProvider</td>
+ <td>UpdateGroup</td>
<td>PATCH</td>
- <td>/v1/{identity_provider.name=idps/*}</td>
- <td>identity_provider</td>
+ <td>/v1/{group.name=groups/*}</td>
+ <td>group</td>
</tr>
<tr>
- <td>DeleteIdentityProvider</td>
+ <td>DeleteGroup</td>
<td>DELETE</td>
- <td>/v1/{name=idps/*}</td>
+ <td>/v1/{name=groups/*}</td>
<td></td>
</tr>
-
-
- <tr>
- <td>TestIdentityProvider</td>
- <td>POST</td>
- <td>/v1/idps/*:test</td>
- <td>*</td>
- </tr>
-
-
</tbody>
</table>
diff --git a/proto/v1/v1/auth_service.proto b/proto/v1/v1/auth_service.proto
index 7d9ae33686..5cf6ce6fa9 100644
--- a/proto/v1/v1/auth_service.proto
+++ b/proto/v1/v1/auth_service.proto
@@ -9,6 +9,7 @@ import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/empty.proto";
import "v1/annotation.proto";
+import "v1/idp_service.proto";
import "v1/setting_service.proto";
import "v1/user_service.proto";
@@ -16,12 +17,13 @@ option go_package = "github.com/bytebase/bytebase/backend/generated-go/v1";
// AuthService handles user authentication operations.
service AuthService {
- // Gets the effective restrictions needed to render authentication flows.
+ // Gets everything the login page renders: the sign-in restrictions and the
+ // identity providers it offers.
// Permissions required: None
- rpc GetAuthenticationRestriction(GetAuthenticationRestrictionRequest) returns (AuthenticationInfo) {
+ rpc GetAuthenticationInfo(GetAuthenticationInfoRequest) returns (AuthenticationInfo) {
option (google.api.http) = {
- get: "/v1/auth/restriction"
- additional_bindings: {get: "/v1/{workspace=workspaces/*}/auth/restriction"}
+ get: "/v1/auth/info"
+ additional_bindings: {get: "/v1/{workspace=workspaces/*}/auth/info"}
};
option (google.api.method_signature) = "";
option (bytebase.v1.allow_without_credential) = true;
@@ -157,7 +159,7 @@ service AuthService {
}
}
-message GetAuthenticationRestrictionRequest {
+message GetAuthenticationInfoRequest {
// Optional. The workspace whose authentication policy should be returned.
// Format: workspaces/{workspace}
// When unset, self-hosted resolves the singleton workspace and SaaS uses
@@ -172,6 +174,9 @@ message AuthenticationInfo {
// The effective authentication restrictions.
Restriction restriction = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // The identity providers the login page renders, in display order.
+ repeated LoginIdentityProvider identity_providers = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}
message Restriction {
@@ -192,6 +197,39 @@ message Restriction {
bool password_reset_enabled = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
}
+// 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.
+message LoginIdentityProvider {
+ // The name of the identity provider.
+ // Format: idps/{idp}
+ string name = 1;
+
+ // The type of identity provider protocol.
+ IdentityProviderType type = 2;
+
+ // The display title of the identity provider.
+ string title = 3;
+
+ // The parameters the browser needs to start the authorization redirect.
+ // Set for OAUTH2 and OIDC, absent for LDAP, whose bind happens server-side.
+ AuthorizationRequest authorization_request = 4;
+}
+
+// AuthorizationRequest is what a browser needs to start an SSO redirect.
+message AuthorizationRequest {
+ // The OAuth2 auth_url, or the authorization endpoint from the OIDC issuer's
+ // discovery document.
+ string endpoint = 1;
+
+ // The OAuth2 or OIDC client identifier.
+ string client_id = 2;
+
+ // The scopes to request.
+ repeated string scopes = 3;
+}
+
message LoginRequest {
// User's email address.
// Bounded so an oversized identity is refused at the edge before any
diff --git a/proto/v1/v1/idp_service.proto b/proto/v1/v1/idp_service.proto
index 573b1d184e..f2bb9a64e9 100644
--- a/proto/v1/v1/idp_service.proto
+++ b/proto/v1/v1/idp_service.proto
@@ -26,16 +26,23 @@ service IdentityProviderService {
option (bytebase.v1.mcp_denial_reason) = ADMINISTERS_THE_WORKSPACE;
}
- // Lists all configured identity providers (public endpoint for login page).
- // Permissions required: None
+ // 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.
+ //
+ // 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
rpc ListIdentityProviders(ListIdentityProvidersRequest) returns (ListIdentityProvidersResponse) {
option (google.api.http) = {
get: "/v1/idps"
additional_bindings: {get: "/v1/{parent=workspaces/*}/idps"}
};
- option (google.api.method_signature) = "";
- option (bytebase.v1.allow_without_credential) = true;
- // The method requires no authentication thus no authorization.
+ option (google.api.method_signature) = "parent";
+ option (bytebase.v1.permission) = "bb.identityProviders.list";
+ option (bytebase.v1.auth_method) = IAM;
option (bytebase.v1.mcp_method_class) = EXCLUDED;
option (bytebase.v1.mcp_denial_reason) = ADMINISTERS_THE_WORKSPACE;
}
@@ -107,10 +114,15 @@ message GetIdentityProviderRequest {
}
message ListIdentityProvidersRequest {
- // The parent workspace whose identity providers should be listed.
+ // The parent workspace whose identity providers should be listed. It must be
+ // the workspace the caller's credential belongs to.
// Format: workspaces/{workspace}
- // When unset, the workspace is resolved from the request context.
- string parent = 1 [(google.api.resource_reference) = {type: "bytebase.com/Workspace"}];
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {type: "bytebase.com/Workspace"},
+ (buf.validate.field).required = true,
+ (buf.validate.field).string.pattern = "^workspaces/[^/]+$"
+ ];
}
message ListIdentityProvidersResponse {
@@ -227,7 +239,6 @@ enum IdentityProviderType {
// LDAP directory service authentication.
LDAP = 3;
}
-
message IdentityProviderConfig {
oneof config {
// OAuth2 protocol configuration.