Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: move mcp info to actuator (#21347)
ecmadao1870550677fe
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yamlindex 1664d7f4ac..9fb0155406 100644--- a/backend/api/mcp/gen/openapi.yaml+++ b/backend/api/mcp/gen/openapi.yaml@@ -8078,51 +8078,6 @@ paths:application/json:schema:$ref: '#/components/schemas/bytebase.v1.IamPolicy'- /bytebase.v1.WorkspaceService/GetMCPInfo:- post:- tags:- - bytebase.v1.WorkspaceService- summary: |-- Gets what MCP (Model Context Protocol) does in this workspace: the- capability ceiling in force, and whether masking narrows what a session- reads under it. The workspace is resolved from the authenticated session.- description: |-- Served to MCP sessions. An agent asking what it may do here is the point:- the response says nothing a session's own denials do not already say, one- refusal at a time, and knowing it up front is what stops the agent- planning work the ceiling was never going to serve.-- Permissions required: None (authentication required)- operationId: bytebase.v1.WorkspaceService.GetMCPInfo- parameters:- - name: Connect-Protocol-Version- in: header- required: true- schema:- $ref: '#/components/schemas/connect-protocol-version'- - name: Connect-Timeout-Ms- in: header- schema:- $ref: '#/components/schemas/connect-timeout-header'- requestBody:- content:- application/json:- schema:- $ref: '#/components/schemas/bytebase.v1.GetMCPInfoRequest'- required: true- responses:- default:- description: Error- content:- application/json:- schema:- $ref: '#/components/schemas/connect.error'- "200":- description: Success- content:- application/json:- schema:- $ref: '#/components/schemas/bytebase.v1.MCPInfo'/bytebase.v1.WorkspaceService/GetWorkspace:post:tags:@@ -8726,6 +8681,10 @@ components:title: sampledescription: Sample setup availability and provisioned resources.$ref: '#/components/schemas/bytebase.v1.SampleInfo'+ mcpSetting:+ title: mcp_setting+ description: The MCP (Model Context Protocol) setting in the current workspace.+ $ref: '#/components/schemas/bytebase.v1.MCPSetting'title: ActuatorInfoadditionalProperties: falsedescription: |-@@ -12838,10 +12797,6 @@ components:description: If set to true, bypass cache and fetch the latest data.title: GetIssueRequestadditionalProperties: false- bytebase.v1.GetMCPInfoRequest:- type: object- title: GetMCPInfoRequest- additionalProperties: falsebytebase.v1.GetPaymentInfoRequest:type: objecttitle: GetPaymentInfoRequest@@ -15687,50 +15642,6 @@ components:that contradicts its class. Neither is expressible now, and the one checkleft — the reason belongs to the class it is used on — is a table the gatealready keeps for the wording.- bytebase.v1.MCPInfo:- type: object- properties:- workspace:- type: string- title: workspace- description: |-- The workspace this describes. Format: workspaces/{workspace}. Not this- message's own resource name — MCPInfo is not a named resource and there is- nothing to get it by.- capability:- title: capability- description: |-- The ceiling in force for this workspace. Any value outside the enum this- build serves, CAPABILITY_UNSPECIFIED included, means no ceiling could be- resolved from the stored row and every MCP connection is refused. A stored- name nothing resolves arrives as CAPABILITY_UNSPECIFIED; a number a newer- release wrote arrives verbatim.- $ref: '#/components/schemas/bytebase.v1.MCPSetting.Capability'- ignoreMaskingExemptions:- type: boolean- title: ignore_masking_exemptions- description: |-- Whether this workspace stops applying the caller's own unmasking- provisioning to MCP requests. It narrows what a session reads only where- Bytebase masks by column and consults exemptions; elsewhere it suppresses- nothing.- dataMaskingAvailable:- type: boolean- title: data_masking_available- description: |-- Whether data masking is licensed for this workspace. When false nothing is- masked whatever an engine supports, so the toggle above suppresses nothing.- Licensing can also be set per instance, so a true here is the workspace- answer, not a promise about every instance.- title: MCPInfo- additionalProperties: false- description: |-- MCPInfo is what MCP does in this workspace: the ceiling in force, and- whether masking narrows what a session reads under it.-- This is the only API a served MCP session or the consent page can read the- ceiling from. SettingService/GetSetting is served by no ceiling, and its- answer is cached besides.bytebase.v1.MCPMethodClass:type: stringtitle: MCPMethodClass@@ -23787,14 +23698,6 @@ security: []tags:- name: bytebase.v1.AccessGrantServicedescription: AccessGrantService manages temporary access grants within projects.- - name: bytebase.v1.ActuatorService- description: ActuatorService manages system health and operational information.- - name: bytebase.v1.AIService- description: AIService provides AI chat capabilities for the page agent.- - name: bytebase.v1.AuditLogService- description: AuditLogService manages audit logs for system activities and API calls.- - name: bytebase.v1.IdentityProviderService- description: IdentityProviderService manages external identity providers for SSO authentication.- name: bytebase.v1.RolloutServicedescription: RolloutService manages the execution of deployment plans.- name: bytebase.v1.QueryHistoryService@@ -23807,6 +23710,14 @@ tags:description: IssueService manages issues for tracking database changes and tasks.- name: bytebase.v1.SettingServicedescription: SettingService manages workspace-level settings and configurations.+ - name: bytebase.v1.ActuatorService+ description: ActuatorService manages system health and operational information.+ - name: bytebase.v1.AIService+ description: AIService provides AI chat capabilities for the page agent.+ - name: bytebase.v1.AuditLogService+ description: AuditLogService manages audit logs for system activities and API calls.+ - name: bytebase.v1.IdentityProviderService+ description: IdentityProviderService manages external identity providers for SSO authentication.- name: bytebase.v1.UserServicedescription: UserService manages user accounts and authentication.- name: bytebase.v1.AuthServicediff --git a/backend/api/mcp/tool_change.go b/backend/api/mcp/tool_change.goindex b345a15cbf..5600713ebe 100644--- a/backend/api/mcp/tool_change.go+++ b/backend/api/mcp/tool_change.go@@ -152,7 +152,7 @@ propose_database_change(database="app", sql="UPDATE orders SET status='shipped'- Requires bb.sheets.create, bb.plans.create, bb.issues.create permissions.- If createRollout=true but policy gates aren't satisfied, returns success with rolloutCreated=false and a reason.- Masked data: a masked column reads back as "******". That is a placeholder, not a value anything holds. Any change containing it is refused, because writing it back would overwrite the real value. Ask a human to make the change in the Bytebase console instead.-- Workspace ceiling: the workspace's MCP policy decides whether changes are served at all, and under a read-only ceiling this tool is refused before anything is created. Read it with call_api(operationId="bytebase.v1.WorkspaceService.GetMCPInfo") before planning a change.`+`func (s *Server) registerChangeTool() {mcp.AddTool(s.mcpServer, &mcp.Tool{diff --git a/backend/api/mcp/tool_query.go b/backend/api/mcp/tool_query.goindex 852cb8c2e0..4680981b74 100644--- a/backend/api/mcp/tool_query.go+++ b/backend/api/mcp/tool_query.go@@ -60,7 +60,7 @@ query_database(database="employee", instance="projects/hr/instances/prod-pg", st**Notes:**- Masked data: a masked column reads back as "******". That is a placeholder, not a value anything holds, so never write it back and never filter on it. Any statement containing it is refused.-- Workspace ceiling: the workspace's MCP policy decides what is served here, and under a read-only ceiling any statement that is not a read is refused whole. Read it with call_api(operationId="bytebase.v1.WorkspaceService.GetMCPInfo").`+`func (s *Server) registerQueryTool() {mcp.AddTool(s.mcpServer, &mcp.Tool{diff --git a/backend/api/v1/actuator_service.go b/backend/api/v1/actuator_service.goindex 67346d842c..4b8694e055 100644--- a/backend/api/v1/actuator_service.go+++ b/backend/api/v1/actuator_service.go@@ -93,6 +93,12 @@ func (s *ActuatorService) getServerInfo(ctx context.Context, workspaceID string)if workspaceID != "" {serverInfo.Workspace = common.FormatWorkspace(workspaceID)+ mcpSetting, err := mcpSettingsForCurrentWorkspace(ctx, s.store, workspaceID)+ if err != nil {+ slog.Error("failed to read the MCP setting", slog.String("workspace", workspaceID), log.BBError(err))+ } else {+ serverInfo.McpSetting = convertToMCPSetting(mcpSetting)+ }if s.sampleManager != nil {serverInfo.Sample.Available = s.sampleManager.CheckAvailable(ctx) == nilinstances, err := s.sampleManager.ListInstances(ctx, workspaceID)diff --git a/backend/api/v1/audit_redact_inventory_test.go b/backend/api/v1/audit_redact_inventory_test.goindex 2337851ff4..75c4a814e4 100644--- a/backend/api/v1/audit_redact_inventory_test.go+++ b/backend/api/v1/audit_redact_inventory_test.go@@ -691,7 +691,6 @@ var auditRecordedFields = []string{"bytebase.v1.MCPDelegation.correlation_id","bytebase.v1.MCPDelegation.resource","bytebase.v1.MCPDelegation.scope",- "bytebase.v1.MCPInfo.workspace","bytebase.v1.MaskingExemptionPolicy.Exemption.members","bytebase.v1.MaskingReason.algorithm","bytebase.v1.MaskingReason.context",diff --git a/backend/api/v1/mcp_gate.go b/backend/api/v1/mcp_gate.goindex e8ec8da60d..794a38d595 100644--- a/backend/api/v1/mcp_gate.go+++ b/backend/api/v1/mcp_gate.go@@ -283,6 +283,13 @@ func mcpSettingsFromContext(ctx context.Context) (*storepb.MCPSetting, bool) {return settings, ok && settings != nil}+func mcpSettingsForCurrentWorkspace(ctx context.Context, reader mcpSettingsReader, workspaceID string) (*storepb.MCPSetting, error) {+ if settings, ok := mcpSettingsFromContext(ctx); ok {+ return settings, nil+ }+ return reader.GetMCPSettingsUncached(ctx, workspaceID)+}+// internalMCPGateInterceptor refuses, before dispatch, every request an MCP// session may not make. The rule is one line — effective = ceiling ∩ RBAC — and// this interceptor is the ceiling half: it never grants anything, and ACL runsdiff --git a/backend/api/v1/mcp_info.go b/backend/api/v1/mcp_info.godeleted file mode 100644index 12eefe4ef8..0000000000--- a/backend/api/v1/mcp_info.go+++ /dev/null@@ -1,69 +0,0 @@-package v1--import (- "context"- "log/slog"-- "connectrpc.com/connect"- "github.com/pkg/errors"-- "github.com/bytebase/bytebase/backend/api/auth"- "github.com/bytebase/bytebase/backend/common"- "github.com/bytebase/bytebase/backend/common/log"- storepb "github.com/bytebase/bytebase/backend/generated-go/store"- v1pb "github.com/bytebase/bytebase/backend/generated-go/v1"-)--// GetMCPInfo reports the MCP ceiling in force in this workspace and whether-// masking narrows what a session reads under it.-//-// It is the only API a served MCP session or the consent page can read the-// ceiling from: SettingService/GetSetting is served by no ceiling, and answers-// from the generic cache besides.-func (s *WorkspaceService) GetMCPInfo(ctx context.Context, _ *connect.Request[v1pb.GetMCPInfoRequest]) (*connect.Response[v1pb.MCPInfo], error) {- workspaceID := common.GetWorkspaceIDFromContext(ctx)- if workspaceID == "" {- return nil, connect.NewError(connect.CodeInternal, errors.New("no workspace on the request"))- }- settings, err := s.mcpSettingsForInfo(ctx, workspaceID)- // Every verdict but an outage is answered, the refusing ceilings included:- // a workspace whose ceiling nothing serves still owes the repairing admin- // the value in force, and the consent page a policy to disclose (BOT-106).- // capability carries the refusal by arriving as a value this build does not- // serve — CAPABILITY_UNSPECIFIED for a stored name nothing resolves, the- // stored number itself for one a newer release wrote.- switch verdict := auth.ClassifyMCPCeiling(settings, err); verdict {- case auth.MCPCeilingServes, auth.MCPCeilingDisabled, auth.MCPCeilingUnserved:- default:- // The store error stays in the log. This method is served to MCP- // sessions and the tool layer renders a connect message into what the- // model reads, so a driver error text would leave the metadata- // database's shape in an agent's context.- //- // An outage has no ceiling to describe, and answering with an empty one- // would be indistinguishable from a row nobody can resolve.- slog.Error("failed to read the MCP setting", slog.String("workspace", workspaceID), log.BBError(err))- return nil, connect.NewError(connect.CodeUnavailable, errors.New(verdict.Refusal()))- }-- return connect.NewResponse(&v1pb.MCPInfo{- Workspace: common.FormatWorkspace(workspaceID),- Capability: convertToV1MCPCapability(settings.Capability),- IgnoreMaskingExemptions: settings.IgnoreMaskingExemptions,- DataMaskingAvailable: s.licenseService.IsFeatureEnabled(ctx, workspaceID, v1pb.PlanFeature_FEATURE_DATA_MASKING) == nil,- }), nil-}--// mcpSettingsForInfo returns the MCP settings this request is answered from.-//-// On the internal MCP chain the gate already resolved them and stamped them on-// the context; reading again could answer with a ceiling the request was not-// admitted under, which is the rule mcp_gate.go states and the clamp and the-// masking check both follow. Off that chain — the consent page, which reads-// this before it discloses anything — nothing is stamped and the store is read.-func (s *WorkspaceService) mcpSettingsForInfo(ctx context.Context, workspaceID string) (*storepb.MCPSetting, error) {- if settings, ok := mcpSettingsFromContext(ctx); ok {- return settings, nil- }- return s.store.GetMCPSettingsUncached(ctx, workspaceID)-}diff --git a/backend/api/v1/mcp_info_test.go b/backend/api/v1/mcp_info_test.goindex 186b2016b0..88ac990294 100644--- a/backend/api/v1/mcp_info_test.go+++ b/backend/api/v1/mcp_info_test.go@@ -17,18 +17,19 @@ import ("github.com/bytebase/bytebase/backend/store")-// TestGetMCPInfoHandler drives the RPC against a real store, across the ways a+// TestGetActuatorInfoMCPSetting drives the MCP setting in actuator info against+// a real store, across the ways a// stored row resolves: served, disabled, a name nothing resolves, a number// nothing serves, and a row that does not unmarshal. capability is the whole// answer now, and the consent page derives its three states from it alone, so// this is the backend receipt for what the page may disclose.-func TestGetMCPInfoHandler(t *testing.T) {+func TestGetActuatorInfoMCPSetting(t *testing.T) {ctx := context.Background()db, stores, _ := testcontainer.NewMetadataDB(t)licenseService, err := enterprise.NewLicenseService(common.ReleaseModeDev, stores, false, "")require.NoError(t, err)- service := NewWorkspaceService(stores, nil, &config.Profile{}, licenseService, nil)+ service := NewActuatorService(stores, &config.Profile{}, nil, licenseService, nil)const workspaceID = "mcp-info-handler"_, err = stores.CreateWorkspace(ctx, &store.WorkspaceMessage{@@ -37,14 +38,23 @@ func TestGetMCPInfoHandler(t *testing.T) {}, "[email protected]")require.NoError(t, err)- get := func(ctx context.Context) (*v1pb.MCPInfo, error) {- resp, err := service.GetMCPInfo(ctx, connect.NewRequest(&v1pb.GetMCPInfoRequest{}))+ user, err := stores.CreateUser(ctx, &store.UserMessage{+ Email: "[email protected]",+ Name: "Admin",+ PasswordHash: "unused",+ Profile: &storepb.UserProfile{},+ })+ require.NoError(t, err)++ get := func(ctx context.Context) (*v1pb.MCPSetting, error) {+ resp, err := service.GetActuatorInfo(ctx, connect.NewRequest(&v1pb.GetActuatorInfoRequest{}))if err != nil {return nil, err}- return resp.Msg, nil+ return resp.Msg.McpSetting, nil}workspaceCtx := func() context.Context {+ ctx := context.WithValue(ctx, common.UserContextKey, user)return context.WithValue(ctx, common.WorkspaceIDContextKey, workspaceID)}setCeiling := func(t *testing.T, value string) {@@ -59,7 +69,6 @@ func TestGetMCPInfoHandler(t *testing.T) {t.Run("a workspace with the default MCP policy", func(t *testing.T) {info, err := get(workspaceCtx())require.NoError(t, err)- require.Equal(t, "workspaces/"+workspaceID, info.Workspace)require.Equal(t, v1pb.MCPSetting_READ_ONLY, info.Capability,"a new workspace is seeded READ_ONLY; only a workspace with no row at all falls back to READ_WRITE")require.False(t, info.IgnoreMaskingExemptions)@@ -95,14 +104,11 @@ func TestGetMCPInfoHandler(t *testing.T) {"no MCP request runs under this ceiling, so the toggle carries neither the row's value nor a decision")})- // The subtest above covers a mistyped enum NAME, which unmarshals away to- // unset and is therefore describable. A wrong-TYPED value is different: it- // fails the whole unmarshal, so the generic setting read errors and there is- // no ceiling in the row to describe. The last two rows are why that is a- // property of the row and not of the capability — the capability is- // readable and a sibling field is not, and one failed unmarshal takes the- // whole row with it.- t.Run("a row that does not unmarshal is refused, not described", func(t *testing.T) {+ // A wrong-typed field fails the whole setting unmarshal. Actuator info is a+ // shared bootstrap response, so it remains available and leaves the optional+ // setting absent; the policy page then withholds editing rather than showing+ // a guessed ceiling.+ t.Run("a row that does not unmarshal leaves the setting absent", func(t *testing.T) {for _, row := range []string{`{"capability":{}}`,`{"capability":true}`,@@ -112,9 +118,9 @@ func TestGetMCPInfoHandler(t *testing.T) {`{"capability":"READ_ONLY","ignoreMaskingExemptions":"yes"}`,} {setCeiling(t, row)- _, err := get(workspaceCtx())- require.Error(t, err, "%s: no ceiling in the row to describe", row)- require.Equal(t, connect.CodeUnavailable, connect.CodeOf(err), row)+ setting, err := get(workspaceCtx())+ require.NoError(t, err, row)+ require.Nil(t, setting, row)}})@@ -146,7 +152,7 @@ func TestGetMCPInfoHandler(t *testing.T) {})t.Run("no workspace on the request", func(t *testing.T) {- _, err := get(ctx)+ _, err := get(context.WithValue(ctx, common.UserContextKey, user))require.Equal(t, connect.CodeInternal, connect.CodeOf(err))})}diff --git a/backend/api/v1/testdata/mcp_method_classification.md b/backend/api/v1/testdata/mcp_method_classification.mdindex cd4aba1e59..ffadc85307 100644--- a/backend/api/v1/testdata/mcp_method_classification.md+++ b/backend/api/v1/testdata/mcp_method_classification.md@@ -16,12 +16,12 @@ served by no ceiling.| Class | Methods | Meaning ||---|---|---|-| READ | 57 | served to a read-only session and above |+| READ | 56 | served to a read-only session and above || WRITE | 41 | served to a read-write session only || EXCLUDED | 85 | served by no ceiling this phase ships || FORBIDDEN | 35 | never served, whatever the ceiling || MCP_METHOD_CLASS_UNSPECIFIED | 0 | unclassified — CI rejects this, and the gate refuses it |-| **total** | **218** | |+| **total** | **217** | || Method | Class | Reason | Permission ||---|---|---|---|@@ -236,7 +236,6 @@ served by no ceiling.| WorkloadIdentityService/UpdateWorkloadIdentity | FORBIDDEN | MINTS_CREDENTIAL_FOR_OTHERS | bb.workloadIdentities.update || WorkspaceService/DeleteWorkspace | FORBIDDEN | ENDS_MEMBERSHIP | bb.workspaces.delete || WorkspaceService/GetIamPolicy | EXCLUDED | ADMINISTERS_THE_WORKSPACE | bb.workspaces.getIamPolicy |-| WorkspaceService/GetMCPInfo | READ | — | — || WorkspaceService/GetWorkspace | READ | — | — || WorkspaceService/LeaveWorkspace | FORBIDDEN | ENDS_MEMBERSHIP | — || WorkspaceService/ListWorkspaces | READ | — | — |diff --git a/backend/common/cel_filter.go b/backend/common/cel_filter.goindex 5b566ce568..2723a2e99b 100644--- a/backend/common/cel_filter.go+++ b/backend/common/cel_filter.go@@ -1,3 +1,4 @@+//nolint:revivepackage commonimport (diff --git a/backend/common/cel_filter_test.go b/backend/common/cel_filter_test.goindex 5c3bc17702..591151382f 100644--- a/backend/common/cel_filter_test.go+++ b/backend/common/cel_filter_test.go@@ -1,3 +1,4 @@+//nolint:revivepackage commonimport (diff --git a/backend/generated-go/v1/actuator_service.pb.go b/backend/generated-go/v1/actuator_service.pb.goindex 0389ec1662..a2825ae92a 100644--- a/backend/generated-go/v1/actuator_service.pb.go+++ b/backend/generated-go/v1/actuator_service.pb.go@@ -150,7 +150,9 @@ type ActuatorInfo struct {// The number of active VCS users seen in the active window.ActiveVcsUserCount int32 `protobuf:"varint,28,opt,name=active_vcs_user_count,json=activeVcsUserCount,proto3" json:"active_vcs_user_count,omitempty"`// Sample setup availability and provisioned resources.- Sample *SampleInfo `protobuf:"bytes,29,opt,name=sample,proto3" json:"sample,omitempty"`+ Sample *SampleInfo `protobuf:"bytes,29,opt,name=sample,proto3" json:"sample,omitempty"`+ // The MCP (Model Context Protocol) setting in the current workspace.+ McpSetting *MCPSetting `protobuf:"bytes,30,opt,name=mcp_setting,json=mcpSetting,proto3" json:"mcp_setting,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}@@ -290,6 +292,13 @@ func (x *ActuatorInfo) GetSample() *SampleInfo {return nil}+func (x *ActuatorInfo) GetMcpSetting() *MCPSetting {+ if x != nil {+ return x.McpSetting+ }+ return nil+}+// Instance describes one provisioned sample instance.type SampleInfo_Instance struct {state protoimpl.MessageState `protogen:"open.v1"`@@ -350,7 +359,7 @@ var File_v1_actuator_service_proto protoreflect.FileDescriptorconst file_v1_actuator_service_proto_rawDesc = "" +"\n" +- "\x19v1/actuator_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\"\x18\n" ++ "\x19v1/actuator_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\x1a\x18v1/setting_service.proto\"\x18\n" +"\x16GetActuatorInfoRequest\"\xfe\x01\n" +"\n" +"SampleInfo\x12!\n" +@@ -360,7 +369,7 @@ const file_v1_actuator_service_proto_rawDesc = "" +"\binstance\x18\x01 \x01(\tB\x1d\xe0A\x03\xfaA\x17\n" +"\x15bytebase.com/InstanceR\binstance\x12@\n" +"\vexpire_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +- "expireTime\"\x92\x06\n" ++ "expireTime\"\xd1\x06\n" +"\fActuatorInfo\x12\x1d\n" +"\aversion\x18\x01 \x01(\tB\x03\xe0A\x03R\aversion\x12\"\n" +"\n" +@@ -377,7 +386,9 @@ const file_v1_actuator_service_proto_rawDesc = "" +"\x0fdefault_project\x18\x1a \x01(\tB\x03\xe0A\x03R\x0edefaultProject\x12.\n" +"\x11user_count_in_iam\x18\x1b \x01(\x05B\x03\xe0A\x03R\x0euserCountInIam\x126\n" +"\x15active_vcs_user_count\x18\x1c \x01(\x05B\x03\xe0A\x03R\x12activeVcsUserCount\x124\n" +- "\x06sample\x18\x1d \x01(\v2\x17.bytebase.v1.SampleInfoB\x03\xe0A\x03R\x06sampleJ\x04\b\x03\x10\x04J\x04\b\x05\x10\bJ\x04\b\t\x10\n" ++ "\x06sample\x18\x1d \x01(\v2\x17.bytebase.v1.SampleInfoB\x03\xe0A\x03R\x06sample\x12=\n" ++ "\vmcp_setting\x18\x1e \x01(\v2\x17.bytebase.v1.MCPSettingB\x03\xe0A\x03R\n" ++ "mcpSettingJ\x04\b\x03\x10\x04J\x04\b\x05\x10\bJ\x04\b\t\x10\n" +"J\x04\b\n" +"\x10\vJ\x04\b\f\x10\rJ\x04\b\x0e\x10\x0fJ\x04\b\x10\x10\x14J\x04\b\x16\x10\x17J\x04\b\x19\x10\x1a2\x86\x01\n" +"\x0fActuatorService\x12s\n" +@@ -403,19 +414,21 @@ var file_v1_actuator_service_proto_goTypes = []any{(*ActuatorInfo)(nil), // 2: bytebase.v1.ActuatorInfo(*SampleInfo_Instance)(nil), // 3: bytebase.v1.SampleInfo.Instance(*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp+ (*MCPSetting)(nil), // 5: bytebase.v1.MCPSetting}var file_v1_actuator_service_proto_depIdxs = []int32{3, // 0: bytebase.v1.SampleInfo.instances:type_name -> bytebase.v1.SampleInfo.Instance4, // 1: bytebase.v1.ActuatorInfo.last_active_time:type_name -> google.protobuf.Timestamp1, // 2: bytebase.v1.ActuatorInfo.sample:type_name -> bytebase.v1.SampleInfo- 4, // 3: bytebase.v1.SampleInfo.Instance.expire_time:type_name -> google.protobuf.Timestamp- 0, // 4: bytebase.v1.ActuatorService.GetActuatorInfo:input_type -> bytebase.v1.GetActuatorInfoRequest- 2, // 5: bytebase.v1.ActuatorService.GetActuatorInfo:output_type -> bytebase.v1.ActuatorInfo- 5, // [5:6] is the sub-list for method output_type- 4, // [4:5] is the sub-list for method input_type- 4, // [4:4] is the sub-list for extension type_name- 4, // [4:4] is the sub-list for extension extendee- 0, // [0:4] is the sub-list for field type_name+ 5, // 3: bytebase.v1.ActuatorInfo.mcp_setting:type_name -> bytebase.v1.MCPSetting+ 4, // 4: bytebase.v1.SampleInfo.Instance.expire_time:type_name -> google.protobuf.Timestamp+ 0, // 5: bytebase.v1.ActuatorService.GetActuatorInfo:input_type -> bytebase.v1.GetActuatorInfoRequest+ 2, // 6: bytebase.v1.ActuatorService.GetActuatorInfo:output_type -> bytebase.v1.ActuatorInfo+ 6, // [6:7] is the sub-list for method output_type+ 5, // [5:6] is the sub-list for method input_type+ 5, // [5:5] is the sub-list for extension type_name+ 5, // [5:5] is the sub-list for extension extendee+ 0, // [0:5] is the sub-list for field type_name}func init() { file_v1_actuator_service_proto_init() }@@ -424,6 +437,7 @@ func file_v1_actuator_service_proto_init() {return}file_v1_annotation_proto_init()+ file_v1_setting_service_proto_init()type x struct{}out := protoimpl.TypeBuilder{File: protoimpl.DescBuilder{diff --git a/backend/generated-go/v1/actuator_service_equal.pb.go b/backend/generated-go/v1/actuator_service_equal.pb.goindex 0c50a01679..b81ab5253e 100644--- a/backend/generated-go/v1/actuator_service_equal.pb.go+++ b/backend/generated-go/v1/actuator_service_equal.pb.go@@ -107,5 +107,8 @@ func (x *ActuatorInfo) Equal(y *ActuatorInfo) bool {if !x.Sample.Equal(y.Sample) {return false}+ if !x.McpSetting.Equal(y.McpSetting) {+ return false+ }return true}diff --git a/backend/generated-go/v1/v1connect/workspace_service.connect.go b/backend/generated-go/v1/v1connect/workspace_service.connect.goindex 1203fcd5dc..ad4cf7e22d 100644--- a/backend/generated-go/v1/v1connect/workspace_service.connect.go+++ b/backend/generated-go/v1/v1connect/workspace_service.connect.go@@ -54,9 +54,6 @@ const (// WorkspaceServiceSetIamPolicyProcedure is the fully-qualified name of the WorkspaceService's// SetIamPolicy RPC.WorkspaceServiceSetIamPolicyProcedure = "/bytebase.v1.WorkspaceService/SetIamPolicy"- // WorkspaceServiceGetMCPInfoProcedure is the fully-qualified name of the WorkspaceService's- // GetMCPInfo RPC.- WorkspaceServiceGetMCPInfoProcedure = "/bytebase.v1.WorkspaceService/GetMCPInfo"// WorkspaceServiceRotateDirectorySyncTokenProcedure is the fully-qualified name of the// WorkspaceService's RotateDirectorySyncToken RPC.WorkspaceServiceRotateDirectorySyncTokenProcedure = "/bytebase.v1.WorkspaceService/RotateDirectorySyncToken"@@ -88,17 +85,6 @@ type WorkspaceServiceClient interface {// Sets IAM policy for the workspace.// Permissions required: bb.workspaces.setIamPolicySetIamPolicy(context.Context, *connect.Request[v1.SetIamPolicyRequest]) (*connect.Response[v1.IamPolicy], error)- // Gets what MCP (Model Context Protocol) does in this workspace: the- // capability ceiling in force, and whether masking narrows what a session- // reads under it. The workspace is resolved from the authenticated session.- //- // Served to MCP sessions. An agent asking what it may do here is the point:- // the response says nothing a session's own denials do not already say, one- // refusal at a time, and knowing it up front is what stops the agent- // planning work the ceiling was never going to serve.- //- // Permissions required: None (authentication required)- GetMCPInfo(context.Context, *connect.Request[v1.GetMCPInfoRequest]) (*connect.Response[v1.MCPInfo], error)// Mints a new directory sync (SCIM) token, immediately invalidating the// previous one. The plaintext token is returned exactly once and cannot be// retrieved afterwards; only its hash is stored. Callers that lose it must@@ -160,12 +146,6 @@ func NewWorkspaceServiceClient(httpClient connect.HTTPClient, baseURL string, opconnect.WithSchema(workspaceServiceMethods.ByName("SetIamPolicy")),connect.WithClientOptions(opts...),),- getMCPInfo: connect.NewClient[v1.GetMCPInfoRequest, v1.MCPInfo](- httpClient,- baseURL+WorkspaceServiceGetMCPInfoProcedure,- connect.WithSchema(workspaceServiceMethods.ByName("GetMCPInfo")),- connect.WithClientOptions(opts...),- ),rotateDirectorySyncToken: connect.NewClient[v1.RotateDirectorySyncTokenRequest, v1.RotateDirectorySyncTokenResponse](httpClient,baseURL+WorkspaceServiceRotateDirectorySyncTokenProcedure,@@ -184,7 +164,6 @@ type workspaceServiceClient struct {deleteWorkspace *connect.Client[v1.DeleteWorkspaceRequest, v1.LoginResponse]leaveWorkspace *connect.Client[v1.LeaveWorkspaceRequest, v1.LoginResponse]setIamPolicy *connect.Client[v1.SetIamPolicyRequest, v1.IamPolicy]- getMCPInfo *connect.Client[v1.GetMCPInfoRequest, v1.MCPInfo]rotateDirectorySyncToken *connect.Client[v1.RotateDirectorySyncTokenRequest, v1.RotateDirectorySyncTokenResponse]}@@ -223,11 +202,6 @@ func (c *workspaceServiceClient) SetIamPolicy(ctx context.Context, req *connect.return c.setIamPolicy.CallUnary(ctx, req)}-// GetMCPInfo calls bytebase.v1.WorkspaceService.GetMCPInfo.-func (c *workspaceServiceClient) GetMCPInfo(ctx context.Context, req *connect.Request[v1.GetMCPInfoRequest]) (*connect.Response[v1.MCPInfo], error) {- return c.getMCPInfo.CallUnary(ctx, req)-}-// RotateDirectorySyncToken calls bytebase.v1.WorkspaceService.RotateDirectorySyncToken.func (c *workspaceServiceClient) RotateDirectorySyncToken(ctx context.Context, req *connect.Request[v1.RotateDirectorySyncTokenRequest]) (*connect.Response[v1.RotateDirectorySyncTokenResponse], error) {return c.rotateDirectorySyncToken.CallUnary(ctx, req)@@ -259,17 +233,6 @@ type WorkspaceServiceHandler interface {// Sets IAM policy for the workspace.// Permissions required: bb.workspaces.setIamPolicySetIamPolicy(context.Context, *connect.Request[v1.SetIamPolicyRequest]) (*connect.Response[v1.IamPolicy], error)- // Gets what MCP (Model Context Protocol) does in this workspace: the- // capability ceiling in force, and whether masking narrows what a session- // reads under it. The workspace is resolved from the authenticated session.- //- // Served to MCP sessions. An agent asking what it may do here is the point:- // the response says nothing a session's own denials do not already say, one- // refusal at a time, and knowing it up front is what stops the agent- // planning work the ceiling was never going to serve.- //- // Permissions required: None (authentication required)- GetMCPInfo(context.Context, *connect.Request[v1.GetMCPInfoRequest]) (*connect.Response[v1.MCPInfo], error)// Mints a new directory sync (SCIM) token, immediately invalidating the// previous one. The plaintext token is returned exactly once and cannot be// retrieved afterwards; only its hash is stored. Callers that lose it must@@ -327,12 +290,6 @@ func NewWorkspaceServiceHandler(svc WorkspaceServiceHandler, opts ...connect.Hanconnect.WithSchema(workspaceServiceMethods.ByName("SetIamPolicy")),connect.WithHandlerOptions(opts...),)- workspaceServiceGetMCPInfoHandler := connect.NewUnaryHandler(- WorkspaceServiceGetMCPInfoProcedure,- svc.GetMCPInfo,- connect.WithSchema(workspaceServiceMethods.ByName("GetMCPInfo")),- connect.WithHandlerOptions(opts...),- )workspaceServiceRotateDirectorySyncTokenHandler := connect.NewUnaryHandler(WorkspaceServiceRotateDirectorySyncTokenProcedure,svc.RotateDirectorySyncToken,@@ -355,8 +312,6 @@ func NewWorkspaceServiceHandler(svc WorkspaceServiceHandler, opts ...connect.HanworkspaceServiceLeaveWorkspaceHandler.ServeHTTP(w, r)case WorkspaceServiceSetIamPolicyProcedure:workspaceServiceSetIamPolicyHandler.ServeHTTP(w, r)- case WorkspaceServiceGetMCPInfoProcedure:- workspaceServiceGetMCPInfoHandler.ServeHTTP(w, r)case WorkspaceServiceRotateDirectorySyncTokenProcedure:workspaceServiceRotateDirectorySyncTokenHandler.ServeHTTP(w, r)default:@@ -396,10 +351,6 @@ func (UnimplementedWorkspaceServiceHandler) SetIamPolicy(context.Context, *connereturn nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.WorkspaceService.SetIamPolicy is not implemented"))}-func (UnimplementedWorkspaceServiceHandler) GetMCPInfo(context.Context, *connect.Request[v1.GetMCPInfoRequest]) (*connect.Response[v1.MCPInfo], error) {- return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.WorkspaceService.GetMCPInfo is not implemented"))-}-func (UnimplementedWorkspaceServiceHandler) RotateDirectorySyncToken(context.Context, *connect.Request[v1.RotateDirectorySyncTokenRequest]) (*connect.Response[v1.RotateDirectorySyncTokenResponse], error) {return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.WorkspaceService.RotateDirectorySyncToken is not implemented"))}diff --git a/backend/generated-go/v1/workspace_service.pb.go b/backend/generated-go/v1/workspace_service.pb.goindex 6137326a09..99c9e0d151 100644--- a/backend/generated-go/v1/workspace_service.pb.go+++ b/backend/generated-go/v1/workspace_service.pb.go@@ -23,132 +23,6 @@ const (_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20))-type GetMCPInfoRequest struct {- state protoimpl.MessageState `protogen:"open.v1"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *GetMCPInfoRequest) Reset() {- *x = GetMCPInfoRequest{}- mi := &file_v1_workspace_service_proto_msgTypes[0]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *GetMCPInfoRequest) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*GetMCPInfoRequest) ProtoMessage() {}--func (x *GetMCPInfoRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_workspace_service_proto_msgTypes[0]- 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 GetMCPInfoRequest.ProtoReflect.Descriptor instead.-func (*GetMCPInfoRequest) Descriptor() ([]byte, []int) {- return file_v1_workspace_service_proto_rawDescGZIP(), []int{0}-}--// MCPInfo is what MCP does in this workspace: the ceiling in force, and-// whether masking narrows what a session reads under it.-//-// This is the only API a served MCP session or the consent page can read the-// ceiling from. SettingService/GetSetting is served by no ceiling, and its-// answer is cached besides.-type MCPInfo struct {- state protoimpl.MessageState `protogen:"open.v1"`- // The workspace this describes. Format: workspaces/{workspace}. Not this- // message's own resource name — MCPInfo is not a named resource and there is- // nothing to get it by.- Workspace string `protobuf:"bytes,1,opt,name=workspace,proto3" json:"workspace,omitempty"`- // The ceiling in force for this workspace. Any value outside the enum this- // build serves, CAPABILITY_UNSPECIFIED included, means no ceiling could be- // resolved from the stored row and every MCP connection is refused. A stored- // name nothing resolves arrives as CAPABILITY_UNSPECIFIED; a number a newer- // release wrote arrives verbatim.- Capability MCPSetting_Capability `protobuf:"varint,2,opt,name=capability,proto3,enum=bytebase.v1.MCPSetting_Capability" json:"capability,omitempty"`- // Whether this workspace stops applying the caller's own unmasking- // provisioning to MCP requests. It narrows what a session reads only where- // Bytebase masks by column and consults exemptions; elsewhere it suppresses- // nothing.- IgnoreMaskingExemptions bool `protobuf:"varint,6,opt,name=ignore_masking_exemptions,json=ignoreMaskingExemptions,proto3" json:"ignore_masking_exemptions,omitempty"`- // Whether data masking is licensed for this workspace. When false nothing is- // masked whatever an engine supports, so the toggle above suppresses nothing.- // Licensing can also be set per instance, so a true here is the workspace- // answer, not a promise about every instance.- DataMaskingAvailable bool `protobuf:"varint,7,opt,name=data_masking_available,json=dataMaskingAvailable,proto3" json:"data_masking_available,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *MCPInfo) Reset() {- *x = MCPInfo{}- mi := &file_v1_workspace_service_proto_msgTypes[1]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *MCPInfo) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*MCPInfo) ProtoMessage() {}--func (x *MCPInfo) ProtoReflect() protoreflect.Message {- mi := &file_v1_workspace_service_proto_msgTypes[1]- 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 MCPInfo.ProtoReflect.Descriptor instead.-func (*MCPInfo) Descriptor() ([]byte, []int) {- return file_v1_workspace_service_proto_rawDescGZIP(), []int{1}-}--func (x *MCPInfo) GetWorkspace() string {- if x != nil {- return x.Workspace- }- return ""-}--func (x *MCPInfo) GetCapability() MCPSetting_Capability {- if x != nil {- return x.Capability- }- return MCPSetting_CAPABILITY_UNSPECIFIED-}--func (x *MCPInfo) GetIgnoreMaskingExemptions() bool {- if x != nil {- return x.IgnoreMaskingExemptions- }- return false-}--func (x *MCPInfo) GetDataMaskingAvailable() bool {- if x != nil {- return x.DataMaskingAvailable- }- return false-}-type RotateDirectorySyncTokenRequest struct {state protoimpl.MessageState `protogen:"open.v1"`// The workspace whose directory sync token is rotated.@@ -160,7 +34,7 @@ type RotateDirectorySyncTokenRequest struct {func (x *RotateDirectorySyncTokenRequest) Reset() {*x = RotateDirectorySyncTokenRequest{}- mi := &file_v1_workspace_service_proto_msgTypes[2]+ mi := &file_v1_workspace_service_proto_msgTypes[0]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -172,7 +46,7 @@ func (x *RotateDirectorySyncTokenRequest) String() string {func (*RotateDirectorySyncTokenRequest) ProtoMessage() {}func (x *RotateDirectorySyncTokenRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_workspace_service_proto_msgTypes[2]+ mi := &file_v1_workspace_service_proto_msgTypes[0]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -185,7 +59,7 @@ func (x *RotateDirectorySyncTokenRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use RotateDirectorySyncTokenRequest.ProtoReflect.Descriptor instead.func (*RotateDirectorySyncTokenRequest) Descriptor() ([]byte, []int) {- return file_v1_workspace_service_proto_rawDescGZIP(), []int{2}+ return file_v1_workspace_service_proto_rawDescGZIP(), []int{0}}func (x *RotateDirectorySyncTokenRequest) GetName() string {@@ -205,7 +79,7 @@ type RotateDirectorySyncTokenResponse struct {func (x *RotateDirectorySyncTokenResponse) Reset() {*x = RotateDirectorySyncTokenResponse{}- mi := &file_v1_workspace_service_proto_msgTypes[3]+ mi := &file_v1_workspace_service_proto_msgTypes[1]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -217,7 +91,7 @@ func (x *RotateDirectorySyncTokenResponse) String() string {func (*RotateDirectorySyncTokenResponse) ProtoMessage() {}func (x *RotateDirectorySyncTokenResponse) ProtoReflect() protoreflect.Message {- mi := &file_v1_workspace_service_proto_msgTypes[3]+ mi := &file_v1_workspace_service_proto_msgTypes[1]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -230,7 +104,7 @@ func (x *RotateDirectorySyncTokenResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use RotateDirectorySyncTokenResponse.ProtoReflect.Descriptor instead.func (*RotateDirectorySyncTokenResponse) Descriptor() ([]byte, []int) {- return file_v1_workspace_service_proto_rawDescGZIP(), []int{3}+ return file_v1_workspace_service_proto_rawDescGZIP(), []int{1}}func (x *RotateDirectorySyncTokenResponse) GetToken() string {@@ -248,7 +122,7 @@ type ListWorkspacesRequest struct {func (x *ListWorkspacesRequest) Reset() {*x = ListWorkspacesRequest{}- mi := &file_v1_workspace_service_proto_msgTypes[4]+ mi := &file_v1_workspace_service_proto_msgTypes[2]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -260,7 +134,7 @@ func (x *ListWorkspacesRequest) String() string {func (*ListWorkspacesRequest) ProtoMessage() {}func (x *ListWorkspacesRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_workspace_service_proto_msgTypes[4]+ mi := &file_v1_workspace_service_proto_msgTypes[2]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -273,7 +147,7 @@ func (x *ListWorkspacesRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use ListWorkspacesRequest.ProtoReflect.Descriptor instead.func (*ListWorkspacesRequest) Descriptor() ([]byte, []int) {- return file_v1_workspace_service_proto_rawDescGZIP(), []int{4}+ return file_v1_workspace_service_proto_rawDescGZIP(), []int{2}}type ListWorkspacesResponse struct {@@ -285,7 +159,7 @@ type ListWorkspacesResponse struct {func (x *ListWorkspacesResponse) Reset() {*x = ListWorkspacesResponse{}- mi := &file_v1_workspace_service_proto_msgTypes[5]+ mi := &file_v1_workspace_service_proto_msgTypes[3]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -297,7 +171,7 @@ func (x *ListWorkspacesResponse) String() string {func (*ListWorkspacesResponse) ProtoMessage() {}func (x *ListWorkspacesResponse) ProtoReflect() protoreflect.Message {- mi := &file_v1_workspace_service_proto_msgTypes[5]+ mi := &file_v1_workspace_service_proto_msgTypes[3]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -310,7 +184,7 @@ func (x *ListWorkspacesResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use ListWorkspacesResponse.ProtoReflect.Descriptor instead.func (*ListWorkspacesResponse) Descriptor() ([]byte, []int) {- return file_v1_workspace_service_proto_rawDescGZIP(), []int{5}+ return file_v1_workspace_service_proto_rawDescGZIP(), []int{3}}func (x *ListWorkspacesResponse) GetWorkspaces() []*Workspace {@@ -331,7 +205,7 @@ type GetWorkspaceRequest struct {func (x *GetWorkspaceRequest) Reset() {*x = GetWorkspaceRequest{}- mi := &file_v1_workspace_service_proto_msgTypes[6]+ mi := &file_v1_workspace_service_proto_msgTypes[4]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -343,7 +217,7 @@ func (x *GetWorkspaceRequest) String() string {func (*GetWorkspaceRequest) ProtoMessage() {}func (x *GetWorkspaceRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_workspace_service_proto_msgTypes[6]+ mi := &file_v1_workspace_service_proto_msgTypes[4]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -356,7 +230,7 @@ func (x *GetWorkspaceRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use GetWorkspaceRequest.ProtoReflect.Descriptor instead.func (*GetWorkspaceRequest) Descriptor() ([]byte, []int) {- return file_v1_workspace_service_proto_rawDescGZIP(), []int{6}+ return file_v1_workspace_service_proto_rawDescGZIP(), []int{4}}func (x *GetWorkspaceRequest) GetName() string {@@ -379,7 +253,7 @@ type Workspace struct {func (x *Workspace) Reset() {*x = Workspace{}- mi := &file_v1_workspace_service_proto_msgTypes[7]+ mi := &file_v1_workspace_service_proto_msgTypes[5]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -391,7 +265,7 @@ func (x *Workspace) String() string {func (*Workspace) ProtoMessage() {}func (x *Workspace) ProtoReflect() protoreflect.Message {- mi := &file_v1_workspace_service_proto_msgTypes[7]+ mi := &file_v1_workspace_service_proto_msgTypes[5]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -404,7 +278,7 @@ func (x *Workspace) ProtoReflect() protoreflect.Message {// Deprecated: Use Workspace.ProtoReflect.Descriptor instead.func (*Workspace) Descriptor() ([]byte, []int) {- return file_v1_workspace_service_proto_rawDescGZIP(), []int{7}+ return file_v1_workspace_service_proto_rawDescGZIP(), []int{5}}func (x *Workspace) GetName() string {@@ -438,7 +312,7 @@ type DeleteWorkspaceRequest struct {func (x *DeleteWorkspaceRequest) Reset() {*x = DeleteWorkspaceRequest{}- mi := &file_v1_workspace_service_proto_msgTypes[8]+ mi := &file_v1_workspace_service_proto_msgTypes[6]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -450,7 +324,7 @@ func (x *DeleteWorkspaceRequest) String() string {func (*DeleteWorkspaceRequest) ProtoMessage() {}func (x *DeleteWorkspaceRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_workspace_service_proto_msgTypes[8]+ mi := &file_v1_workspace_service_proto_msgTypes[6]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -463,7 +337,7 @@ func (x *DeleteWorkspaceRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use DeleteWorkspaceRequest.ProtoReflect.Descriptor instead.func (*DeleteWorkspaceRequest) Descriptor() ([]byte, []int) {- return file_v1_workspace_service_proto_rawDescGZIP(), []int{8}+ return file_v1_workspace_service_proto_rawDescGZIP(), []int{6}}func (x *DeleteWorkspaceRequest) GetName() string {@@ -483,7 +357,7 @@ type UpdateWorkspaceRequest struct {func (x *UpdateWorkspaceRequest) Reset() {*x = UpdateWorkspaceRequest{}- mi := &file_v1_workspace_service_proto_msgTypes[9]+ mi := &file_v1_workspace_service_proto_msgTypes[7]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -495,7 +369,7 @@ func (x *UpdateWorkspaceRequest) String() string {func (*UpdateWorkspaceRequest) ProtoMessage() {}func (x *UpdateWorkspaceRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_workspace_service_proto_msgTypes[9]+ mi := &file_v1_workspace_service_proto_msgTypes[7]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -508,7 +382,7 @@ func (x *UpdateWorkspaceRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use UpdateWorkspaceRequest.ProtoReflect.Descriptor instead.func (*UpdateWorkspaceRequest) Descriptor() ([]byte, []int) {- return file_v1_workspace_service_proto_rawDescGZIP(), []int{9}+ return file_v1_workspace_service_proto_rawDescGZIP(), []int{7}}func (x *UpdateWorkspaceRequest) GetWorkspace() *Workspace {@@ -535,7 +409,7 @@ type LeaveWorkspaceRequest struct {func (x *LeaveWorkspaceRequest) Reset() {*x = LeaveWorkspaceRequest{}- mi := &file_v1_workspace_service_proto_msgTypes[10]+ mi := &file_v1_workspace_service_proto_msgTypes[8]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -547,7 +421,7 @@ func (x *LeaveWorkspaceRequest) String() string {func (*LeaveWorkspaceRequest) ProtoMessage() {}func (x *LeaveWorkspaceRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_workspace_service_proto_msgTypes[10]+ mi := &file_v1_workspace_service_proto_msgTypes[8]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -560,7 +434,7 @@ func (x *LeaveWorkspaceRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use LeaveWorkspaceRequest.ProtoReflect.Descriptor instead.func (*LeaveWorkspaceRequest) Descriptor() ([]byte, []int) {- return file_v1_workspace_service_proto_rawDescGZIP(), []int{10}+ return file_v1_workspace_service_proto_rawDescGZIP(), []int{8}}func (x *LeaveWorkspaceRequest) GetName() string {@@ -574,15 +448,7 @@ var File_v1_workspace_service_proto protoreflect.FileDescriptorconst file_v1_workspace_service_proto_rawDesc = "" +"\n" +- "\x1av1/workspace_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x13v1/annotation.proto\x1a\x15v1/auth_service.proto\x1a\x13v1/iam_policy.proto\x1a\x18v1/setting_service.proto\"\x13\n" +- "\x11GetMCPInfoRequest\"\x9c\x02\n" +- "\aMCPInfo\x12!\n" +- "\tworkspace\x18\x01 \x01(\tB\x03\xe0A\x03R\tworkspace\x12G\n" +- "\n" +- "capability\x18\x02 \x01(\x0e2\".bytebase.v1.MCPSetting.CapabilityB\x03\xe0A\x03R\n" +- "capability\x12?\n" +- "\x19ignore_masking_exemptions\x18\x06 \x01(\bB\x03\xe0A\x03R\x17ignoreMaskingExemptions\x129\n" +- "\x16data_masking_available\x18\a \x01(\bB\x03\xe0A\x03R\x14dataMaskingAvailableJ\x04\b\x03\x10\x04J\x04\b\x04\x10\x05J\x04\b\x05\x10\x06R\x05modesR\amethodsR\aengines\"U\n" ++ "\x1av1/workspace_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x13v1/annotation.proto\x1a\x15v1/auth_service.proto\x1a\x13v1/iam_policy.proto\"U\n" +"\x1fRotateDirectorySyncTokenRequest\x122\n" +"\x04name\x18\x01 \x01(\tB\x1e\xe0A\x02\xfaA\x18\n" +"\x16bytebase.com/WorkspaceR\x04name\"A\n" +@@ -606,7 +472,8 @@ const file_v1_workspace_service_proto_rawDesc = "" +"\vupdate_mask\x18\x02 \x01(\v2\x1a.google.protobuf.FieldMaskR\n" +"updateMask\"0\n" +"\x15LeaveWorkspaceRequest\x12\x17\n" +- "\x04name\x18\x01 \x01(\tB\x03\xe0A\x02R\x04name2\x80\v\n" ++ "\x04name\x18\x01 \x01(\tB\x03\xe0A\x02R\x04name2\x9f\n" ++ "\n" +"\x10WorkspaceService\x12q\n" +"\fGetWorkspace\x12 .bytebase.v1.GetWorkspaceRequest\x1a\x16.bytebase.v1.Workspace\"'\x80\xea0\x01\xa0\xea0\x01\x82\xd3\xe4\x93\x02\x19\x12\x17/v1/{name=workspaces/*}\x12y\n" +"\x0eListWorkspaces\x12\".bytebase.v1.ListWorkspacesRequest\x1a#.bytebase.v1.ListWorkspacesResponse\"\x1e\x90\xea0\x02\xa0\xea0\x01\x82\xd3\xe4\x93\x02\x10\x12\x0e/v1/workspaces\x12\xa4\x01\n" +@@ -614,9 +481,7 @@ const file_v1_workspace_service_proto_rawDesc = "" +"\fGetIamPolicy\x12 .bytebase.v1.GetIamPolicyRequest\x1a\x16.bytebase.v1.IamPolicy\"Z\x8a\xea0\x1abb.workspaces.getIamPolicy\x90\xea0\x01\xa0\xea0\x04\xa8\xea0\t\x82\xd3\xe4\x93\x02*\x12(/v1/{resource=workspaces/*}:getIamPolicy\x12\x9b\x01\n" +"\x0fDeleteWorkspace\x12#.bytebase.v1.DeleteWorkspaceRequest\x1a\x1a.bytebase.v1.LoginResponse\"G\x8a\xea0\x14bb.workspaces.delete\x90\xea0\x01\x98\xea0\x01\xa0\xea0\x03\xa8\xea0\x05\x82\xd3\xe4\x93\x02\x19*\x17/v1/{name=workspaces/*}\x12\x8a\x01\n" +"\x0eLeaveWorkspace\x12\".bytebase.v1.LeaveWorkspaceRequest\x1a\x1a.bytebase.v1.LoginResponse\"8\x90\xea0\x02\x98\xea0\x01\xa0\xea0\x03\xa8\xea0\x05\x82\xd3\xe4\x93\x02\":\x01*\"\x1d/v1/{name=workspaces/*}:leave\x12\xab\x01\n" +- "\fSetIamPolicy\x12 .bytebase.v1.SetIamPolicyRequest\x1a\x16.bytebase.v1.IamPolicy\"a\x8a\xea0\x1abb.workspaces.setIamPolicy\x90\xea0\x01\x98\xea0\x01\xa0\xea0\x04\xa8\xea0\t\x82\xd3\xe4\x93\x02-:\x01*\"(/v1/{resource=workspaces/*}:setIamPolicy\x12_\n" +- "\n" +- "GetMCPInfo\x12\x1e.bytebase.v1.GetMCPInfoRequest\x1a\x14.bytebase.v1.MCPInfo\"\x1b\xdaA\x00\xa0\xea0\x01\x82\xd3\xe4\x93\x02\x0e\x12\f/v1/mcp/info\x12\xf5\x01\n" ++ "\fSetIamPolicy\x12 .bytebase.v1.SetIamPolicyRequest\x1a\x16.bytebase.v1.IamPolicy\"a\x8a\xea0\x1abb.workspaces.setIamPolicy\x90\xea0\x01\x98\xea0\x01\xa0\xea0\x04\xa8\xea0\t\x82\xd3\xe4\x93\x02-:\x01*\"(/v1/{resource=workspaces/*}:setIamPolicy\x12\xf5\x01\n" +"\x18RotateDirectorySyncToken\x12,.bytebase.v1.RotateDirectorySyncTokenRequest\x1a-.bytebase.v1.RotateDirectorySyncTokenResponse\"|\xdaA\x04name\x8a\xea0&bb.workspaces.rotateDirectorySyncToken\x90\xea0\x01\x98\xea0\x01\xa0\xea0\x03\xa8\xea0\x06\x82\xd3\xe4\x93\x025:\x01*\"0/v1/{name=workspaces/*}:rotateDirectorySyncTokenB\xab\x01\n" +"\x0fcom.bytebase.v1B\x15WorkspaceServiceProtoP\x01Z4github.com/bytebase/bytebase/backend/generated-go/v1\xa2\x02\x03BXX\xaa\x02\vBytebase.V1\xca\x02\vBytebase\\V1\xe2\x02\x17Bytebase\\V1\\GPBMetadata\xea\x02\fBytebase::V1b\x06proto3"@@ -632,54 +497,48 @@ func file_v1_workspace_service_proto_rawDescGZIP() []byte {return file_v1_workspace_service_proto_rawDescData}-var file_v1_workspace_service_proto_msgTypes = make([]protoimpl.MessageInfo, 11)+var file_v1_workspace_service_proto_msgTypes = make([]protoimpl.MessageInfo, 9)var file_v1_workspace_service_proto_goTypes = []any{- (*GetMCPInfoRequest)(nil), // 0: bytebase.v1.GetMCPInfoRequest- (*MCPInfo)(nil), // 1: bytebase.v1.MCPInfo- (*RotateDirectorySyncTokenRequest)(nil), // 2: bytebase.v1.RotateDirectorySyncTokenRequest- (*RotateDirectorySyncTokenResponse)(nil), // 3: bytebase.v1.RotateDirectorySyncTokenResponse- (*ListWorkspacesRequest)(nil), // 4: bytebase.v1.ListWorkspacesRequest- (*ListWorkspacesResponse)(nil), // 5: bytebase.v1.ListWorkspacesResponse- (*GetWorkspaceRequest)(nil), // 6: bytebase.v1.GetWorkspaceRequest- (*Workspace)(nil), // 7: bytebase.v1.Workspace- (*DeleteWorkspaceRequest)(nil), // 8: bytebase.v1.DeleteWorkspaceRequest- (*UpdateWorkspaceRequest)(nil), // 9: bytebase.v1.UpdateWorkspaceRequest- (*LeaveWorkspaceRequest)(nil), // 10: bytebase.v1.LeaveWorkspaceRequest- (MCPSetting_Capability)(0), // 11: bytebase.v1.MCPSetting.Capability- (*fieldmaskpb.FieldMask)(nil), // 12: google.protobuf.FieldMask- (*GetIamPolicyRequest)(nil), // 13: bytebase.v1.GetIamPolicyRequest- (*SetIamPolicyRequest)(nil), // 14: bytebase.v1.SetIamPolicyRequest- (*IamPolicy)(nil), // 15: bytebase.v1.IamPolicy- (*LoginResponse)(nil), // 16: bytebase.v1.LoginResponse+ (*RotateDirectorySyncTokenRequest)(nil), // 0: bytebase.v1.RotateDirectorySyncTokenRequest+ (*RotateDirectorySyncTokenResponse)(nil), // 1: bytebase.v1.RotateDirectorySyncTokenResponse+ (*ListWorkspacesRequest)(nil), // 2: bytebase.v1.ListWorkspacesRequest+ (*ListWorkspacesResponse)(nil), // 3: bytebase.v1.ListWorkspacesResponse+ (*GetWorkspaceRequest)(nil), // 4: bytebase.v1.GetWorkspaceRequest+ (*Workspace)(nil), // 5: bytebase.v1.Workspace+ (*DeleteWorkspaceRequest)(nil), // 6: bytebase.v1.DeleteWorkspaceRequest+ (*UpdateWorkspaceRequest)(nil), // 7: bytebase.v1.UpdateWorkspaceRequest+ (*LeaveWorkspaceRequest)(nil), // 8: bytebase.v1.LeaveWorkspaceRequest+ (*fieldmaskpb.FieldMask)(nil), // 9: google.protobuf.FieldMask+ (*GetIamPolicyRequest)(nil), // 10: bytebase.v1.GetIamPolicyRequest+ (*SetIamPolicyRequest)(nil), // 11: bytebase.v1.SetIamPolicyRequest+ (*IamPolicy)(nil), // 12: bytebase.v1.IamPolicy+ (*LoginResponse)(nil), // 13: bytebase.v1.LoginResponse}var file_v1_workspace_service_proto_depIdxs = []int32{- 11, // 0: bytebase.v1.MCPInfo.capability:type_name -> bytebase.v1.MCPSetting.Capability- 7, // 1: bytebase.v1.ListWorkspacesResponse.workspaces:type_name -> bytebase.v1.Workspace- 7, // 2: bytebase.v1.UpdateWorkspaceRequest.workspace:type_name -> bytebase.v1.Workspace- 12, // 3: bytebase.v1.UpdateWorkspaceRequest.update_mask:type_name -> google.protobuf.FieldMask- 6, // 4: bytebase.v1.WorkspaceService.GetWorkspace:input_type -> bytebase.v1.GetWorkspaceRequest- 4, // 5: bytebase.v1.WorkspaceService.ListWorkspaces:input_type -> bytebase.v1.ListWorkspacesRequest- 9, // 6: bytebase.v1.WorkspaceService.UpdateWorkspace:input_type -> bytebase.v1.UpdateWorkspaceRequest- 13, // 7: bytebase.v1.WorkspaceService.GetIamPolicy:input_type -> bytebase.v1.GetIamPolicyRequest- 8, // 8: bytebase.v1.WorkspaceService.DeleteWorkspace:input_type -> bytebase.v1.DeleteWorkspaceRequest- 10, // 9: bytebase.v1.WorkspaceService.LeaveWorkspace:input_type -> bytebase.v1.LeaveWorkspaceRequest- 14, // 10: bytebase.v1.WorkspaceService.SetIamPolicy:input_type -> bytebase.v1.SetIamPolicyRequest- 0, // 11: bytebase.v1.WorkspaceService.GetMCPInfo:input_type -> bytebase.v1.GetMCPInfoRequest- 2, // 12: bytebase.v1.WorkspaceService.RotateDirectorySyncToken:input_type -> bytebase.v1.RotateDirectorySyncTokenRequest- 7, // 13: bytebase.v1.WorkspaceService.GetWorkspace:output_type -> bytebase.v1.Workspace- 5, // 14: bytebase.v1.WorkspaceService.ListWorkspaces:output_type -> bytebase.v1.ListWorkspacesResponse- 7, // 15: bytebase.v1.WorkspaceService.UpdateWorkspace:output_type -> bytebase.v1.Workspace- 15, // 16: bytebase.v1.WorkspaceService.GetIamPolicy:output_type -> bytebase.v1.IamPolicy- 16, // 17: bytebase.v1.WorkspaceService.DeleteWorkspace:output_type -> bytebase.v1.LoginResponse- 16, // 18: bytebase.v1.WorkspaceService.LeaveWorkspace:output_type -> bytebase.v1.LoginResponse- 15, // 19: bytebase.v1.WorkspaceService.SetIamPolicy:output_type -> bytebase.v1.IamPolicy- 1, // 20: bytebase.v1.WorkspaceService.GetMCPInfo:output_type -> bytebase.v1.MCPInfo- 3, // 21: bytebase.v1.WorkspaceService.RotateDirectorySyncToken:output_type -> bytebase.v1.RotateDirectorySyncTokenResponse- 13, // [13:22] is the sub-list for method output_type- 4, // [4:13] is the sub-list for method input_type- 4, // [4:4] is the sub-list for extension type_name- 4, // [4:4] is the sub-list for extension extendee- 0, // [0:4] is the sub-list for field type_name+ 5, // 0: bytebase.v1.ListWorkspacesResponse.workspaces:type_name -> bytebase.v1.Workspace+ 5, // 1: bytebase.v1.UpdateWorkspaceRequest.workspace:type_name -> bytebase.v1.Workspace+ 9, // 2: bytebase.v1.UpdateWorkspaceRequest.update_mask:type_name -> google.protobuf.FieldMask+ 4, // 3: bytebase.v1.WorkspaceService.GetWorkspace:input_type -> bytebase.v1.GetWorkspaceRequest+ 2, // 4: bytebase.v1.WorkspaceService.ListWorkspaces:input_type -> bytebase.v1.ListWorkspacesRequest+ 7, // 5: bytebase.v1.WorkspaceService.UpdateWorkspace:input_type -> bytebase.v1.UpdateWorkspaceRequest+ 10, // 6: bytebase.v1.WorkspaceService.GetIamPolicy:input_type -> bytebase.v1.GetIamPolicyRequest+ 6, // 7: bytebase.v1.WorkspaceService.DeleteWorkspace:input_type -> bytebase.v1.DeleteWorkspaceRequest+ 8, // 8: bytebase.v1.WorkspaceService.LeaveWorkspace:input_type -> bytebase.v1.LeaveWorkspaceRequest+ 11, // 9: bytebase.v1.WorkspaceService.SetIamPolicy:input_type -> bytebase.v1.SetIamPolicyRequest+ 0, // 10: bytebase.v1.WorkspaceService.RotateDirectorySyncToken:input_type -> bytebase.v1.RotateDirectorySyncTokenRequest+ 5, // 11: bytebase.v1.WorkspaceService.GetWorkspace:output_type -> bytebase.v1.Workspace+ 3, // 12: bytebase.v1.WorkspaceService.ListWorkspaces:output_type -> bytebase.v1.ListWorkspacesResponse+ 5, // 13: bytebase.v1.WorkspaceService.UpdateWorkspace:output_type -> bytebase.v1.Workspace+ 12, // 14: bytebase.v1.WorkspaceService.GetIamPolicy:output_type -> bytebase.v1.IamPolicy+ 13, // 15: bytebase.v1.WorkspaceService.DeleteWorkspace:output_type -> bytebase.v1.LoginResponse+ 13, // 16: bytebase.v1.WorkspaceService.LeaveWorkspace:output_type -> bytebase.v1.LoginResponse+ 12, // 17: bytebase.v1.WorkspaceService.SetIamPolicy:output_type -> bytebase.v1.IamPolicy+ 1, // 18: bytebase.v1.WorkspaceService.RotateDirectorySyncToken:output_type -> bytebase.v1.RotateDirectorySyncTokenResponse+ 11, // [11:19] is the sub-list for method output_type+ 3, // [3:11] is the sub-list for method input_type+ 3, // [3:3] is the sub-list for extension type_name+ 3, // [3:3] is the sub-list for extension extendee+ 0, // [0:3] is the sub-list for field type_name}func init() { file_v1_workspace_service_proto_init() }@@ -690,14 +549,13 @@ func file_v1_workspace_service_proto_init() {file_v1_annotation_proto_init()file_v1_auth_service_proto_init()file_v1_iam_policy_proto_init()- file_v1_setting_service_proto_init()type x struct{}out := protoimpl.TypeBuilder{File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_workspace_service_proto_rawDesc), len(file_v1_workspace_service_proto_rawDesc)),NumEnums: 0,- NumMessages: 11,+ NumMessages: 9,NumExtensions: 0,NumServices: 1,},diff --git a/backend/generated-go/v1/workspace_service.pb.gw.go b/backend/generated-go/v1/workspace_service.pb.gw.goindex 3960cd4956..3cd9057274 100644--- a/backend/generated-go/v1/workspace_service.pb.gw.go+++ b/backend/generated-go/v1/workspace_service.pb.gw.go@@ -308,27 +308,6 @@ func local_request_WorkspaceService_SetIamPolicy_0(ctx context.Context, marshalereturn msg, metadata, err}-func request_WorkspaceService_GetMCPInfo_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var (- protoReq GetMCPInfoRequest- metadata runtime.ServerMetadata- )- if req.Body != nil {- _, _ = io.Copy(io.Discard, req.Body)- }- msg, err := client.GetMCPInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))- return msg, metadata, err-}--func local_request_WorkspaceService_GetMCPInfo_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var (- protoReq GetMCPInfoRequest- metadata runtime.ServerMetadata- )- msg, err := server.GetMCPInfo(ctx, &protoReq)- return msg, metadata, err-}-func request_WorkspaceService_RotateDirectorySyncToken_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {var (protoReq RotateDirectorySyncTokenRequest@@ -520,26 +499,6 @@ func RegisterWorkspaceServiceHandlerServer(ctx context.Context, mux *runtime.Ser}forward_WorkspaceService_SetIamPolicy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)})- mux.Handle(http.MethodGet, pattern_WorkspaceService_GetMCPInfo_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.WorkspaceService/GetMCPInfo", runtime.WithHTTPPathPattern("/v1/mcp/info"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := local_request_WorkspaceService_GetMCPInfo_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_WorkspaceService_GetMCPInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)- })mux.Handle(http.MethodPost, pattern_WorkspaceService_RotateDirectorySyncToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {ctx, cancel := context.WithCancel(req.Context())defer cancel()@@ -719,23 +678,6 @@ func RegisterWorkspaceServiceHandlerClient(ctx context.Context, mux *runtime.Ser}forward_WorkspaceService_SetIamPolicy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)})- mux.Handle(http.MethodGet, pattern_WorkspaceService_GetMCPInfo_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.WorkspaceService/GetMCPInfo", runtime.WithHTTPPathPattern("/v1/mcp/info"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := request_WorkspaceService_GetMCPInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams)- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)- if err != nil {- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)- return- }- forward_WorkspaceService_GetMCPInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)- })mux.Handle(http.MethodPost, pattern_WorkspaceService_RotateDirectorySyncToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {ctx, cancel := context.WithCancel(req.Context())defer cancel()@@ -764,7 +706,6 @@ var (pattern_WorkspaceService_DeleteWorkspace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "workspaces", "name"}, ""))pattern_WorkspaceService_LeaveWorkspace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "workspaces", "name"}, "leave"))pattern_WorkspaceService_SetIamPolicy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "workspaces", "resource"}, "setIamPolicy"))- pattern_WorkspaceService_GetMCPInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "mcp", "info"}, ""))pattern_WorkspaceService_RotateDirectorySyncToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "workspaces", "name"}, "rotateDirectorySyncToken")))@@ -776,6 +717,5 @@ var (forward_WorkspaceService_DeleteWorkspace_0 = runtime.ForwardResponseMessageforward_WorkspaceService_LeaveWorkspace_0 = runtime.ForwardResponseMessageforward_WorkspaceService_SetIamPolicy_0 = runtime.ForwardResponseMessage- forward_WorkspaceService_GetMCPInfo_0 = runtime.ForwardResponseMessageforward_WorkspaceService_RotateDirectorySyncToken_0 = runtime.ForwardResponseMessage)diff --git a/backend/generated-go/v1/workspace_service_equal.pb.go b/backend/generated-go/v1/workspace_service_equal.pb.goindex d7d7d7205a..331ff3293e 100644--- a/backend/generated-go/v1/workspace_service_equal.pb.go+++ b/backend/generated-go/v1/workspace_service_equal.pb.go@@ -8,38 +8,6 @@ import (fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb")-func (x *GetMCPInfoRequest) Equal(y *GetMCPInfoRequest) bool {- if x == y {- return true- }- if x == nil || y == nil {- return x == nil && y == nil- }- return true-}--func (x *MCPInfo) Equal(y *MCPInfo) bool {- if x == y {- return true- }- if x == nil || y == nil {- return x == nil && y == nil- }- if x.Workspace != y.Workspace {- return false- }- if x.Capability != y.Capability {- return false- }- if x.IgnoreMaskingExemptions != y.IgnoreMaskingExemptions {- return false- }- if x.DataMaskingAvailable != y.DataMaskingAvailable {- return false- }- return true-}-func (x *RotateDirectorySyncTokenRequest) Equal(y *RotateDirectorySyncTokenRequest) bool {if x == y {return truediff --git a/backend/generated-go/v1/workspace_service_grpc.pb.go b/backend/generated-go/v1/workspace_service_grpc.pb.goindex ce503e1291..ea339d6178 100644--- a/backend/generated-go/v1/workspace_service_grpc.pb.go+++ b/backend/generated-go/v1/workspace_service_grpc.pb.go@@ -26,7 +26,6 @@ const (WorkspaceService_DeleteWorkspace_FullMethodName = "/bytebase.v1.WorkspaceService/DeleteWorkspace"WorkspaceService_LeaveWorkspace_FullMethodName = "/bytebase.v1.WorkspaceService/LeaveWorkspace"WorkspaceService_SetIamPolicy_FullMethodName = "/bytebase.v1.WorkspaceService/SetIamPolicy"- WorkspaceService_GetMCPInfo_FullMethodName = "/bytebase.v1.WorkspaceService/GetMCPInfo"WorkspaceService_RotateDirectorySyncToken_FullMethodName = "/bytebase.v1.WorkspaceService/RotateDirectorySyncToken")@@ -60,17 +59,6 @@ type WorkspaceServiceClient interface {// Sets IAM policy for the workspace.// Permissions required: bb.workspaces.setIamPolicySetIamPolicy(ctx context.Context, in *SetIamPolicyRequest, opts ...grpc.CallOption) (*IamPolicy, error)- // Gets what MCP (Model Context Protocol) does in this workspace: the- // capability ceiling in force, and whether masking narrows what a session- // reads under it. The workspace is resolved from the authenticated session.- //- // Served to MCP sessions. An agent asking what it may do here is the point:- // the response says nothing a session's own denials do not already say, one- // refusal at a time, and knowing it up front is what stops the agent- // planning work the ceiling was never going to serve.- //- // Permissions required: None (authentication required)- GetMCPInfo(ctx context.Context, in *GetMCPInfoRequest, opts ...grpc.CallOption) (*MCPInfo, error)// Mints a new directory sync (SCIM) token, immediately invalidating the// previous one. The plaintext token is returned exactly once and cannot be// retrieved afterwards; only its hash is stored. Callers that lose it must@@ -157,16 +145,6 @@ func (c *workspaceServiceClient) SetIamPolicy(ctx context.Context, in *SetIamPolreturn out, nil}-func (c *workspaceServiceClient) GetMCPInfo(ctx context.Context, in *GetMCPInfoRequest, opts ...grpc.CallOption) (*MCPInfo, error) {- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)- out := new(MCPInfo)- err := c.cc.Invoke(ctx, WorkspaceService_GetMCPInfo_FullMethodName, in, out, cOpts...)- if err != nil {- return nil, err- }- return out, nil-}-func (c *workspaceServiceClient) RotateDirectorySyncToken(ctx context.Context, in *RotateDirectorySyncTokenRequest, opts ...grpc.CallOption) (*RotateDirectorySyncTokenResponse, error) {cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)out := new(RotateDirectorySyncTokenResponse)@@ -207,17 +185,6 @@ type WorkspaceServiceServer interface {// Sets IAM policy for the workspace.// Permissions required: bb.workspaces.setIamPolicySetIamPolicy(context.Context, *SetIamPolicyRequest) (*IamPolicy, error)- // Gets what MCP (Model Context Protocol) does in this workspace: the- // capability ceiling in force, and whether masking narrows what a session- // reads under it. The workspace is resolved from the authenticated session.- //- // Served to MCP sessions. An agent asking what it may do here is the point:- // the response says nothing a session's own denials do not already say, one- // refusal at a time, and knowing it up front is what stops the agent- // planning work the ceiling was never going to serve.- //- // Permissions required: None (authentication required)- GetMCPInfo(context.Context, *GetMCPInfoRequest) (*MCPInfo, error)// Mints a new directory sync (SCIM) token, immediately invalidating the// previous one. The plaintext token is returned exactly once and cannot be// retrieved afterwards; only its hash is stored. Callers that lose it must@@ -255,9 +222,6 @@ func (UnimplementedWorkspaceServiceServer) LeaveWorkspace(context.Context, *Leavfunc (UnimplementedWorkspaceServiceServer) SetIamPolicy(context.Context, *SetIamPolicyRequest) (*IamPolicy, error) {return nil, status.Error(codes.Unimplemented, "method SetIamPolicy not implemented")}-func (UnimplementedWorkspaceServiceServer) GetMCPInfo(context.Context, *GetMCPInfoRequest) (*MCPInfo, error) {- return nil, status.Error(codes.Unimplemented, "method GetMCPInfo not implemented")-}func (UnimplementedWorkspaceServiceServer) RotateDirectorySyncToken(context.Context, *RotateDirectorySyncTokenRequest) (*RotateDirectorySyncTokenResponse, error) {return nil, status.Error(codes.Unimplemented, "method RotateDirectorySyncToken not implemented")}@@ -408,24 +372,6 @@ func _WorkspaceService_SetIamPolicy_Handler(srv interface{}, ctx context.Contextreturn interceptor(ctx, in, info, handler)}-func _WorkspaceService_GetMCPInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {- in := new(GetMCPInfoRequest)- if err := dec(in); err != nil {- return nil, err- }- if interceptor == nil {- return srv.(WorkspaceServiceServer).GetMCPInfo(ctx, in)- }- info := &grpc.UnaryServerInfo{- Server: srv,- FullMethod: WorkspaceService_GetMCPInfo_FullMethodName,- }- handler := func(ctx context.Context, req interface{}) (interface{}, error) {- return srv.(WorkspaceServiceServer).GetMCPInfo(ctx, req.(*GetMCPInfoRequest))- }- return interceptor(ctx, in, info, handler)-}-func _WorkspaceService_RotateDirectorySyncToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {in := new(RotateDirectorySyncTokenRequest)if err := dec(in); err != nil {@@ -479,10 +425,6 @@ var WorkspaceService_ServiceDesc = grpc.ServiceDesc{MethodName: "SetIamPolicy",Handler: _WorkspaceService_SetIamPolicy_Handler,},- {- MethodName: "GetMCPInfo",- Handler: _WorkspaceService_GetMCPInfo_Handler,- },{MethodName: "RotateDirectorySyncToken",Handler: _WorkspaceService_RotateDirectorySyncToken_Handler,diff --git a/docs/design/v1-api-audit-2026-09.md b/docs/design/v1-api-audit-2026-09.mdindex d5f071e7ea..2a051272a2 100644--- a/docs/design/v1-api-audit-2026-09.md+++ b/docs/design/v1-api-audit-2026-09.md@@ -606,8 +606,8 @@ runtime check.### A1 · Unset `auth_method` means "any principal" — MED-`GetActuatorInfo`, `BatchParse`, `BatchDeparse`, `GetSubscription`, `ListPurchasePlans` and-`GetMCPInfo` carry no `auth_method`. `doIAMPermissionCheck` returns true for anything that is not+`GetActuatorInfo`, `BatchParse`, `BatchDeparse`, `GetSubscription` and `ListPurchasePlans`+carry no `auth_method`. `doIAMPermissionCheck` returns true for anything that is not`IAM` (`acl.go:254-256`), so UNSPECIFIED and CUSTOM are indistinguishable to the interceptor andthe effective rule is "any authenticated member of the workspace" — right for all six today, andthe default an RPC gets by forgetting the annotation. Nothing rejects `AUTH_METHOD_UNSPECIFIED`:@@ -616,7 +616,7 @@ same descriptor walk, one more assertion.### A2 · The published permission is not the checked one — MED-`GetMCPInfo` publishes each method's `permission` option to agents (`mcp_info.go:143-145`); the+The MCP OpenAPI publishes each method's `permission` option to agents; the`Permissions required:` comment publishes it to the OpenAPI. Four methods publish one thing andcheck another:@@ -638,7 +638,7 @@ check another:The other eleven CUSTOM methods that declare a permission check exactly it, with documentedcreator/owner/member bypasses. The fix is one of two: make the annotation mean something onCUSTOM methods by having the handler declare its check where a test can read it, or drop it from-CUSTOM methods so `GetMCPInfo` stops publishing a contract nobody enforces.+CUSTOM methods so the MCP OpenAPI stops publishing a contract nobody enforces.### A3 · The resource extractor still fails silent — MED@@ -768,7 +768,7 @@ follow.6. **Three more descriptor-walking assertions** (A1, A3, A4): no `AUTH_METHOD_UNSPECIFIED`, nowrite request that resolves to the workspace by falling through the extractor, and a`Permissions required:` line on every RPC. Decide what `permission` means on a CUSTOM method- and make `GetMCPInfo` publish only what is true (A2).+and make the MCP OpenAPI publish only what is true (A2).7. **Pagination where it is still cheap** (L1–L5): negative `page_size` errors in`parseLimitAndOffset`; `page_size`/`page_token` on `ListDatabaseGroups`, `ListPolicies`,`ListReleaseCategories`, `SearchSavedQueryFolders` and a renamed `:listDatabases` custom methoddiff --git a/frontend/src/app/router/routes.test.tsx b/frontend/src/app/router/routes.test.tsxindex 183232c18d..1b7cc4ecc5 100644--- a/frontend/src/app/router/routes.test.tsx+++ b/frontend/src/app/router/routes.test.tsx@@ -3,7 +3,9 @@ import { describe, expect, it } from "vitest";import {PROJECT_V1_ROUTE_PLAN_DETAIL_SPECS,WORKSPACE_ROUTE_404,+ WORKSPACE_ROUTE_MCP,} from "@/app/router/handles";+import { buildReactRoute } from "./index";import { routes } from "./routes";import { sqlEditorRoutes } from "./routes/sqlEditor";@@ -85,6 +87,20 @@ describe("workspace root", () => {});});+describe("MCP integration route", () => {+ it("does not require settings access to open the setup page", () => {+ const matches = matchRoutes(routes, "/integration/mcp");+ const route = buildReactRoute(+ { pathname: "/integration/mcp", search: "", hash: "" },+ (matches ?? []).map((match) => ({ handle: match.route.handle })),+ {}+ );++ expect(route.name).toBe(WORKSPACE_ROUTE_MCP);+ expect(route.requiredPermissions).toEqual([]);+ });+});+describe("react route table reachability", () => {it("marks SQL Editor layout leaves with an explicit null element", () => {const children = sqlEditorRoutes[0].children ?? [];diff --git a/frontend/src/app/router/routes/dashboard.tsx b/frontend/src/app/router/routes/dashboard.tsxindex dd1c014dc6..57206cc913 100644--- a/frontend/src/app/router/routes/dashboard.tsx+++ b/frontend/src/app/router/routes/dashboard.tsx@@ -416,7 +416,6 @@ const workspaceLevelRoutes: RouteObject[] = [path: "mcp",handle: {name: WORKSPACE_ROUTE_MCP,- requiredPermissionList: (): Permission[] => ["bb.settings.get"],},lazy: lazyPage(() => import("@/routes/workspace/MCPPage"),diff --git a/frontend/src/components/mcp/mcpPolicy.test.ts b/frontend/src/components/mcp/mcpPolicy.test.tsindex 14142b1dde..4472413c7f 100644--- a/frontend/src/components/mcp/mcpPolicy.test.ts+++ b/frontend/src/components/mcp/mcpPolicy.test.ts@@ -1,7 +1,9 @@import { create } from "@bufbuild/protobuf";import { describe, expect, test } from "vitest";-import { MCPSetting_Capability } from "@/types/proto-es/v1/setting_service_pb";-import { MCPInfoSchema } from "@/types/proto-es/v1/workspace_service_pb";+import {+ MCPSetting_Capability,+ MCPSettingSchema,+} from "@/types/proto-es/v1/setting_service_pb";import {isMCPMode,MCP_CAPABILITY_CHOICES,@@ -40,7 +42,8 @@ describe("isMCPMode", () => {});});-const infoWith = (capability: number) => create(MCPInfoSchema, { capability });+const settingWith = (capability: number) =>+ create(MCPSettingSchema, { capability });describe("readConsentCeiling", () => {test("no response is the policy being unknown, not absent", () => {@@ -48,15 +51,15 @@ describe("readConsentCeiling", () => {});test("a served ceiling carries the response the disclosure needs", () => {- const info = infoWith(MCPSetting_Capability.READ_WRITE);- expect(readConsentCeiling(info)).toEqual({ kind: "mode", info });+ const setting = settingWith(MCPSetting_Capability.READ_WRITE);+ expect(readConsentCeiling(setting)).toEqual({ kind: "mode", setting });});test("disabled is a policy, so it reaches its own screen", () => {// Not undisclosable: an admin turned MCP off, which is a decision this page// can name and the one refusing ceiling with a screen of its own.- const info = infoWith(MCPSetting_Capability.DISABLED);- expect(readConsentCeiling(info)).toEqual({ kind: "mode", info });+ const setting = settingWith(MCPSetting_Capability.DISABLED);+ expect(readConsentCeiling(setting)).toEqual({ kind: "mode", setting });});// The three ways a stored ceiling reaches this page without a name for it.@@ -64,15 +67,21 @@ describe("readConsentCeiling", () => {// the remedy the page prints now names both repairs, so they are one state.test("a value nothing could resolve is undisclosable", () => {expect(- readConsentCeiling(infoWith(MCPSetting_Capability.CAPABILITY_UNSPECIFIED))+ readConsentCeiling(+ settingWith(MCPSetting_Capability.CAPABILITY_UNSPECIFIED)+ )).toEqual({ kind: "undisclosable" });});test("the reserved tier is undisclosable", () => {- expect(readConsentCeiling(infoWith(2))).toEqual({ kind: "undisclosable" });+ expect(readConsentCeiling(settingWith(2))).toEqual({+ kind: "undisclosable",+ });});test("a tier a newer release wrote is undisclosable", () => {- expect(readConsentCeiling(infoWith(5))).toEqual({ kind: "undisclosable" });+ expect(readConsentCeiling(settingWith(5))).toEqual({+ kind: "undisclosable",+ });});});diff --git a/frontend/src/components/mcp/mcpPolicy.ts b/frontend/src/components/mcp/mcpPolicy.tsindex 1496d2e72a..5feda5f609 100644--- a/frontend/src/components/mcp/mcpPolicy.ts+++ b/frontend/src/components/mcp/mcpPolicy.ts@@ -1,5 +1,7 @@-import { MCPSetting_Capability } from "@/types/proto-es/v1/setting_service_pb";-import type { MCPInfo } from "@/types/proto-es/v1/workspace_service_pb";+import {+ type MCPSetting,+ MCPSetting_Capability,+} from "@/types/proto-es/v1/setting_service_pb";export type MCPMode =| MCPSetting_Capability.DISABLED@@ -31,14 +33,14 @@ export const isMCPMode = (*/export type ConsentCeiling =/** Carries the response, so the disclosure cannot be rendered without it. */- | { kind: "mode"; info: MCPInfo }- /** GetMCPInfo failed or timed out. The policy is not known to be anything. */+ | { kind: "mode"; setting: MCPSetting }+ /** Actuator info did not provide a policy. The policy is not known to be anything. */| { kind: "unknown" }/** A stored ceiling this build has no wording for, whatever wrote it. */| { kind: "undisclosable" };/**- * Reads a GetMCPInfo response — or its absence — into that state.+ * Reads the MCP setting in actuator info — or its absence — into that state.** The check is local and total: a capability this bundle can name is one it has* copy for. That covers a value nothing resolved (CAPABILITY_UNSPECIFIED), the@@ -46,13 +48,13 @@ export type ConsentCeiling =* of the three it is.*/export const readConsentCeiling = (- info: MCPInfo | undefined+ setting: MCPSetting | undefined): ConsentCeiling => {- if (!info) {+ if (!setting) {return { kind: "unknown" };}- if (!isMCPMode(info.capability)) {+ if (!isMCPMode(setting.capability)) {return { kind: "undisclosable" };}- return { kind: "mode", info };+ return { kind: "mode", setting };};diff --git a/frontend/src/routes/auth/MCPConsentCeiling.tsx b/frontend/src/routes/auth/MCPConsentCeiling.tsxindex 3bffad951e..0a03c63d3a 100644--- a/frontend/src/routes/auth/MCPConsentCeiling.tsx+++ b/frontend/src/routes/auth/MCPConsentCeiling.tsx@@ -3,8 +3,10 @@ import type { ReactNode } from "react";import { useTranslation } from "react-i18next";import { Alert } from "@/components/ui/alert";import { Badge } from "@/components/ui/badge";-import { MCPSetting_Capability } from "@/types/proto-es/v1/setting_service_pb";-import type { MCPInfo } from "@/types/proto-es/v1/workspace_service_pb";+import {+ type MCPSetting,+ MCPSetting_Capability,+} from "@/types/proto-es/v1/setting_service_pb";interface Line {readonly key: string;@@ -13,7 +15,8 @@ interface Line {}interface Props {- readonly info: MCPInfo;+ readonly setting: MCPSetting;+ readonly dataMaskingAvailable: boolean;}/**@@ -24,10 +27,10 @@ interface Props {* render of a decision the backend makes either way — never the decision* itself.*/-export function MCPConsentCeiling({ info }: Props) {+export function MCPConsentCeiling({ setting, dataMaskingAvailable }: Props) {const { t } = useTranslation();- const readWrite = info.capability === MCPSetting_Capability.READ_WRITE;+ const readWrite = setting.capability === MCPSetting_Capability.READ_WRITE;const modeKey = readWrite ? "read-write" : "read-only";const modeLabel = t(`settings.mcp.policy.mode.${modeKey}.title`);@@ -69,7 +72,7 @@ export function MCPConsentCeiling({ info }: Props) {// withholds unmasking exemptions from MCP sessions, which changes nothing// where masking does not run at all — asserting it there would tell the// person approving that their data is covered when it is not.- ...(info.ignoreMaskingExemptions && info.dataMaskingAvailable+ ...(setting.ignoreMaskingExemptions && dataMaskingAvailable? [{key: "masking",diff --git a/frontend/src/routes/auth/OAuth2ConsentPage.test.tsx b/frontend/src/routes/auth/OAuth2ConsentPage.test.tsxindex 0e95d71648..1a252460ea 100644--- a/frontend/src/routes/auth/OAuth2ConsentPage.test.tsx+++ b/frontend/src/routes/auth/OAuth2ConsentPage.test.tsx@@ -24,6 +24,9 @@ const mocks = vi.hoisted(() => ({workspaceList: { value: [] as { name: string; title: string }[] },loadWorkspace: vi.fn(async () => {}),loadWorkspaceList: vi.fn(async () => {}),+ refreshSubscription: vi.fn(),+ loadServerInfo: vi.fn(),+ refreshServerInfo: vi.fn(),switchWorkspace: vi.fn(async () => {}),routerReplace: vi.fn(),routerBack: vi.fn(),@@ -34,7 +37,7 @@ const mocks = vi.hoisted(() => ({},},fetchImpl: vi.fn(),- getMCPInfo: vi.fn(),+ dataMaskingAvailable: { value: true },}));mocks.useAuthStore.mockImplementation(() => ({get isLoggedIn() {@@ -55,15 +58,13 @@ mocks.useAppStore.mockImplementation((selector: (state: unknown) => unknown) =>isLoggedIn: () => mocks.isLoggedIn.value,loadWorkspace: mocks.loadWorkspace,loadWorkspaceList: mocks.loadWorkspaceList,+ refreshSubscription: mocks.refreshSubscription,+ loadServerInfo: mocks.loadServerInfo,+ refreshServerInfo: mocks.refreshServerInfo,switchWorkspace: mocks.switchWorkspace,+ hasFeature: () => mocks.dataMaskingAvailable.value,}));-// The consent page also calls `useAppStore.getState().loadServerInfo()` on mount.-(mocks.useAppStore as unknown as { getState: () => unknown }).getState =- () => ({- loadServerInfo: vi.fn().mockResolvedValue(undefined),- });-vi.mock("@/hooks/useAppState", () => ({useWorkspace: mocks.useWorkspace,}));@@ -126,17 +127,11 @@ vi.mock("@/components/BytebaseLogo", () => ({BytebaseLogo: () => null,}));-vi.mock("@/api", () => ({- workspaceServiceClientConnect: { getMCPInfo: mocks.getMCPInfo },-}));-vi.mock("react-i18next", () => ({useTranslation: () => ({t: (key: string, vars?: Record<string, string>) =>vars ? `${key}:${JSON.stringify(vars)}` : key,}),- // The page now reaches the connect client for GetMCPInfo, and @/api's error- // middleware imports the shared i18n instance, which registers this.initReactI18next: { type: "3rdParty", init: () => {} },}));@@ -179,15 +174,16 @@ beforeEach(async () => {mocks.currentRoute.value.fullPath = "/oauth2/consent";globalThis.fetch = mocks.fetchImpl as typeof fetch;mocks.fetchImpl.mockReset();- mocks.getMCPInfo.mockReset();+ mocks.dataMaskingAvailable.value = true;// Default: a served read-only ceiling, the page's ordinary case. Allow// renders only under one, so a failing default would leave every test that// is not about the ceiling asserting against the undisclosed card.- mocks.getMCPInfo.mockResolvedValue({- capability: 3,- ignoreMaskingExemptions: false,- dataMaskingAvailable: true,- });+ const serverInfo = {+ mcpSetting: { capability: 3, ignoreMaskingExemptions: false },+ };+ mocks.loadServerInfo.mockResolvedValue(serverInfo);+ mocks.refreshServerInfo.mockResolvedValue(serverInfo);+ mocks.refreshSubscription.mockResolvedValue({});({ OAuth2ConsentPage } = await import("./OAuth2ConsentPage"));});@@ -238,6 +234,7 @@ describe("OAuth2ConsentPage", () => {render();await flushPromises();expect(mocks.fetchImpl).toHaveBeenCalledWith("/api/oauth2/clients/c1");+ expect(mocks.refreshSubscription).toHaveBeenCalledOnce();expect(container.textContent).toContain("Acme");expect(container.querySelector('form[method="POST"]')).not.toBeNull();const hiddenClientId = container.querySelector<HTMLInputElement>(@@ -515,19 +512,73 @@ describe("OAuth2ConsentPage", () => {code_challenge_method: "S256",});- const renderWithCeiling = async (info: Record<string, unknown>) => {+ const renderWithCeiling = async (setting: Record<string, unknown>) => {mocks.currentRoute.value.query = consentQuery();mocks.fetchImpl.mockResolvedValue({ok: true,json: async () => ({ client_name: "Acme" }),});- mocks.getMCPInfo.mockResolvedValue(info);+ mocks.refreshServerInfo.mockResolvedValue({ mcpSetting: setting });const handle = renderIntoContainer(<OAuth2ConsentPage />);handle.render();await flushPromises();return handle;};+ test("refreshes the ceiling before presenting consent", async () => {+ mocks.currentRoute.value.query = consentQuery();+ mocks.fetchImpl.mockResolvedValue({+ ok: true,+ json: async () => ({ client_name: "Acme" }),+ });+ mocks.loadServerInfo.mockResolvedValue({+ mcpSetting: { capability: 3, ignoreMaskingExemptions: false },+ });+ mocks.refreshServerInfo.mockResolvedValue({+ mcpSetting: { capability: 4, ignoreMaskingExemptions: false },+ });++ const { container, render, unmount } = renderIntoContainer(+ <OAuth2ConsentPage />+ );+ render();+ await flushPromises();++ expect(mocks.refreshServerInfo).toHaveBeenCalledOnce();+ expect(mocks.loadServerInfo).not.toHaveBeenCalled();+ expect(container.textContent).toContain("oauth2.consent.mcp.line.write");+ unmount();+ });++ test("waits for a fresh subscription before presenting consent", async () => {+ mocks.currentRoute.value.query = consentQuery();+ mocks.fetchImpl.mockResolvedValue({+ ok: true,+ json: async () => ({ client_name: "Acme" }),+ });+ let resolveSubscription: (() => void) | undefined;+ mocks.refreshSubscription.mockImplementation(+ () =>+ new Promise((resolve) => {+ resolveSubscription = () => resolve({});+ })+ );++ const { container, render, unmount } = renderIntoContainer(+ <OAuth2ConsentPage />+ );+ try {+ render();+ await flushPromises();++ expect(mocks.refreshSubscription).toHaveBeenCalledOnce();+ expect(container.querySelector('form[method="POST"]')).toBeNull();+ } finally {+ resolveSubscription?.();+ unmount();+ }+ });+// Codex, #21237: the !response.ok branch returned, its sibling catch did not.// The render checks loading before error, so a failed client lookup sat// behind the spinner until an optional policy request it no longer needed@@ -535,9 +586,6 @@ describe("OAuth2ConsentPage", () => {test("a failed client lookup shows its error without waiting on the policy", async () => {mocks.currentRoute.value.query = consentQuery();mocks.fetchImpl.mockRejectedValue(new Error("network down"));- // Never settles: if the error waits on this, the test sees the spinner.- mocks.getMCPInfo.mockReturnValue(new Promise(() => {}));-const handle = renderIntoContainer(<OAuth2ConsentPage />);handle.render();await flushPromises();@@ -569,7 +617,6 @@ describe("OAuth2ConsentPage", () => {const { container, unmount } = await renderWithCeiling({capability: 4,ignoreMaskingExemptions: true,- dataMaskingAvailable: true,});expect(container.textContent).toContain("oauth2.consent.mcp.line.write");expect(container.textContent).toContain("oauth2.consent.mcp.write-caution");@@ -582,10 +629,10 @@ describe("OAuth2ConsentPage", () => {// masking does not run — and this card is read at the moment someone decides// whether to hand over access.test("the masking line is not promised where masking does not run", async () => {+ mocks.dataMaskingAvailable.value = false;const { container, unmount } = await renderWithCeiling({capability: 4,ignoreMaskingExemptions: true,- dataMaskingAvailable: false,});// The rest of the card is unchanged, so this is the line and not the card.expect(container.textContent).toContain("oauth2.consent.mcp.line.write");@@ -603,7 +650,6 @@ describe("OAuth2ConsentPage", () => {const { container, unmount } = await renderWithCeiling({capability: 1,ignoreMaskingExemptions: false,- dataMaskingAvailable: true,});const submitted: HTMLFormElement[] = [];@@ -633,7 +679,6 @@ describe("OAuth2ConsentPage", () => {const { container, unmount } = await renderWithCeiling({capability: 1,ignoreMaskingExemptions: false,- dataMaskingAvailable: true,});expect(container.textContent).toContain("oauth2.consent.workspace-label");unmount();@@ -656,7 +701,7 @@ describe("OAuth2ConsentPage", () => {// BOT-106, and the reason this is a blocker rather than a tidy-up. The page// used to fall through to a generic "access your account" card with Allow- // live whenever GetMCPInfo failed for ANY reason. The POST refuses a stored+ // live whenever actuator info lacked the MCP setting for ANY reason. The POST refuses a stored// value nothing resolves, so that half was cosmetic; it refuses neither a// transient failure nor a tier this bundle is merely too old to name. In both// of those the POST reads the ceiling for itself, succeeds, and issues a grant@@ -670,7 +715,7 @@ describe("OAuth2ConsentPage", () => {ok: true,json: async () => ({ client_name: "Acme" }),});- mocks.getMCPInfo.mockRejectedValueOnce(new Error("deadline exceeded"));+ mocks.refreshServerInfo.mockResolvedValueOnce(undefined);const { container, render, unmount } = renderIntoContainer(<OAuth2ConsentPage />@@ -716,7 +761,6 @@ describe("OAuth2ConsentPage", () => {const { container, unmount } = await renderWithCeiling({capability,ignoreMaskingExemptions: false,- dataMaskingAvailable: true,});expect(container.textContent).not.toContain("common.allow");expect(container.querySelector('form[method="POST"]')).toBeNull();@@ -739,7 +783,6 @@ describe("OAuth2ConsentPage", () => {const { container, unmount } = await renderWithCeiling({capability: 0,ignoreMaskingExemptions: false,- dataMaskingAvailable: true,});const submitted: HTMLFormElement[] = [];diff --git a/frontend/src/routes/auth/OAuth2ConsentPage.tsx b/frontend/src/routes/auth/OAuth2ConsentPage.tsxindex 81ae2ced30..391f84ab5e 100644--- a/frontend/src/routes/auth/OAuth2ConsentPage.tsx+++ b/frontend/src/routes/auth/OAuth2ConsentPage.tsx@@ -1,9 +1,6 @@-import { createContextValues } from "@connectrpc/connect";import { Building2, Loader2 } from "lucide-react";import { useCallback, useEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { workspaceServiceClientConnect } from "@/api";-import { silentContextKey } from "@/api/context-key";import { router } from "@/app/router";import { AUTH_SIGNIN_MODULE } from "@/app/router/handles";import { BytebaseLogo } from "@/components/BytebaseLogo";@@ -18,8 +15,11 @@ import {} from "@/components/ui/select";import { useWorkspace } from "@/hooks/useAppState";import { useAppStore } from "@/stores/app";-import { MCPSetting_Capability } from "@/types/proto-es/v1/setting_service_pb";-import type { MCPInfo } from "@/types/proto-es/v1/workspace_service_pb";+import {+ type MCPSetting,+ MCPSetting_Capability,+} from "@/types/proto-es/v1/setting_service_pb";+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { MCPConsentCeiling } from "./MCPConsentCeiling";import { MCPConsentDisabled } from "./MCPConsentDisabled";import type { UndisclosedReason } from "./MCPConsentUndisclosed";@@ -39,12 +39,18 @@ export function OAuth2ConsentPage() {//// Undefined is not "no policy": it is this page not holding one, which is// the state Allow is withheld under.- const [mcpInfo, setMcpInfo] = useState<MCPInfo | undefined>(undefined);+ const [mcpSetting, setMcpSetting] = useState<MCPSetting | undefined>(+ undefined+ );+ const [dataMaskingAvailable, setDataMaskingAvailable] = useState(false);const [retrying, setRetrying] = useState(false);const loadWorkspace = useAppStore((state) => state.loadWorkspace);const loadWorkspaceList = useAppStore((state) => state.loadWorkspaceList);+ const refreshSubscription = useAppStore((state) => state.refreshSubscription);+ const refreshServerInfo = useAppStore((state) => state.refreshServerInfo);const switchWorkspace = useAppStore((state) => state.switchWorkspace);+ const hasFeature = useAppStore((state) => state.hasFeature);const isLoggedIn = useAppStore((s) => s.isLoggedIn());// Workspace context shown on the consent card. On SaaS, every Bytebase@@ -75,25 +81,33 @@ export function OAuth2ConsentPage() {// Silent: the interceptor's toast names a status code, not a fix, and the// card this feeds says the same thing in words the person can act on.- const readCeiling = useCallback(async (): Promise<MCPInfo | undefined> => {+ const readCeiling = useCallback(async (): Promise<MCPSetting | undefined> => {try {- return await workspaceServiceClientConnect.getMCPInfo(- {},- {- contextValues: createContextValues().set(silentContextKey, true),- // The shared transport has no deadline. Without one a stalled read- // leaves the page on its spinner with no way forward and no way out.- timeoutMs: 10_000,- }- );+ const info = await refreshServerInfo();+ return info?.mcpSetting;} catch {return undefined;}- }, []);+ }, [refreshServerInfo]);++ const readConsentDisclosure = useCallback(async () => {+ const [mcpSetting, subscription] = await Promise.all([+ readCeiling(),+ refreshSubscription(),+ ]);+ return {+ mcpSetting,+ dataMaskingAvailable:+ subscription !== undefined &&+ hasFeature(PlanFeature.FEATURE_DATA_MASKING),+ };+ }, [hasFeature, readCeiling, refreshSubscription]);const retryCeiling = async () => {setRetrying(true);- setMcpInfo(await readCeiling());+ const disclosure = await readConsentDisclosure();+ setMcpSetting(disclosure.mcpSetting);+ setDataMaskingAvailable(disclosure.dataMaskingAvailable);setRetrying(false);};@@ -116,11 +130,6 @@ export function OAuth2ConsentPage() {return;}- // This page renders outside any shell, so the workspace bootstrap hasn't- // populated the app store — load server info so `isSaaSMode()` resolves- // and the SaaS workspace picker can render.- void useAppStore.getState().loadServerInfo();-(async () => {try {const response = await fetch(@@ -145,10 +154,12 @@ export function OAuth2ConsentPage() {setLoading(false);return;}- setMcpInfo(await readCeiling());+ const disclosure = await readConsentDisclosure();+ setMcpSetting(disclosure.mcpSetting);+ setDataMaskingAvailable(disclosure.dataMaskingAvailable);setLoading(false);})();- }, [readCeiling]);+ }, [readConsentDisclosure]);// Prefetch workspace list on SaaS so the picker can render. This runs in// its own effect keyed on `isSaaSMode` because actuator's serverInfo may@@ -294,7 +305,7 @@ export function OAuth2ConsentPage() {}// Allow renders only below this line, and only where the page holds a// ceiling this bundle can name (BOT-106).- const ceiling = readConsentCeiling(mcpInfo);+ const ceiling = readConsentCeiling(mcpSetting);if (ceiling.kind !== "mode") {return (<MCPConsentUndisclosed@@ -310,7 +321,7 @@ export function OAuth2ConsentPage() {/>);}- if (ceiling.info.capability === MCPSetting_Capability.DISABLED) {+ if (ceiling.setting.capability === MCPSetting_Capability.DISABLED) {return (<MCPConsentDisabledworkspaceTitle={@@ -333,7 +344,10 @@ export function OAuth2ConsentPage() {</p></div>{workspaceCard}- <MCPConsentCeiling info={ceiling.info} />+ <MCPConsentCeiling+ setting={ceiling.setting}+ dataMaskingAvailable={dataMaskingAvailable}+ /><form method="POST" action={AUTHORIZE_URL}><input type="hidden" name="client_id" value={clientId} /><input type="hidden" name="redirect_uri" value={redirectUri} />diff --git a/frontend/src/routes/workspace/MCPPage.tsx b/frontend/src/routes/workspace/MCPPage.tsxindex cb0475d386..66fe9e00ce 100644--- a/frontend/src/routes/workspace/MCPPage.tsx+++ b/frontend/src/routes/workspace/MCPPage.tsx@@ -7,7 +7,6 @@ import { Input } from "@/components/ui/input";import { Tabs, TabsList, TabsPanel, TabsTrigger } from "@/components/ui/tabs";import { Textarea } from "@/components/ui/textarea";import { useServerState } from "@/hooks/useAppState";-import { isDev } from "@/utils";import { MCPAccessPolicySection } from "./mcp/MCPAccessPolicySection";export function MCPPage() {@@ -98,9 +97,7 @@ export function MCPPage() {{/* Warning if external URL not configured */}<ExternalUrlAlert actionAppearance="outline" />- {/* Hidden in prod builds until release readiness; the settings API and- server-side enforcement stay live intentionally. */}- {isDev() && <MCPAccessPolicySection />}+ <MCPAccessPolicySection />{/* Authentication Notice */}<Alertdiff --git a/frontend/src/routes/workspace/mcp/MCPAccessPolicySection.test.tsx b/frontend/src/routes/workspace/mcp/MCPAccessPolicySection.test.tsxindex 827ffd38d6..00a310ca02 100644--- a/frontend/src/routes/workspace/mcp/MCPAccessPolicySection.test.tsx+++ b/frontend/src/routes/workspace/mcp/MCPAccessPolicySection.test.tsx@@ -1,12 +1,8 @@import type { ReactElement } from "react";import { act } from "react";import { createRoot } from "react-dom/client";-import { Code, ConnectError } from "@connectrpc/connect";import { beforeEach, describe, expect, test, vi } from "vitest";-import {- MCPSetting_Capability,- type Setting,-} from "@/types/proto-es/v1/setting_service_pb";+import { MCPSetting_Capability } from "@/types/proto-es/v1/setting_service_pb";(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }@@ -14,60 +10,50 @@ import {const mocks = vi.hoisted(() => ({useUnsavedChangesGuard: vi.fn(),- getSetting: vi.fn(),- setSettingByName: vi.fn(),upsertSetting: vi.fn(),- hasFeature: vi.fn(() => true),- settingsByName: { value: {} as Record<string, Setting> },- mcpSetting: {- value: undefined as- | {- capability: number;- ignoreMaskingExemptions: boolean;- }- | undefined,+ loadServerInfo: vi.fn(),+ refreshServerInfo: vi.fn(),+ serverInfo: {+ value: {+ mcpSetting: {+ capability: 3,+ ignoreMaskingExemptions: false,+ },+ } as { mcpSetting?: { capability: MCPSetting_Capability; ignoreMaskingExemptions: boolean } } | undefined,},+ dataMaskingAvailable: { value: true },+ permissionDisabled: { value: false },+ permissionGuard: vi.fn(),}));vi.mock("@/hooks/useUnsavedChangesGuard", () => ({useUnsavedChangesGuard: mocks.useUnsavedChangesGuard,}));-vi.mock("@/api", () => ({- settingServiceClientConnect: { getSetting: mocks.getSetting },-}));-vi.mock("@/components/PermissionGuard", () => ({PermissionGuard: ({+ permissions,children,}: {+ permissions: string[];children: (props: { disabled: boolean }) => ReactElement;- }) => children({ disabled: false }),+ }) => {+ mocks.permissionGuard(permissions);+ return children({ disabled: mocks.permissionDisabled.value });+ },}));vi.mock("@/stores", () => ({ pushNotification: vi.fn() }));vi.mock("@/stores/app", () => {const state = {- get settingsByName() {- return mocks.settingsByName.value;- },- getSettingByName: () =>- mocks.mcpSetting.value === undefined- ? undefined- : { value: { value: { case: "mcp", value: mocks.mcpSetting.value } } },- setSettingByName: (setting: Setting) => {- mocks.setSettingByName(setting);- mocks.settingsByName.value = {- ...mocks.settingsByName.value,- [setting.name]: setting,- };- if (setting.value?.value?.case === "mcp") {- mocks.mcpSetting.value = setting.value.value.value;- }- },upsertSetting: mocks.upsertSetting,- hasFeature: mocks.hasFeature,+ loadServerInfo: mocks.loadServerInfo,+ refreshServerInfo: mocks.refreshServerInfo,+ hasFeature: () => mocks.dataMaskingAvailable.value,+ get serverInfo() {+ return mocks.serverInfo.value;+ },};const useAppStore = (selector: (s: unknown) => unknown) => selector(state);useAppStore.getState = () => state;@@ -108,13 +94,6 @@ const deferred = <T,>() => {return { promise, resolve, reject };};-const toggleMasking = (container: HTMLElement) => {- const input = container.querySelector('input[type="checkbox"]');- act(() => {- (input as HTMLInputElement).click();- });-};-const clickText = (container: HTMLElement, text: string) => {const el = [...container.querySelectorAll("button, label")].find((n) =>n.textContent?.includes(text)@@ -126,18 +105,33 @@ const clickText = (container: HTMLElement, text: string) => {beforeEach(async () => {vi.clearAllMocks();- mocks.settingsByName.value = {};- mocks.mcpSetting.value = {- capability: 3, // READ_ONLY- ignoreMaskingExemptions: false,+ mocks.permissionDisabled.value = false;+ mocks.dataMaskingAvailable.value = true;+ mocks.serverInfo.value = {+ mcpSetting: {+ capability: MCPSetting_Capability.READ_ONLY,+ ignoreMaskingExemptions: false,+ },};+ mocks.loadServerInfo.mockResolvedValue(mocks.serverInfo.value);+ mocks.refreshServerInfo.mockResolvedValue(mocks.serverInfo.value);mocks.upsertSetting.mockResolvedValue(undefined);- mocks.hasFeature.mockReturnValue(true);- mocks.getSetting.mockResolvedValue({ name: "settings/MCP" });({ MCPAccessPolicySection } = await import("./MCPAccessPolicySection"));});describe("MCPAccessPolicySection", () => {+ test("reads the displayed policy from cached actuator info", async () => {+ const { container, render, unmount } = renderIntoContainer(+ <MCPAccessPolicySection />+ );+ render();+ await flush();++ expect(mocks.loadServerInfo).toHaveBeenCalledOnce();+ expect(container.textContent).toContain("settings.mcp.policy.in-force");+ unmount();+ });+// Codex raised exactly this on #21236 after the form moved off GeneralPage,// where it had been registered in the guarded section refs. Without an// assertion the regression returns silently, which is why both sibling forms@@ -168,11 +162,9 @@ describe("MCPAccessPolicySection", () => {unmount();});- // The read is deliberately uncached because the row changes out of band. When- // it fails, the store may still hold a value from an earlier visit, and- // rendering that reports a ceiling nobody is enforcing.- test("a failed read outranks a value left in the store", async () => {- mocks.getSetting.mockRejectedValue(new Error("does not parse"));+ test("shows the policy-read failure instead of a stale policy", async () => {+ mocks.serverInfo.value = undefined;+ mocks.loadServerInfo.mockResolvedValue(undefined);const { container, render, unmount } = renderIntoContainer(<MCPAccessPolicySection />);@@ -186,64 +178,30 @@ describe("MCPAccessPolicySection", () => {unmount();});- test("a missing row uses the READ_WRITE compatibility default", async () => {- mocks.getSetting.mockRejectedValue(- new ConnectError("setting MCP not found", Code.NotFound)- );+ test("uses the permission wrapper to disable policy editing", async () => {+ mocks.permissionDisabled.value = true;const { container, render, unmount } = renderIntoContainer(<MCPAccessPolicySection />);render();await flush();- expect(mocks.setSettingByName).toHaveBeenCalledWith(- expect.objectContaining({- name: "settings/MCP",- value: expect.objectContaining({- value: expect.objectContaining({- case: "mcp",- value: expect.objectContaining({- capability: MCPSetting_Capability.READ_WRITE,- ignoreMaskingExemptions: false,- }),- }),- }),- })- );- expect(container.textContent).toContain("settings.mcp.policy.in-force");- expect(container.textContent).not.toContain(- "settings.mcp.policy.read-failed.title"- );-- clickText(container, "settings.mcp.policy.edit");- await flush();- toggleMasking(container);- await flush();- clickText(container, "settings.mcp.policy.save");- await flush();-- expect(mocks.upsertSetting).toHaveBeenCalledWith(- expect.objectContaining({- value: expect.objectContaining({- value: expect.objectContaining({- value: expect.objectContaining({- capability: MCPSetting_Capability.READ_WRITE,- }),- }),- }),- updateMask: expect.objectContaining({- paths: ["value.mcp.ignore_masking_exemptions"],- }),- })- );+ expect(mocks.permissionGuard).toHaveBeenCalledWith(["bb.settings.set"]);+ expect(+ [...container.querySelectorAll("button")].find((button) =>+ button.textContent?.includes("settings.mcp.policy.edit")+ )+ ).toHaveProperty("disabled", true);unmount();});- test("repairs an unspecified capability without a frontend fallback", async () => {- mocks.mcpSetting.value = {- capability: 0,- ignoreMaskingExemptions: false,+ test("repairs an unspecified capability reported by actuator info", async () => {+ mocks.serverInfo.value = {+ mcpSetting: {+ capability: MCPSetting_Capability.CAPABILITY_UNSPECIFIED,+ ignoreMaskingExemptions: false,+ },};const { container, render, unmount } = renderIntoContainer(<MCPAccessPolicySection />@@ -280,11 +238,10 @@ describe("MCPAccessPolicySection", () => {unmount();});- // Codex, #21236. Two halves of one race, both pinned here.- test("waits for its own read before offering the cached policy for editing", async () => {- // Second visit: the store already holds a value from visit one.- const pending = deferred<{ name: string }>();- mocks.getSetting.mockReturnValue(pending.promise);+ test("waits for actuator info before offering policy editing", async () => {+ const pending = deferred<undefined>();+ mocks.serverInfo.value = undefined;+ mocks.loadServerInfo.mockReturnValue(pending.promise);const { container, render, unmount } = renderIntoContainer(<MCPAccessPolicySection />@@ -292,25 +249,15 @@ describe("MCPAccessPolicySection", () => {render();await flush();- // The cached ceiling must not be presented as authoritative, and Edit must- // not be reachable, while this mount's own read is still in flight.expect(container.textContent).toContain("settings.mcp.policy.loading");expect(container.textContent).not.toContain("settings.mcp.policy.in-force");expect(container.textContent).not.toContain("settings.mcp.policy.edit");- act(() => pending.resolve({ name: "settings/MCP" }));- await flush();- expect(container.textContent).toContain("settings.mcp.policy.in-force");-unmount();});- // Codex, #21236: this warning was once gated on a GetMCPInfo response, which- // can fail through an outage. Hiding it there lets an admin arm a toggle that- // does nothing while believing they tightened masking, so it reads the- // licence the store already holds.test("says masking is unlicensed", async () => {- mocks.hasFeature.mockReturnValue(false);+ mocks.dataMaskingAvailable.value = false;const { container, render, unmount } = renderIntoContainer(<MCPAccessPolicySection />@@ -395,26 +342,8 @@ describe("MCPAccessPolicySection", () => {act(() => inFlight.resolve(undefined));await flush();+ expect(mocks.refreshServerInfo).toHaveBeenCalledOnce();unmount();});- // The generations are per-mount; the setting store they write is the- // application's. A read left flying by a visit the admin navigated away from- // still passed its own check and wrote — which is Codex's corruption with- // "the cached policy" replaced by "the previous visit's unfinished read".- test("a read left in flight by an unmounted visit cannot write", async () => {- const abandoned = deferred<{ name: string }>();- mocks.getSetting.mockReturnValueOnce(abandoned.promise);-- const first = renderIntoContainer(<MCPAccessPolicySection />);- first.render();- await flush();- first.unmount();-- mocks.setSettingByName.mockClear();- act(() => abandoned.resolve({ name: "settings/MCP" }));- await flush();-- expect(mocks.setSettingByName).not.toHaveBeenCalled();- });});diff --git a/frontend/src/routes/workspace/mcp/MCPAccessPolicySection.tsx b/frontend/src/routes/workspace/mcp/MCPAccessPolicySection.tsxindex 8be739805c..7e3a1cc289 100644--- a/frontend/src/routes/workspace/mcp/MCPAccessPolicySection.tsx+++ b/frontend/src/routes/workspace/mcp/MCPAccessPolicySection.tsx@@ -1,11 +1,8 @@import { create } from "@bufbuild/protobuf";import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";-import { Code, ConnectError, createContextValues } from "@connectrpc/connect";import { Rows3 } from "lucide-react";-import { useEffect, useMemo, useRef, useState } from "react";+import { useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import { settingServiceClientConnect } from "@/api";-import { silentContextKey } from "@/api/context-key";import type { MCPMode } from "@/components/mcp/mcpPolicy";import { isMCPMode, MCP_CAPABILITY_CHOICES } from "@/components/mcp/mcpPolicy";import { PermissionGuard } from "@/components/PermissionGuard";@@ -17,7 +14,6 @@ import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";import { Separator } from "@/components/ui/separator";import { Switch } from "@/components/ui/switch";import { useUnsavedChangesGuard } from "@/hooks/useUnsavedChangesGuard";-import { settingNamePrefix } from "@/lib/resourceName";import { cn } from "@/lib/utils";import { pushNotification } from "@/stores";import { useAppStore } from "@/stores/app";@@ -25,7 +21,6 @@ import {MCPSetting_Capability,MCPSettingSchema,Setting_SettingName,- SettingSchema,SettingValueSchema,} from "@/types/proto-es/v1/setting_service_pb";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";@@ -55,122 +50,38 @@ const MODES: Record<},};-const mcpSettingName = `${settingNamePrefix}${Setting_SettingName[Setting_SettingName.MCP]}`;-export function MCPAccessPolicySection() {const { t } = useTranslation();- const settingsByName = useAppStore((s) => s.settingsByName);- // Read from the licence the store already holds, not from a request that can- // fail: hiding this line lets an admin arm a toggle that does nothing while- // believing they tightened masking.- const dataMaskingAvailable = useAppStore((s) =>- s.hasFeature(PlanFeature.FEATURE_DATA_MASKING)- );- const mcpSetting = useMemo(() => {- const setting = useAppStore- .getState()- .getSettingByName(Setting_SettingName.MCP);- if (setting?.value?.value?.case === "mcp") {- return setting.value.value.value;- }- return undefined;- }, [settingsByName]);-const [editing, setEditing] = useState(false);const [saving, setSaving] = useState(false);const [pick, setPick] = useState<MCPMode | undefined>(undefined);const [ignoreMasking, setIgnoreMasking] = useState(false);-- // The read carries a generation, and the effect retires it on unmount. A- // response has no way of knowing it was overtaken, and the store it writes is- // shared: a read left flying by a visit the admin navigated away from would- // otherwise land later and put that visit's row back, reverting a save made- // since.- const settingGeneration = useRef(0);-- // Read the setting past the store's cache. The server reads this row uncached- // for a reason — a hand edit or a newer replica changes it out of band — and- // getOrFetchSettingByName returns a cached snapshot without revalidating, so- // a second visit in one session would compute the form's dirty state against- // a value that is no longer stored. On an invalid row that makes the- // one-save repair unreachable without a reload.const [readFailed, setReadFailed] = useState(false);- // Whether this mount's own read has answered. Until it has, a value left in- // the store by an earlier visit is a guess, not the ceiling — so the page- // waits rather than offering it for editing.const [readSettled, setReadSettled] = useState(false);+ const serverInfo = useAppStore((state) => state.serverInfo);+ const loadServerInfo = useAppStore((state) => state.loadServerInfo);+ const refreshServerInfo = useAppStore((state) => state.refreshServerInfo);+ const dataMaskingAvailable = useAppStore((state) =>+ state.hasFeature(PlanFeature.FEATURE_DATA_MASKING)+ );+useEffect(() => {- setReadFailed(false);- setReadSettled(false);- const generation = ++settingGeneration.current;- const settle = (failed: boolean) => {- if (generation !== settingGeneration.current) {- return;- }- setReadFailed(failed);+ void loadServerInfo().then((info) => {+ setReadFailed(!info?.mcpSetting);setReadSettled(true);- };- settingServiceClientConnect- .getSetting(- {- name: mcpSettingName,- },- {- contextValues: createContextValues().set(silentContextKey, true),- // The card waits for this read, so an unbounded one is a page that- // never loads. The transport declares no default timeout.- timeoutMs: 30_000,- }- )- .then((setting) => {- if (generation !== settingGeneration.current) {- return;- }- useAppStore.getState().setSettingByName(setting);- settle(false);- })- .catch((error: unknown) => {- if (generation !== settingGeneration.current) {- return;- }- // Older workspaces can legitimately have no row. Match the backend's- // effective READ_WRITE policy; all other read failures still win over- // any value left in the frontend store.- if (error instanceof ConnectError && error.code === Code.NotFound) {- useAppStore.getState().setSettingByName(- create(SettingSchema, {- name: mcpSettingName,- value: create(SettingValueSchema, {- value: {- case: "mcp",- value: create(MCPSettingSchema, {- capability: MCPSetting_Capability.READ_WRITE,- }),- },- }),- })- );- settle(false);- return;- }- settle(true);- });- // Retire the read when this instance goes away. The generation is this- // mount's; the setting store it writes is the application's.- return () => {- settingGeneration.current++;- };- }, []);+ });+ }, [loadServerInfo]);- const storedCapability = mcpSetting?.capability;+ const storedCapability = serverInfo?.mcpSetting?.capability;const storedMode =storedCapability !== undefined && isMCPMode(storedCapability)? storedCapability: undefined;const unreadable =storedCapability === MCPSetting_Capability.CAPABILITY_UNSPECIFIED;- const storedIgnoreMasking = mcpSetting?.ignoreMaskingExemptions ?? false;+ const storedIgnoreMasking =+ serverInfo?.mcpSetting?.ignoreMaskingExemptions ?? false;// The form is seeded when editing opens, not on every store change: the// stored value only moves under an open form when someone else saved, and@@ -221,6 +132,7 @@ export function MCPAccessPolicySection() {updateMask: create(FieldMaskSchema, { paths }),});setEditing(false);+ await refreshServerInfo();pushNotification({module: "bytebase",style: "SUCCESS",diff --git a/frontend/src/types/proto-es/v1/actuator_service_pb.d.ts b/frontend/src/types/proto-es/v1/actuator_service_pb.d.tsindex 5a3ca4200b..7d42db894a 100644--- a/frontend/src/types/proto-es/v1/actuator_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/actuator_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 { Timestamp } from "@bufbuild/protobuf/wkt";+import type { MCPSetting } from "./setting_service_pb";/*** Describes the file v1/actuator_service.proto.@@ -193,6 +194,13 @@ export declare type ActuatorInfo = Message<"bytebase.v1.ActuatorInfo"> & {* @generated from field: bytebase.v1.SampleInfo sample = 29;*/sample?: SampleInfo | undefined;++ /**+ * The MCP (Model Context Protocol) setting in the current workspace.+ *+ * @generated from field: bytebase.v1.MCPSetting mcp_setting = 30;+ */+ mcpSetting?: MCPSetting | undefined;};/**diff --git a/frontend/src/types/proto-es/v1/actuator_service_pb.js b/frontend/src/types/proto-es/v1/actuator_service_pb.jsindex d335fc00c9..fc308098a0 100644--- a/frontend/src/types/proto-es/v1/actuator_service_pb.js+++ b/frontend/src/types/proto-es/v1/actuator_service_pb.js@@ -9,12 +9,13 @@ 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_timestamp } from "@bufbuild/protobuf/wkt";import { file_v1_annotation } from "./annotation_pb";+import { file_v1_setting_service } from "./setting_service_pb";/*** Describes the file v1/actuator_service.proto.*/export const file_v1_actuator_service = /*@__PURE__*/- fileDesc("Chl2MS9hY3R1YXRvcl9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSIYChZHZXRBY3R1YXRvckluZm9SZXF1ZXN0ItEBCgpTYW1wbGVJbmZvEhYKCWF2YWlsYWJsZRgBIAEoCEID4EEDEjgKCWluc3RhbmNlcxgCIAMoCzIgLmJ5dGViYXNlLnYxLlNhbXBsZUluZm8uSW5zdGFuY2VCA+BBAxpxCghJbnN0YW5jZRIvCghpbnN0YW5jZRgBIAEoCUId4EED+kEXChVieXRlYmFzZS5jb20vSW5zdGFuY2USNAoLZXhwaXJlX3RpbWUYAiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQgPgQQMisQQKDEFjdHVhdG9ySW5mbxIUCgd2ZXJzaW9uGAEgASgJQgPgQQMSFwoKZ2l0X2NvbW1pdBgCIAEoCUID4EEDEhEKBHNhYXMYBCABKAhCA+BBAxIZCgxleHRlcm5hbF91cmwYCCABKAlCA+BBAxI5ChBsYXN0X2FjdGl2ZV90aW1lGAsgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEID4EEDEhYKCXdvcmtzcGFjZRgNIAEoCUID4EEDEiAKE3VubGljZW5zZWRfZmVhdHVyZXMYDyADKAlCA+BBAxIlChhhY3RpdmF0ZWRfaW5zdGFuY2VfY291bnQYFCABKAVCA+BBAxIhChR0b3RhbF9pbnN0YW5jZV9jb3VudBgVIAEoBUID4EEDEiMKFmV4dGVybmFsX3VybF9mcm9tX2ZsYWcYFyABKAhCA+BBAxIaCg1yZXBsaWNhX2NvdW50GBggASgFQgPgQQMSHAoPZGVmYXVsdF9wcm9qZWN0GBogASgJQgPgQQMSHgoRdXNlcl9jb3VudF9pbl9pYW0YGyABKAVCA+BBAxIiChVhY3RpdmVfdmNzX3VzZXJfY291bnQYHCABKAVCA+BBAxIsCgZzYW1wbGUYHSABKAsyFy5ieXRlYmFzZS52MS5TYW1wbGVJbmZvQgPgQQNKBAgDEARKBAgFEAhKBAgJEApKBAgKEAtKBAgMEA1KBAgOEA9KBAgQEBRKBAgWEBdKBAgZEBoyhgEKD0FjdHVhdG9yU2VydmljZRJzCg9HZXRBY3R1YXRvckluZm8SIy5ieXRlYmFzZS52MS5HZXRBY3R1YXRvckluZm9SZXF1ZXN0GhkuYnl0ZWJhc2UudjEuQWN0dWF0b3JJbmZvIiDaQQCg6jABgtPkkwITEhEvdjEvYWN0dWF0b3IvaW5mb0KqAQoPY29tLmJ5dGViYXNlLnYxQhRBY3R1YXRvclNlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_timestamp, file_v1_annotation]);+ fileDesc("Chl2MS9hY3R1YXRvcl9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSIYChZHZXRBY3R1YXRvckluZm9SZXF1ZXN0ItEBCgpTYW1wbGVJbmZvEhYKCWF2YWlsYWJsZRgBIAEoCEID4EEDEjgKCWluc3RhbmNlcxgCIAMoCzIgLmJ5dGViYXNlLnYxLlNhbXBsZUluZm8uSW5zdGFuY2VCA+BBAxpxCghJbnN0YW5jZRIvCghpbnN0YW5jZRgBIAEoCUId4EED+kEXChVieXRlYmFzZS5jb20vSW5zdGFuY2USNAoLZXhwaXJlX3RpbWUYAiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQgPgQQMi5AQKDEFjdHVhdG9ySW5mbxIUCgd2ZXJzaW9uGAEgASgJQgPgQQMSFwoKZ2l0X2NvbW1pdBgCIAEoCUID4EEDEhEKBHNhYXMYBCABKAhCA+BBAxIZCgxleHRlcm5hbF91cmwYCCABKAlCA+BBAxI5ChBsYXN0X2FjdGl2ZV90aW1lGAsgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEID4EEDEhYKCXdvcmtzcGFjZRgNIAEoCUID4EEDEiAKE3VubGljZW5zZWRfZmVhdHVyZXMYDyADKAlCA+BBAxIlChhhY3RpdmF0ZWRfaW5zdGFuY2VfY291bnQYFCABKAVCA+BBAxIhChR0b3RhbF9pbnN0YW5jZV9jb3VudBgVIAEoBUID4EEDEiMKFmV4dGVybmFsX3VybF9mcm9tX2ZsYWcYFyABKAhCA+BBAxIaCg1yZXBsaWNhX2NvdW50GBggASgFQgPgQQMSHAoPZGVmYXVsdF9wcm9qZWN0GBogASgJQgPgQQMSHgoRdXNlcl9jb3VudF9pbl9pYW0YGyABKAVCA+BBAxIiChVhY3RpdmVfdmNzX3VzZXJfY291bnQYHCABKAVCA+BBAxIsCgZzYW1wbGUYHSABKAsyFy5ieXRlYmFzZS52MS5TYW1wbGVJbmZvQgPgQQMSMQoLbWNwX3NldHRpbmcYHiABKAsyFy5ieXRlYmFzZS52MS5NQ1BTZXR0aW5nQgPgQQNKBAgDEARKBAgFEAhKBAgJEApKBAgKEAtKBAgMEA1KBAgOEA9KBAgQEBRKBAgWEBdKBAgZEBoyhgEKD0FjdHVhdG9yU2VydmljZRJzCg9HZXRBY3R1YXRvckluZm8SIy5ieXRlYmFzZS52MS5HZXRBY3R1YXRvckluZm9SZXF1ZXN0GhkuYnl0ZWJhc2UudjEuQWN0dWF0b3JJbmZvIiDaQQCg6jABgtPkkwITEhEvdjEvYWN0dWF0b3IvaW5mb0KqAQoPY29tLmJ5dGViYXNlLnYxQhRBY3R1YXRvclNlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_timestamp, file_v1_annotation, file_v1_setting_service]);/*** Describes the message bytebase.v1.GetActuatorInfoRequest.diff --git a/frontend/src/types/proto-es/v1/workspace_service_pb.d.ts b/frontend/src/types/proto-es/v1/workspace_service_pb.d.tsindex c5b2867f8d..a887316eb6 100644--- a/frontend/src/types/proto-es/v1/workspace_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/workspace_service_pb.d.ts@@ -4,7 +4,6 @@import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";import type { Message } from "@bufbuild/protobuf";-import type { MCPSetting_Capability } from "./setting_service_pb";import type { FieldMask } from "@bufbuild/protobuf/wkt";import type { GetIamPolicyRequestSchema, IamPolicySchema, SetIamPolicyRequestSchema } from "./iam_policy_pb";import type { LoginResponseSchema } from "./auth_service_pb";@@ -14,76 +13,6 @@ import type { LoginResponseSchema } from "./auth_service_pb";*/export declare const file_v1_workspace_service: GenFile;-/**- * @generated from message bytebase.v1.GetMCPInfoRequest- */-export declare type GetMCPInfoRequest = Message<"bytebase.v1.GetMCPInfoRequest"> & {-};--/**- * Describes the message bytebase.v1.GetMCPInfoRequest.- * Use `create(GetMCPInfoRequestSchema)` to create a new message.- */-export declare const GetMCPInfoRequestSchema: GenMessage<GetMCPInfoRequest>;--/**- * MCPInfo is what MCP does in this workspace: the ceiling in force, and- * whether masking narrows what a session reads under it.- *- * This is the only API a served MCP session or the consent page can read the- * ceiling from. SettingService/GetSetting is served by no ceiling, and its- * answer is cached besides.- *- * @generated from message bytebase.v1.MCPInfo- */-export declare type MCPInfo = Message<"bytebase.v1.MCPInfo"> & {- /**- * The workspace this describes. Format: workspaces/{workspace}. Not this- * message's own resource name — MCPInfo is not a named resource and there is- * nothing to get it by.- *- * @generated from field: string workspace = 1;- */- workspace: string;-- /**- * The ceiling in force for this workspace. Any value outside the enum this- * build serves, CAPABILITY_UNSPECIFIED included, means no ceiling could be- * resolved from the stored row and every MCP connection is refused. A stored- * name nothing resolves arrives as CAPABILITY_UNSPECIFIED; a number a newer- * release wrote arrives verbatim.- *- * @generated from field: bytebase.v1.MCPSetting.Capability capability = 2;- */- capability: MCPSetting_Capability;-- /**- * Whether this workspace stops applying the caller's own unmasking- * provisioning to MCP requests. It narrows what a session reads only where- * Bytebase masks by column and consults exemptions; elsewhere it suppresses- * nothing.- *- * @generated from field: bool ignore_masking_exemptions = 6;- */- ignoreMaskingExemptions: boolean;-- /**- * Whether data masking is licensed for this workspace. When false nothing is- * masked whatever an engine supports, so the toggle above suppresses nothing.- * Licensing can also be set per instance, so a true here is the workspace- * answer, not a promise about every instance.- *- * @generated from field: bool data_masking_available = 7;- */- dataMaskingAvailable: boolean;-};--/**- * Describes the message bytebase.v1.MCPInfo.- * Use `create(MCPInfoSchema)` to create a new message.- */-export declare const MCPInfoSchema: GenMessage<MCPInfo>;-/*** @generated from message bytebase.v1.RotateDirectorySyncTokenRequest*/@@ -341,25 +270,6 @@ export declare const WorkspaceService: GenService<{input: typeof SetIamPolicyRequestSchema;output: typeof IamPolicySchema;},- /**- * Gets what MCP (Model Context Protocol) does in this workspace: the- * capability ceiling in force, and whether masking narrows what a session- * reads under it. The workspace is resolved from the authenticated session.- *- * Served to MCP sessions. An agent asking what it may do here is the point:- * the response says nothing a session's own denials do not already say, one- * refusal at a time, and knowing it up front is what stops the agent- * planning work the ceiling was never going to serve.- *- * Permissions required: None (authentication required)- *- * @generated from rpc bytebase.v1.WorkspaceService.GetMCPInfo- */- getMCPInfo: {- methodKind: "unary";- input: typeof GetMCPInfoRequestSchema;- output: typeof MCPInfoSchema;- },/*** Mints a new directory sync (SCIM) token, immediately invalidating the* previous one. The plaintext token is returned exactly once and cannot bediff --git a/frontend/src/types/proto-es/v1/workspace_service_pb.js b/frontend/src/types/proto-es/v1/workspace_service_pb.jsindex 1673a640cd..198f680e57 100644--- a/frontend/src/types/proto-es/v1/workspace_service_pb.js+++ b/frontend/src/types/proto-es/v1/workspace_service_pb.js@@ -11,90 +11,75 @@ import { file_google_protobuf_field_mask } from "@bufbuild/protobuf/wkt";import { file_v1_annotation } from "./annotation_pb";import { file_v1_auth_service } from "./auth_service_pb";import { file_v1_iam_policy } from "./iam_policy_pb";-import { file_v1_setting_service } from "./setting_service_pb";/*** Describes the file v1/workspace_service.proto.*/export const file_v1_workspace_service = /*@__PURE__*/- fileDesc("Chp2MS93b3Jrc3BhY2Vfc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEiEwoRR2V0TUNQSW5mb1JlcXVlc3Qi1gEKB01DUEluZm8SFgoJd29ya3NwYWNlGAEgASgJQgPgQQMSOwoKY2FwYWJpbGl0eRgCIAEoDjIiLmJ5dGViYXNlLnYxLk1DUFNldHRpbmcuQ2FwYWJpbGl0eUID4EEDEiYKGWlnbm9yZV9tYXNraW5nX2V4ZW1wdGlvbnMYBiABKAhCA+BBAxIjChZkYXRhX21hc2tpbmdfYXZhaWxhYmxlGAcgASgIQgPgQQNKBAgDEARKBAgEEAVKBAgFEAZSBW1vZGVzUgdtZXRob2RzUgdlbmdpbmVzIk8KH1JvdGF0ZURpcmVjdG9yeVN5bmNUb2tlblJlcXVlc3QSLAoEbmFtZRgBIAEoCUIe4EEC+kEYChZieXRlYmFzZS5jb20vV29ya3NwYWNlIjoKIFJvdGF0ZURpcmVjdG9yeVN5bmNUb2tlblJlc3BvbnNlEhYKBXRva2VuGAEgASgJQgfgQQPQ6jABIhcKFUxpc3RXb3Jrc3BhY2VzUmVxdWVzdCJEChZMaXN0V29ya3NwYWNlc1Jlc3BvbnNlEioKCndvcmtzcGFjZXMYASADKAsyFi5ieXRlYmFzZS52MS5Xb3Jrc3BhY2UiIwoTR2V0V29ya3NwYWNlUmVxdWVzdBIMCgRuYW1lGAEgASgJIjYKCVdvcmtzcGFjZRIMCgRuYW1lGAEgASgJEg0KBXRpdGxlGAIgASgJEgwKBGxvZ28YAyABKAkiKwoWRGVsZXRlV29ya3NwYWNlUmVxdWVzdBIRCgRuYW1lGAEgASgJQgPgQQIieQoWVXBkYXRlV29ya3NwYWNlUmVxdWVzdBIuCgl3b3Jrc3BhY2UYASABKAsyFi5ieXRlYmFzZS52MS5Xb3Jrc3BhY2VCA+BBAhIvCgt1cGRhdGVfbWFzaxgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2siKgoVTGVhdmVXb3Jrc3BhY2VSZXF1ZXN0EhEKBG5hbWUYASABKAlCA+BBAjKACwoQV29ya3NwYWNlU2VydmljZRJxCgxHZXRXb3Jrc3BhY2USIC5ieXRlYmFzZS52MS5HZXRXb3Jrc3BhY2VSZXF1ZXN0GhYuYnl0ZWJhc2UudjEuV29ya3NwYWNlIieA6jABoOowAYLT5JMCGRIXL3YxL3tuYW1lPXdvcmtzcGFjZXMvKn0SeQoOTGlzdFdvcmtzcGFjZXMSIi5ieXRlYmFzZS52MS5MaXN0V29ya3NwYWNlc1JlcXVlc3QaIy5ieXRlYmFzZS52MS5MaXN0V29ya3NwYWNlc1Jlc3BvbnNlIh6Q6jACoOowAYLT5JMCEBIOL3YxL3dvcmtzcGFjZXMSpAEKD1VwZGF0ZVdvcmtzcGFjZRIjLmJ5dGViYXNlLnYxLlVwZGF0ZVdvcmtzcGFjZVJlcXVlc3QaFi5ieXRlYmFzZS52MS5Xb3Jrc3BhY2UiVIrqMBRiYi53b3Jrc3BhY2VzLnVwZGF0ZZDqMAGY6jABoOowBKjqMAmC0+STAiY6ASoyIS92MS97d29ya3NwYWNlLm5hbWU9d29ya3NwYWNlcy8qfRKkAQoMR2V0SWFtUG9saWN5EiAuYnl0ZWJhc2UudjEuR2V0SWFtUG9saWN5UmVxdWVzdBoWLmJ5dGViYXNlLnYxLklhbVBvbGljeSJaiuowGmJiLndvcmtzcGFjZXMuZ2V0SWFtUG9saWN5kOowAaDqMASo6jAJgtPkkwIqEigvdjEve3Jlc291cmNlPXdvcmtzcGFjZXMvKn06Z2V0SWFtUG9saWN5EpsBCg9EZWxldGVXb3Jrc3BhY2USIy5ieXRlYmFzZS52MS5EZWxldGVXb3Jrc3BhY2VSZXF1ZXN0GhouYnl0ZWJhc2UudjEuTG9naW5SZXNwb25zZSJHiuowFGJiLndvcmtzcGFjZXMuZGVsZXRlkOowAZjqMAGg6jADqOowBYLT5JMCGSoXL3YxL3tuYW1lPXdvcmtzcGFjZXMvKn0SigEKDkxlYXZlV29ya3NwYWNlEiIuYnl0ZWJhc2UudjEuTGVhdmVXb3Jrc3BhY2VSZXF1ZXN0GhouYnl0ZWJhc2UudjEuTG9naW5SZXNwb25zZSI4kOowApjqMAGg6jADqOowBYLT5JMCIjoBKiIdL3YxL3tuYW1lPXdvcmtzcGFjZXMvKn06bGVhdmUSqwEKDFNldElhbVBvbGljeRIgLmJ5dGViYXNlLnYxLlNldElhbVBvbGljeVJlcXVlc3QaFi5ieXRlYmFzZS52MS5JYW1Qb2xpY3kiYYrqMBpiYi53b3Jrc3BhY2VzLnNldElhbVBvbGljeZDqMAGY6jABoOowBKjqMAmC0+STAi06ASoiKC92MS97cmVzb3VyY2U9d29ya3NwYWNlcy8qfTpzZXRJYW1Qb2xpY3kSXwoKR2V0TUNQSW5mbxIeLmJ5dGViYXNlLnYxLkdldE1DUEluZm9SZXF1ZXN0GhQuYnl0ZWJhc2UudjEuTUNQSW5mbyIb2kEAoOowAYLT5JMCDhIML3YxL21jcC9pbmZvEvUBChhSb3RhdGVEaXJlY3RvcnlTeW5jVG9rZW4SLC5ieXRlYmFzZS52MS5Sb3RhdGVEaXJlY3RvcnlTeW5jVG9rZW5SZXF1ZXN0Gi0uYnl0ZWJhc2UudjEuUm90YXRlRGlyZWN0b3J5U3luY1Rva2VuUmVzcG9uc2UifNpBBG5hbWWK6jAmYmIud29ya3NwYWNlcy5yb3RhdGVEaXJlY3RvcnlTeW5jVG9rZW6Q6jABmOowAaDqMAOo6jAGgtPkkwI1OgEqIjAvdjEve25hbWU9d29ya3NwYWNlcy8qfTpyb3RhdGVEaXJlY3RvcnlTeW5jVG9rZW5CqwEKD2NvbS5ieXRlYmFzZS52MUIVV29ya3NwYWNlU2VydmljZVByb3RvUAFaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_field_mask, file_v1_annotation, file_v1_auth_service, file_v1_iam_policy, file_v1_setting_service]);--/**- * Describes the message bytebase.v1.GetMCPInfoRequest.- * Use `create(GetMCPInfoRequestSchema)` to create a new message.- */-export const GetMCPInfoRequestSchema = /*@__PURE__*/- messageDesc(file_v1_workspace_service, 0);--/**- * Describes the message bytebase.v1.MCPInfo.- * Use `create(MCPInfoSchema)` to create a new message.- */-export const MCPInfoSchema = /*@__PURE__*/- messageDesc(file_v1_workspace_service, 1);+ fileDesc("Chp2MS93b3Jrc3BhY2Vfc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEiTwofUm90YXRlRGlyZWN0b3J5U3luY1Rva2VuUmVxdWVzdBIsCgRuYW1lGAEgASgJQh7gQQL6QRgKFmJ5dGViYXNlLmNvbS9Xb3Jrc3BhY2UiOgogUm90YXRlRGlyZWN0b3J5U3luY1Rva2VuUmVzcG9uc2USFgoFdG9rZW4YASABKAlCB+BBA9DqMAEiFwoVTGlzdFdvcmtzcGFjZXNSZXF1ZXN0IkQKFkxpc3RXb3Jrc3BhY2VzUmVzcG9uc2USKgoKd29ya3NwYWNlcxgBIAMoCzIWLmJ5dGViYXNlLnYxLldvcmtzcGFjZSIjChNHZXRXb3Jrc3BhY2VSZXF1ZXN0EgwKBG5hbWUYASABKAkiNgoJV29ya3NwYWNlEgwKBG5hbWUYASABKAkSDQoFdGl0bGUYAiABKAkSDAoEbG9nbxgDIAEoCSIrChZEZWxldGVXb3Jrc3BhY2VSZXF1ZXN0EhEKBG5hbWUYASABKAlCA+BBAiJ5ChZVcGRhdGVXb3Jrc3BhY2VSZXF1ZXN0Ei4KCXdvcmtzcGFjZRgBIAEoCzIWLmJ5dGViYXNlLnYxLldvcmtzcGFjZUID4EECEi8KC3VwZGF0ZV9tYXNrGAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLkZpZWxkTWFzayIqChVMZWF2ZVdvcmtzcGFjZVJlcXVlc3QSEQoEbmFtZRgBIAEoCUID4EECMp8KChBXb3Jrc3BhY2VTZXJ2aWNlEnEKDEdldFdvcmtzcGFjZRIgLmJ5dGViYXNlLnYxLkdldFdvcmtzcGFjZVJlcXVlc3QaFi5ieXRlYmFzZS52MS5Xb3Jrc3BhY2UiJ4DqMAGg6jABgtPkkwIZEhcvdjEve25hbWU9d29ya3NwYWNlcy8qfRJ5Cg5MaXN0V29ya3NwYWNlcxIiLmJ5dGViYXNlLnYxLkxpc3RXb3Jrc3BhY2VzUmVxdWVzdBojLmJ5dGViYXNlLnYxLkxpc3RXb3Jrc3BhY2VzUmVzcG9uc2UiHpDqMAKg6jABgtPkkwIQEg4vdjEvd29ya3NwYWNlcxKkAQoPVXBkYXRlV29ya3NwYWNlEiMuYnl0ZWJhc2UudjEuVXBkYXRlV29ya3NwYWNlUmVxdWVzdBoWLmJ5dGViYXNlLnYxLldvcmtzcGFjZSJUiuowFGJiLndvcmtzcGFjZXMudXBkYXRlkOowAZjqMAGg6jAEqOowCYLT5JMCJjoBKjIhL3YxL3t3b3Jrc3BhY2UubmFtZT13b3Jrc3BhY2VzLyp9EqQBCgxHZXRJYW1Qb2xpY3kSIC5ieXRlYmFzZS52MS5HZXRJYW1Qb2xpY3lSZXF1ZXN0GhYuYnl0ZWJhc2UudjEuSWFtUG9saWN5IlqK6jAaYmIud29ya3NwYWNlcy5nZXRJYW1Qb2xpY3mQ6jABoOowBKjqMAmC0+STAioSKC92MS97cmVzb3VyY2U9d29ya3NwYWNlcy8qfTpnZXRJYW1Qb2xpY3kSmwEKD0RlbGV0ZVdvcmtzcGFjZRIjLmJ5dGViYXNlLnYxLkRlbGV0ZVdvcmtzcGFjZVJlcXVlc3QaGi5ieXRlYmFzZS52MS5Mb2dpblJlc3BvbnNlIkeK6jAUYmIud29ya3NwYWNlcy5kZWxldGWQ6jABmOowAaDqMAOo6jAFgtPkkwIZKhcvdjEve25hbWU9d29ya3NwYWNlcy8qfRKKAQoOTGVhdmVXb3Jrc3BhY2USIi5ieXRlYmFzZS52MS5MZWF2ZVdvcmtzcGFjZVJlcXVlc3QaGi5ieXRlYmFzZS52MS5Mb2dpblJlc3BvbnNlIjiQ6jACmOowAaDqMAOo6jAFgtPkkwIiOgEqIh0vdjEve25hbWU9d29ya3NwYWNlcy8qfTpsZWF2ZRKrAQoMU2V0SWFtUG9saWN5EiAuYnl0ZWJhc2UudjEuU2V0SWFtUG9saWN5UmVxdWVzdBoWLmJ5dGViYXNlLnYxLklhbVBvbGljeSJhiuowGmJiLndvcmtzcGFjZXMuc2V0SWFtUG9saWN5kOowAZjqMAGg6jAEqOowCYLT5JMCLToBKiIoL3YxL3tyZXNvdXJjZT13b3Jrc3BhY2VzLyp9OnNldElhbVBvbGljeRL1AQoYUm90YXRlRGlyZWN0b3J5U3luY1Rva2VuEiwuYnl0ZWJhc2UudjEuUm90YXRlRGlyZWN0b3J5U3luY1Rva2VuUmVxdWVzdBotLmJ5dGViYXNlLnYxLlJvdGF0ZURpcmVjdG9yeVN5bmNUb2tlblJlc3BvbnNlInzaQQRuYW1liuowJmJiLndvcmtzcGFjZXMucm90YXRlRGlyZWN0b3J5U3luY1Rva2VukOowAZjqMAGg6jADqOowBoLT5JMCNToBKiIwL3YxL3tuYW1lPXdvcmtzcGFjZXMvKn06cm90YXRlRGlyZWN0b3J5U3luY1Rva2VuQqsBCg9jb20uYnl0ZWJhc2UudjFCFVdvcmtzcGFjZVNlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_field_mask, file_v1_annotation, file_v1_auth_service, file_v1_iam_policy]);/*** Describes the message bytebase.v1.RotateDirectorySyncTokenRequest.* Use `create(RotateDirectorySyncTokenRequestSchema)` to create a new message.*/export const RotateDirectorySyncTokenRequestSchema = /*@__PURE__*/- messageDesc(file_v1_workspace_service, 2);+ messageDesc(file_v1_workspace_service, 0);/*** Describes the message bytebase.v1.RotateDirectorySyncTokenResponse.* Use `create(RotateDirectorySyncTokenResponseSchema)` to create a new message.*/export const RotateDirectorySyncTokenResponseSchema = /*@__PURE__*/- messageDesc(file_v1_workspace_service, 3);+ messageDesc(file_v1_workspace_service, 1);/*** Describes the message bytebase.v1.ListWorkspacesRequest.* Use `create(ListWorkspacesRequestSchema)` to create a new message.*/export const ListWorkspacesRequestSchema = /*@__PURE__*/- messageDesc(file_v1_workspace_service, 4);+ messageDesc(file_v1_workspace_service, 2);/*** Describes the message bytebase.v1.ListWorkspacesResponse.* Use `create(ListWorkspacesResponseSchema)` to create a new message.*/export const ListWorkspacesResponseSchema = /*@__PURE__*/- messageDesc(file_v1_workspace_service, 5);+ messageDesc(file_v1_workspace_service, 3);/*** Describes the message bytebase.v1.GetWorkspaceRequest.* Use `create(GetWorkspaceRequestSchema)` to create a new message.*/export const GetWorkspaceRequestSchema = /*@__PURE__*/- messageDesc(file_v1_workspace_service, 6);+ messageDesc(file_v1_workspace_service, 4);/*** Describes the message bytebase.v1.Workspace.* Use `create(WorkspaceSchema)` to create a new message.*/export const WorkspaceSchema = /*@__PURE__*/- messageDesc(file_v1_workspace_service, 7);+ messageDesc(file_v1_workspace_service, 5);/*** Describes the message bytebase.v1.DeleteWorkspaceRequest.* Use `create(DeleteWorkspaceRequestSchema)` to create a new message.*/export const DeleteWorkspaceRequestSchema = /*@__PURE__*/- messageDesc(file_v1_workspace_service, 8);+ messageDesc(file_v1_workspace_service, 6);/*** Describes the message bytebase.v1.UpdateWorkspaceRequest.* Use `create(UpdateWorkspaceRequestSchema)` to create a new message.*/export const UpdateWorkspaceRequestSchema = /*@__PURE__*/- messageDesc(file_v1_workspace_service, 9);+ messageDesc(file_v1_workspace_service, 7);/*** Describes the message bytebase.v1.LeaveWorkspaceRequest.* Use `create(LeaveWorkspaceRequestSchema)` to create a new message.*/export const LeaveWorkspaceRequestSchema = /*@__PURE__*/- messageDesc(file_v1_workspace_service, 10);+ messageDesc(file_v1_workspace_service, 8);/*** WorkspaceService manages workspace-level operations and profile.diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 65c2e169fa..f15aec6950 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -5434,29 +5434,6 @@ paths:application/json:schema:$ref: '#/components/schemas/bytebase.v1.BatchUpdateInstancesResponse'- /v1/mcp/info:- get:- tags:- - WorkspaceService- summary: |-- Gets what MCP (Model Context Protocol) does in this workspace: the- capability ceiling in force, and whether masking narrows what a session- reads under it. The workspace is resolved from the authenticated session.- description: |-- Served to MCP sessions. An agent asking what it may do here is the point:- the response says nothing a session's own denials do not already say, one- refusal at a time, and knowing it up front is what stops the agent- planning work the ceiling was never going to serve.-- Permissions required: None (authentication required)- operationId: WorkspaceService_GetMCPInfo- responses:- "200":- description: Success- content:- application/json:- schema:- $ref: '#/components/schemas/bytebase.v1.MCPInfo'/v1/projects:get:tags:@@ -19546,6 +19523,11 @@ components:description: Sample setup availability and provisioned resources.readOnly: true$ref: '#/components/schemas/bytebase.v1.SampleInfo'+ mcpSetting:+ title: mcp_setting+ description: The MCP (Model Context Protocol) setting in the current workspace.+ readOnly: true+ $ref: '#/components/schemas/bytebase.v1.MCPSetting'title: ActuatorInfoadditionalProperties: falsedescription: |-@@ -23898,10 +23880,6 @@ components:required:- nameadditionalProperties: false- bytebase.v1.GetMCPInfoRequest:- type: object- title: GetMCPInfoRequest- additionalProperties: falsebytebase.v1.GetPaymentInfoRequest:type: objecttitle: GetPaymentInfoRequest@@ -26842,54 +26820,6 @@ components:that contradicts its class. Neither is expressible now, and the one checkleft — the reason belongs to the class it is used on — is a table the gatealready keeps for the wording.- bytebase.v1.MCPInfo:- type: object- properties:- workspace:- type: string- title: workspace- description: |-- The workspace this describes. Format: workspaces/{workspace}. Not this- message's own resource name — MCPInfo is not a named resource and there is- nothing to get it by.- readOnly: true- capability:- title: capability- description: |-- The ceiling in force for this workspace. Any value outside the enum this- build serves, CAPABILITY_UNSPECIFIED included, means no ceiling could be- resolved from the stored row and every MCP connection is refused. A stored- name nothing resolves arrives as CAPABILITY_UNSPECIFIED; a number a newer- release wrote arrives verbatim.- readOnly: true- $ref: '#/components/schemas/bytebase.v1.MCPSetting.Capability'- ignoreMaskingExemptions:- type: boolean- title: ignore_masking_exemptions- description: |-- Whether this workspace stops applying the caller's own unmasking- provisioning to MCP requests. It narrows what a session reads only where- Bytebase masks by column and consults exemptions; elsewhere it suppresses- nothing.- readOnly: true- dataMaskingAvailable:- type: boolean- title: data_masking_available- description: |-- Whether data masking is licensed for this workspace. When false nothing is- masked whatever an engine supports, so the toggle above suppresses nothing.- Licensing can also be set per instance, so a true here is the workspace- answer, not a promise about every instance.- readOnly: true- title: MCPInfo- additionalProperties: false- description: |-- MCPInfo is what MCP does in this workspace: the ceiling in force, and- whether masking narrows what a session reads under it.-- This is the only API a served MCP session or the consent page can read the- ceiling from. SettingService/GetSetting is served by no ceiling, and its- answer is cached besides.bytebase.v1.MCPMethodClass:type: stringtitle: MCPMethodClass@@ -35183,14 +35113,6 @@ security: []tags:- name: AccessGrantServicedescription: AccessGrantService manages temporary access grants within projects.- - name: ActuatorService- description: ActuatorService manages system health and operational information.- - name: AIService- 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: RolloutServicedescription: RolloutService manages the execution of deployment plans.- name: QueryHistoryService@@ -35203,6 +35125,14 @@ tags:description: IssueService manages issues for tracking database changes and tasks.- name: SettingServicedescription: SettingService manages workspace-level settings and configurations.+ - name: ActuatorService+ description: ActuatorService manages system health and operational information.+ - name: AIService+ 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: UserServicedescription: UserService manages user accounts and authentication.- name: AuthServicediff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.htmlindex 6d1ce105d0..bfdd79a6d4 100644--- a/proto/gen/grpc-doc/store/index.html+++ b/proto/gen/grpc-doc/store/index.html@@ -10465,7 +10465,7 @@ If enabled, issues cannot be created when SQL review finds errors. </p></td><td></td><td><p>Whether to allow the last Plan editor to approve a database change issue. </p></td></tr>-+</tbody></table>@@ -15690,7 +15690,7 @@ Used to auto-select workspace on next login instead of requiring a workspace pic<td></td><td><p>Optional JWKS endpoint. When empty, use OIDC discovery from issuer_url. </p></td></tr>-+</tbody></table>@@ -15766,7 +15766,7 @@ Used to auto-select workspace on next login instead of requiring a workspace pic<td>3</td><td><p></p></td></tr>-+</tbody></table>@@ -16057,3 +16057,4 @@ Used to auto-select workspace on next login instead of requiring a workspace pic</table></body></html>+diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 563340b842..f38c889dd1 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -32,26 +32,6 @@- [AccessGrantService](#bytebase-v1-AccessGrantService)-- [v1/actuator_service.proto](#v1_actuator_service-proto)- - [ActuatorInfo](#bytebase-v1-ActuatorInfo)- - [GetActuatorInfoRequest](#bytebase-v1-GetActuatorInfoRequest)- - [SampleInfo](#bytebase-v1-SampleInfo)- - [SampleInfo.Instance](#bytebase-v1-SampleInfo-Instance)-- - [ActuatorService](#bytebase-v1-ActuatorService)--- [v1/ai_service.proto](#v1_ai_service-proto)- - [AIChatMessage](#bytebase-v1-AIChatMessage)- - [AIChatRequest](#bytebase-v1-AIChatRequest)- - [AIChatResponse](#bytebase-v1-AIChatResponse)- - [AIChatToolCall](#bytebase-v1-AIChatToolCall)- - [AIChatToolDefinition](#bytebase-v1-AIChatToolDefinition)- - [AIChatUsage](#bytebase-v1-AIChatUsage)-- - [AIChatMessageRole](#bytebase-v1-AIChatMessageRole)-- - [AIService](#bytebase-v1-AIService)-- [v1/common.proto](#v1_common-proto)- [PermissionDeniedDetail](#bytebase-v1-PermissionDeniedDetail)- [Position](#bytebase-v1-Position)@@ -67,57 +47,6 @@- [VCSType](#bytebase-v1-VCSType)- [WebhookType](#bytebase-v1-WebhookType)-- [v1/iam_policy.proto](#v1_iam_policy-proto)- - [Binding](#bytebase-v1-Binding)- - [BindingDelta](#bytebase-v1-BindingDelta)- - [GetIamPolicyRequest](#bytebase-v1-GetIamPolicyRequest)- - [IamPolicy](#bytebase-v1-IamPolicy)- - [PolicyDelta](#bytebase-v1-PolicyDelta)- - [SetIamPolicyRequest](#bytebase-v1-SetIamPolicyRequest)-- - [BindingDelta.Action](#bytebase-v1-BindingDelta-Action)--- [v1/audit_log_service.proto](#v1_audit_log_service-proto)- - [AuditData](#bytebase-v1-AuditData)- - [AuditLog](#bytebase-v1-AuditLog)- - [ExportAuditLogsRequest](#bytebase-v1-ExportAuditLogsRequest)- - [ExportAuditLogsResponse](#bytebase-v1-ExportAuditLogsResponse)- - [MCPDelegation](#bytebase-v1-MCPDelegation)- - [RequestMetadata](#bytebase-v1-RequestMetadata)- - [SearchAuditLogsRequest](#bytebase-v1-SearchAuditLogsRequest)- - [SearchAuditLogsResponse](#bytebase-v1-SearchAuditLogsResponse)-- - [AuditLog.Severity](#bytebase-v1-AuditLog-Severity)-- - [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)@@ -338,6 +267,77 @@- [SettingService](#bytebase-v1-SettingService)+- [v1/actuator_service.proto](#v1_actuator_service-proto)+ - [ActuatorInfo](#bytebase-v1-ActuatorInfo)+ - [GetActuatorInfoRequest](#bytebase-v1-GetActuatorInfoRequest)+ - [SampleInfo](#bytebase-v1-SampleInfo)+ - [SampleInfo.Instance](#bytebase-v1-SampleInfo-Instance)++ - [ActuatorService](#bytebase-v1-ActuatorService)++- [v1/ai_service.proto](#v1_ai_service-proto)+ - [AIChatMessage](#bytebase-v1-AIChatMessage)+ - [AIChatRequest](#bytebase-v1-AIChatRequest)+ - [AIChatResponse](#bytebase-v1-AIChatResponse)+ - [AIChatToolCall](#bytebase-v1-AIChatToolCall)+ - [AIChatToolDefinition](#bytebase-v1-AIChatToolDefinition)+ - [AIChatUsage](#bytebase-v1-AIChatUsage)++ - [AIChatMessageRole](#bytebase-v1-AIChatMessageRole)++ - [AIService](#bytebase-v1-AIService)++- [v1/iam_policy.proto](#v1_iam_policy-proto)+ - [Binding](#bytebase-v1-Binding)+ - [BindingDelta](#bytebase-v1-BindingDelta)+ - [GetIamPolicyRequest](#bytebase-v1-GetIamPolicyRequest)+ - [IamPolicy](#bytebase-v1-IamPolicy)+ - [PolicyDelta](#bytebase-v1-PolicyDelta)+ - [SetIamPolicyRequest](#bytebase-v1-SetIamPolicyRequest)++ - [BindingDelta.Action](#bytebase-v1-BindingDelta-Action)++- [v1/audit_log_service.proto](#v1_audit_log_service-proto)+ - [AuditData](#bytebase-v1-AuditData)+ - [AuditLog](#bytebase-v1-AuditLog)+ - [ExportAuditLogsRequest](#bytebase-v1-ExportAuditLogsRequest)+ - [ExportAuditLogsResponse](#bytebase-v1-ExportAuditLogsResponse)+ - [MCPDelegation](#bytebase-v1-MCPDelegation)+ - [RequestMetadata](#bytebase-v1-RequestMetadata)+ - [SearchAuditLogsRequest](#bytebase-v1-SearchAuditLogsRequest)+ - [SearchAuditLogsResponse](#bytebase-v1-SearchAuditLogsResponse)++ - [AuditLog.Severity](#bytebase-v1-AuditLog-Severity)++ - [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/user_service.proto](#v1_user_service-proto)- [BatchGetUsersRequest](#bytebase-v1-BatchGetUsersRequest)- [BatchGetUsersResponse](#bytebase-v1-BatchGetUsersResponse)@@ -794,12 +794,10 @@- [v1/workspace_service.proto](#v1_workspace_service-proto)- [DeleteWorkspaceRequest](#bytebase-v1-DeleteWorkspaceRequest)- - [GetMCPInfoRequest](#bytebase-v1-GetMCPInfoRequest)- [GetWorkspaceRequest](#bytebase-v1-GetWorkspaceRequest)- [LeaveWorkspaceRequest](#bytebase-v1-LeaveWorkspaceRequest)- [ListWorkspacesRequest](#bytebase-v1-ListWorkspacesRequest)- [ListWorkspacesResponse](#bytebase-v1-ListWorkspacesResponse)- - [MCPInfo](#bytebase-v1-MCPInfo)- [RotateDirectorySyncTokenRequest](#bytebase-v1-RotateDirectorySyncTokenRequest)- [RotateDirectorySyncTokenResponse](#bytebase-v1-RotateDirectorySyncTokenResponse)- [UpdateWorkspaceRequest](#bytebase-v1-UpdateWorkspaceRequest)@@ -1144,343 +1142,103 @@ AccessGrantService manages temporary access grants within projects.-<a name="v1_actuator_service-proto"></a>+<a name="v1_common-proto"></a><p align="right"><a href="#top">Top</a></p>-## v1/actuator_service.proto+## v1/common.proto-<a name="bytebase-v1-ActuatorInfo"></a>+<a name="bytebase-v1-PermissionDeniedDetail"></a>-### ActuatorInfo-System information and configuration for the Bytebase instance.-Actuator concept is similar to the Spring Boot Actuator.+### PermissionDeniedDetail+PermissionDeniedDetail provides structured information about permission failures.+Used as error detail when returning CodePermissionDenied errors.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| version | [string](#string) | | The Bytebase server version. |-| git_commit | [string](#string) | | The git commit hash of the build. |-| saas | [bool](#bool) | | Whether the Bytebase instance is running in SaaS mode where some features cannot be edited by users. |-| external_url | [string](#string) | | The external URL where users or webhook callbacks access Bytebase. |-| last_active_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time any API call was made, refreshed on each request. |-| workspace | [string](#string) | | The unique identifier for the workspace. Format: workspaces/{id} |-| unlicensed_features | [string](#string) | repeated | List of features that are not licensed. |-| activated_instance_count | [int32](#int32) | | The number of activated database instances. |-| total_instance_count | [int32](#int32) | | The total number of database instances. |-| external_url_from_flag | [bool](#bool) | | Whether the external URL is set via command-line flag (and thus cannot be changed via UI). |-| replica_count | [int32](#int32) | | The number of active replicas (servers sharing the same database). |-| default_project | [string](#string) | | The default project for unassigned databases. Format: projects/{id} |-| user_count_in_iam | [int32](#int32) | | The number of users in the workspace IAM (for seat limit display). |-| active_vcs_user_count | [int32](#int32) | | The number of active VCS users seen in the active window. |-| sample | [SampleInfo](#bytebase-v1-SampleInfo) | | Sample setup availability and provisioned resources. |-------<a name="bytebase-v1-GetActuatorInfoRequest"></a>+| method | [string](#string) | | The API method that was called. |+| required_permissions | [string](#string) | repeated | The permissions required but not granted to the user. |+| resources | [string](#string) | repeated | The resources the user was trying to access. |-### GetActuatorInfoRequest-Request message for getting actuator information.+<a name="bytebase-v1-Position"></a>-<a name="bytebase-v1-SampleInfo"></a>+### Position+Position in a text expressed as one-based line and one-based column.+We use 1-based numbering to match the majority of industry standards:+- Monaco Editor uses 1-based (https://microsoft.github.io/monaco-editor/typedoc/interfaces/IPosition.html)+- GitHub Actions uses 1-based (https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-error-message)+- Most text editors display 1-based positions to users+Note: LSP uses 0-based (https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position),+but we follow the canonical user-facing standards.-### SampleInfo-SampleInfo describes sample setup availability and provisioned resources.+Handling unknown positions:+- If the entire position is unknown, leave this field as nil/undefined+- If only line is known, set line and leave column as 0 (e.g., line=5, column=0)+- If only column is known (rare), set column and leave line as 0+Frontends should check for nil/undefined/zero values and handle them appropriately.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| available | [bool](#bool) | | Whether sample setup is currently available. |-| instances | [SampleInfo.Instance](#bytebase-v1-SampleInfo-Instance) | repeated | The provisioned sample instances. |+| line | [int32](#int32) | | Line position in a text (one-based). First line of the text is line 1. A value of 0 indicates the line information is unknown. |+| column | [int32](#int32) | | Column position in a text (one-based). Column is measured in Unicode code points (characters/runes), not bytes or grapheme clusters. First character of the line is column 1. A value of 0 indicates the column information is unknown.+Examples: - "SELECT * FROM t" - column 8 is '*' - "SELECT 你好 FROM t" - column 8 is '你' (even though it's at byte offset 7) - "SELECT 😀 FROM t" - column 8 is '😀' (even though it's 4 bytes in UTF-8) |-<a name="bytebase-v1-SampleInfo-Instance"></a>-### SampleInfo.Instance-Instance describes one provisioned sample instance.+<a name="bytebase-v1-Range"></a>++### Range+Range represents a span within a text or sequence.+Whether the indices are byte offsets or character indices depends on the context.+Check the documentation of the field using Range for specific semantics.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| instance | [string](#string) | | The provisioned sample instance. Format: instances/{instance} or projects/{project}/instances/{instance} |-| expire_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The time when the provisioned sample instance expires. |----------+| start | [int32](#int32) | | Start index (inclusive). |+| end | [int32](#int32) | | End index (exclusive). |-<a name="bytebase-v1-ActuatorService"></a>-### ActuatorService-ActuatorService manages system health and operational information.-| Method Name | Request Type | Response Type | Description |-| ----------- | ------------ | ------------- | ------------|-| GetActuatorInfo | [GetActuatorInfoRequest](#bytebase-v1-GetActuatorInfoRequest) | [ActuatorInfo](#bytebase-v1-ActuatorInfo) | Gets system information and health status of the Bytebase instance. The workspace is resolved from the authenticated session. Permissions required: None (authentication required) |+<a name="bytebase-v1-ApprovalStatus"></a>-<a name="v1_ai_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>--## v1/ai_service.proto+### ApprovalStatus+Approval workflow status for an issue or a plan.+Lives at the top level so both plan_service.proto and issue_service.proto+can reference it without a circular import.+| Name | Number | Description |+| ---- | ------ | ----------- |+| APPROVAL_STATUS_UNSPECIFIED | 0 | No approval workflow has started, including for a linked draft issue. |+| CHECKING | 1 | Approval checks are being evaluated. |+| PENDING | 2 | Approval is pending. |+| APPROVED | 3 | Issue has been approved. |+| REJECTED | 4 | Issue has been rejected. |+| SKIPPED | 5 | Approval was skipped. |-<a name="bytebase-v1-AIChatMessage"></a>-### AIChatMessage-A single message in the conversation.+<a name="bytebase-v1-Engine"></a>--| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| role | [AIChatMessageRole](#bytebase-v1-AIChatMessageRole) | | The role of the message sender. |-| content | [string](#string) | optional | The text content of the message. Optional for assistant messages that only contain tool calls. |-| tool_calls | [AIChatToolCall](#bytebase-v1-AIChatToolCall) | repeated | Tool calls made by the assistant. Only present in assistant messages. |-| tool_call_id | [string](#string) | optional | The ID of the tool call this message is responding to. Only present in tool messages. |-------<a name="bytebase-v1-AIChatRequest"></a>--### AIChatRequest-Request message for AIService.Chat.---| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| messages | [AIChatMessage](#bytebase-v1-AIChatMessage) | repeated | The conversation messages. |-| tool_definitions | [AIChatToolDefinition](#bytebase-v1-AIChatToolDefinition) | repeated | The tool definitions available to the AI. |-------<a name="bytebase-v1-AIChatResponse"></a>--### AIChatResponse-Response message for AIService.Chat.---| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| content | [string](#string) | optional | The text content of the AI response. Optional when the response only contains tool calls. |-| tool_calls | [AIChatToolCall](#bytebase-v1-AIChatToolCall) | repeated | Tool calls the AI wants to make. |-| usage | [AIChatUsage](#bytebase-v1-AIChatUsage) | optional | Token usage for this provider call, when available. |-------<a name="bytebase-v1-AIChatToolCall"></a>--### AIChatToolCall-A tool call made by the AI.---| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| id | [string](#string) | | The unique ID of this tool call. |-| name | [string](#string) | | The name of the tool to call. |-| arguments | [string](#string) | | The JSON-encoded arguments to pass to the tool. |-| metadata | [string](#string) | optional | Opaque provider-specific metadata (e.g., Gemini thought_signature). Frontend must echo this back unchanged when sending tool results. |-------<a name="bytebase-v1-AIChatToolDefinition"></a>--### AIChatToolDefinition-A tool definition that the AI can invoke.---| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the tool. |-| description | [string](#string) | | A description of what the tool does. |-| parameters_schema | [string](#string) | | The JSON Schema describing the tool's parameters. |-------<a name="bytebase-v1-AIChatUsage"></a>--### AIChatUsage-Token usage for a single AI provider call.---| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| total_tokens | [int32](#int32) | | Total tokens used by the provider call. |---------<a name="bytebase-v1-AIChatMessageRole"></a>--### AIChatMessageRole-Role of a chat message.--| Name | Number | Description |-| ---- | ------ | ----------- |-| AI_CHAT_MESSAGE_ROLE_UNSPECIFIED | 0 | Unspecified role. |-| AI_CHAT_MESSAGE_ROLE_SYSTEM | 1 | System message providing instructions. |-| AI_CHAT_MESSAGE_ROLE_USER | 2 | User message. |-| AI_CHAT_MESSAGE_ROLE_ASSISTANT | 3 | Assistant (AI) message. |-| AI_CHAT_MESSAGE_ROLE_TOOL | 4 | Tool result message. |--------<a name="bytebase-v1-AIService"></a>--### AIService-AIService provides AI chat capabilities for the page agent.--| Method Name | Request Type | Response Type | Description |-| ----------- | ------------ | ------------- | ------------|-| Chat | [AIChatRequest](#bytebase-v1-AIChatRequest) | [AIChatResponse](#bytebase-v1-AIChatResponse) | Chat sends a conversation with tool definitions to the configured AI provider and returns the AI response. |------<a name="v1_common-proto"></a>-<p align="right"><a href="#top">Top</a></p>--## v1/common.proto----<a name="bytebase-v1-PermissionDeniedDetail"></a>--### PermissionDeniedDetail-PermissionDeniedDetail provides structured information about permission failures.-Used as error detail when returning CodePermissionDenied errors.---| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| method | [string](#string) | | The API method that was called. |-| required_permissions | [string](#string) | repeated | The permissions required but not granted to the user. |-| resources | [string](#string) | repeated | The resources the user was trying to access. |-------<a name="bytebase-v1-Position"></a>--### Position-Position in a text expressed as one-based line and one-based column.-We use 1-based numbering to match the majority of industry standards:-- Monaco Editor uses 1-based (https://microsoft.github.io/monaco-editor/typedoc/interfaces/IPosition.html)-- GitHub Actions uses 1-based (https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-error-message)-- Most text editors display 1-based positions to users-Note: LSP uses 0-based (https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position),-but we follow the canonical user-facing standards.--Handling unknown positions:-- If the entire position is unknown, leave this field as nil/undefined-- If only line is known, set line and leave column as 0 (e.g., line=5, column=0)-- If only column is known (rare), set column and leave line as 0-Frontends should check for nil/undefined/zero values and handle them appropriately.---| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| line | [int32](#int32) | | Line position in a text (one-based). First line of the text is line 1. A value of 0 indicates the line information is unknown. |-| column | [int32](#int32) | | Column position in a text (one-based). Column is measured in Unicode code points (characters/runes), not bytes or grapheme clusters. First character of the line is column 1. A value of 0 indicates the column information is unknown.--Examples: - "SELECT * FROM t" - column 8 is '*' - "SELECT 你好 FROM t" - column 8 is '你' (even though it's at byte offset 7) - "SELECT 😀 FROM t" - column 8 is '😀' (even though it's 4 bytes in UTF-8) |-------<a name="bytebase-v1-Range"></a>--### Range-Range represents a span within a text or sequence.-Whether the indices are byte offsets or character indices depends on the context.-Check the documentation of the field using Range for specific semantics.---| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| start | [int32](#int32) | | Start index (inclusive). |-| end | [int32](#int32) | | End index (exclusive). |---------<a name="bytebase-v1-ApprovalStatus"></a>--### ApprovalStatus-Approval workflow status for an issue or a plan.-Lives at the top level so both plan_service.proto and issue_service.proto-can reference it without a circular import.--| Name | Number | Description |-| ---- | ------ | ----------- |-| APPROVAL_STATUS_UNSPECIFIED | 0 | No approval workflow has started, including for a linked draft issue. |-| CHECKING | 1 | Approval checks are being evaluated. |-| PENDING | 2 | Approval is pending. |-| APPROVED | 3 | Issue has been approved. |-| REJECTED | 4 | Issue has been rejected. |-| SKIPPED | 5 | Approval was skipped. |----<a name="bytebase-v1-Engine"></a>--### Engine-Database engine type.+### Engine+Database engine type.| Name | Number | Description || ---- | ------ | ----------- |@@ -1663,2330 +1421,2238 @@ Webhook integration type.-<a name="v1_iam_policy-proto"></a>+<a name="v1_rollout_service-proto"></a><p align="right"><a href="#top">Top</a></p>-## v1/iam_policy.proto+## v1/rollout_service.proto-<a name="bytebase-v1-Binding"></a>+<a name="bytebase-v1-BatchCancelTaskRunsRequest"></a>++### BatchCancelTaskRunsRequest-### Binding-Binding associates members with a role and optional conditions.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| role | [string](#string) | | The role that is assigned to the members. Format: roles/{role} |-| members | [string](#string) | repeated | Specifies the principals requesting access for a Bytebase resource. For users, the member should be: user:{email} For groups, the member should be: group:{email} For service accounts, the member should be: serviceAccount:{email} For workload identities, the member should be: workloadIdentity:{email} |-| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this binding, only used in the project IAM policy. If the condition evaluates to true, then this binding applies to the current request. If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec+| 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} |-Support variables: resource.database: the canonical database full name in "instances/{instance}/databases/{database}" or "projects/{project}/instances/{instance}/databases/{database}" format, used by any role with SQL Editor read (e.g. "roles/sqlEditorUser", "roles/sqlEditorReadUser") or write (bb.sql.ddl / bb.sql.dml) access, support "==" operator. resource.schema_name: the schema name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, support "==" operator. resource.table_name: the table name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, support "==" operator. resource.environment_id: the environment to allow the DDL/DML operation in the SQL Editor, only works for the role with bb.sql.ddl or bb.sql.dml permissions. Support "in" operator. request.time: the expiration. Only support "<" operation in `request.time < timestamp("{ISO datetime string format}")`.-Known limitations of table/schema-scoped DDL/DML grants: - The scope only gates the write target, not the read sources of a write: e.g. `INSERT INTO granted_table SELECT * FROM other_table` may read `other_table` without a grant on it, so a table-scoped write grant is not an exfiltration boundary. - It must be paired with a database/project-level read grant: a table-scoped grant alone does not satisfy the SQL Editor query method permission (bb.databases.get). - A resource.schema_name-scoped grant only authorizes a write whose schema is unambiguous — qualify the table (schema.table) or select the schema for the SQL Editor session. An unqualified write whose effective schema cannot be determined ahead of execution is denied (qualify it, or use a table-only grant). - Multi-statement batches are authorized at the database level: an earlier statement can rebind the session's default schema or database mid-batch, so per-table/schema scoping is dropped and a table/schema-scoped grant requires a database-level grant. The database-level check is still per target database — a qualified cross-database write is gated by a grant on its own database, not the request database — but an unqualified write whose session default is rebound mid-batch is evaluated against the database it literally names, so qualify cross-database writes or run them as single statements. - A write target in a different project than the SQL-Editor session's database is denied: the per-target check evaluates the session project's IAM policy, so a cross-project write is failed closed (to write it, open the SQL Editor on a database in the target project). - Enforcement is on the statement's literal write target; writes routed elsewhere by a view/synonym, or into a temporary schema (e.g. pg_temp), are evaluated against what the statement names, not the ultimate base object. - Write-target gating uses an ALLOWLIST of statement types the resolver models. It does NOT cover every syntactically-identifiable cross-database write; statement types off the allowlist are authorized against the request database. The allowlist is: - Modeled table/data writes (per-table/schema-scopable): INSERT/UPDATE/DELETE/TRUNCATE/MERGE, LOAD DATA, IMPORT INTO, CREATE TABLE AS / SELECT INTO, and table-level CREATE/DROP/ALTER/RENAME/index. - Modeled non-table object DDL (gated at the DATABASE level by the object's own explicit database/schema qualifier; an unqualified name keeps the request-database check): CREATE/ALTER/DROP of view, procedure/function/routine, trigger, sequence, synonym, type, and (Oracle) package and cluster; plus Oracle ALTER/DROP MATERIALIZED VIEW (Oracle CREATE MATERIALIZED VIEW is not modeled — see below). NOT modeled (these fall back to the request-database check, so a qualified cross-database one is authorized against the request database): MySQL CREATE TRIGGER and CREATE/ALTER/DROP EVENT (bare-string AST names); MSSQL ALTER of view/procedure/function/trigger (no ALTER node in the grammar); Oracle CREATE MATERIALIZED VIEW and the niche object DDL — dimension, attribute dimension, hierarchy, analytic view, JSON duality view, materialized zonemap, operator, in-memory join group, property graph, vector index, index type, domain; COPY ... FROM; and engine-specific bulk-load / deprecated text writes. A structural "write-target object database" extraction layer to remove this allowlist dependence is tracked as a follow-up. - Out of scope (read sources / indirect effects): the tables a write READS (INSERT … SELECT, MERGE … USING, CREATE TABLE AS … SELECT) and objects reached indirectly via views/synonyms/function bodies/triggers are NOT gated. Invariant: for a statement ON the modeled allowlist that explicitly names a different database as its write target, the ACL uses that target database, not the request database. Statement types OFF the allowlist are authorized against the request database.-For example: resource.database == "instances/local-pg/databases/postgres" && resource.schema_name in ["public","another_schema"] resource.database == "instances/local-pg/databases/bytebase" && resource.schema_name == "public" && resource.table_name in ["audit_log"] resource.database == "instances/local-pg/databases/postgres" && resource.environment_id in ["test"] request.time < timestamp("2025-04-26T11:24:48.655Z") |-| parsed_expr | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | | The parsed expression of the condition. |+<a name="bytebase-v1-BatchCancelTaskRunsResponse"></a>+### BatchCancelTaskRunsResponse-<a name="bytebase-v1-BindingDelta"></a>--### BindingDelta-A single change to a binding.---| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| action | [BindingDelta.Action](#bytebase-v1-BindingDelta-Action) | | The action that was performed on a Binding. |-| role | [string](#string) | | Role that is assigned to `members`. For example, `roles/projectOwner`. |-| member | [string](#string) | | Follows the same format of Binding.members. |-| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this binding. |+<a name="bytebase-v1-BatchRunTasksRequest"></a>-<a name="bytebase-v1-GetIamPolicyRequest"></a>+### BatchRunTasksRequest-### GetIamPolicyRequest-Request message for getting an IAM policy.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| resource | [string](#string) | | The name of the resource to get the IAM policy. Format: projects/{project} Format: workspaces/{workspace} |+| 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-IamPolicy"></a>+<a name="bytebase-v1-BatchRunTasksResponse"></a>-### IamPolicy-IAM policy that binds members to roles.+### BatchRunTasksResponse-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| bindings | [Binding](#bytebase-v1-Binding) | repeated | Collection of binding. A binding binds one or more project members to a single project role. |-| etag | [string](#string) | | The current etag of the policy, returned by GetIamPolicy and SetIamPolicy. Sending it back on SetIamPolicy makes the write conditional: if the policy changed since the read, the call returns ABORTED. Omitting it applies the write unconditionally, overwriting any concurrent change (AIP-154). |+<a name="bytebase-v1-BatchSkipTasksRequest"></a>-<a name="bytebase-v1-PolicyDelta"></a>+### BatchSkipTasksRequest-### PolicyDelta-Describes changes between two IAM policies.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| binding_deltas | [BindingDelta](#bytebase-v1-BindingDelta) | repeated | The delta for Bindings between two policies. |----+| 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-SetIamPolicyRequest"></a>-### SetIamPolicyRequest-Request message for setting an IAM policy.-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| resource | [string](#string) | | The name of the resource to set the IAM policy. Format: projects/{project} Format: workspaces/{workspace} |-| policy | [IamPolicy](#bytebase-v1-IamPolicy) | | |-| etag | [string](#string) | | The current etag of the policy. Equivalent to setting `policy.etag`; supplying both with different values returns INVALID_ARGUMENT. |+<a name="bytebase-v1-BatchSkipTasksResponse"></a>+### BatchSkipTasksResponse--<a name="bytebase-v1-BindingDelta-Action"></a>-### BindingDelta.Action-Type of action performed on a binding.-| Name | Number | Description |-| ---- | ------ | ----------- |-| ACTION_UNSPECIFIED | 0 | Unspecified action. |-| ADD | 1 | Add a binding. |-| REMOVE | 2 | Remove a binding. |+<a name="bytebase-v1-CreateRolloutRequest"></a>+### CreateRolloutRequest---+| 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 "", no stages are created. |-<a name="v1_audit_log_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/audit_log_service.proto+<a name="bytebase-v1-GetRolloutRequest"></a>-<a name="bytebase-v1-AuditData"></a>+### GetRolloutRequest-### AuditData-Additional audit data specific to certain operations.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| policy_delta | [PolicyDelta](#bytebase-v1-PolicyDelta) | | Changes to IAM policies. |+| 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-AuditLog"></a>+<a name="bytebase-v1-GetTaskRunLogRequest"></a>++### GetTaskRunLogRequest-### AuditLog-Audit log entry recording system activity or API call.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the log. Formats: - projects/{project}/auditLogs/{uid} - workspaces/{workspace}/auditLogs/{uid} |-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The timestamp when the audit log was created. |-| user | [string](#string) | | The user who performed the action. Format: users/{email} |-| method | [string](#string) | | The method or action being audited. For example: /bytebase.v1.SQLService/Query or bb.project.repository.push |-| severity | [AuditLog.Severity](#bytebase-v1-AuditLog-Severity) | | The severity level of this audit log entry. |-| resource | [string](#string) | | The resource associated with this audit log. |-| request | [string](#string) | | The request payload in JSON format. |-| response | [string](#string) | | The response payload in JSON format. Some fields may be omitted if they are too large or contain sensitive information. |-| status | [google.rpc.Status](#google-rpc-Status) | | The status of the operation. |-| latency | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration of the operation. |-| service_data | [google.protobuf.Any](#google-protobuf-Any) | | Service-specific metadata about the request, response, and activities. |-| request_metadata | [RequestMetadata](#bytebase-v1-RequestMetadata) | | Metadata about the request context. |-| mcp_delegation | [MCPDelegation](#bytebase-v1-MCPDelegation) | | MCP delegation provenance. Present exactly when the audited call arrived through the MCP server's delegated credential; never set for public API calls. Presence of this message is the MCP-origin marker. |+| parent | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |-<a name="bytebase-v1-ExportAuditLogsRequest"></a>+<a name="bytebase-v1-GetTaskRunRequest"></a>++### GetTaskRunRequest-### ExportAuditLogsRequest-Request message for exporting audit logs.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | |-| filter | [string](#string) | | The filter of the log. It should be a valid CEL expression. Check the filter field in the SearchAuditLogsRequest message. |-| order_by | [string](#string) | | The order by of the log. Only support order by create_time. The default sorting order is ascending. For example: - order_by = "create_time asc" - order_by = "create_time desc" |-| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The export format. |-| page_size | [int32](#int32) | | The maximum number of logs to return. The service may return fewer than this value. If unspecified, at most 10 log entries will be returned. The maximum value is 5000; values above 5000 will be coerced to 5000. |-| page_token | [string](#string) | | A page token, received from a previous `ExportAuditLogs` call. Provide this to retrieve the subsequent page. |+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |-<a name="bytebase-v1-ExportAuditLogsResponse"></a>+<a name="bytebase-v1-GetTaskRunSessionRequest"></a>++### GetTaskRunSessionRequest-### ExportAuditLogsResponse-Response message for exporting audit logs.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| content | [bytes](#bytes) | | The exported audit log content in the requested format. |-| next_page_token | [string](#string) | | A token to retrieve next page of log entities. Pass this value in the page_token field in the subsequent call to retrieve the next page of log entities. |+| parent | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |-<a name="bytebase-v1-MCPDelegation"></a>+<a name="bytebase-v1-ListRolloutsRequest"></a>++### ListRolloutsRequest-### MCPDelegation-Provenance of a call that reached the API through the MCP (Model Context-Protocol) server's delegated credential. The values are copied verbatim from-the verified credential's grant state; empty fields record that the grant-stored nothing (legacy sessions), never a resolved or synthesized value.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| scope | [string](#string) | | The OAuth2 grant's consented scope, e.g. "mcp:read-only". Empty when the grant recorded no scope. |-| resource | [string](#string) | | The grant's stored MCP resource URI. Empty for pre-grant legacy sessions. |-| client_id | [string](#string) | | The OAuth2 client the grant was consented to. Empty for legacy web-session tokens at /mcp. |-| correlation_id | [string](#string) | | Correlates the audit rows an MCP session produces. Minted at the /mcp boundary and session-scoped: the MCP SDK hands tool handlers the initialize-time context, so one MCP session carries one correlation ID across all of its tool calls. |-----+| parent | [string](#string) | | The parent, which owns this collection of rollouts. Format: projects/{project} Use "projects/-" 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.-<a name="bytebase-v1-RequestMetadata"></a>+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-### RequestMetadata-Metadata about the incoming request.+Supported filters: - update_time: rollout update time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator. - task_type: the task type, support "in" operator, check the Task.Type enum for the values.+For example: update_time >= "2025-01-02T15:04:05Z07:00" task_type in ["DATABASE_MIGRATE", "DATABASE_CREATE"] |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| caller_ip | [string](#string) | | The IP address of the request originator. |-| caller_supplied_user_agent | [string](#string) | | The user agent string provided by the caller. This is supplied by the client and is not authenticated. |+<a name="bytebase-v1-ListRolloutsResponse"></a>-<a name="bytebase-v1-SearchAuditLogsRequest"></a>+### ListRolloutsResponse-### SearchAuditLogsRequest-Request message for searching audit logs.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | |-| filter | [string](#string) | | The filter of the log. It should be a valid CEL expression. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filter: - method: the API name, can be found in the docs. Usually "/bytebase.v1.…", for example "/bytebase.v1.UserService/CreateUser"; entries written outside the v1 API carry their own prefix, such as "/bytebase.mcp.Session/Authorize" or "/bytebase.cli.Recovery/ResetUserPassword". Support "==" operator. - resource: the resource the entry is about, support "==" operator. - severity: support "==" operator, check Severity enum in AuditLog message for values. - user: the actor, should in "users/{email}" format, support "==" operator. - create_time: support ">=" and "<=" operator. - mcp: true selects the entries MCP produced, false the rest. A boolean, not a string. Support "==" operator. - mcp_correlation_id: the MCP session an entry belongs to, taken from an entry's mcp_delegation.correlation_id. Support "==" operator. Entries MCP produced outside a session — a refused connection or consent — carry none and match no value here.+| 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. |-For example: - filter = "method == '/bytebase.v1.SQLService/Query'" - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR'" - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && user == 'users/[email protected]'" - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && create_time <= '2021-01-01T00:00:00Z' && create_time >= '2020-01-01T00:00:00Z'" - filter = "mcp == true" - filter = "mcp_correlation_id == '0b7f1a3c-1d2e-4f56-8a90-1b2c3d4e5f60'" |-| order_by | [string](#string) | | The order by of the log. Only support order by create_time. The default sorting order is ascending. For example: - order_by = "create_time asc" - order_by = "create_time desc" |-| page_size | [int32](#int32) | | The maximum number of logs to return. The service may return fewer than this value. If unspecified, at most 10 log entries will be returned. The maximum value is 5000; values above 5000 will be coerced to 5000. |-| page_token | [string](#string) | | A page token, received from a previous `SearchLogs` call. Provide this to retrieve the subsequent page. |+<a name="bytebase-v1-ListTaskRunsRequest"></a>-<a name="bytebase-v1-SearchAuditLogsResponse"></a>+### ListTaskRunsRequest-### SearchAuditLogsResponse-Response message for searching audit logs.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| audit_logs | [AuditLog](#bytebase-v1-AuditLog) | repeated | |-| next_page_token | [string](#string) | | A token to retrieve next page of log entities. Pass this value in the page_token field in the subsequent call to retrieve the next page of log entities. |+| parent | [string](#string) | | The parent, which owns this collection of taskRuns. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} Use "projects/{project}/plans/{plan}/rollout/stages/-/tasks/-" to list all taskRuns from a rollout. |+| 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-AuditLog-Severity"></a>+<a name="bytebase-v1-ListTaskRunsResponse"></a>-### AuditLog.Severity-Severity level for audit log entries.+### ListTaskRunsResponse-| Name | Number | Description |-| ---- | ------ | ----------- |-| SEVERITY_UNSPECIFIED | 0 | Unspecified severity level. |-| DEBUG | 1 | Debug-level information. |-| INFO | 2 | Informational messages. |-| NOTICE | 3 | Notable events. |-| WARNING | 4 | Warning conditions. |-| ERROR | 5 | Error conditions. |-| CRITICAL | 6 | Critical conditions. |-| ALERT | 7 | Action must be taken immediately. |-| EMERGENCY | 8 | System is unusable. |-+| 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. |--<a name="bytebase-v1-AuditLogService"></a>-### AuditLogService-AuditLogService manages audit logs for system activities and API calls.-| Method Name | Request Type | Response Type | Description |-| ----------- | ------------ | ------------- | ------------|-| SearchAuditLogs | [SearchAuditLogsRequest](#bytebase-v1-SearchAuditLogsRequest) | [SearchAuditLogsResponse](#bytebase-v1-SearchAuditLogsResponse) | Searches audit logs with optional filtering and pagination. Permissions required: bb.auditLogs.search |-| ExportAuditLogs | [ExportAuditLogsRequest](#bytebase-v1-ExportAuditLogsRequest) | [ExportAuditLogsResponse](#bytebase-v1-ExportAuditLogsResponse) | Exports audit logs in a specified format for external analysis. Permissions required: bb.auditLogs.export |-+<a name="bytebase-v1-PreviewTaskRunRollbackRequest"></a>+### PreviewTaskRunRollbackRequest-<a name="v1_idp_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/idp_service.proto+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |-<a name="bytebase-v1-CreateIdentityProviderRequest"></a>-### CreateIdentityProviderRequest+++<a name="bytebase-v1-PreviewTaskRunRollbackResponse"></a>++### PreviewTaskRunRollbackResponse| 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'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. |+| statement | [string](#string) | | The rollback SQL statement that would undo the task run. |-<a name="bytebase-v1-DeleteIdentityProviderRequest"></a>+<a name="bytebase-v1-Rollout"></a>-### DeleteIdentityProviderRequest+### Rollout| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the identity provider to delete. Format: idps/{identity_provider} |+| 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-FieldMapping"></a>+<a name="bytebase-v1-Stage"></a>++### Stage-### 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/ |+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage} Use "-" for {stage} when the stage has no environment or deleted environment. |+| id | [string](#string) | | id is the environment id of the stage. e.g., "prod". Use "-" 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 "environments/-" for stages without environment or with deleted environments. |+| tasks | [Task](#bytebase-v1-Task) | repeated | The tasks within this stage. |-<a name="bytebase-v1-GetIdentityProviderRequest"></a>+<a name="bytebase-v1-Task"></a>-### GetIdentityProviderRequest+### Task| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the identity provider to retrieve. Format: idps/{idp} |-+| 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-IdentityProvider"></a>-### IdentityProvider+<a name="bytebase-v1-Task-DatabaseCreate"></a>+### Task.DatabaseCreate+Payload for creating a new database.| 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. |-+| sheet | [string](#string) | | Format: projects/{project}/sheets/{sheet} |-<a name="bytebase-v1-IdentityProviderConfig"></a>-### IdentityProviderConfig+<a name="bytebase-v1-Task-DatabaseUpdate"></a>+### Task.DatabaseUpdate+Payload for updating a database schema.| 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. |+| sheet | [string](#string) | | Format: projects/{project}/sheets/{sheet} |+| release | [string](#string) | | Format: projects/{project}/releases/{release} |-<a name="bytebase-v1-LDAPIdentityProviderConfig"></a>+<a name="bytebase-v1-TaskRun"></a>++### TaskRun-### 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., "ldap.example.com". |-| 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., "ou=users,dc=example,dc=com". |-| user_filter | [string](#string) | | UserFilter is the filter to search for users, e.g., "(uid=%s)". |-| 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. |-+| 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-LDAPIdentityProviderTestRequestContext"></a>-### LDAPIdentityProviderTestRequestContext+<a name="bytebase-v1-TaskRun-SchedulerInfo"></a>+### TaskRun.SchedulerInfo+Information about task run scheduling.| 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. |-+| 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-ListIdentityProvidersRequest"></a>-### ListIdentityProvidersRequest+<a name="bytebase-v1-TaskRun-SchedulerInfo-WaitingCause"></a>+### TaskRun.SchedulerInfo.WaitingCause+Information about why a task run is waiting.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent workspace whose identity providers should be listed. It must be the workspace the caller's credential belongs to. Format: workspaces/{workspace} |+| parallel_tasks_limit | [bool](#bool) | | Waiting due to parallel tasks limit. |-<a name="bytebase-v1-ListIdentityProvidersResponse"></a>+<a name="bytebase-v1-TaskRunLog"></a>-### ListIdentityProvidersResponse+### TaskRunLog| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| identity_providers | [IdentityProvider](#bytebase-v1-IdentityProvider) | repeated | The identity providers from the specified request. |+| 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-OAuth2IdentityProviderConfig"></a>+<a name="bytebase-v1-TaskRunLogEntry"></a>++### TaskRunLogEntry-### OAuth2IdentityProviderConfig-OAuth2IdentityProviderConfig is the structure for OAuth2 identity provider config.| 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. |-+| 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-OAuth2IdentityProviderTestRequestContext"></a>-### OAuth2IdentityProviderTestRequestContext+<a name="bytebase-v1-TaskRunLogEntry-CommandExecute"></a>+### TaskRunLogEntry.CommandExecute+Command execution details.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| code | [string](#string) | | Authorize code from website. |+| 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 "SELECT 你好;" 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-OIDCIdentityProviderConfig"></a>+<a name="bytebase-v1-TaskRunLogEntry-CommandExecute-CommandResponse"></a>-### OIDCIdentityProviderConfig-OIDCIdentityProviderConfig is the structure for OIDC identity provider config.+### TaskRunLogEntry.CommandExecute.CommandResponse+Command execution response.| 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. |-+| 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't support it. Caller should fallback to `affected_rows` in that case. |-<a name="bytebase-v1-OIDCIdentityProviderTestRequestContext"></a>-### OIDCIdentityProviderTestRequestContext+<a name="bytebase-v1-TaskRunLogEntry-ComputeDiff"></a>+### TaskRunLogEntry.ComputeDiff+Schema diff computation details.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| code | [string](#string) | | Authorize code from OIDC provider. |-+| 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-TestIdentityProviderRequest"></a>-### TestIdentityProviderRequest+<a name="bytebase-v1-TaskRunLogEntry-DatabaseSync"></a>+### TaskRunLogEntry.DatabaseSync+Database synchronization details.| 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. |-+| 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-TestIdentityProviderResponse"></a>-### TestIdentityProviderResponse+<a name="bytebase-v1-TaskRunLogEntry-GhostMigration"></a>+### TaskRunLogEntry.GhostMigration+gh-ost migration details.| 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. |-+| 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-TestIdentityProviderResponse-ClaimsEntry"></a>-### TestIdentityProviderResponse.ClaimsEntry+<a name="bytebase-v1-TaskRunLogEntry-PriorBackup"></a>+### TaskRunLogEntry.PriorBackup+Prior backup operation details.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [string](#string) | | |-+| 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="bytebase-v1-TestIdentityProviderResponse-UserInfoEntry"></a>-### TestIdentityProviderResponse.UserInfoEntry+<a name="bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail"></a>+### TaskRunLogEntry.PriorBackup.PriorBackupDetail+Prior backup detail for rollback purposes.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [string](#string) | | |-+| items | [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item) | repeated | The list of backed up tables. |-<a name="bytebase-v1-UpdateIdentityProviderRequest"></a>-### UpdateIdentityProviderRequest+<a name="bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item"></a>+### TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item+A single backup table mapping.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| identity_provider | [IdentityProvider](#bytebase-v1-IdentityProvider) | | The identity provider to update.+| 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. |-The identity provider'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-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table"></a>+### TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table+Table information.-<a name="bytebase-v1-IdentityProviderType"></a>-### IdentityProviderType+| 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. |-| 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-TaskRunLogEntry-ReleaseFileExecute"></a>+### TaskRunLogEntry.ReleaseFileExecute+Release file execution details.-| 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 |+| ----- | ---- | ----- | ----------- |+| version | [string](#string) | | The version of the file being executed (e.g., "0001"). |+| file_path | [string](#string) | | The file path within the release (e.g., "2.2/V0001_create_table.sql"). |-<a name="bytebase-v1-OAuth2AuthStyle"></a>-### OAuth2AuthStyle-| Name | Number | Description |-| ---- | ------ | ----------- |-| OAUTH2_AUTH_STYLE_UNSPECIFIED | 0 | |-| IN_PARAMS | 1 | IN_PARAMS sends the "client_id" and "client_secret" 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-TaskRunLogEntry-RetryInfo"></a>-+### 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. |-<a name="bytebase-v1-IdentityProviderService"></a>--### IdentityProviderService-IdentityProviderService manages external identity providers for SSO authentication.--| 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'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-BatchCancelTaskRunsRequest"></a>-### BatchCancelTaskRunsRequest+<a name="bytebase-v1-TaskRunLogEntry-SchemaDump"></a>+### TaskRunLogEntry.SchemaDump+Schema dump operation details.| 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} |+| 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-BatchCancelTaskRunsResponse"></a>+<a name="bytebase-v1-TaskRunLogEntry-TransactionControl"></a>-### BatchCancelTaskRunsResponse+### 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. |+-<a name="bytebase-v1-BatchRunTasksRequest"></a>+<a name="bytebase-v1-TaskRunSession"></a>-### BatchRunTasksRequest+### TaskRunSession| 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. |+| 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-BatchRunTasksResponse"></a>+<a name="bytebase-v1-TaskRunSession-Postgres"></a>-### BatchRunTasksResponse+### 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`. |-<a name="bytebase-v1-BatchSkipTasksRequest"></a>-### BatchSkipTasksRequest+<a name="bytebase-v1-TaskRunSession-Postgres-Session"></a>+### TaskRunSession.Postgres.Session+PostgreSQL session information read from `pg_stat_activity`.| 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. |+| 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-BatchSkipTasksResponse"></a>-### BatchSkipTasksResponse+<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-Type"></a>-<a name="bytebase-v1-CreateRolloutRequest"></a>+### Task.Type-### CreateRolloutRequest+| 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 |-| ----- | ---- | ----- | ----------- |-| 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 "", no stages are created. |+<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-GetRolloutRequest"></a>-### GetRolloutRequest+<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. |-| 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 |+<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-GetTaskRunLogRequest"></a>+-### GetTaskRunLogRequest++<a name="bytebase-v1-RolloutService"></a>-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |+### 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-GetTaskRunRequest"></a>-### GetTaskRunRequest++<a name="bytebase-v1-GetQueryHistoryRequest"></a>++### GetQueryHistoryRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |+| name | [string](#string) | | The name of the query history to retrieve. Format: projects/{project}/queryHistories/{id} |-<a name="bytebase-v1-GetTaskRunSessionRequest"></a>+<a name="bytebase-v1-ListQueryHistoriesRequest"></a>-### GetTaskRunSessionRequest+### ListQueryHistoriesRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |-+| parent | [string](#string) | | The parent project whose query histories are listed. Format: projects/{project} Use "projects/-" to list query histories across all projects (https://google.aip.dev/159); this requires the bb.queryHistories.list permission on the workspace. |+| 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 "users/{email}" format, support "==" operator.+For example: creator == "users/{email}" |-<a name="bytebase-v1-ListRolloutsRequest"></a>-### ListRolloutsRequest+<a name="bytebase-v1-ListQueryHistoriesResponse"></a>-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent, which owns this collection of rollouts. Format: projects/{project} Use "projects/-" 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.+### ListQueryHistoriesResponse-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 "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator. - task_type: the task type, support "in" operator, check the Task.Type enum for the values.-For example: update_time >= "2025-01-02T15:04:05Z07:00" task_type in ["DATABASE_MIGRATE", "DATABASE_CREATE"] |+| 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. |-<a name="bytebase-v1-ListRolloutsResponse"></a>+<a name="bytebase-v1-QueryHistory"></a>-### ListRolloutsResponse+### QueryHistory| 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. |+| 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-ListTaskRunsRequest"></a>+<a name="bytebase-v1-SearchQueryHistoriesRequest"></a>-### ListTaskRunsRequest+### SearchQueryHistoriesRequest| 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 "projects/{project}/plans/{plan}/rollout/stages/-/tasks/-" 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.+| parent | [string](#string) | | The parent project to search query histories in. Format: projects/{project} The AIP-159 wildcard "projects/-" is not supported; use ListQueryHistories for cross-project reads. |+| 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-When paginating, all other parameters provided to `ListTaskRuns` must match the call that provided the page token. |+Supported filter: - project: the project full name in "projects/{id}" format, support "==" operator. - database: the database full name in "instances/{id}/databases/{name}" or "projects/{project}/instances/{id}/databases/{name}" format, support "==" operator. - instance: the instance full name in "instances/{id}" or "projects/{project}/instances/{id}" format, support "==" operator. - type: the type, should be "QUERY" or "EXPORT", support "==" operator. - statement: the SQL statement, support "==" and ".contains()" operators.+For example: project == "projects/{project}" database == "instances/{instance}/databases/{database}" instance == "instances/{instance}" type == "QUERY" type == "EXPORT" statement == "SELECT 1;" statement.contains("select") type == "QUERY" && statement.contains("select") |-<a name="bytebase-v1-ListTaskRunsResponse"></a>-### ListTaskRunsResponse+<a name="bytebase-v1-SearchQueryHistoriesResponse"></a>++### SearchQueryHistoriesResponse| 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. |+| 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-PreviewTaskRunRollbackRequest"></a>--### PreviewTaskRunRollbackRequest+<a name="bytebase-v1-QueryHistory-Type"></a>+### QueryHistory.Type-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |+| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | Unspecified query history type. |+| QUERY | 1 | Query execution for data retrieval. |+| EXPORT | 2 | Data export operation to file. |++-<a name="bytebase-v1-PreviewTaskRunRollbackResponse"></a>+<a name="bytebase-v1-QueryHistoryService"></a>-### PreviewTaskRunRollbackResponse+### 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'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's own query history) |+-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| statement | [string](#string) | | The rollback SQL statement that would undo the task run. |+<a name="v1_sql_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/sql_service.proto-<a name="bytebase-v1-Rollout"></a>+<a name="bytebase-v1-AdminExecuteRequest"></a>-### Rollout+### AdminExecuteRequest| 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) | | |+| 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-Stage"></a>+<a name="bytebase-v1-AdminExecuteResponse"></a>-### Stage+### AdminExecuteResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage} Use "-" for {stage} when the stage has no environment or deleted environment. |-| id | [string](#string) | | id is the environment id of the stage. e.g., "prod". Use "-" 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 "environments/-" for stages without environment or with deleted environments. |-| tasks | [Task](#bytebase-v1-Task) | repeated | The tasks within this stage. |+| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |-<a name="bytebase-v1-Task"></a>+<a name="bytebase-v1-Advice"></a>-### Task+### Advice| 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. |+| 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-Task-DatabaseCreate"></a>+<a name="bytebase-v1-ExportRequest"></a>++### ExportRequest-### Task.DatabaseCreate-Payload for creating a new database.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| sheet | [string](#string) | | Format: projects/{project}/sheets/{sheet} |+| 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-Task-DatabaseUpdate"></a>+<a name="bytebase-v1-ExportResponse"></a>++### ExportResponse-### Task.DatabaseUpdate-Payload for updating a database schema.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| sheet | [string](#string) | | Format: projects/{project}/sheets/{sheet} |-| release | [string](#string) | | Format: projects/{project}/releases/{release} |+| 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-TaskRun"></a>+<a name="bytebase-v1-MaskingReason"></a>-### TaskRun+### MaskingReason| 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. |+| semantic_type_id | [string](#string) | | The semantic type that triggered masking (e.g., "SSN", "email", "phone"). |+| 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., "Matched global rule: PII Protection"). |+| 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-TaskRun-SchedulerInfo"></a>+<a name="bytebase-v1-QueryOption"></a>++### QueryOption-### TaskRun.SchedulerInfo-Information about task run scheduling.| 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. |+| redis_run_commands_on | [QueryOption.RedisRunCommandsOn](#bytebase-v1-QueryOption-RedisRunCommandsOn) | | |+| mssql_explain_format | [QueryOption.MSSQLExplainFormat](#bytebase-v1-QueryOption-MSSQLExplainFormat) | | |-<a name="bytebase-v1-TaskRun-SchedulerInfo-WaitingCause"></a>+<a name="bytebase-v1-QueryRequest"></a>++### QueryRequest-### 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. |+| 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-TaskRunLog"></a>+<a name="bytebase-v1-QueryResponse"></a>-### TaskRunLog+### QueryResponse| 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. |+| 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-TaskRunLogEntry"></a>+<a name="bytebase-v1-QueryResult"></a>-### TaskRunLogEntry+### QueryResult| 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). |+| 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's RAISE NOTICE, MSSQL's PRINT, or Oracle'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-TaskRunLogEntry-CommandExecute"></a>+<a name="bytebase-v1-QueryResult-CommandError"></a>-### TaskRunLogEntry.CommandExecute-Command execution details.+### QueryResult.CommandError+Permission denied with resource information or disallowed command_type.+Either resources or command_type is available.| 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 "SELECT 你好;" 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. |+| command_type | [QueryResult.CommandError.Type](#bytebase-v1-QueryResult-CommandError-Type) | | Disallowed command_type. |-<a name="bytebase-v1-TaskRunLogEntry-CommandExecute-CommandResponse"></a>+<a name="bytebase-v1-QueryResult-Message"></a>++### QueryResult.Message-### 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't support it. Caller should fallback to `affected_rows` in that case. |+| level | [QueryResult.Message.Level](#bytebase-v1-QueryResult-Message-Level) | | |+| content | [string](#string) | | |-<a name="bytebase-v1-TaskRunLogEntry-ComputeDiff"></a>+<a name="bytebase-v1-QueryResult-PostgresError"></a>-### TaskRunLogEntry.ComputeDiff-Schema diff computation details.+### QueryResult.PostgresError+refer https://www.postgresql.org/docs/11/protocol-error-fields.html+for field description.| 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. |+| 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-DatabaseSync"></a>+<a name="bytebase-v1-QueryResult-SyntaxError"></a>-### TaskRunLogEntry.DatabaseSync-Database synchronization details.+### QueryResult.SyntaxError+Syntax error with position information for editor highlighting| 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. |+| start_position | [Position](#bytebase-v1-Position) | | Position information for highlighting in editor |-<a name="bytebase-v1-TaskRunLogEntry-GhostMigration"></a>+<a name="bytebase-v1-QueryRow"></a>++### QueryRow-### 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. |+| values | [RowValue](#bytebase-v1-RowValue) | repeated | Row values of the query result. |-<a name="bytebase-v1-TaskRunLogEntry-PriorBackup"></a>+<a name="bytebase-v1-RowValue"></a>++### RowValue-### 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. |+| 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-TaskRunLogEntry-PriorBackup-PriorBackupDetail"></a>+<a name="bytebase-v1-RowValue-Timestamp"></a>++### RowValue.Timestamp-### 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. |+| 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-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item"></a>+<a name="bytebase-v1-RowValue-TimestampTZ"></a>++### RowValue.TimestampTZ-### TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item-A single backup table mapping.| 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. |+| google_timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |+| zone | [string](#string) | | Zone is the time zone abbreviations in timezone database such as "PDT", "PST". https://en.wikipedia.org/wiki/List_of_tz_database_time_zones We retrieve the time zone information from the timestamptz field in the database. A timestamp is in UTC or epoch time, and with zone info, we can convert it to a local time string. Zone and offset are returned by time.Time.Zone() |+| offset | [int32](#int32) | | The offset is in seconds east of UTC |+| accuracy | [int32](#int32) | | |+-<a name="bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table"></a>-### TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table-Table information.+<a name="bytebase-v1-Advice-Level"></a>+### Advice.Level+Level represents the severity level of the advice.-| 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. |+| 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>+### 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-TaskRunLogEntry-ReleaseFileExecute"></a>-### TaskRunLogEntry.ReleaseFileExecute-Release file execution details.+<a name="bytebase-v1-QueryOption-MSSQLExplainFormat"></a>-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| version | [string](#string) | | The version of the file being executed (e.g., "0001"). |-| file_path | [string](#string) | | The file path within the release (e.g., "2.2/V0001_create_table.sql"). |+### 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 |++<a name="bytebase-v1-QueryOption-RedisRunCommandsOn"></a>+### QueryOption.RedisRunCommandsOn-<a name="bytebase-v1-TaskRunLogEntry-RetryInfo"></a>-### TaskRunLogEntry.RetryInfo-Retry information for failed operations.+| 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 |-| ----- | ---- | ----- | ----------- |-| 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-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-TaskRunLogEntry-SchemaDump"></a>-### TaskRunLogEntry.SchemaDump-Schema dump operation details.+<a name="bytebase-v1-QueryResult-Message-Level"></a>+### QueryResult.Message.Level-| 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. |++| 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. |+++<a name="bytebase-v1-SQLService"></a>-<a name="bytebase-v1-TaskRunLogEntry-TransactionControl"></a>+### SQLService+SQLService executes SQL queries and manages query operations.-### TaskRunLogEntry.TransactionControl-Transaction control operation details.+| 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'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'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 |+-| 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. |+<a name="v1_plan_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/plan_service.proto-<a name="bytebase-v1-TaskRunSession"></a>+<a name="bytebase-v1-CancelPlanCheckRunRequest"></a>-### TaskRunSession+### CancelPlanCheckRunRequest| 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) | | The name of the plan check run to cancel. Format: projects/{project}/plans/{plan}/planCheckRun |-<a name="bytebase-v1-TaskRunSession-Postgres"></a>+<a name="bytebase-v1-CancelPlanCheckRunResponse"></a>-### TaskRunSession.Postgres-PostgreSQL session information.+### CancelPlanCheckRunResponse-| 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`. |+<a name="bytebase-v1-CreatePlanRequest"></a>-<a name="bytebase-v1-TaskRunSession-Postgres-Session"></a>+### CreatePlanRequest-### TaskRunSession.Postgres.Session-PostgreSQL session information read from `pg_stat_activity`.| 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. |+| 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-GetPlanCheckRunRequest"></a>-<a name="bytebase-v1-Task-Status"></a>+### GetPlanCheckRunRequest-### 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. |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name of the plan check run to retrieve. Format: projects/{project}/plans/{plan}/planCheckRun |-<a name="bytebase-v1-Task-Type"></a>-### 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-GetPlanRequest"></a>+### GetPlanRequest-<a name="bytebase-v1-TaskRun-Status"></a>-### TaskRun.Status+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name of the plan to retrieve. Format: projects/{project}/plans/{plan} |-| 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-TaskRunLogEntry-TransactionControl-Type"></a>-### TaskRunLogEntry.TransactionControl.Type-Transaction control type.+<a name="bytebase-v1-ListPlansRequest"></a>-| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | Unspecified type. |-| BEGIN | 1 | Begin transaction. |-| COMMIT | 2 | Commit transaction. |-| ROLLBACK | 3 | Rollback transaction. |+### ListPlansRequest-<a name="bytebase-v1-TaskRunLogEntry-Type"></a>+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| parent | [string](#string) | | The parent, which owns this collection of plans. Format: projects/{project} Use "projects/-" 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.-### TaskRunLogEntry.Type-The type of log entry.+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-| 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-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 |--+Supported filters: - creator: the plan creator full name in "users/{email or id}" format, support "==" operator. - create_time: the plan create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator. - has_rollout: whether the plan has rollout, support "==" operator, the value should be "true" or "false". - title: the plan title, support "==" operator for exact match and ".contains()" operator for case-insensitive substring match. - spec_type: the plan spec config type, support "==" operator, the value should be "create_database_config" or "change_database_config". - state: the plan state, support "==" operator, the value should be "ACTIVE" or "DELETED".+For example: creator == "users/[email protected]" && create_time >= "2025-01-02T15:04:05Z07:00" title == "My Plan" title.contains("database migration") spec_type == "change_database_config" state == "ACTIVE" |-<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-ListPlansResponse"></a>-### GetQueryHistoryRequest+### ListPlansResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the query history to retrieve. Format: projects/{project}/queryHistories/{id} |+| 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-ListQueryHistoriesRequest"></a>+<a name="bytebase-v1-Plan"></a>-### ListQueryHistoriesRequest+### Plan| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent project whose query histories are listed. Format: projects/{project} Use "projects/-" to list query histories across all projects (https://google.aip.dev/159); this requires the bb.queryHistories.list permission on the workspace. |-| 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 "users/{email}" format, support "==" operator.--For example: creator == "users/{email}" |+| 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. |-<a name="bytebase-v1-ListQueryHistoriesResponse"></a>+<a name="bytebase-v1-Plan-ChangeDatabaseConfig"></a>-### ListQueryHistoriesResponse+### Plan.ChangeDatabaseConfig| 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. |+| 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-QueryHistory"></a>+<a name="bytebase-v1-Plan-CreateDatabaseConfig"></a>-### QueryHistory+### Plan.CreateDatabaseConfig| 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) | | |+| 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 "ON CLUSTER <<cluster>>". |+| owner | [string](#string) | | owner is the owner of the database. This is only applicable to Postgres for "WITH OWNER <<owner>>". |+| environment | [string](#string) | | The environment resource. Format: environments/prod where prod is the environment resource ID. |-<a name="bytebase-v1-SearchQueryHistoriesRequest"></a>+<a name="bytebase-v1-Plan-PlanCheckRunStatusCountEntry"></a>-### SearchQueryHistoriesRequest+### Plan.PlanCheckRunStatusCountEntry| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent project to search query histories in. Format: projects/{project} The AIP-159 wildcard "projects/-" is not supported; use ListQueryHistories for cross-project reads. |-| 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 "projects/{id}" format, support "==" operator. - database: the database full name in "instances/{id}/databases/{name}" or "projects/{project}/instances/{id}/databases/{name}" format, support "==" operator. - instance: the instance full name in "instances/{id}" or "projects/{project}/instances/{id}" format, support "==" operator. - type: the type, should be "QUERY" or "EXPORT", support "==" operator. - statement: the SQL statement, support "==" and ".contains()" operators.--For example: project == "projects/{project}" database == "instances/{instance}/databases/{database}" instance == "instances/{instance}" type == "QUERY" type == "EXPORT" statement == "SELECT 1;" statement.contains("select") type == "QUERY" && statement.contains("select") |+| key | [string](#string) | | |+| value | [int32](#int32) | | |-<a name="bytebase-v1-SearchQueryHistoriesResponse"></a>+<a name="bytebase-v1-Plan-RolloutStageSummary"></a>-### SearchQueryHistoriesResponse+### Plan.RolloutStageSummary| 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. |+| 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-Plan-Spec"></a>-<a name="bytebase-v1-QueryHistory-Type"></a>+### Plan.Spec-### QueryHistory.Type-| 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 |+| ----- | ---- | ----- | ----------- |+| 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-QueryHistoryService"></a>-### QueryHistoryService-QueryHistoryService manages query history records of SQL Editor queries and exports.+<a name="bytebase-v1-Plan-TaskStatusCount"></a>-| 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'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's own query history) |+### 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="v1_sql_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/sql_service.proto-<a name="bytebase-v1-AdminExecuteRequest"></a>+<a name="bytebase-v1-PlanCheckRun"></a>-### AdminExecuteRequest+### PlanCheckRun| 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. |+| 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-AdminExecuteResponse"></a>+<a name="bytebase-v1-PlanCheckRun-Result"></a>-### AdminExecuteResponse+### PlanCheckRun.Result| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |+| 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-Advice"></a>+<a name="bytebase-v1-PlanCheckRun-Result-SqlReviewReport"></a>-### Advice+### PlanCheckRun.Result.SqlReviewReport| 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 |+| start_position | [Position](#bytebase-v1-Position) | | Position of the SQL statement. || 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-ExportRequest"></a>+<a name="bytebase-v1-PlanCheckRun-Result-SqlSummaryReport"></a>-### ExportRequest+### PlanCheckRun.Result.SqlSummaryReport| 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. |+| 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-ExportResponse"></a>+<a name="bytebase-v1-RunPlanChecksRequest"></a>-### ExportResponse+### RunPlanChecksRequest| 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. |--+| 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-MaskingReason"></a>-### MaskingReason+<a name="bytebase-v1-RunPlanChecksResponse"></a>+### RunPlanChecksResponse-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| semantic_type_id | [string](#string) | | The semantic type that triggered masking (e.g., "SSN", "email", "phone"). |-| 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., "Matched global rule: PII Protection"). |-| 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-QueryOption"></a>+<a name="bytebase-v1-UpdatePlanRequest"></a>-### QueryOption+### UpdatePlanRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| redis_run_commands_on | [QueryOption.RedisRunCommandsOn](#bytebase-v1-QueryOption-RedisRunCommandsOn) | | |-| mssql_explain_format | [QueryOption.MSSQLExplainFormat](#bytebase-v1-QueryOption-MSSQLExplainFormat) | | |+| plan | [Plan](#bytebase-v1-Plan) | | The plan to update.+The plan'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-QueryRequest"></a>+-### QueryRequest+<a name="bytebase-v1-PlanCheckRun-Result-Type"></a>+### PlanCheckRun.Result.Type-| 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 | 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-QueryResponse"></a>-### QueryResponse+| Name | Number | Description |+| ---- | ------ | ----------- |+| STATUS_UNSPECIFIED | 0 | |+| RUNNING | 1 | |+| DONE | 2 | |+| FAILED | 3 | |+| CANCELED | 4 | |+-| 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. |++<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-QueryResult"></a>-### QueryResult++<a name="bytebase-v1-ApprovalFlow"></a>++### ApprovalFlow| 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's RAISE NOTICE, MSSQL's PRINT, or Oracle's DBMS_OUTPUT.PUT_LINE. |-| masked | [MaskingReason](#bytebase-v1-MaskingReason) | repeated | Masking reasons for each column (empty for non-masked columns). |+| roles | [string](#string) | repeated | The roles required for approval in order. |-<a name="bytebase-v1-QueryResult-CommandError"></a>+<a name="bytebase-v1-ApprovalTemplate"></a>++### ApprovalTemplate-### QueryResult.CommandError-Permission denied with resource information or disallowed command_type.-Either resources or command_type is available.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| command_type | [QueryResult.CommandError.Type](#bytebase-v1-QueryResult-CommandError-Type) | | Disallowed command_type. |+| 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-QueryResult-Message"></a>+<a name="bytebase-v1-ApproveIssueRequest"></a>-### QueryResult.Message+### ApproveIssueRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| level | [QueryResult.Message.Level](#bytebase-v1-QueryResult-Message-Level) | | |-| content | [string](#string) | | |+| 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-QueryResult-PostgresError"></a>+<a name="bytebase-v1-BatchUpdateIssuesStatusRequest"></a>++### BatchUpdateIssuesStatusRequest-### QueryResult.PostgresError-refer https://www.postgresql.org/docs/11/protocol-error-fields.html-for field description.| 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) | | |-+| 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-QueryResult-SyntaxError"></a>-### QueryResult.SyntaxError-Syntax error with position information for editor highlighting+<a name="bytebase-v1-BatchUpdateIssuesStatusResponse"></a>+### BatchUpdateIssuesStatusResponse-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| start_position | [Position](#bytebase-v1-Position) | | Position information for highlighting in editor |-<a name="bytebase-v1-QueryRow"></a>+<a name="bytebase-v1-CreateIssueCommentRequest"></a>-### QueryRow+### CreateIssueCommentRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| values | [RowValue](#bytebase-v1-RowValue) | repeated | Row values of the query result. |+| parent | [string](#string) | | The issue name Format: projects/{project}/issues/{issue} |+| issue_comment | [IssueComment](#bytebase-v1-IssueComment) | | The comment to create. |-<a name="bytebase-v1-RowValue"></a>+<a name="bytebase-v1-CreateIssueRequest"></a>-### RowValue+### CreateIssueRequest| 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, which owns this collection of issues. Format: projects/{project} |+| issue | [Issue](#bytebase-v1-Issue) | | The issue to create. |-<a name="bytebase-v1-RowValue-Timestamp"></a>+<a name="bytebase-v1-GetIssueRequest"></a>-### RowValue.Timestamp+### GetIssueRequest| 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. |+| 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-RowValue-TimestampTZ"></a>+<a name="bytebase-v1-Issue"></a>-### RowValue.TimestampTZ+### Issue| 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 "PDT", "PST". https://en.wikipedia.org/wiki/List_of_tz_database_time_zones We retrieve the time zone information from the timestamptz field in the database. A timestamp is in UTC or epoch time, and with zone info, we can convert it to a local time string. Zone and offset are returned by time.Time.Zone() |-| offset | [int32](#int32) | | The offset is in seconds east of UTC |-| accuracy | [int32](#int32) | | |+| 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-Issue-Approver"></a>-<a name="bytebase-v1-Advice-Level"></a>+### Issue.Approver+Approvers and their approval status for the issue.-### 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 |+| ----- | ---- | ----- | ----------- |+| status | [Issue.Approver.Status](#bytebase-v1-Issue-Approver-Status) | | The new status. |+| principal | [string](#string) | | Format: users/[email protected] |-<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-IssueComment"></a>+### IssueComment+A comment on an issue.-<a name="bytebase-v1-QueryOption-MSSQLExplainFormat"></a>-### QueryOption.MSSQLExplainFormat+| 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. |-| 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-IssueComment-Approval"></a>+### IssueComment.Approval+Approval event information.-| 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 |+| ----- | ---- | ----- | ----------- |+| status | [IssueComment.Approval.Status](#bytebase-v1-IssueComment-Approval-Status) | | The approval status. |-<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>--### QueryResult.Message.Level---| 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. |-------<a name="bytebase-v1-SQLService"></a>--### SQLService-SQLService executes SQL queries and manages query operations.--| 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'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'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="bytebase-v1-IssueComment-IssueUpdate"></a>-+### 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 | |-<a name="v1_plan_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/plan_service.proto-<a name="bytebase-v1-CancelPlanCheckRunRequest"></a>-### CancelPlanCheckRunRequest+<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 || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the plan check run to cancel. Format: projects/{project}/plans/{plan}/planCheckRun |-+| from_specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | |+| to_specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | |-<a name="bytebase-v1-CancelPlanCheckRunResponse"></a>-### CancelPlanCheckRunResponse+<a name="bytebase-v1-IssueComment-ReviewSubmission"></a>+### IssueComment.ReviewSubmission+Review submission event information.-<a name="bytebase-v1-CreatePlanRequest"></a>+<a name="bytebase-v1-ListIssueCommentsRequest"></a>-### CreatePlanRequest+### ListIssueCommentsRequest| 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. |-------<a name="bytebase-v1-GetPlanCheckRunRequest"></a>--### GetPlanCheckRunRequest--+| 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.-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the plan check run to retrieve. Format: projects/{project}/plans/{plan}/planCheckRun |+When paginating, all other parameters provided to `ListIssueComments` must match the call that provided the page token. |-<a name="bytebase-v1-GetPlanRequest"></a>+<a name="bytebase-v1-ListIssueCommentsResponse"></a>-### GetPlanRequest+### ListIssueCommentsResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the plan to retrieve. Format: projects/{project}/plans/{plan} |+| 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-ListPlansRequest"></a>+<a name="bytebase-v1-ListIssuesRequest"></a>-### ListPlansRequest+### ListIssuesRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent, which owns this collection of plans. Format: projects/{project} Use "projects/-" 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.+| 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 `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+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: the plan creator full name in "users/{email or id}" format, support "==" operator. - create_time: the plan create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator. - has_rollout: whether the plan has rollout, support "==" operator, the value should be "true" or "false". - title: the plan title, support "==" operator for exact match and ".contains()" operator for case-insensitive substring match. - spec_type: the plan spec config type, support "==" operator, the value should be "create_database_config" or "change_database_config". - state: the plan state, support "==" operator, the value should be "ACTIVE" or "DELETED".+Supported filters: - creator: issue creator full name in "users/{email or id}" format, support "==" operator. - status: the issue status, support "==" and "in" operator, check the IssueStatus enum for the values. - create_time: issue create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator. - type: the issue type, support "==" and "in" operator, check the Type enum in the Issue message for the values. - labels: the issue labels, support "==" and "in" operator. - risk_level: the issue risk level, support "in" operator, check the RiskLevel enum for the values. - approval_status: issue approval status, support "==" operator. - current_approver: the issue approver, should in "users/{email} format", support "==" operator.-For example: creator == "users/[email protected]" && create_time >= "2025-01-02T15:04:05Z07:00" title == "My Plan" title.contains("database migration") spec_type == "change_database_config" state == "ACTIVE" |+For example: creator == "users/[email protected]" && status in ["OPEN", "DONE"] status == "CANCELED" && type == "DATABASE_CHANGE" labels in ["label1", "label2"] risk_level in ["HIGH", "MODERATE"] create_time >= "2025-01-02T15:04:05Z07:00" |+| query | [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 = "create_time desc" - order_by = "update_time asc" |-<a name="bytebase-v1-ListPlansResponse"></a>+<a name="bytebase-v1-ListIssuesResponse"></a>-### ListPlansResponse+### ListIssuesResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| plans | [Plan](#bytebase-v1-Plan) | repeated | The plans from the specified request. |+| 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. |@@ -3994,901 +3660,1210 @@ For example: creator == "users/[email protected]" && create_time &-<a name="bytebase-v1-Plan"></a>+<a name="bytebase-v1-RejectIssueRequest"></a>-### Plan+### RejectIssueRequest| 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 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-Plan-ChangeDatabaseConfig"></a>+<a name="bytebase-v1-RequestIssueRequest"></a>-### Plan.ChangeDatabaseConfig+### RequestIssueRequest| 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. |+| 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-Plan-CreateDatabaseConfig"></a>+<a name="bytebase-v1-RetryIssueApprovalRequest"></a>-### Plan.CreateDatabaseConfig+### RetryIssueApprovalRequest| 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 "ON CLUSTER <<cluster>>". |-| owner | [string](#string) | | owner is the owner of the database. This is only applicable to Postgres for "WITH OWNER <<owner>>". |-| environment | [string](#string) | | The environment resource. Format: environments/prod where prod is the environment resource ID. |+| name | [string](#string) | | The name of the issue whose approval-finding should be retried. Format: projects/{project}/issues/{issue} |-<a name="bytebase-v1-Plan-PlanCheckRunStatusCountEntry"></a>+<a name="bytebase-v1-ReviewRun"></a>-### Plan.PlanCheckRunStatusCountEntry+### ReviewRun| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [int32](#int32) | | |+| name | [string](#string) | | Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun} The {reviewRun} id is the reviewer: "rule" or "guideline". 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-Plan-RolloutStageSummary"></a>+<a name="bytebase-v1-RoleGrant"></a>-### Plan.RolloutStageSummary+### RoleGrant| 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. |+| 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-Plan-Spec"></a>+<a name="bytebase-v1-RunReviewRequest"></a>-### Plan.Spec+### RunReviewRequest| 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) | | |+| name | [string](#string) | | Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun} |-<a name="bytebase-v1-Plan-TaskStatusCount"></a>+<a name="bytebase-v1-SearchIssuesRequest"></a>-### Plan.TaskStatusCount+### SearchIssuesRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| status | [Task.Status](#bytebase-v1-Task-Status) | | The task status. |-| count | [int32](#int32) | | The number of tasks in the status. |+| parent | [string](#string) | | The parent, which owns this collection of issues. Format: projects/{project} Use the wildcard "projects/-" to search across collections (AIP-159); the result is restricted to the projects where the caller holds bb.issues.get. For a concrete project, the caller must hold bb.issues.get on that project or the request is denied. |+| 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 = "create_time desc" - order_by = "update_time asc" |-<a name="bytebase-v1-PlanCheckRun"></a>-### PlanCheckRun+<a name="bytebase-v1-SearchIssuesResponse"></a>++### SearchIssuesResponse| 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) | | |+| 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-PlanCheckRun-Result"></a>+<a name="bytebase-v1-UpdateIssueCommentRequest"></a>-### PlanCheckRun.Result+### UpdateIssueCommentRequest| 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) | | |+| 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-PlanCheckRun-Result-SqlReviewReport"></a>+<a name="bytebase-v1-UpdateIssueRequest"></a>-### PlanCheckRun.Result.SqlReviewReport+### UpdateIssueRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| start_position | [Position](#bytebase-v1-Position) | | Position of the SQL statement. |-| end_position | [Position](#bytebase-v1-Position) | | |-+| issue | [Issue](#bytebase-v1-Issue) | | The issue to update.+The issue'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-PlanCheckRun-Result-SqlSummaryReport"></a>--### PlanCheckRun.Result.SqlSummaryReport----| 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) | | |++<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. |-<a name="bytebase-v1-RunPlanChecksRequest"></a>-### RunPlanChecksRequest+<a name="bytebase-v1-Issue-Type"></a>+### Issue.Type+The type of issue.-| 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. |+| 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-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. |-<a name="bytebase-v1-RunPlanChecksResponse"></a>-### RunPlanChecksResponse+<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>-<a name="bytebase-v1-UpdatePlanRequest"></a>+### ReviewRun.Type-### UpdatePlanRequest+| 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 |-| ----- | ---- | ----- | ----------- |-| plan | [Plan](#bytebase-v1-Plan) | | The plan to update.+-The plan'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-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 & query. Permissions required: bb.issues.get |+| UpdateIssue | [UpdateIssueRequest](#bytebase-v1-UpdateIssueRequest) | [Issue](#bytebase-v1-Issue) | Updates an issue'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'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-PlanCheckRun-Result-Type"></a>-### PlanCheckRun.Result.Type+<a name="v1_setting_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/setting_service.proto-| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | |-| STATEMENT_ADVISE | 1 | |-| STATEMENT_SUMMARY_REPORT | 2 | |-| GHOST_SYNC | 3 | |+<a name="bytebase-v1-AISetting"></a>-<a name="bytebase-v1-PlanCheckRun-Status"></a>+### AISetting-### PlanCheckRun.Status-| Name | Number | Description |-| ---- | ------ | ----------- |-| STATUS_UNSPECIFIED | 0 | |-| RUNNING | 1 | |-| DONE | 2 | |-| FAILED | 3 | |-| CANCELED | 4 | |+| 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) | | |---<a name="bytebase-v1-PlanService"></a>-### PlanService-PlanService manages deployment plans for database changes.+<a name="bytebase-v1-Algorithm"></a>-| 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 |+### Algorithm-+| 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) | | |-<a name="v1_issue_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/issue_service.proto-<a name="bytebase-v1-ApprovalFlow"></a>-### ApprovalFlow+<a name="bytebase-v1-Algorithm-FullMask"></a>++### Algorithm.FullMask| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| roles | [string](#string) | repeated | The roles required for approval in order. |+| 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-ApprovalTemplate"></a>+<a name="bytebase-v1-Algorithm-InnerOuterMask"></a>-### ApprovalTemplate+### Algorithm.InnerOuterMask| 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. |+| prefix_len | [int32](#int32) | | |+| suffix_len | [int32](#int32) | | |+| type | [Algorithm.InnerOuterMask.MaskType](#bytebase-v1-Algorithm-InnerOuterMask-MaskType) | | |+| substitution | [string](#string) | | |-<a name="bytebase-v1-ApproveIssueRequest"></a>+<a name="bytebase-v1-Algorithm-MD5Mask"></a>-### ApproveIssueRequest+### Algorithm.MD5Mask| 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. |+| salt | [string](#string) | | salt is the salt value to generate a different hash that with the word alone. |-<a name="bytebase-v1-BatchUpdateIssuesStatusRequest"></a>+<a name="bytebase-v1-Algorithm-RangeMask"></a>-### BatchUpdateIssuesStatusRequest+### Algorithm.RangeMask| 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. |+| 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-BatchUpdateIssuesStatusResponse"></a>+<a name="bytebase-v1-Algorithm-RangeMask-Slice"></a>-### BatchUpdateIssuesStatusResponse+### Algorithm.RangeMask.Slice+| 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 "你好world", character index 2 refers to 'w' (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-CreateIssueCommentRequest"></a>-### CreateIssueCommentRequest++<a name="bytebase-v1-Announcement"></a>++### Announcement| 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. |+| 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-CreateIssueRequest"></a>+<a name="bytebase-v1-Announcement-AnnouncementTheme"></a>-### CreateIssueRequest+### Announcement.AnnouncementTheme| 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. |+| background | [google.type.Color](#google-type-Color) | | |+| text | [google.type.Color](#google-type-Color) | | |-<a name="bytebase-v1-GetIssueRequest"></a>+<a name="bytebase-v1-AppIMSetting"></a>-### GetIssueRequest+### AppIMSetting| 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. |+| settings | [AppIMSetting.IMSetting](#bytebase-v1-AppIMSetting-IMSetting) | repeated | |-<a name="bytebase-v1-Issue"></a>+<a name="bytebase-v1-AppIMSetting-DingTalk"></a>-### Issue+### AppIMSetting.DingTalk| 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. |+| client_id | [string](#string) | | |+| client_secret | [string](#string) | | |+| robot_code | [string](#string) | | |-<a name="bytebase-v1-Issue-Approver"></a>+<a name="bytebase-v1-AppIMSetting-Feishu"></a>++### AppIMSetting.Feishu-### 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] |+| app_id | [string](#string) | | |+| app_secret | [string](#string) | | |-<a name="bytebase-v1-IssueComment"></a>+<a name="bytebase-v1-AppIMSetting-IMSetting"></a>++### AppIMSetting.IMSetting-### 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. |+| 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-IssueComment-Approval"></a>+<a name="bytebase-v1-AppIMSetting-Lark"></a>++### AppIMSetting.Lark-### IssueComment.Approval-Approval event information.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| status | [IssueComment.Approval.Status](#bytebase-v1-IssueComment-Approval-Status) | | The approval status. |+| app_id | [string](#string) | | |+| app_secret | [string](#string) | | |-<a name="bytebase-v1-IssueComment-IssueUpdate"></a>+<a name="bytebase-v1-AppIMSetting-Slack"></a>++### AppIMSetting.Slack-### 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 | |+| token | [string](#string) | | |-<a name="bytebase-v1-IssueComment-PlanUpdate"></a>+<a name="bytebase-v1-AppIMSetting-Teams"></a>++### AppIMSetting.Teams-### 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 | |+| 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-IssueComment-ReviewSubmission"></a>+<a name="bytebase-v1-AppIMSetting-Wecom"></a>-### IssueComment.ReviewSubmission-Review submission event information.+### AppIMSetting.Wecom+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| corp_id | [string](#string) | | |+| agent_id | [string](#string) | | |+| secret | [string](#string) | | |-<a name="bytebase-v1-ListIssueCommentsRequest"></a>-### ListIssueCommentsRequest+++<a name="bytebase-v1-DataClassificationSetting"></a>++### DataClassificationSetting| 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. |+| configs | [DataClassificationSetting.DataClassificationConfig](#bytebase-v1-DataClassificationSetting-DataClassificationConfig) | repeated | |-<a name="bytebase-v1-ListIssueCommentsResponse"></a>+<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig"></a>-### ListIssueCommentsResponse+### DataClassificationSetting.DataClassificationConfig| 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. |+| 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]+-[0-9]+-[0-9]+ format. |-<a name="bytebase-v1-ListIssuesRequest"></a>+<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-ClassificationEntry"></a>-### ListIssuesRequest+### DataClassificationSetting.DataClassificationConfig.ClassificationEntry| 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 "users/{email or id}" format, support "==" operator. - status: the issue status, support "==" and "in" operator, check the IssueStatus enum for the values. - create_time: issue create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator. - type: the issue type, support "==" and "in" operator, check the Type enum in the Issue message for the values. - labels: the issue labels, support "==" and "in" operator. - risk_level: the issue risk level, support "in" operator, check the RiskLevel enum for the values. - approval_status: issue approval status, support "==" operator. - current_approver: the issue approver, should in "users/{email} format", support "==" operator.--For example: creator == "users/[email protected]" && status in ["OPEN", "DONE"] status == "CANCELED" && type == "DATABASE_CHANGE" labels in ["label1", "label2"] risk_level in ["HIGH", "MODERATE"] create_time >= "2025-01-02T15:04:05Z07:00" |-| query | [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 = "create_time desc" - order_by = "update_time asc" |+| key | [string](#string) | | |+| value | [DataClassificationSetting.DataClassificationConfig.DataClassification](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-DataClassification) | | |-<a name="bytebase-v1-ListIssuesResponse"></a>+<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-DataClassification"></a>-### ListIssuesResponse+### DataClassificationSetting.DataClassificationConfig.DataClassification| 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. |+| id | [string](#string) | | id is the classification id in [0-9]+-[0-9]+-[0-9]+ format. |+| title | [string](#string) | | |+| level | [int32](#int32) | optional | The sensitivity level. Maps to Level.level. |-<a name="bytebase-v1-RejectIssueRequest"></a>+<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-Level"></a>-### RejectIssueRequest+### DataClassificationSetting.DataClassificationConfig.Level| 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. |+| title | [string](#string) | | |+| level | [int32](#int32) | | The numeric level for ordering. Higher = more sensitive. |-<a name="bytebase-v1-RequestIssueRequest"></a>+<a name="bytebase-v1-EmailSetting"></a>-### RequestIssueRequest+### EmailSetting| 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. |+| 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-RetryIssueApprovalRequest"></a>+<a name="bytebase-v1-EmailSetting-SMTPConfig"></a>-### RetryIssueApprovalRequest+### EmailSetting.SMTPConfig| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the issue whose approval-finding should be retried. Format: projects/{project}/issues/{issue} |+| 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-ReviewRun"></a>+<a name="bytebase-v1-EnvironmentSetting"></a>-### ReviewRun+### EnvironmentSetting| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun} The {reviewRun} id is the reviewer: "rule" or "guideline". 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). |+| environments | [EnvironmentSetting.Environment](#bytebase-v1-EnvironmentSetting-Environment) | repeated | |-<a name="bytebase-v1-RoleGrant"></a>+<a name="bytebase-v1-EnvironmentSetting-Environment"></a>-### RoleGrant+### EnvironmentSetting.Environment| 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. |+| 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) | | |-<a name="bytebase-v1-RunReviewRequest"></a>+<a name="bytebase-v1-EnvironmentSetting-Environment-TagsEntry"></a>-### RunReviewRequest+### EnvironmentSetting.Environment.TagsEntry| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun} |-+| key | [string](#string) | | |+| value | [string](#string) | | |-<a name="bytebase-v1-SearchIssuesRequest"></a>-### SearchIssuesRequest+<a name="bytebase-v1-GetSettingRequest"></a>+### GetSettingRequest+The request message for getting a setting.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent, which owns this collection of issues. Format: projects/{project} Use the wildcard "projects/-" to search across collections (AIP-159); the result is restricted to the projects where the caller holds bb.issues.get. For a concrete project, the caller must hold bb.issues.get on that project or the request is denied. |-| 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 = "create_time desc" - order_by = "update_time asc" |-+| name | [string](#string) | | The resource name of the setting. |-<a name="bytebase-v1-SearchIssuesResponse"></a>-### SearchIssuesResponse+<a name="bytebase-v1-GetSettingResponse"></a>+### GetSettingResponse+The response message for getting a setting.| 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. |--+| setting | [Setting](#bytebase-v1-Setting) | | |-<a name="bytebase-v1-UpdateIssueCommentRequest"></a>-### UpdateIssueCommentRequest+<a name="bytebase-v1-ListSettingsRequest"></a>+### ListSettingsRequest-| 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. |-<a name="bytebase-v1-UpdateIssueRequest"></a>+<a name="bytebase-v1-ListSettingsResponse"></a>-### UpdateIssueRequest+### ListSettingsResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| issue | [Issue](#bytebase-v1-Issue) | | The issue to update.+| settings | [Setting](#bytebase-v1-Setting) | repeated | The settings from the specified request. |-The issue'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-MCPSetting"></a>+### MCPSetting+MCPSetting is what an MCP (Model Context Protocol) session may do in this+workspace.-<a name="bytebase-v1-Issue-Approver-Status"></a>-### Issue.Approver.Status-The approval status of an approver.+| 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'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.-| Name | Number | Description |-| ---- | ------ | ----------- |-| STATUS_UNSPECIFIED | 0 | Unspecified status. |-| PENDING | 1 | Awaiting approval. |-| APPROVED | 2 | Approved. |-| REJECTED | 3 | Rejected. |+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-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-SQLEditorThemeSetting"></a>+### SQLEditorThemeSetting-<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 |+| ----- | ---- | ----- | ----------- |+| 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-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).+++<a name="bytebase-v1-SQLEditorThemeSetting-TokensEntry"></a>++### SQLEditorThemeSetting.TokensEntry++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| key | [string](#string) | | |+| value | [google.type.Color](#google-type-Color) | | |+++++++<a name="bytebase-v1-SemanticTypeSetting"></a>++### SemanticTypeSetting++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| types | [SemanticTypeSetting.SemanticType](#bytebase-v1-SemanticTypeSetting-SemanticType) | repeated | |+++++++<a name="bytebase-v1-SemanticTypeSetting-SemanticType"></a>++### SemanticTypeSetting.SemanticType++++| 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. |+++++++<a name="bytebase-v1-Setting"></a>++### Setting+The schema of setting.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The resource name of the setting. Format: settings/{setting} Example: "settings/SEMANTIC_TYPES" |+| value | [SettingValue](#bytebase-v1-SettingValue) | | The configuration value of the setting. |+++++++<a name="bytebase-v1-SettingValue"></a>++### 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) | | |+++++++<a name="bytebase-v1-TestEmailSettingRequest"></a>++### TestEmailSettingRequest++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| parent | [string](#string) | | |+| email_setting | [EmailSetting](#bytebase-v1-EmailSetting) | | |+| to | [string](#string) | | |+++++++<a name="bytebase-v1-TestEmailSettingResponse"></a>++### TestEmailSettingResponse++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| success | [bool](#bool) | | |+| error | [string](#string) | | |+++++++<a name="bytebase-v1-UpdateSettingRequest"></a>++### 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) | | |+++++++<a name="bytebase-v1-WorkspaceApprovalSetting"></a>++### WorkspaceApprovalSetting++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| rules | [WorkspaceApprovalSetting.Rule](#bytebase-v1-WorkspaceApprovalSetting-Rule) | repeated | |+++++++<a name="bytebase-v1-WorkspaceApprovalSetting-Rule"></a>++### WorkspaceApprovalSetting.Rule++++| 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 "==", "!=", "<", "<=", ">", ">=" operations. statement.table_rows: table row count number, support "==", "!=", "<", "<=", ">", ">=" operations. resource.environment_id: the environment resource id, support "==", "!=", "in [xx]", "!(in [xx])" operations. resource.project_id: the project resource id, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations. resource.db_engine: the database engine type, support "==", "!=", "in [xx]", "!(in [xx])" operations. Check the Engine enum for values. statement.sql_type: the SQL type, support "==", "!=", "in [xx]", "!(in [xx])" operations. resource.database_name: the database name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations. resource.schema_name: the schema name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations. resource.table_name: the table name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations. statement.text: the SQL statement, support "contains()", "matches()", "startsWith()", "endsWith()" operations. request.expiration_days: the role expiration days for the request, support "==", "!=", "<", "<=", ">", ">=" operations. request.role: the request role full name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.++When source is CHANGE_DATABASE, support: statement.*, resource.* (excluding request.*) When source is CREATE_DATABASE, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name When source is REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_name, request.unmask, request.data_export++For examples: resource.environment_id == "prod" && statement.affected_rows >= 100 resource.table_name.matches("sensitive_.*") && resource.db_engine == "MYSQL" |+| source | [WorkspaceApprovalSetting.Rule.Source](#bytebase-v1-WorkspaceApprovalSetting-Rule-Source) | | |+++++++<a name="bytebase-v1-WorkspaceProfileSetting"></a>++### WorkspaceProfileSetting++++| 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 <= 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 <= 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 + 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's uuid. Empty ⇒ default light. |+| sql_editor_custom_theme | [SQLEditorThemeSetting](#bytebase-v1-SQLEditorThemeSetting) | | The enforced CUSTOM theme'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 "generate" and "regenerate". |+++++++<a name="bytebase-v1-WorkspaceProfileSetting-PasswordRestriction"></a>++### WorkspaceProfileSetting.PasswordRestriction++++| 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. |+++++++++<a name="bytebase-v1-AISetting-Provider"></a>++### AISetting.Provider+| 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`. |+| PROVIDER_UNSPECIFIED | 0 | |+| OPEN_AI | 1 | |+| CLAUDE | 2 | |+| GEMINI | 3 | |+| AZURE_OPENAI | 4 | |-<a name="bytebase-v1-ReviewRun-Type"></a>+<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-DatabaseChangeMode"></a>++### DatabaseChangeMode+++| 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+++| Name | Number | Description |+| ---- | ------ | ----------- |+| AUTHENTICATION_UNSPECIFIED | 0 | |+| AUTHENTICATION_NONE | 1 | |+| PLAIN | 2 | |+| LOGIN | 3 | |+| CRAM_MD5 | 4 | |++++<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 | |-### ReviewRun.Type+++<a name="bytebase-v1-EmailSetting-Type"></a>++### EmailSetting.Type| Name | Number | Description || ---- | ------ | ----------- || TYPE_UNSPECIFIED | 0 | |-| RULE | 1 | Review against the standard rules. |-| GUIDELINE | 2 | Review against natural-language guidelines, performed by AI. |+| 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'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's RBAC. |++++<a name="bytebase-v1-Setting-SettingName"></a>++### Setting.SettingName+++| 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+++| Name | Number | Description |+| ---- | ------ | ----------- |+| SOURCE_UNSPECIFIED | 0 | |+| CHANGE_DATABASE | 1 | |+| CREATE_DATABASE | 2 | |+| REQUEST_ROLE | 4 | |+| REQUEST_ACCESS | 5 | |@@ -4896,957 +4871,977 @@ completion transaction, so re-running supersedes instead of canceling).-<a name="bytebase-v1-IssueService"></a>+<a name="bytebase-v1-SettingService"></a>-### IssueService-IssueService manages issues for tracking database changes and tasks.+### SettingService+SettingService manages workspace-level settings and configurations.| 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 & query. Permissions required: bb.issues.get |-| UpdateIssue | [UpdateIssueRequest](#bytebase-v1-UpdateIssueRequest) | [Issue](#bytebase-v1-Issue) | Updates an issue'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'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 |+| 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 |-<a name="v1_setting_service-proto"></a>+<a name="v1_actuator_service-proto"></a><p align="right"><a href="#top">Top</a></p>-## v1/setting_service.proto-+## v1/actuator_service.proto-<a name="bytebase-v1-AISetting"></a>-### AISetting+<a name="bytebase-v1-ActuatorInfo"></a>+### ActuatorInfo+System information and configuration for the Bytebase instance.+Actuator concept is similar to the Spring Boot Actuator.| 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) | | |+| version | [string](#string) | | The Bytebase server version. |+| git_commit | [string](#string) | | The git commit hash of the build. |+| saas | [bool](#bool) | | Whether the Bytebase instance is running in SaaS mode where some features cannot be edited by users. |+| external_url | [string](#string) | | The external URL where users or webhook callbacks access Bytebase. |+| last_active_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time any API call was made, refreshed on each request. |+| workspace | [string](#string) | | The unique identifier for the workspace. Format: workspaces/{id} |+| unlicensed_features | [string](#string) | repeated | List of features that are not licensed. |+| activated_instance_count | [int32](#int32) | | The number of activated database instances. |+| total_instance_count | [int32](#int32) | | The total number of database instances. |+| external_url_from_flag | [bool](#bool) | | Whether the external URL is set via command-line flag (and thus cannot be changed via UI). |+| replica_count | [int32](#int32) | | The number of active replicas (servers sharing the same database). |+| default_project | [string](#string) | | The default project for unassigned databases. Format: projects/{id} |+| user_count_in_iam | [int32](#int32) | | The number of users in the workspace IAM (for seat limit display). |+| active_vcs_user_count | [int32](#int32) | | The number of active VCS users seen in the active window. |+| sample | [SampleInfo](#bytebase-v1-SampleInfo) | | Sample setup availability and provisioned resources. |+| mcp_setting | [MCPSetting](#bytebase-v1-MCPSetting) | | The MCP (Model Context Protocol) setting in the current workspace. |+++++++<a name="bytebase-v1-GetActuatorInfoRequest"></a>++### GetActuatorInfoRequest+Request message for getting actuator information.++<a name="bytebase-v1-SampleInfo"></a>++### SampleInfo+SampleInfo describes sample setup availability and provisioned resources.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| available | [bool](#bool) | | Whether sample setup is currently available. |+| instances | [SampleInfo.Instance](#bytebase-v1-SampleInfo-Instance) | repeated | The provisioned sample instances. |++++-<a name="bytebase-v1-Algorithm"></a>-### Algorithm+<a name="bytebase-v1-SampleInfo-Instance"></a>+### SampleInfo.Instance+Instance describes one provisioned sample instance.| 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) | | |+| instance | [string](#string) | | The provisioned sample instance. Format: instances/{instance} or projects/{project}/instances/{instance} |+| expire_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The time when the provisioned sample instance expires. |+-<a name="bytebase-v1-Algorithm-FullMask"></a>+-### Algorithm.FullMask++<a name="bytebase-v1-ActuatorService"></a>-| 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. |+### ActuatorService+ActuatorService manages system health and operational information.++| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| GetActuatorInfo | [GetActuatorInfoRequest](#bytebase-v1-GetActuatorInfoRequest) | [ActuatorInfo](#bytebase-v1-ActuatorInfo) | Gets system information and health status of the Bytebase instance. The workspace is resolved from the authenticated session. Permissions required: None (authentication required) |++<a name="v1_ai_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/ai_service.proto-<a name="bytebase-v1-Algorithm-InnerOuterMask"></a>-### Algorithm.InnerOuterMask+<a name="bytebase-v1-AIChatMessage"></a>++### AIChatMessage+A single message in the conversation.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| prefix_len | [int32](#int32) | | |-| suffix_len | [int32](#int32) | | |-| type | [Algorithm.InnerOuterMask.MaskType](#bytebase-v1-Algorithm-InnerOuterMask-MaskType) | | |-| substitution | [string](#string) | | |-+| role | [AIChatMessageRole](#bytebase-v1-AIChatMessageRole) | | The role of the message sender. |+| content | [string](#string) | optional | The text content of the message. Optional for assistant messages that only contain tool calls. |+| tool_calls | [AIChatToolCall](#bytebase-v1-AIChatToolCall) | repeated | Tool calls made by the assistant. Only present in assistant messages. |+| tool_call_id | [string](#string) | optional | The ID of the tool call this message is responding to. Only present in tool messages. |-<a name="bytebase-v1-Algorithm-MD5Mask"></a>-### Algorithm.MD5Mask+<a name="bytebase-v1-AIChatRequest"></a>+### AIChatRequest+Request message for AIService.Chat.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| salt | [string](#string) | | salt is the salt value to generate a different hash that with the word alone. |-+| messages | [AIChatMessage](#bytebase-v1-AIChatMessage) | repeated | The conversation messages. |+| tool_definitions | [AIChatToolDefinition](#bytebase-v1-AIChatToolDefinition) | repeated | The tool definitions available to the AI. |-<a name="bytebase-v1-Algorithm-RangeMask"></a>-### Algorithm.RangeMask+<a name="bytebase-v1-AIChatResponse"></a>+### AIChatResponse+Response message for AIService.Chat.| 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. |-+| content | [string](#string) | optional | The text content of the AI response. Optional when the response only contains tool calls. |+| tool_calls | [AIChatToolCall](#bytebase-v1-AIChatToolCall) | repeated | Tool calls the AI wants to make. |+| usage | [AIChatUsage](#bytebase-v1-AIChatUsage) | optional | Token usage for this provider call, when available. |-<a name="bytebase-v1-Algorithm-RangeMask-Slice"></a>-### Algorithm.RangeMask.Slice+<a name="bytebase-v1-AIChatToolCall"></a>+### AIChatToolCall+A tool call made by the AI.| 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 "你好world", character index 2 refers to 'w' (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). |-+| id | [string](#string) | | The unique ID of this tool call. |+| name | [string](#string) | | The name of the tool to call. |+| arguments | [string](#string) | | The JSON-encoded arguments to pass to the tool. |+| metadata | [string](#string) | optional | Opaque provider-specific metadata (e.g., Gemini thought_signature). Frontend must echo this back unchanged when sending tool results. |-<a name="bytebase-v1-Announcement"></a>-### Announcement+<a name="bytebase-v1-AIChatToolDefinition"></a>+### AIChatToolDefinition+A tool definition that the AI can invoke.| 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. |-+| name | [string](#string) | | The name of the tool. |+| description | [string](#string) | | A description of what the tool does. |+| parameters_schema | [string](#string) | | The JSON Schema describing the tool's parameters. |-<a name="bytebase-v1-Announcement-AnnouncementTheme"></a>-### Announcement.AnnouncementTheme+<a name="bytebase-v1-AIChatUsage"></a>+### AIChatUsage+Token usage for a single AI provider call.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| background | [google.type.Color](#google-type-Color) | | |-| text | [google.type.Color](#google-type-Color) | | |---+| total_tokens | [int32](#int32) | | Total tokens used by the provider call. |-<a name="bytebase-v1-AppIMSetting"></a>-### AppIMSetting+-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| settings | [AppIMSetting.IMSetting](#bytebase-v1-AppIMSetting-IMSetting) | repeated | |+<a name="bytebase-v1-AIChatMessageRole"></a>+### AIChatMessageRole+Role of a chat message.+| Name | Number | Description |+| ---- | ------ | ----------- |+| AI_CHAT_MESSAGE_ROLE_UNSPECIFIED | 0 | Unspecified role. |+| AI_CHAT_MESSAGE_ROLE_SYSTEM | 1 | System message providing instructions. |+| AI_CHAT_MESSAGE_ROLE_USER | 2 | User message. |+| AI_CHAT_MESSAGE_ROLE_ASSISTANT | 3 | Assistant (AI) message. |+| AI_CHAT_MESSAGE_ROLE_TOOL | 4 | Tool result message. |++-<a name="bytebase-v1-AppIMSetting-DingTalk"></a>-### AppIMSetting.DingTalk+<a name="bytebase-v1-AIService"></a>+### AIService+AIService provides AI chat capabilities for the page agent.+| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| Chat | [AIChatRequest](#bytebase-v1-AIChatRequest) | [AIChatResponse](#bytebase-v1-AIChatResponse) | Chat sends a conversation with tool definitions to the configured AI provider and returns the AI response. |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| client_id | [string](#string) | | |-| client_secret | [string](#string) | | |-| robot_code | [string](#string) | | |++<a name="v1_iam_policy-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/iam_policy.proto-<a name="bytebase-v1-AppIMSetting-Feishu"></a>-### AppIMSetting.Feishu+<a name="bytebase-v1-Binding"></a>+### Binding+Binding associates members with a role and optional conditions.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| app_id | [string](#string) | | |-| app_secret | [string](#string) | | |+| role | [string](#string) | | The role that is assigned to the members. Format: roles/{role} |+| members | [string](#string) | repeated | Specifies the principals requesting access for a Bytebase resource. For users, the member should be: user:{email} For groups, the member should be: group:{email} For service accounts, the member should be: serviceAccount:{email} For workload identities, the member should be: workloadIdentity:{email} |+| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this binding, only used in the project IAM policy. If the condition evaluates to true, then this binding applies to the current request. If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Support variables: resource.database: the canonical database full name in "instances/{instance}/databases/{database}" or "projects/{project}/instances/{instance}/databases/{database}" format, used by any role with SQL Editor read (e.g. "roles/sqlEditorUser", "roles/sqlEditorReadUser") or write (bb.sql.ddl / bb.sql.dml) access, support "==" operator. resource.schema_name: the schema name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, support "==" operator. resource.table_name: the table name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, support "==" operator. resource.environment_id: the environment to allow the DDL/DML operation in the SQL Editor, only works for the role with bb.sql.ddl or bb.sql.dml permissions. Support "in" operator. request.time: the expiration. Only support "<" operation in `request.time < timestamp("{ISO datetime string format}")`.+Known limitations of table/schema-scoped DDL/DML grants: - The scope only gates the write target, not the read sources of a write: e.g. `INSERT INTO granted_table SELECT * FROM other_table` may read `other_table` without a grant on it, so a table-scoped write grant is not an exfiltration boundary. - It must be paired with a database/project-level read grant: a table-scoped grant alone does not satisfy the SQL Editor query method permission (bb.databases.get). - A resource.schema_name-scoped grant only authorizes a write whose schema is unambiguous — qualify the table (schema.table) or select the schema for the SQL Editor session. An unqualified write whose effective schema cannot be determined ahead of execution is denied (qualify it, or use a table-only grant). - Multi-statement batches are authorized at the database level: an earlier statement can rebind the session's default schema or database mid-batch, so per-table/schema scoping is dropped and a table/schema-scoped grant requires a database-level grant. The database-level check is still per target database — a qualified cross-database write is gated by a grant on its own database, not the request database — but an unqualified write whose session default is rebound mid-batch is evaluated against the database it literally names, so qualify cross-database writes or run them as single statements. - A write target in a different project than the SQL-Editor session's database is denied: the per-target check evaluates the session project's IAM policy, so a cross-project write is failed closed (to write it, open the SQL Editor on a database in the target project). - Enforcement is on the statement's literal write target; writes routed elsewhere by a view/synonym, or into a temporary schema (e.g. pg_temp), are evaluated against what the statement names, not the ultimate base object. - Write-target gating uses an ALLOWLIST of statement types the resolver models. It does NOT cover every syntactically-identifiable cross-database write; statement types off the allowlist are authorized against the request database. The allowlist is: - Modeled table/data writes (per-table/schema-scopable): INSERT/UPDATE/DELETE/TRUNCATE/MERGE, LOAD DATA, IMPORT INTO, CREATE TABLE AS / SELECT INTO, and table-level CREATE/DROP/ALTER/RENAME/index. - Modeled non-table object DDL (gated at the DATABASE level by the object's own explicit database/schema qualifier; an unqualified name keeps the request-database check): CREATE/ALTER/DROP of view, procedure/function/routine, trigger, sequence, synonym, type, and (Oracle) package and cluster; plus Oracle ALTER/DROP MATERIALIZED VIEW (Oracle CREATE MATERIALIZED VIEW is not modeled — see below). NOT modeled (these fall back to the request-database check, so a qualified cross-database one is authorized against the request database): MySQL CREATE TRIGGER and CREATE/ALTER/DROP EVENT (bare-string AST names); MSSQL ALTER of view/procedure/function/trigger (no ALTER node in the grammar); Oracle CREATE MATERIALIZED VIEW and the niche object DDL — dimension, attribute dimension, hierarchy, analytic view, JSON duality view, materialized zonemap, operator, in-memory join group, property graph, vector index, index type, domain; COPY ... FROM; and engine-specific bulk-load / deprecated text writes. A structural "write-target object database" extraction layer to remove this allowlist dependence is tracked as a follow-up. - Out of scope (read sources / indirect effects): the tables a write READS (INSERT … SELECT, MERGE … USING, CREATE TABLE AS … SELECT) and objects reached indirectly via views/synonyms/function bodies/triggers are NOT gated. Invariant: for a statement ON the modeled allowlist that explicitly names a different database as its write target, the ACL uses that target database, not the request database. Statement types OFF the allowlist are authorized against the request database.+For example: resource.database == "instances/local-pg/databases/postgres" && resource.schema_name in ["public","another_schema"] resource.database == "instances/local-pg/databases/bytebase" && resource.schema_name == "public" && resource.table_name in ["audit_log"] resource.database == "instances/local-pg/databases/postgres" && resource.environment_id in ["test"] request.time < timestamp("2025-04-26T11:24:48.655Z") |+| parsed_expr | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | | The parsed expression of the condition. |-<a name="bytebase-v1-AppIMSetting-IMSetting"></a>-### AppIMSetting.IMSetting+<a name="bytebase-v1-BindingDelta"></a>++### BindingDelta+A single change to a binding.| 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) | | |-+| action | [BindingDelta.Action](#bytebase-v1-BindingDelta-Action) | | The action that was performed on a Binding. |+| role | [string](#string) | | Role that is assigned to `members`. For example, `roles/projectOwner`. |+| member | [string](#string) | | Follows the same format of Binding.members. |+| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this binding. |-<a name="bytebase-v1-AppIMSetting-Lark"></a>-### AppIMSetting.Lark+<a name="bytebase-v1-GetIamPolicyRequest"></a>+### GetIamPolicyRequest+Request message for getting an IAM policy.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| app_id | [string](#string) | | |-| app_secret | [string](#string) | | |-+| resource | [string](#string) | | The name of the resource to get the IAM policy. Format: projects/{project} Format: workspaces/{workspace} |-<a name="bytebase-v1-AppIMSetting-Slack"></a>-### AppIMSetting.Slack+<a name="bytebase-v1-IamPolicy"></a>+### IamPolicy+IAM policy that binds members to roles.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| token | [string](#string) | | |-+| bindings | [Binding](#bytebase-v1-Binding) | repeated | Collection of binding. A binding binds one or more project members to a single project role. |+| etag | [string](#string) | | The current etag of the policy, returned by GetIamPolicy and SetIamPolicy. Sending it back on SetIamPolicy makes the write conditional: if the policy changed since the read, the call returns ABORTED. Omitting it applies the write unconditionally, overwriting any concurrent change (AIP-154). |-<a name="bytebase-v1-AppIMSetting-Teams"></a>-### AppIMSetting.Teams+<a name="bytebase-v1-PolicyDelta"></a>+### PolicyDelta+Describes changes between two IAM policies.| 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. |-+| binding_deltas | [BindingDelta](#bytebase-v1-BindingDelta) | repeated | The delta for Bindings between two policies. |-<a name="bytebase-v1-AppIMSetting-Wecom"></a>-### AppIMSetting.Wecom+<a name="bytebase-v1-SetIamPolicyRequest"></a>+### SetIamPolicyRequest+Request message for setting an IAM policy.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| corp_id | [string](#string) | | |-| agent_id | [string](#string) | | |-| secret | [string](#string) | | |+| resource | [string](#string) | | The name of the resource to set the IAM policy. Format: projects/{project} Format: workspaces/{workspace} |+| policy | [IamPolicy](#bytebase-v1-IamPolicy) | | |+| etag | [string](#string) | | The current etag of the policy. Equivalent to setting `policy.etag`; supplying both with different values returns INVALID_ARGUMENT. |++-<a name="bytebase-v1-DataClassificationSetting"></a>+<a name="bytebase-v1-BindingDelta-Action"></a>-### DataClassificationSetting+### BindingDelta.Action+Type of action performed on a binding.++| Name | Number | Description |+| ---- | ------ | ----------- |+| ACTION_UNSPECIFIED | 0 | Unspecified action. |+| ADD | 1 | Add a binding. |+| REMOVE | 2 | Remove a binding. |+-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| configs | [DataClassificationSetting.DataClassificationConfig](#bytebase-v1-DataClassificationSetting-DataClassificationConfig) | repeated | |++++<a name="v1_audit_log_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/audit_log_service.proto-<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig"></a>-### DataClassificationSetting.DataClassificationConfig+<a name="bytebase-v1-AuditData"></a>+### AuditData+Additional audit data specific to certain operations.| 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]+-[0-9]+-[0-9]+ format. |-+| policy_delta | [PolicyDelta](#bytebase-v1-PolicyDelta) | | Changes to IAM policies. |-<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-ClassificationEntry"></a>-### DataClassificationSetting.DataClassificationConfig.ClassificationEntry+<a name="bytebase-v1-AuditLog"></a>+### AuditLog+Audit log entry recording system activity or API call.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [DataClassificationSetting.DataClassificationConfig.DataClassification](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-DataClassification) | | |-+| name | [string](#string) | | The name of the log. Formats: - projects/{project}/auditLogs/{uid} - workspaces/{workspace}/auditLogs/{uid} |+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The timestamp when the audit log was created. |+| user | [string](#string) | | The user who performed the action. Format: users/{email} |+| method | [string](#string) | | The method or action being audited. For example: /bytebase.v1.SQLService/Query or bb.project.repository.push |+| severity | [AuditLog.Severity](#bytebase-v1-AuditLog-Severity) | | The severity level of this audit log entry. |+| resource | [string](#string) | | The resource associated with this audit log. |+| request | [string](#string) | | The request payload in JSON format. |+| response | [string](#string) | | The response payload in JSON format. Some fields may be omitted if they are too large or contain sensitive information. |+| status | [google.rpc.Status](#google-rpc-Status) | | The status of the operation. |+| latency | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration of the operation. |+| service_data | [google.protobuf.Any](#google-protobuf-Any) | | Service-specific metadata about the request, response, and activities. |+| request_metadata | [RequestMetadata](#bytebase-v1-RequestMetadata) | | Metadata about the request context. |+| mcp_delegation | [MCPDelegation](#bytebase-v1-MCPDelegation) | | MCP delegation provenance. Present exactly when the audited call arrived through the MCP server's delegated credential; never set for public API calls. Presence of this message is the MCP-origin marker. |-<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-DataClassification"></a>-### DataClassificationSetting.DataClassificationConfig.DataClassification+<a name="bytebase-v1-ExportAuditLogsRequest"></a>+### ExportAuditLogsRequest+Request message for exporting audit logs.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| id | [string](#string) | | id is the classification id in [0-9]+-[0-9]+-[0-9]+ format. |-| title | [string](#string) | | |-| level | [int32](#int32) | optional | The sensitivity level. Maps to Level.level. |-+| parent | [string](#string) | | |+| filter | [string](#string) | | The filter of the log. It should be a valid CEL expression. Check the filter field in the SearchAuditLogsRequest message. |+| order_by | [string](#string) | | The order by of the log. Only support order by create_time. The default sorting order is ascending. For example: - order_by = "create_time asc" - order_by = "create_time desc" |+| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The export format. |+| page_size | [int32](#int32) | | The maximum number of logs to return. The service may return fewer than this value. If unspecified, at most 10 log entries will be returned. The maximum value is 5000; values above 5000 will be coerced to 5000. |+| page_token | [string](#string) | | A page token, received from a previous `ExportAuditLogs` call. Provide this to retrieve the subsequent page. |-<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-Level"></a>-### DataClassificationSetting.DataClassificationConfig.Level+<a name="bytebase-v1-ExportAuditLogsResponse"></a>+### ExportAuditLogsResponse+Response message for exporting audit logs.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| title | [string](#string) | | |-| level | [int32](#int32) | | The numeric level for ordering. Higher = more sensitive. |-+| content | [bytes](#bytes) | | The exported audit log content in the requested format. |+| next_page_token | [string](#string) | | A token to retrieve next page of log entities. Pass this value in the page_token field in the subsequent call to retrieve the next page of log entities. |-<a name="bytebase-v1-EmailSetting"></a>-### EmailSetting+<a name="bytebase-v1-MCPDelegation"></a>+### MCPDelegation+Provenance of a call that reached the API through the MCP (Model Context+Protocol) server's delegated credential. The values are copied verbatim from+the verified credential's grant state; empty fields record that the grant+stored nothing (legacy sessions), never a resolved or synthesized value.| 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) | | |-+| scope | [string](#string) | | The OAuth2 grant's consented scope, e.g. "mcp:read-only". Empty when the grant recorded no scope. |+| resource | [string](#string) | | The grant's stored MCP resource URI. Empty for pre-grant legacy sessions. |+| client_id | [string](#string) | | The OAuth2 client the grant was consented to. Empty for legacy web-session tokens at /mcp. |+| correlation_id | [string](#string) | | Correlates the audit rows an MCP session produces. Minted at the /mcp boundary and session-scoped: the MCP SDK hands tool handlers the initialize-time context, so one MCP session carries one correlation ID across all of its tool calls. |-<a name="bytebase-v1-EmailSetting-SMTPConfig"></a>-### EmailSetting.SMTPConfig+<a name="bytebase-v1-RequestMetadata"></a>+### RequestMetadata+Metadata about the incoming request.| 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) | | |-+| caller_ip | [string](#string) | | The IP address of the request originator. |+| caller_supplied_user_agent | [string](#string) | | The user agent string provided by the caller. This is supplied by the client and is not authenticated. |-<a name="bytebase-v1-EnvironmentSetting"></a>-### EnvironmentSetting+<a name="bytebase-v1-SearchAuditLogsRequest"></a>+### SearchAuditLogsRequest+Request message for searching audit logs.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| environments | [EnvironmentSetting.Environment](#bytebase-v1-EnvironmentSetting-Environment) | repeated | |+| parent | [string](#string) | | |+| filter | [string](#string) | | The filter of the log. It should be a valid CEL expression. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Supported filter: - method: the API name, can be found in the docs. Usually "/bytebase.v1.…", for example "/bytebase.v1.UserService/CreateUser"; entries written outside the v1 API carry their own prefix, such as "/bytebase.mcp.Session/Authorize" or "/bytebase.cli.Recovery/ResetUserPassword". Support "==" operator. - resource: the resource the entry is about, support "==" operator. - severity: support "==" operator, check Severity enum in AuditLog message for values. - user: the actor, should in "users/{email}" format, support "==" operator. - create_time: support ">=" and "<=" operator. - mcp: true selects the entries MCP produced, false the rest. A boolean, not a string. Support "==" operator. - mcp_correlation_id: the MCP session an entry belongs to, taken from an entry's mcp_delegation.correlation_id. Support "==" operator. Entries MCP produced outside a session — a refused connection or consent — carry none and match no value here.+For example: - filter = "method == '/bytebase.v1.SQLService/Query'" - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR'" - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && user == 'users/[email protected]'" - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && create_time <= '2021-01-01T00:00:00Z' && create_time >= '2020-01-01T00:00:00Z'" - filter = "mcp == true" - filter = "mcp_correlation_id == '0b7f1a3c-1d2e-4f56-8a90-1b2c3d4e5f60'" |+| order_by | [string](#string) | | The order by of the log. Only support order by create_time. The default sorting order is ascending. For example: - order_by = "create_time asc" - order_by = "create_time desc" |+| page_size | [int32](#int32) | | The maximum number of logs to return. The service may return fewer than this value. If unspecified, at most 10 log entries will be returned. The maximum value is 5000; values above 5000 will be coerced to 5000. |+| page_token | [string](#string) | | A page token, received from a previous `SearchLogs` call. Provide this to retrieve the subsequent page. |-<a name="bytebase-v1-EnvironmentSetting-Environment"></a>-### EnvironmentSetting.Environment+<a name="bytebase-v1-SearchAuditLogsResponse"></a>+### SearchAuditLogsResponse+Response message for searching audit logs.| 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) | | |+| audit_logs | [AuditLog](#bytebase-v1-AuditLog) | repeated | |+| next_page_token | [string](#string) | | A token to retrieve next page of log entities. Pass this value in the page_token field in the subsequent call to retrieve the next page of log entities. |+-<a name="bytebase-v1-EnvironmentSetting-Environment-TagsEntry"></a>-### EnvironmentSetting.Environment.TagsEntry+<a name="bytebase-v1-AuditLog-Severity"></a>+### AuditLog.Severity+Severity level for audit log entries.+| Name | Number | Description |+| ---- | ------ | ----------- |+| SEVERITY_UNSPECIFIED | 0 | Unspecified severity level. |+| DEBUG | 1 | Debug-level information. |+| INFO | 2 | Informational messages. |+| NOTICE | 3 | Notable events. |+| WARNING | 4 | Warning conditions. |+| ERROR | 5 | Error conditions. |+| CRITICAL | 6 | Critical conditions. |+| ALERT | 7 | Action must be taken immediately. |+| EMERGENCY | 8 | System is unusable. |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [string](#string) | | |+++<a name="bytebase-v1-AuditLogService"></a>+### AuditLogService+AuditLogService manages audit logs for system activities and API calls.-<a name="bytebase-v1-GetSettingRequest"></a>+| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| SearchAuditLogs | [SearchAuditLogsRequest](#bytebase-v1-SearchAuditLogsRequest) | [SearchAuditLogsResponse](#bytebase-v1-SearchAuditLogsResponse) | Searches audit logs with optional filtering and pagination. Permissions required: bb.auditLogs.search |+| ExportAuditLogs | [ExportAuditLogsRequest](#bytebase-v1-ExportAuditLogsRequest) | [ExportAuditLogsResponse](#bytebase-v1-ExportAuditLogsResponse) | Exports audit logs in a specified format for external analysis. Permissions required: bb.auditLogs.export |-### GetSettingRequest-The request message for getting a setting.+-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The resource name of the setting. |+<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>-<a name="bytebase-v1-GetSettingResponse"></a>+### CreateIdentityProviderRequest-### GetSettingResponse-The response message for getting a setting.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| setting | [Setting](#bytebase-v1-Setting) | | |-------<a name="bytebase-v1-ListSettingsRequest"></a>--### ListSettingsRequest+| 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'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-ListSettingsResponse"></a>+<a name="bytebase-v1-DeleteIdentityProviderRequest"></a>-### ListSettingsResponse+### DeleteIdentityProviderRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| settings | [Setting](#bytebase-v1-Setting) | repeated | The settings from the specified request. |+| name | [string](#string) | | The name of the identity provider to delete. Format: idps/{identity_provider} |-<a name="bytebase-v1-MCPSetting"></a>+<a name="bytebase-v1-FieldMapping"></a>-### MCPSetting-MCPSetting is what an MCP (Model Context Protocol) session may do in this-workspace.+### 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 || ----- | ---- | ----- | ----------- |-| 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'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. |+| 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-SQLEditorThemeSetting"></a>+<a name="bytebase-v1-GetIdentityProviderRequest"></a>-### SQLEditorThemeSetting+### GetIdentityProviderRequest| 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. |+| name | [string](#string) | | The name of the identity provider to retrieve. Format: idps/{idp} |-<a name="bytebase-v1-SQLEditorThemeSetting-TokensEntry"></a>+<a name="bytebase-v1-IdentityProvider"></a>-### SQLEditorThemeSetting.TokensEntry+### IdentityProvider| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [google.type.Color](#google-type-Color) | | |+| 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-SemanticTypeSetting"></a>+<a name="bytebase-v1-IdentityProviderConfig"></a>-### SemanticTypeSetting+### IdentityProviderConfig| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| types | [SemanticTypeSetting.SemanticType](#bytebase-v1-SemanticTypeSetting-SemanticType) | repeated | |-+| 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-SemanticTypeSetting-SemanticType"></a>-### SemanticTypeSetting.SemanticType+<a name="bytebase-v1-LDAPIdentityProviderConfig"></a>+### LDAPIdentityProviderConfig+LDAPIdentityProviderConfig is the structure for LDAP identity provider config.| 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. |+| host | [string](#string) | | Host is the hostname or IP address of the LDAP server, e.g., "ldap.example.com". |+| 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., "ou=users,dc=example,dc=com". |+| user_filter | [string](#string) | | UserFilter is the filter to search for users, e.g., "(uid=%s)". |+| 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-Setting"></a>+<a name="bytebase-v1-LDAPIdentityProviderTestRequestContext"></a>++### LDAPIdentityProviderTestRequestContext-### Setting-The schema of setting.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The resource name of the setting. Format: settings/{setting} Example: "settings/SEMANTIC_TYPES" |-| value | [SettingValue](#bytebase-v1-SettingValue) | | The configuration value of the setting. |+| 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-SettingValue"></a>+<a name="bytebase-v1-ListIdentityProvidersRequest"></a>++### ListIdentityProvidersRequest-### 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) | | |+| parent | [string](#string) | | The parent workspace whose identity providers should be listed. It must be the workspace the caller's credential belongs to. Format: workspaces/{workspace} |-<a name="bytebase-v1-TestEmailSettingRequest"></a>+<a name="bytebase-v1-ListIdentityProvidersResponse"></a>-### TestEmailSettingRequest+### ListIdentityProvidersResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | |-| email_setting | [EmailSetting](#bytebase-v1-EmailSetting) | | |-| to | [string](#string) | | |-+| identity_providers | [IdentityProvider](#bytebase-v1-IdentityProvider) | repeated | The identity providers from the specified request. |-<a name="bytebase-v1-TestEmailSettingResponse"></a>-### TestEmailSettingResponse+<a name="bytebase-v1-OAuth2IdentityProviderConfig"></a>+### OAuth2IdentityProviderConfig+OAuth2IdentityProviderConfig is the structure for OAuth2 identity provider config.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| success | [bool](#bool) | | |-| error | [string](#string) | | |+| 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-UpdateSettingRequest"></a>+<a name="bytebase-v1-OAuth2IdentityProviderTestRequestContext"></a>++### OAuth2IdentityProviderTestRequestContext-### 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) | | |-+| code | [string](#string) | | Authorize code from website. |-<a name="bytebase-v1-WorkspaceApprovalSetting"></a>-### WorkspaceApprovalSetting+<a name="bytebase-v1-OIDCIdentityProviderConfig"></a>+### OIDCIdentityProviderConfig+OIDCIdentityProviderConfig is the structure for OIDC identity provider config.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| rules | [WorkspaceApprovalSetting.Rule](#bytebase-v1-WorkspaceApprovalSetting-Rule) | repeated | |+| 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-WorkspaceApprovalSetting-Rule"></a>+<a name="bytebase-v1-OIDCIdentityProviderTestRequestContext"></a>-### WorkspaceApprovalSetting.Rule+### OIDCIdentityProviderTestRequestContext| 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 "==", "!=", "<", "<=", ">", ">=" operations. statement.table_rows: table row count number, support "==", "!=", "<", "<=", ">", ">=" operations. resource.environment_id: the environment resource id, support "==", "!=", "in [xx]", "!(in [xx])" operations. resource.project_id: the project resource id, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations. resource.db_engine: the database engine type, support "==", "!=", "in [xx]", "!(in [xx])" operations. Check the Engine enum for values. statement.sql_type: the SQL type, support "==", "!=", "in [xx]", "!(in [xx])" operations. resource.database_name: the database name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations. resource.schema_name: the schema name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations. resource.table_name: the table name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations. statement.text: the SQL statement, support "contains()", "matches()", "startsWith()", "endsWith()" operations. request.expiration_days: the role expiration days for the request, support "==", "!=", "<", "<=", ">", ">=" operations. request.role: the request role full name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.--When source is CHANGE_DATABASE, support: statement.*, resource.* (excluding request.*) When source is CREATE_DATABASE, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name When source is REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_name, request.unmask, request.data_export--For examples: resource.environment_id == "prod" && statement.affected_rows >= 100 resource.table_name.matches("sensitive_.*") && resource.db_engine == "MYSQL" |-| source | [WorkspaceApprovalSetting.Rule.Source](#bytebase-v1-WorkspaceApprovalSetting-Rule-Source) | | |+| code | [string](#string) | | Authorize code from OIDC provider. |-<a name="bytebase-v1-WorkspaceProfileSetting"></a>+<a name="bytebase-v1-TestIdentityProviderRequest"></a>-### WorkspaceProfileSetting+### TestIdentityProviderRequest| 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 <= 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 <= 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 + 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's uuid. Empty ⇒ default light. |-| sql_editor_custom_theme | [SQLEditorThemeSetting](#bytebase-v1-SQLEditorThemeSetting) | | The enforced CUSTOM theme'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 "generate" and "regenerate". |+| 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-WorkspaceProfileSetting-PasswordRestriction"></a>+<a name="bytebase-v1-TestIdentityProviderResponse"></a>-### WorkspaceProfileSetting.PasswordRestriction+### TestIdentityProviderResponse| 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. |----+| 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-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-TestIdentityProviderResponse-ClaimsEntry"></a>+### TestIdentityProviderResponse.ClaimsEntry-<a name="bytebase-v1-Algorithm-InnerOuterMask-MaskType"></a>-### Algorithm.InnerOuterMask.MaskType+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| key | [string](#string) | | |+| value | [string](#string) | | |-| Name | Number | Description |-| ---- | ------ | ----------- |-| MASK_TYPE_UNSPECIFIED | 0 | |-| INNER | 1 | |-| OUTER | 2 | |-<a name="bytebase-v1-DatabaseChangeMode"></a>-### DatabaseChangeMode+<a name="bytebase-v1-TestIdentityProviderResponse-UserInfoEntry"></a>+### TestIdentityProviderResponse.UserInfoEntry-| 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 |+| ----- | ---- | ----- | ----------- |+| key | [string](#string) | | |+| value | [string](#string) | | |-<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-UpdateIdentityProviderRequest"></a>-<a name="bytebase-v1-EmailSetting-SMTPConfig-Encryption"></a>+### UpdateIdentityProviderRequest-### EmailSetting.SMTPConfig.Encryption-| Name | Number | Description |-| ---- | ------ | ----------- |-| ENCRYPTION_UNSPECIFIED | 0 | |-| ENCRYPTION_NONE | 1 | |-| STARTTLS | 2 | |-| SSL_TLS | 3 | |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| identity_provider | [IdentityProvider](#bytebase-v1-IdentityProvider) | | The identity provider to update.+The identity provider'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-EmailSetting-Type"></a>-### EmailSetting.Type-| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | |-| SMTP | 1 | |++<a name="bytebase-v1-IdentityProviderType"></a>-<a name="bytebase-v1-MCPSetting-Capability"></a>+### IdentityProviderType-### 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'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's RBAC. |+| 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-Setting-SettingName"></a>+<a name="bytebase-v1-LDAPIdentityProviderConfig-SecurityProtocol"></a>-### Setting.SettingName+### LDAPIdentityProviderConfig.SecurityProtocol| 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 | |+| 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-WorkspaceApprovalSetting-Rule-Source"></a>+<a name="bytebase-v1-OAuth2AuthStyle"></a>-### WorkspaceApprovalSetting.Rule.Source+### OAuth2AuthStyle| Name | Number | Description || ---- | ------ | ----------- |-| SOURCE_UNSPECIFIED | 0 | |-| CHANGE_DATABASE | 1 | |-| CREATE_DATABASE | 2 | |-| REQUEST_ROLE | 4 | |-| REQUEST_ACCESS | 5 | |+| OAUTH2_AUTH_STYLE_UNSPECIFIED | 0 | |+| IN_PARAMS | 1 | IN_PARAMS sends the "client_id" and "client_secret" 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. |@@ -5854,17 +5849,21 @@ path to leave the current ceiling unchanged.-<a name="bytebase-v1-SettingService"></a>+<a name="bytebase-v1-IdentityProviderService"></a>-### SettingService-SettingService manages workspace-level settings and configurations.+### IdentityProviderService+IdentityProviderService manages external identity providers for SSO authentication.| 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 |+| 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'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 |@@ -12856,16 +12855,6 @@ WorkloadIdentityService manages workload identities for external CI/CD integrati-<a name="bytebase-v1-GetMCPInfoRequest"></a>--### GetMCPInfoRequest-------<a name="bytebase-v1-GetWorkspaceRequest"></a>### GetWorkspaceRequest@@ -12921,29 +12910,6 @@ WorkloadIdentityService manages workload identities for external CI/CD integrati-<a name="bytebase-v1-MCPInfo"></a>--### MCPInfo-MCPInfo is what MCP does in this workspace: the ceiling in force, and-whether masking narrows what a session reads under it.--This is the only API a served MCP session or the consent page can read the-ceiling from. SettingService/GetSetting is served by no ceiling, and its-answer is cached besides.---| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| workspace | [string](#string) | | The workspace this describes. Format: workspaces/{workspace}. Not this message's own resource name — MCPInfo is not a named resource and there is nothing to get it by. |-| capability | [MCPSetting.Capability](#bytebase-v1-MCPSetting-Capability) | | The ceiling in force for this workspace. Any value outside the enum this build serves, CAPABILITY_UNSPECIFIED included, means no ceiling could be resolved from the stored row and every MCP connection is refused. A stored name nothing resolves arrives as CAPABILITY_UNSPECIFIED; a number a newer release wrote arrives verbatim. |-| ignore_masking_exemptions | [bool](#bool) | | Whether this workspace stops applying the caller's own unmasking provisioning to MCP requests. It narrows what a session reads only where Bytebase masks by column and consults exemptions; elsewhere it suppresses nothing. |-| data_masking_available | [bool](#bool) | | Whether data masking is licensed for this workspace. When false nothing is masked whatever an engine supports, so the toggle above suppresses nothing. Licensing can also be set per instance, so a true here is the workspace answer, not a promise about every instance. |------<a name="bytebase-v1-RotateDirectorySyncTokenRequest"></a>### RotateDirectorySyncTokenRequest@@ -13027,11 +12993,6 @@ WorkspaceService manages workspace-level operations and profile.| DeleteWorkspace | [DeleteWorkspaceRequest](#bytebase-v1-DeleteWorkspaceRequest) | [LoginResponse](#bytebase-v1-LoginResponse) | Deletes a workspace. SaaS only. Cancels any active subscription and soft-deletes the workspace so all associated data becomes inaccessible. Requires workspace admin permission. || LeaveWorkspace | [LeaveWorkspaceRequest](#bytebase-v1-LeaveWorkspaceRequest) | [LoginResponse](#bytebase-v1-LoginResponse) | Removes the calling user from a workspace and switches to the next available workspace. Available to any workspace member. Fails if the caller is the last workspace admin. || SetIamPolicy | [SetIamPolicyRequest](#bytebase-v1-SetIamPolicyRequest) | [IamPolicy](#bytebase-v1-IamPolicy) | Sets IAM policy for the workspace. Permissions required: bb.workspaces.setIamPolicy |-| GetMCPInfo | [GetMCPInfoRequest](#bytebase-v1-GetMCPInfoRequest) | [MCPInfo](#bytebase-v1-MCPInfo) | Gets what MCP (Model Context Protocol) does in this workspace: the capability ceiling in force, and whether masking narrows what a session reads under it. The workspace is resolved from the authenticated session.--Served to MCP sessions. An agent asking what it may do here is the point: the response says nothing a session's own denials do not already say, one refusal at a time, and knowing it up front is what stops the agent planning work the ceiling was never going to serve.--Permissions required: None (authentication required) || RotateDirectorySyncToken | [RotateDirectorySyncTokenRequest](#bytebase-v1-RotateDirectorySyncTokenRequest) | [RotateDirectorySyncTokenResponse](#bytebase-v1-RotateDirectorySyncTokenResponse) | Mints a new directory sync (SCIM) token, immediately invalidating the previous one. The plaintext token is returned exactly once and cannot be retrieved afterwards; only its hash is stored. Callers that lose it must rotate again and update their identity provider. Permissions required: bb.workspaces.rotateDirectorySyncToken |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 4175c61588..966dc1f060 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -284,80 +284,6 @@</li>- <li>- <a href="#v1%2factuator_service.proto">v1/actuator_service.proto</a>- <ul>-- <li>- <a href="#bytebase.v1.ActuatorInfo"><span class="badge">M</span>ActuatorInfo</a>- </li>-- <li>- <a href="#bytebase.v1.GetActuatorInfoRequest"><span class="badge">M</span>GetActuatorInfoRequest</a>- </li>-- <li>- <a href="#bytebase.v1.SampleInfo"><span class="badge">M</span>SampleInfo</a>- </li>-- <li>- <a href="#bytebase.v1.SampleInfo.Instance"><span class="badge">M</span>SampleInfo.Instance</a>- </li>----- <li>- <a href="#bytebase.v1.ActuatorService"><span class="badge">S</span>ActuatorService</a>- </li>-- </ul>- </li>--- <li>- <a href="#v1%2fai_service.proto">v1/ai_service.proto</a>- <ul>-- <li>- <a href="#bytebase.v1.AIChatMessage"><span class="badge">M</span>AIChatMessage</a>- </li>-- <li>- <a href="#bytebase.v1.AIChatRequest"><span class="badge">M</span>AIChatRequest</a>- </li>-- <li>- <a href="#bytebase.v1.AIChatResponse"><span class="badge">M</span>AIChatResponse</a>- </li>-- <li>- <a href="#bytebase.v1.AIChatToolCall"><span class="badge">M</span>AIChatToolCall</a>- </li>-- <li>- <a href="#bytebase.v1.AIChatToolDefinition"><span class="badge">M</span>AIChatToolDefinition</a>- </li>-- <li>- <a href="#bytebase.v1.AIChatUsage"><span class="badge">M</span>AIChatUsage</a>- </li>--- <li>- <a href="#bytebase.v1.AIChatMessageRole"><span class="badge">E</span>AIChatMessageRole</a>- </li>---- <li>- <a href="#bytebase.v1.AIService"><span class="badge">S</span>AIService</a>- </li>-- </ul>- </li>--<li><a href="#v1%2fcommon.proto">v1/common.proto</a><ul>@@ -417,199 +343,6 @@</li>- <li>- <a href="#v1%2fiam_policy.proto">v1/iam_policy.proto</a>- <ul>-- <li>- <a href="#bytebase.v1.Binding"><span class="badge">M</span>Binding</a>- </li>-- <li>- <a href="#bytebase.v1.BindingDelta"><span class="badge">M</span>BindingDelta</a>- </li>-- <li>- <a href="#bytebase.v1.GetIamPolicyRequest"><span class="badge">M</span>GetIamPolicyRequest</a>- </li>-- <li>- <a href="#bytebase.v1.IamPolicy"><span class="badge">M</span>IamPolicy</a>- </li>-- <li>- <a href="#bytebase.v1.PolicyDelta"><span class="badge">M</span>PolicyDelta</a>- </li>-- <li>- <a href="#bytebase.v1.SetIamPolicyRequest"><span class="badge">M</span>SetIamPolicyRequest</a>- </li>--- <li>- <a href="#bytebase.v1.BindingDelta.Action"><span class="badge">E</span>BindingDelta.Action</a>- </li>---- </ul>- </li>--- <li>- <a href="#v1%2faudit_log_service.proto">v1/audit_log_service.proto</a>- <ul>-- <li>- <a href="#bytebase.v1.AuditData"><span class="badge">M</span>AuditData</a>- </li>-- <li>- <a href="#bytebase.v1.AuditLog"><span class="badge">M</span>AuditLog</a>- </li>-- <li>- <a href="#bytebase.v1.ExportAuditLogsRequest"><span class="badge">M</span>ExportAuditLogsRequest</a>- </li>-- <li>- <a href="#bytebase.v1.ExportAuditLogsResponse"><span class="badge">M</span>ExportAuditLogsResponse</a>- </li>-- <li>- <a href="#bytebase.v1.MCPDelegation"><span class="badge">M</span>MCPDelegation</a>- </li>-- <li>- <a href="#bytebase.v1.RequestMetadata"><span class="badge">M</span>RequestMetadata</a>- </li>-- <li>- <a href="#bytebase.v1.SearchAuditLogsRequest"><span class="badge">M</span>SearchAuditLogsRequest</a>- </li>-- <li>- <a href="#bytebase.v1.SearchAuditLogsResponse"><span class="badge">M</span>SearchAuditLogsResponse</a>- </li>--- <li>- <a href="#bytebase.v1.AuditLog.Severity"><span class="badge">E</span>AuditLog.Severity</a>- </li>---- <li>- <a href="#bytebase.v1.AuditLogService"><span class="badge">S</span>AuditLogService</a>- </li>-- </ul>- </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>@@ -1460,6 +1193,273 @@</li>+ <li>+ <a href="#v1%2factuator_service.proto">v1/actuator_service.proto</a>+ <ul>++ <li>+ <a href="#bytebase.v1.ActuatorInfo"><span class="badge">M</span>ActuatorInfo</a>+ </li>++ <li>+ <a href="#bytebase.v1.GetActuatorInfoRequest"><span class="badge">M</span>GetActuatorInfoRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.SampleInfo"><span class="badge">M</span>SampleInfo</a>+ </li>++ <li>+ <a href="#bytebase.v1.SampleInfo.Instance"><span class="badge">M</span>SampleInfo.Instance</a>+ </li>+++++ <li>+ <a href="#bytebase.v1.ActuatorService"><span class="badge">S</span>ActuatorService</a>+ </li>++ </ul>+ </li>+++ <li>+ <a href="#v1%2fai_service.proto">v1/ai_service.proto</a>+ <ul>++ <li>+ <a href="#bytebase.v1.AIChatMessage"><span class="badge">M</span>AIChatMessage</a>+ </li>++ <li>+ <a href="#bytebase.v1.AIChatRequest"><span class="badge">M</span>AIChatRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.AIChatResponse"><span class="badge">M</span>AIChatResponse</a>+ </li>++ <li>+ <a href="#bytebase.v1.AIChatToolCall"><span class="badge">M</span>AIChatToolCall</a>+ </li>++ <li>+ <a href="#bytebase.v1.AIChatToolDefinition"><span class="badge">M</span>AIChatToolDefinition</a>+ </li>++ <li>+ <a href="#bytebase.v1.AIChatUsage"><span class="badge">M</span>AIChatUsage</a>+ </li>+++ <li>+ <a href="#bytebase.v1.AIChatMessageRole"><span class="badge">E</span>AIChatMessageRole</a>+ </li>++++ <li>+ <a href="#bytebase.v1.AIService"><span class="badge">S</span>AIService</a>+ </li>++ </ul>+ </li>+++ <li>+ <a href="#v1%2fiam_policy.proto">v1/iam_policy.proto</a>+ <ul>++ <li>+ <a href="#bytebase.v1.Binding"><span class="badge">M</span>Binding</a>+ </li>++ <li>+ <a href="#bytebase.v1.BindingDelta"><span class="badge">M</span>BindingDelta</a>+ </li>++ <li>+ <a href="#bytebase.v1.GetIamPolicyRequest"><span class="badge">M</span>GetIamPolicyRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.IamPolicy"><span class="badge">M</span>IamPolicy</a>+ </li>++ <li>+ <a href="#bytebase.v1.PolicyDelta"><span class="badge">M</span>PolicyDelta</a>+ </li>++ <li>+ <a href="#bytebase.v1.SetIamPolicyRequest"><span class="badge">M</span>SetIamPolicyRequest</a>+ </li>+++ <li>+ <a href="#bytebase.v1.BindingDelta.Action"><span class="badge">E</span>BindingDelta.Action</a>+ </li>++++ </ul>+ </li>+++ <li>+ <a href="#v1%2faudit_log_service.proto">v1/audit_log_service.proto</a>+ <ul>++ <li>+ <a href="#bytebase.v1.AuditData"><span class="badge">M</span>AuditData</a>+ </li>++ <li>+ <a href="#bytebase.v1.AuditLog"><span class="badge">M</span>AuditLog</a>+ </li>++ <li>+ <a href="#bytebase.v1.ExportAuditLogsRequest"><span class="badge">M</span>ExportAuditLogsRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.ExportAuditLogsResponse"><span class="badge">M</span>ExportAuditLogsResponse</a>+ </li>++ <li>+ <a href="#bytebase.v1.MCPDelegation"><span class="badge">M</span>MCPDelegation</a>+ </li>++ <li>+ <a href="#bytebase.v1.RequestMetadata"><span class="badge">M</span>RequestMetadata</a>+ </li>++ <li>+ <a href="#bytebase.v1.SearchAuditLogsRequest"><span class="badge">M</span>SearchAuditLogsRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.SearchAuditLogsResponse"><span class="badge">M</span>SearchAuditLogsResponse</a>+ </li>+++ <li>+ <a href="#bytebase.v1.AuditLog.Severity"><span class="badge">E</span>AuditLog.Severity</a>+ </li>++++ <li>+ <a href="#bytebase.v1.AuditLogService"><span class="badge">S</span>AuditLogService</a>+ </li>++ </ul>+ </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%2fuser_service.proto">v1/user_service.proto</a><ul>@@ -3203,10 +3203,6 @@<a href="#bytebase.v1.DeleteWorkspaceRequest"><span class="badge">M</span>DeleteWorkspaceRequest</a></li>- <li>- <a href="#bytebase.v1.GetMCPInfoRequest"><span class="badge">M</span>GetMCPInfoRequest</a>- </li>-<li><a href="#bytebase.v1.GetWorkspaceRequest"><span class="badge">M</span>GetWorkspaceRequest</a></li>@@ -3223,10 +3219,6 @@<a href="#bytebase.v1.ListWorkspacesResponse"><span class="badge">M</span>ListWorkspacesResponse</a></li>- <li>- <a href="#bytebase.v1.MCPInfo"><span class="badge">M</span>MCPInfo</a>- </li>-<li><a href="#bytebase.v1.RotateDirectorySyncTokenRequest"><span class="badge">M</span>RotateDirectorySyncTokenRequest</a></li>@@ -4224,13 +4216,13 @@ whether the grant is still valid or has expired.</p></td><div class="file-heading">- <h2 id="v1/actuator_service.proto">v1/actuator_service.proto</h2><a href="#title">Top</a>+ <h2 id="v1/common.proto">v1/common.proto</h2><a href="#title">Top</a></div><p></p>- <h3 id="bytebase.v1.ActuatorInfo">ActuatorInfo</h3>- <p>System information and configuration for the Bytebase instance.</p><p>Actuator concept is similar to the Spring Boot Actuator.</p>+ <h3 id="bytebase.v1.PermissionDeniedDetail">PermissionDeniedDetail</h3>+ <p>PermissionDeniedDetail provides structured information about permission failures.</p><p>Used as error detail when returning CodePermissionDenied errors.</p><table class="field-table">@@ -4240,148 +4232,24 @@ whether the grant is still valid or has expired.</p></td><tbody><tr>- <td>version</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The Bytebase server version. </p></td>- </tr>-- <tr>- <td>git_commit</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The git commit hash of the build. </p></td>- </tr>-- <tr>- <td>saas</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Whether the Bytebase instance is running in SaaS mode where some features cannot be edited by users. </p></td>- </tr>-- <tr>- <td>external_url</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The external URL where users or webhook callbacks access Bytebase. </p></td>- </tr>-- <tr>- <td>last_active_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>The last time any API call was made, refreshed on each request. </p></td>- </tr>-- <tr>- <td>workspace</td>+ <td>method</td><td><a href="#string">string</a></td><td></td>- <td><p>The unique identifier for the workspace.-Format: workspaces/{id} </p></td>+ <td><p>The API method that was called. </p></td></tr><tr>- <td>unlicensed_features</td>+ <td>required_permissions</td><td><a href="#string">string</a></td><td>repeated</td>- <td><p>List of features that are not licensed. </p></td>- </tr>-- <tr>- <td>activated_instance_count</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>The number of activated database instances. </p></td>- </tr>-- <tr>- <td>total_instance_count</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>The total number of database instances. </p></td>- </tr>-- <tr>- <td>external_url_from_flag</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Whether the external URL is set via command-line flag (and thus cannot be changed via UI). </p></td>- </tr>-- <tr>- <td>replica_count</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>The number of active replicas (servers sharing the same database). </p></td>+ <td><p>The permissions required but not granted to the user. </p></td></tr><tr>- <td>default_project</td>+ <td>resources</td><td><a href="#string">string</a></td>- <td></td>- <td><p>The default project for unassigned databases.-Format: projects/{id} </p></td>- </tr>-- <tr>- <td>user_count_in_iam</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>The number of users in the workspace IAM (for seat limit display). </p></td>- </tr>-- <tr>- <td>active_vcs_user_count</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>The number of active VCS users seen in the active window. </p></td>- </tr>-- <tr>- <td>sample</td>- <td><a href="#bytebase.v1.SampleInfo">SampleInfo</a></td>- <td></td>- <td><p>Sample setup availability and provisioned resources. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.GetActuatorInfoRequest">GetActuatorInfoRequest</h3>- <p>Request message for getting actuator information.</p>------ <h3 id="bytebase.v1.SampleInfo">SampleInfo</h3>- <p>SampleInfo describes sample setup availability and provisioned resources.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>available</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Whether sample setup is currently available. </p></td>- </tr>-- <tr>- <td>instances</td>- <td><a href="#bytebase.v1.SampleInfo.Instance">SampleInfo.Instance</a></td><td>repeated</td>- <td><p>The provisioned sample instances. </p></td>+ <td><p>The resources the user was trying to access. </p></td></tr></tbody>@@ -4391,8 +4259,8 @@ Format: projects/{id} </p></td>- <h3 id="bytebase.v1.SampleInfo.Instance">SampleInfo.Instance</h3>- <p>Instance describes one provisioned sample instance.</p>+ <h3 id="bytebase.v1.Position">Position</h3>+ <p>Position in a text expressed as one-based line and one-based column.</p><p>We use 1-based numbering to match the majority of industry standards:</p><p>- Monaco Editor uses 1-based (https://microsoft.github.io/monaco-editor/typedoc/interfaces/IPosition.html)</p><p>- GitHub Actions uses 1-based (https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-error-message)</p><p>- Most text editors display 1-based positions to users</p><p>Note: LSP uses 0-based (https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position),</p><p>but we follow the canonical user-facing standards.</p><p>Handling unknown positions:</p><p>- If the entire position is unknown, leave this field as nil/undefined</p><p>- If only line is known, set line and leave column as 0 (e.g., line=5, column=0)</p><p>- If only column is known (rare), set column and leave line as 0</p><p>Frontends should check for nil/undefined/zero values and handle them appropriately.</p><table class="field-table">@@ -4402,241 +4270,27 @@ Format: projects/{id} </p></td><tbody><tr>- <td>instance</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The provisioned sample instance.-Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>- </tr>-- <tr>- <td>expire_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>line</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The time when the provisioned sample instance expires. </p></td>+ <td><p>Line position in a text (one-based).+First line of the text is line 1.+A value of 0 indicates the line information is unknown. </p></td></tr>- </tbody>- </table>------------ <h3 id="bytebase.v1.ActuatorService">ActuatorService</h3>- <p>ActuatorService manages system health and operational information.</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>GetActuatorInfo</td>- <td><a href="#bytebase.v1.GetActuatorInfoRequest">GetActuatorInfoRequest</a></td>- <td><a href="#bytebase.v1.ActuatorInfo">ActuatorInfo</a></td>- <td><p>Gets system information and health status of the Bytebase instance.-The workspace is resolved from the authenticated session.-Permissions required: None (authentication required)</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>GetActuatorInfo</td>- <td>GET</td>- <td>/v1/actuator/info</td>- <td></td>- </tr>--- </tbody>- </table>----- <div class="file-heading">- <h2 id="v1/ai_service.proto">v1/ai_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.v1.AIChatMessage">AIChatMessage</h3>- <p>A single message in the conversation.</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="#bytebase.v1.AIChatMessageRole">AIChatMessageRole</a></td>+ <td>column</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The role of the message sender. </p></td>- </tr>-- <tr>- <td>content</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The text content of the message. Optional for assistant messages that only contain tool calls. </p></td>- </tr>-- <tr>- <td>tool_calls</td>- <td><a href="#bytebase.v1.AIChatToolCall">AIChatToolCall</a></td>- <td>repeated</td>- <td><p>Tool calls made by the assistant. Only present in assistant messages. </p></td>- </tr>-- <tr>- <td>tool_call_id</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The ID of the tool call this message is responding to. Only present in tool messages. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.AIChatRequest">AIChatRequest</h3>- <p>Request message for AIService.Chat.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>messages</td>- <td><a href="#bytebase.v1.AIChatMessage">AIChatMessage</a></td>- <td>repeated</td>- <td><p>The conversation messages. </p></td>- </tr>-- <tr>- <td>tool_definitions</td>- <td><a href="#bytebase.v1.AIChatToolDefinition">AIChatToolDefinition</a></td>- <td>repeated</td>- <td><p>The tool definitions available to the AI. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.AIChatResponse">AIChatResponse</h3>- <p>Response message for AIService.Chat.</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="#string">string</a></td>- <td>optional</td>- <td><p>The text content of the AI response. Optional when the response only contains tool calls. </p></td>- </tr>-- <tr>- <td>tool_calls</td>- <td><a href="#bytebase.v1.AIChatToolCall">AIChatToolCall</a></td>- <td>repeated</td>- <td><p>Tool calls the AI wants to make. </p></td>- </tr>-- <tr>- <td>usage</td>- <td><a href="#bytebase.v1.AIChatUsage">AIChatUsage</a></td>- <td>optional</td>- <td><p>Token usage for this provider call, when available. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.AIChatToolCall">AIChatToolCall</h3>- <p>A tool call made by the AI.</p>+ <td><p>Column position in a text (one-based).+Column is measured in Unicode code points (characters/runes), not bytes or grapheme clusters.+First character of the line is column 1.+A value of 0 indicates the column information is unknown.-- <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>The unique ID of this tool call. </p></td>- </tr>-- <tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the tool to call. </p></td>- </tr>-- <tr>- <td>arguments</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The JSON-encoded arguments to pass to the tool. </p></td>- </tr>-- <tr>- <td>metadata</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Opaque provider-specific metadata (e.g., Gemini thought_signature).-Frontend must echo this back unchanged when sending tool results. </p></td>+Examples:+- "SELECT * FROM t" - column 8 is '*'+- "SELECT 你好 FROM t" - column 8 is '你' (even though it's at byte offset 7)+- "SELECT 😀 FROM t" - column 8 is '😀' (even though it's 4 bytes in UTF-8) </p></td></tr></tbody>@@ -4646,8 +4300,8 @@ Frontend must echo this back unchanged when sending tool results. </p></td>- <h3 id="bytebase.v1.AIChatToolDefinition">AIChatToolDefinition</h3>- <p>A tool definition that the AI can invoke.</p>+ <h3 id="bytebase.v1.Range">Range</h3>+ <p>Range represents a span within a text or sequence.</p><p>Whether the indices are byte offsets or character indices depends on the context.</p><p>Check the documentation of the field using Range for specific semantics.</p><table class="field-table">@@ -4657,48 +4311,17 @@ Frontend must echo this back unchanged when sending tool results. </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the tool. </p></td>- </tr>-- <tr>- <td>description</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>A description of what the tool does. </p></td>- </tr>-- <tr>- <td>parameters_schema</td>- <td><a href="#string">string</a></td>+ <td>start</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The JSON Schema describing the tool's parameters. </p></td>+ <td><p>Start index (inclusive). </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.AIChatUsage">AIChatUsage</h3>- <p>Token usage for a single AI provider call.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-<tr>- <td>total_tokens</td>+ <td>end</td><td><a href="#int32">int32</a></td><td></td>- <td><p>Total tokens used by the provider call. </p></td>+ <td><p>End index (exclusive). </p></td></tr></tbody>@@ -4710,8 +4333,8 @@ Frontend must echo this back unchanged when sending tool results. </p></td>- <h3 id="bytebase.v1.AIChatMessageRole">AIChatMessageRole</h3>- <p>Role of a chat message.</p>+ <h3 id="bytebase.v1.ApprovalStatus">ApprovalStatus</h3>+ <p>Approval workflow status for an issue or a plan.</p><p>Lives at the top level so both plan_service.proto and issue_service.proto</p><p>can reference it without a circular import.</p><table class="enum-table"><thead><tr><td>Name</td><td>Number</td><td>Description</td></tr>@@ -4719,275 +4342,62 @@ Frontend must echo this back unchanged when sending tool results. </p></td><tbody><tr>- <td>AI_CHAT_MESSAGE_ROLE_UNSPECIFIED</td>+ <td>APPROVAL_STATUS_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified role.</p></td>+ <td><p>No approval workflow has started, including for a linked draft issue.</p></td></tr><tr>- <td>AI_CHAT_MESSAGE_ROLE_SYSTEM</td>+ <td>CHECKING</td><td>1</td>- <td><p>System message providing instructions.</p></td>+ <td><p>Approval checks are being evaluated.</p></td></tr><tr>- <td>AI_CHAT_MESSAGE_ROLE_USER</td>+ <td>PENDING</td><td>2</td>- <td><p>User message.</p></td>+ <td><p>Approval is pending.</p></td></tr><tr>- <td>AI_CHAT_MESSAGE_ROLE_ASSISTANT</td>+ <td>APPROVED</td><td>3</td>- <td><p>Assistant (AI) message.</p></td>+ <td><p>Issue has been approved.</p></td></tr><tr>- <td>AI_CHAT_MESSAGE_ROLE_TOOL</td>+ <td>REJECTED</td><td>4</td>- <td><p>Tool result message.</p></td>+ <td><p>Issue has been rejected.</p></td>+ </tr>++ <tr>+ <td>SKIPPED</td>+ <td>5</td>+ <td><p>Approval was skipped.</p></td></tr></tbody></table>----- <h3 id="bytebase.v1.AIService">AIService</h3>- <p>AIService provides AI chat capabilities for the page agent.</p>+ <h3 id="bytebase.v1.Engine">Engine</h3>+ <p>Database engine type.</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>Chat</td>- <td><a href="#bytebase.v1.AIChatRequest">AIChatRequest</a></td>- <td><a href="#bytebase.v1.AIChatResponse">AIChatResponse</a></td>- <td><p>Chat sends a conversation with tool definitions to the configured AI provider-and returns the AI response.</p></td>+ <td>ENGINE_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified database engine.</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>Chat</td>- <td>POST</td>- <td>/v1/ai/chat</td>- <td>*</td>- </tr>--- </tbody>- </table>----- <div class="file-heading">- <h2 id="v1/common.proto">v1/common.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.v1.PermissionDeniedDetail">PermissionDeniedDetail</h3>- <p>PermissionDeniedDetail provides structured information about permission failures.</p><p>Used as error detail when returning CodePermissionDenied errors.</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>The API method that was called. </p></td>- </tr>-- <tr>- <td>required_permissions</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The permissions required but not granted to the user. </p></td>- </tr>-- <tr>- <td>resources</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The resources the user was trying to access. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.Position">Position</h3>- <p>Position in a text expressed as one-based line and one-based column.</p><p>We use 1-based numbering to match the majority of industry standards:</p><p>- Monaco Editor uses 1-based (https://microsoft.github.io/monaco-editor/typedoc/interfaces/IPosition.html)</p><p>- GitHub Actions uses 1-based (https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-error-message)</p><p>- Most text editors display 1-based positions to users</p><p>Note: LSP uses 0-based (https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position),</p><p>but we follow the canonical user-facing standards.</p><p>Handling unknown positions:</p><p>- If the entire position is unknown, leave this field as nil/undefined</p><p>- If only line is known, set line and leave column as 0 (e.g., line=5, column=0)</p><p>- If only column is known (rare), set column and leave line as 0</p><p>Frontends should check for nil/undefined/zero values and handle them appropriately.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>line</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>Line position in a text (one-based).-First line of the text is line 1.-A value of 0 indicates the line information is unknown. </p></td>- </tr>-- <tr>- <td>column</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>Column position in a text (one-based).-Column is measured in Unicode code points (characters/runes), not bytes or grapheme clusters.-First character of the line is column 1.-A value of 0 indicates the column information is unknown.--Examples:-- "SELECT * FROM t" - column 8 is '*'-- "SELECT 你好 FROM t" - column 8 is '你' (even though it's at byte offset 7)-- "SELECT 😀 FROM t" - column 8 is '😀' (even though it's 4 bytes in UTF-8) </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.Range">Range</h3>- <p>Range represents a span within a text or sequence.</p><p>Whether the indices are byte offsets or character indices depends on the context.</p><p>Check the documentation of the field using Range for specific semantics.</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</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>Start index (inclusive). </p></td>- </tr>-- <tr>- <td>end</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>End index (exclusive). </p></td>- </tr>-- </tbody>- </table>-------- <h3 id="bytebase.v1.ApprovalStatus">ApprovalStatus</h3>- <p>Approval workflow status for an issue or a plan.</p><p>Lives at the top level so both plan_service.proto and issue_service.proto</p><p>can reference it without a circular import.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>APPROVAL_STATUS_UNSPECIFIED</td>- <td>0</td>- <td><p>No approval workflow has started, including for a linked draft issue.</p></td>- </tr>-- <tr>- <td>CHECKING</td>- <td>1</td>- <td><p>Approval checks are being evaluated.</p></td>- </tr>-- <tr>- <td>PENDING</td>- <td>2</td>- <td><p>Approval is pending.</p></td>- </tr>-- <tr>- <td>APPROVED</td>- <td>3</td>- <td><p>Issue has been approved.</p></td>- </tr>-- <tr>- <td>REJECTED</td>- <td>4</td>- <td><p>Issue has been rejected.</p></td>- </tr>-- <tr>- <td>SKIPPED</td>- <td>5</td>- <td><p>Approval was skipped.</p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.Engine">Engine</h3>- <p>Database engine type.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>ENGINE_UNSPECIFIED</td>- <td>0</td>- <td><p>Unspecified database engine.</p></td>- </tr>-- <tr>- <td>CLICKHOUSE</td>- <td>1</td>- <td><p>ClickHouse columnar database.</p></td>+ <td>CLICKHOUSE</td>+ <td>1</td>+ <td><p>ClickHouse columnar database.</p></td></tr><tr>@@ -5647,13 +5057,13 @@ Examples:<div class="file-heading">- <h2 id="v1/iam_policy.proto">v1/iam_policy.proto</h2><a href="#title">Top</a>+ <h2 id="v1/rollout_service.proto">v1/rollout_service.proto</h2><a href="#title">Top</a></div><p></p>- <h3 id="bytebase.v1.Binding">Binding</h3>- <p>Binding associates members with a role and optional conditions.</p>+ <h3 id="bytebase.v1.BatchCancelTaskRunsRequest">BatchCancelTaskRunsRequest</h3>+ <p></p><table class="field-table">@@ -5663,66 +5073,20 @@ Examples:<tbody><tr>- <td>role</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The role that is assigned to the members.-Format: roles/{role} </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>members</td>+ <td>task_runs</td><td><a href="#string">string</a></td><td>repeated</td>- <td><p>Specifies the principals requesting access for a Bytebase resource.-For users, the member should be: user:{email}-For groups, the member should be: group:{email}-For service accounts, the member should be: serviceAccount:{email}-For workload identities, the member should be: workloadIdentity:{email} </p></td>- </tr>-- <tr>- <td>condition</td>- <td><a href="#google.type.Expr">google.type.Expr</a></td>- <td></td>- <td><p>The condition that is associated with this binding, only used in the project IAM policy.-If the condition evaluates to true, then this binding applies to the current request.-If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding.-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Support variables:-resource.database: the canonical database full name in "instances/{instance}/databases/{database}" or "projects/{project}/instances/{instance}/databases/{database}" format, used by any role with SQL Editor read (e.g. "roles/sqlEditorUser", "roles/sqlEditorReadUser") or write (bb.sql.ddl / bb.sql.dml) access, support "==" operator.-resource.schema_name: the schema name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, support "==" operator.-resource.table_name: the table name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, support "==" operator.-resource.environment_id: the environment to allow the DDL/DML operation in the SQL Editor, only works for the role with bb.sql.ddl or bb.sql.dml permissions. Support "in" operator.-request.time: the expiration. Only support "<" operation in `request.time < timestamp("{ISO datetime string format}")`.--Known limitations of table/schema-scoped DDL/DML grants:-- The scope only gates the write target, not the read sources of a write: e.g. `INSERT INTO granted_table SELECT * FROM other_table` may read `other_table` without a grant on it, so a table-scoped write grant is not an exfiltration boundary.-- It must be paired with a database/project-level read grant: a table-scoped grant alone does not satisfy the SQL Editor query method permission (bb.databases.get).-- A resource.schema_name-scoped grant only authorizes a write whose schema is unambiguous — qualify the table (schema.table) or select the schema for the SQL Editor session. An unqualified write whose effective schema cannot be determined ahead of execution is denied (qualify it, or use a table-only grant).-- Multi-statement batches are authorized at the database level: an earlier statement can rebind the session's default schema or database mid-batch, so per-table/schema scoping is dropped and a table/schema-scoped grant requires a database-level grant. The database-level check is still per target database — a qualified cross-database write is gated by a grant on its own database, not the request database — but an unqualified write whose session default is rebound mid-batch is evaluated against the database it literally names, so qualify cross-database writes or run them as single statements.-- A write target in a different project than the SQL-Editor session's database is denied: the per-target check evaluates the session project's IAM policy, so a cross-project write is failed closed (to write it, open the SQL Editor on a database in the target project).-- Enforcement is on the statement's literal write target; writes routed elsewhere by a view/synonym, or into a temporary schema (e.g. pg_temp), are evaluated against what the statement names, not the ultimate base object.-- Write-target gating uses an ALLOWLIST of statement types the resolver models. It does NOT cover every syntactically-identifiable cross-database write; statement types off the allowlist are authorized against the request database. The allowlist is:- - Modeled table/data writes (per-table/schema-scopable): INSERT/UPDATE/DELETE/TRUNCATE/MERGE, LOAD DATA, IMPORT INTO, CREATE TABLE AS / SELECT INTO, and table-level CREATE/DROP/ALTER/RENAME/index.- - Modeled non-table object DDL (gated at the DATABASE level by the object's own explicit database/schema qualifier; an unqualified name keeps the request-database check): CREATE/ALTER/DROP of view, procedure/function/routine, trigger, sequence, synonym, type, and (Oracle) package and cluster; plus Oracle ALTER/DROP MATERIALIZED VIEW (Oracle CREATE MATERIALIZED VIEW is not modeled — see below).- NOT modeled (these fall back to the request-database check, so a qualified cross-database one is authorized against the request database): MySQL CREATE TRIGGER and CREATE/ALTER/DROP EVENT (bare-string AST names); MSSQL ALTER of view/procedure/function/trigger (no ALTER node in the grammar); Oracle CREATE MATERIALIZED VIEW and the niche object DDL — dimension, attribute dimension, hierarchy, analytic view, JSON duality view, materialized zonemap, operator, in-memory join group, property graph, vector index, index type, domain; COPY ... FROM; and engine-specific bulk-load / deprecated text writes. A structural "write-target object database" extraction layer to remove this allowlist dependence is tracked as a follow-up.- - Out of scope (read sources / indirect effects): the tables a write READS (INSERT … SELECT, MERGE … USING, CREATE TABLE AS … SELECT) and objects reached indirectly via views/synonyms/function bodies/triggers are NOT gated.- Invariant: for a statement ON the modeled allowlist that explicitly names a different database as its write target, the ACL uses that target database, not the request database. Statement types OFF the allowlist are authorized against the request database.--For example:-resource.database == "instances/local-pg/databases/postgres" && resource.schema_name in ["public","another_schema"]-resource.database == "instances/local-pg/databases/bytebase" && resource.schema_name == "public" && resource.table_name in ["audit_log"]-resource.database == "instances/local-pg/databases/postgres" && resource.environment_id in ["test"]-request.time < timestamp("2025-04-26T11:24:48.655Z") </p></td>- </tr>-- <tr>- <td>parsed_expr</td>- <td><a href="#google.api.expr.v1alpha1.Expr">google.api.expr.v1alpha1.Expr</a></td>- <td></td>- <td><p>The parsed expression of the condition. </p></td>+ <td><p>The taskRuns to cancel.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td></tr></tbody>@@ -5732,8 +5096,15 @@ request.time < timestamp("2025-04-26T11:24:48.655Z") </p></td>- <h3 id="bytebase.v1.BindingDelta">BindingDelta</h3>- <p>A single change to a binding.</p>+ <h3 id="bytebase.v1.BatchCancelTaskRunsResponse">BatchCancelTaskRunsResponse</h3>+ <p></p>++++++ <h3 id="bytebase.v1.BatchRunTasksRequest">BatchRunTasksRequest</h3>+ <p></p><table class="field-table">@@ -5743,32 +5114,33 @@ request.time < timestamp("2025-04-26T11:24:48.655Z") </p></td><tbody><tr>- <td>action</td>- <td><a href="#bytebase.v1.BindingDelta.Action">BindingDelta.Action</a></td>+ <td>parent</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The action that was performed on a Binding. </p></td>+ <td><p>The stage name for the tasks.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td></tr><tr>- <td>role</td>+ <td>tasks</td><td><a href="#string">string</a></td>- <td></td>- <td><p>Role that is assigned to `members`.-For example, `roles/projectOwner`. </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>member</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Follows the same format of Binding.members. </p></td>+ <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></tr><tr>- <td>condition</td>- <td><a href="#google.type.Expr">google.type.Expr</a></td>+ <td>skip_prior_backup</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The condition that is associated with this binding. </p></td>+ <td><p>If true, skip prior backup for this run even if the task has prior backup enabled. </p></td></tr></tbody>@@ -5778,8 +5150,15 @@ For example, `roles/projectOwner`. </p></td>- <h3 id="bytebase.v1.GetIamPolicyRequest">GetIamPolicyRequest</h3>- <p>Request message for getting an IAM policy.</p>+ <h3 id="bytebase.v1.BatchRunTasksResponse">BatchRunTasksResponse</h3>+ <p></p>++++++ <h3 id="bytebase.v1.BatchSkipTasksRequest">BatchSkipTasksRequest</h3>+ <p></p><table class="field-table">@@ -5789,12 +5168,26 @@ For example, `roles/projectOwner`. </p></td><tbody><tr>- <td>resource</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the resource to get the IAM policy.-Format: projects/{project}-Format: workspaces/{workspace} </p></td>+ <td><p>The stage name for the tasks.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>+ </tr>++ <tr>+ <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>reason</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The reason for skipping the tasks. </p></td></tr></tbody>@@ -5804,8 +5197,15 @@ Format: workspaces/{workspace} </p></td>- <h3 id="bytebase.v1.IamPolicy">IamPolicy</h3>- <p>IAM policy that binds members to roles.</p>+ <h3 id="bytebase.v1.BatchSkipTasksResponse">BatchSkipTasksResponse</h3>+ <p></p>++++++ <h3 id="bytebase.v1.CreateRolloutRequest">CreateRolloutRequest</h3>+ <p></p><table class="field-table">@@ -5815,21 +5215,21 @@ Format: workspaces/{workspace} </p></td><tbody><tr>- <td>bindings</td>- <td><a href="#bytebase.v1.Binding">Binding</a></td>- <td>repeated</td>- <td><p>Collection of binding.-A binding binds one or more project members to a single project role. </p></td>+ <td>parent</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The parent plan for which this rollout will be created.+Format: projects/{project}/plans/{plan} </p></td></tr><tr>- <td>etag</td>+ <td>target</td><td><a href="#string">string</a></td>- <td></td>- <td><p>The current etag of the policy, returned by GetIamPolicy and SetIamPolicy.-Sending it back on SetIamPolicy makes the write conditional: if the policy-changed since the read, the call returns ABORTED. Omitting it applies the-write unconditionally, overwriting any concurrent change (AIP-154). </p></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 "", no stages are created. </p></td></tr></tbody>@@ -5839,8 +5239,8 @@ write unconditionally, overwriting any concurrent change (AIP-154). </p></td>- <h3 id="bytebase.v1.PolicyDelta">PolicyDelta</h3>- <p>Describes changes between two IAM policies.</p>+ <h3 id="bytebase.v1.GetRolloutRequest">GetRolloutRequest</h3>+ <p></p><table class="field-table">@@ -5850,10 +5250,12 @@ write unconditionally, overwriting any concurrent change (AIP-154). </p></td><tbody><tr>- <td>binding_deltas</td>- <td><a href="#bytebase.v1.BindingDelta">BindingDelta</a></td>- <td>repeated</td>- <td><p>The delta for Bindings between two policies. </p></td>+ <td>name</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></tr></tbody>@@ -5863,8 +5265,8 @@ write unconditionally, overwriting any concurrent change (AIP-154). </p></td>- <h3 id="bytebase.v1.SetIamPolicyRequest">SetIamPolicyRequest</h3>- <p>Request message for setting an IAM policy.</p>+ <h3 id="bytebase.v1.GetTaskRunLogRequest">GetTaskRunLogRequest</h3>+ <p></p><table class="field-table">@@ -5874,27 +5276,34 @@ write unconditionally, overwriting any concurrent change (AIP-154). </p></td><tbody><tr>- <td>resource</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the resource to set the IAM policy.-Format: projects/{project}-Format: workspaces/{workspace} </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td></tr>- <tr>- <td>policy</td>- <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td>- <td></td>- <td><p> </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.GetTaskRunRequest">GetTaskRunRequest</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>etag</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The current etag of the policy. Equivalent to setting `policy.etag`;-supplying both with different values returns INVALID_ARGUMENT. </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td></tr></tbody>@@ -5904,51 +5313,8 @@ supplying both with different values returns INVALID_ARGUMENT. </p></td>--- <h3 id="bytebase.v1.BindingDelta.Action">BindingDelta.Action</h3>- <p>Type of action performed on a binding.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>ACTION_UNSPECIFIED</td>- <td>0</td>- <td><p>Unspecified action.</p></td>- </tr>-- <tr>- <td>ADD</td>- <td>1</td>- <td><p>Add a binding.</p></td>- </tr>-- <tr>- <td>REMOVE</td>- <td>2</td>- <td><p>Remove a binding.</p></td>- </tr>-- </tbody>- </table>-------- <div class="file-heading">- <h2 id="v1/audit_log_service.proto">v1/audit_log_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.v1.AuditData">AuditData</h3>- <p>Additional audit data specific to certain operations.</p>+ <h3 id="bytebase.v1.GetTaskRunSessionRequest">GetTaskRunSessionRequest</h3>+ <p></p><table class="field-table">@@ -5958,10 +5324,10 @@ supplying both with different values returns INVALID_ARGUMENT. </p></td><tbody><tr>- <td>policy_delta</td>- <td><a href="#bytebase.v1.PolicyDelta">PolicyDelta</a></td>+ <td>parent</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Changes to IAM policies. </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td></tr></tbody>@@ -5971,8 +5337,8 @@ supplying both with different values returns INVALID_ARGUMENT. </p></td>- <h3 id="bytebase.v1.AuditLog">AuditLog</h3>- <p>Audit log entry recording system activity or API call.</p>+ <h3 id="bytebase.v1.ListRolloutsRequest">ListRolloutsRequest</h3>+ <p></p><table class="field-table">@@ -5982,102 +5348,184 @@ supplying both with different values returns INVALID_ARGUMENT. </p></td><tbody><tr>- <td>name</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the log.-Formats:-- projects/{project}/auditLogs/{uid}-- workspaces/{workspace}/auditLogs/{uid} </p></td>+ <td><p>The parent, which owns this collection of rollouts.+Format: projects/{project}+Use "projects/-" to list all rollouts from all projects. </p></td></tr><tr>- <td>create_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>The timestamp when the audit log was created. </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>user</td>+ <td>page_token</td><td><a href="#string">string</a></td><td></td>- <td><p>The user who performed the action.-Format: users/{email} </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>method</td>+ <td>filter</td><td><a href="#string">string</a></td><td></td>- <td><p>The method or action being audited.-For example: /bytebase.v1.SQLService/Query or bb.project.repository.push </p></td>- </tr>-- <tr>- <td>severity</td>- <td><a href="#bytebase.v1.AuditLog.Severity">AuditLog.Severity</a></td>- <td></td>- <td><p>The severity level of this audit log entry. </p></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 "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.+- task_type: the task type, support "in" operator, check the Task.Type enum for the values.++For example:+update_time >= "2025-01-02T15:04:05Z07:00"+task_type in ["DATABASE_MIGRATE", "DATABASE_CREATE"] </p></td></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.ListRolloutsResponse">ListRolloutsResponse</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>resource</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The resource associated with this audit log. </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>request</td>+ <td>next_page_token</td><td><a href="#string">string</a></td><td></td>- <td><p>The request payload in JSON format. </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.ListTaskRunsRequest">ListTaskRunsRequest</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>response</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The response payload in JSON format.-Some fields may be omitted if they are too large or contain sensitive information. </p></td>+ <td><p>The parent, which owns this collection of taskRuns.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}+Use "projects/{project}/plans/{plan}/rollout/stages/-/tasks/-" to list all taskRuns from a rollout. </p></td></tr><tr>- <td>status</td>- <td><a href="#google.rpc.Status">google.rpc.Status</a></td>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The status of the operation. </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>latency</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td>page_token</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The duration of the operation. </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>+ </table>++++++ <h3 id="bytebase.v1.ListTaskRunsResponse">ListTaskRunsResponse</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>service_data</td>- <td><a href="#google.protobuf.Any">google.protobuf.Any</a></td>- <td></td>- <td><p>Service-specific metadata about the request, response, and activities. </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>request_metadata</td>- <td><a href="#bytebase.v1.RequestMetadata">RequestMetadata</a></td>+ <td>next_page_token</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Metadata about the request context. </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.PreviewTaskRunRollbackRequest">PreviewTaskRunRollbackRequest</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>mcp_delegation</td>- <td><a href="#bytebase.v1.MCPDelegation">MCPDelegation</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>MCP delegation provenance. Present exactly when the audited call arrived-through the MCP server's delegated credential; never set for public API-calls. Presence of this message is the MCP-origin marker. </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td></tr></tbody>@@ -6087,8 +5535,8 @@ calls. Presence of this message is the MCP-origin marker. </p></td>- <h3 id="bytebase.v1.ExportAuditLogsRequest">ExportAuditLogsRequest</h3>- <p>Request message for exporting audit logs.</p>+ <h3 id="bytebase.v1.PreviewTaskRunRollbackResponse">PreviewTaskRunRollbackResponse</h3>+ <p></p><table class="field-table">@@ -6098,54 +5546,64 @@ calls. Presence of this message is the MCP-origin marker. </p></td><tbody><tr>- <td>parent</td>+ <td>statement</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The rollback SQL statement that would undo the task run. </p></td></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.Rollout">Rollout</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>filter</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The filter of the log. It should be a valid CEL expression.-Check the filter field in the SearchAuditLogsRequest message. </p></td>+ <td><p>The resource name of the rollout.+Format: projects/{project}/plans/{plan}/rollout </p></td></tr><tr>- <td>order_by</td>+ <td>title</td><td><a href="#string">string</a></td><td></td>- <td><p>The order by of the log.-Only support order by create_time. The default sorting order is ascending.-For example:- - order_by = "create_time asc"- - order_by = "create_time desc" </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>format</td>- <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>- <td></td>- <td><p>The export format. </p></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>page_size</td>- <td><a href="#int32">int32</a></td>+ <td>create_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>The maximum number of logs to return.-The service may return fewer than this value.-If unspecified, at most 10 log entries will be returned.-The maximum value is 5000; values above 5000 will be coerced to 5000. </p></td>+ <td><p> </p></td></tr><tr>- <td>page_token</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>A page token, received from a previous `ExportAuditLogs` call.-Provide this to retrieve the subsequent page. </p></td>+ <td><p> </p></td></tr></tbody>@@ -6155,8 +5613,8 @@ Provide this to retrieve the subsequent page. </p></td>- <h3 id="bytebase.v1.ExportAuditLogsResponse">ExportAuditLogsResponse</h3>- <p>Response message for exporting audit logs.</p>+ <h3 id="bytebase.v1.Stage">Stage</h3>+ <p></p><table class="field-table">@@ -6166,19 +5624,35 @@ Provide this to retrieve the subsequent page. </p></td><tbody><tr>- <td>content</td>- <td><a href="#bytes">bytes</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The exported audit log content in the requested format. </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}+Use "-" for {stage} when the stage has no environment or deleted environment. </p></td></tr><tr>- <td>next_page_token</td>+ <td>id</td><td><a href="#string">string</a></td><td></td>- <td><p>A token to retrieve next page of log entities.-Pass this value in the page_token field in the subsequent call-to retrieve the next page of log entities. </p></td>+ <td><p>id is the environment id of the stage.+e.g., "prod".+Use "-" when the stage has no environment or deleted environment. </p></td>+ </tr>++ <tr>+ <td>environment</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 "environments/-" 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>@@ -6188,8 +5662,8 @@ to retrieve the next page of log entities. </p></td>- <h3 id="bytebase.v1.MCPDelegation">MCPDelegation</h3>- <p>Provenance of a call that reached the API through the MCP (Model Context</p><p>Protocol) server's delegated credential. The values are copied verbatim from</p><p>the verified credential's grant state; empty fields record that the grant</p><p>stored nothing (legacy sessions), never a resolved or synthesized value.</p>+ <h3 id="bytebase.v1.Task">Task</h3>+ <p></p><table class="field-table">@@ -6199,37 +5673,76 @@ to retrieve the next page of log entities. </p></td><tbody><tr>- <td>scope</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The OAuth2 grant's consented scope, e.g. "mcp:read-only".-Empty when the grant recorded no scope. </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p></td></tr><tr>- <td>resource</td>+ <td>spec_id</td><td><a href="#string">string</a></td><td></td>- <td><p>The grant's stored MCP resource URI.-Empty for pre-grant legacy sessions. </p></td>+ <td><p>A UUID4 string that uniquely identifies the Spec. </p></td></tr><tr>- <td>client_id</td>+ <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 OAuth2 client the grant was consented to.-Empty for legacy web-session tokens at /mcp. </p></td>+ <td><p>The reason why the task was skipped. </p></td></tr><tr>- <td>correlation_id</td>+ <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></td>- <td><p>Correlates the audit rows an MCP session produces. Minted at the /mcp-boundary and session-scoped: the MCP SDK hands tool handlers the-initialize-time context, so one MCP session carries one correlation ID-across all of its tool calls. </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>++ <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>database_update</td>+ <td><a href="#bytebase.v1.Task.DatabaseUpdate">Task.DatabaseUpdate</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></tr></tbody>@@ -6239,8 +5752,8 @@ across all of its tool calls. </p></td>- <h3 id="bytebase.v1.RequestMetadata">RequestMetadata</h3>- <p>Metadata about the incoming request.</p>+ <h3 id="bytebase.v1.Task.DatabaseCreate">Task.DatabaseCreate</h3>+ <p>Payload for creating a new database.</p><table class="field-table">@@ -6250,18 +5763,41 @@ across all of its tool calls. </p></td><tbody><tr>- <td>caller_ip</td>+ <td>sheet</td><td><a href="#string">string</a></td><td></td>- <td><p>The IP address of the request originator. </p></td>+ <td><p>Format: projects/{project}/sheets/{sheet} </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.Task.DatabaseUpdate">Task.DatabaseUpdate</h3>+ <p>Payload for updating a database 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>sheet</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Format: projects/{project}/sheets/{sheet} </p></td></tr><tr>- <td>caller_supplied_user_agent</td>+ <td>release</td><td><a href="#string">string</a></td><td></td>- <td><p>The user agent string provided by the caller.-This is supplied by the client and is not authenticated. </p></td>+ <td><p>Format: projects/{project}/releases/{release} </p></td></tr></tbody>@@ -6271,8 +5807,8 @@ This is supplied by the client and is not authenticated. </p></td>- <h3 id="bytebase.v1.SearchAuditLogsRequest">SearchAuditLogsRequest</h3>- <p>Request message for searching audit logs.</p>+ <h3 id="bytebase.v1.TaskRun">TaskRun</h3>+ <p></p><table class="field-table">@@ -6282,64 +5818,77 @@ This is supplied by the client and is not authenticated. </p></td><tbody><tr>- <td>parent</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td></tr><tr>- <td>filter</td>+ <td>creator</td><td><a href="#string">string</a></td><td></td>- <td><p>The filter of the log. It should be a valid CEL expression.-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filter:-- method: the API name, can be found in the docs. Usually "/bytebase.v1.…", for example "/bytebase.v1.UserService/CreateUser"; entries written outside the v1 API carry their own prefix, such as "/bytebase.mcp.Session/Authorize" or "/bytebase.cli.Recovery/ResetUserPassword". Support "==" operator.-- resource: the resource the entry is about, support "==" operator.-- severity: support "==" operator, check Severity enum in AuditLog message for values.-- user: the actor, should in "users/{email}" format, support "==" operator.-- create_time: support ">=" and "<=" operator.-- mcp: true selects the entries MCP produced, false the rest. A boolean, not a string. Support "==" operator.-- mcp_correlation_id: the MCP session an entry belongs to, taken from an entry's mcp_delegation.correlation_id. Support "==" operator. Entries MCP produced outside a session — a refused connection or consent — carry none and match no value here.--For example:- - filter = "method == '/bytebase.v1.SQLService/Query'"- - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR'"- - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && user == 'users/[email protected]'"- - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && create_time <= '2021-01-01T00:00:00Z' && create_time >= '2020-01-01T00:00:00Z'"- - filter = "mcp == true"- - filter = "mcp_correlation_id == '0b7f1a3c-1d2e-4f56-8a90-1b2c3d4e5f60'" </p></td>+ <td><p>Format: users/[email protected] </p></td></tr><tr>- <td>order_by</td>- <td><a href="#string">string</a></td>+ <td>create_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>The order by of the log.-Only support order by create_time. The default sorting order is ascending.-For example:- - order_by = "create_time asc"- - order_by = "create_time desc" </p></td>+ <td><p> </p></td></tr><tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>+ <td>update_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>The maximum number of logs to return.-The service may return fewer than this value.-If unspecified, at most 10 log entries will be returned.-The maximum value is 5000; values above 5000 will be coerced to 5000. </p></td>+ <td><p> </p></td></tr><tr>- <td>page_token</td>+ <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>A page token, received from a previous `SearchLogs` call.-Provide this to retrieve the subsequent page. </p></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>@@ -6349,8 +5898,8 @@ Provide this to retrieve the subsequent page. </p></td>- <h3 id="bytebase.v1.SearchAuditLogsResponse">SearchAuditLogsResponse</h3>- <p>Response message for searching audit logs.</p>+ <h3 id="bytebase.v1.TaskRun.SchedulerInfo">TaskRun.SchedulerInfo</h3>+ <p>Information about task run scheduling.</p><table class="field-table">@@ -6360,19 +5909,17 @@ Provide this to retrieve the subsequent page. </p></td><tbody><tr>- <td>audit_logs</td>- <td><a href="#bytebase.v1.AuditLog">AuditLog</a></td>- <td>repeated</td>- <td><p> </p></td>+ <td>report_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p>The time when the scheduling info was reported. </p></td></tr><tr>- <td>next_page_token</td>- <td><a href="#string">string</a></td>+ <td>waiting_cause</td>+ <td><a href="#bytebase.v1.TaskRun.SchedulerInfo.WaitingCause">TaskRun.SchedulerInfo.WaitingCause</a></td><td></td>- <td><p>A token to retrieve next page of log entities.-Pass this value in the page_token field in the subsequent call-to retrieve the next page of log entities. </p></td>+ <td><p>The cause for the task run waiting. </p></td></tr></tbody>@@ -6382,166 +5929,62 @@ to retrieve the next page of log entities. </p></td>+ <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.AuditLog.Severity">AuditLog.Severity</h3>- <p>Severity level for audit log entries.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>SEVERITY_UNSPECIFIED</td>- <td>0</td>- <td><p>Unspecified severity level.</p></td>- </tr>-- <tr>- <td>DEBUG</td>- <td>1</td>- <td><p>Debug-level information.</p></td>- </tr>-- <tr>- <td>INFO</td>- <td>2</td>- <td><p>Informational messages.</p></td>- </tr>-- <tr>- <td>NOTICE</td>- <td>3</td>- <td><p>Notable events.</p></td>- </tr>-- <tr>- <td>WARNING</td>- <td>4</td>- <td><p>Warning conditions.</p></td>- </tr>-- <tr>- <td>ERROR</td>- <td>5</td>- <td><p>Error conditions.</p></td>- </tr>-- <tr>- <td>CRITICAL</td>- <td>6</td>- <td><p>Critical conditions.</p></td>- </tr>-- <tr>- <td>ALERT</td>- <td>7</td>- <td><p>Action must be taken immediately.</p></td>- </tr>-- <tr>- <td>EMERGENCY</td>- <td>8</td>- <td><p>System is unusable.</p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.AuditLogService">AuditLogService</h3>- <p>AuditLogService manages audit logs for system activities and API calls.</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>SearchAuditLogs</td>- <td><a href="#bytebase.v1.SearchAuditLogsRequest">SearchAuditLogsRequest</a></td>- <td><a href="#bytebase.v1.SearchAuditLogsResponse">SearchAuditLogsResponse</a></td>- <td><p>Searches audit logs with optional filtering and pagination.-Permissions required: bb.auditLogs.search</p></td>- </tr>-- <tr>- <td>ExportAuditLogs</td>- <td><a href="#bytebase.v1.ExportAuditLogsRequest">ExportAuditLogsRequest</a></td>- <td><a href="#bytebase.v1.ExportAuditLogsResponse">ExportAuditLogsResponse</a></td>- <td><p>Exports audit logs in a specified format for external analysis.-Permissions required: bb.auditLogs.export</p></td>- </tr>-- </tbody>- </table>+ <h3 id="bytebase.v1.TaskRunLog">TaskRunLog</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>SearchAuditLogs</td>- <td>POST</td>- <td>/v1/{parent=projects/*}/auditLogs:search</td>- <td>*</td>- </tr>-- <tr>- <td>SearchAuditLogs</td>- <td>POST</td>- <td>/v1/auditLogs:search</td>- <td>*</td>- </tr>---- <tr>- <td>ExportAuditLogs</td>- <td>POST</td>- <td>/v1/{parent=projects/*}/auditLogs:export</td>- <td>*</td>- </tr>+ <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>ExportAuditLogs</td>- <td>POST</td>- <td>/v1/auditLogs:export</td>- <td>*</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>+ </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>+ <h3 id="bytebase.v1.TaskRunLogEntry">TaskRunLogEntry</h3><p></p>@@ -6552,28 +5995,87 @@ Permissions required: bb.auditLogs.export</p></td><tbody><tr>- <td>identity_provider</td>- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>+ <td>type</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.Type">TaskRunLogEntry.Type</a></td><td></td>- <td><p>The identity provider to create. </p></td>+ <td><p>The type of this log entry. </p></td></tr><tr>- <td>identity_provider_id</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>replica_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's resource name.--This value should be 4-63 characters, and valid characters-are /[a-z][0-9]-/. </p></td>+ <td><p>The replica ID for this log entry. </p></td></tr><tr>- <td>validate_only</td>- <td><a href="#bool">bool</a></td>+ <td>schema_dump</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.SchemaDump">TaskRunLogEntry.SchemaDump</a></td><td></td>- <td><p>If set to true, the request will be validated without actually creating the identity provider. </p></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></tr></tbody>@@ -6583,8 +6085,8 @@ are /[a-z][0-9]-/. </p></td>- <h3 id="bytebase.v1.DeleteIdentityProviderRequest">DeleteIdentityProviderRequest</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.CommandExecute">TaskRunLogEntry.CommandExecute</h3>+ <p>Command execution details.</p><table class="field-table">@@ -6594,11 +6096,33 @@ are /[a-z][0-9]-/. </p></td><tbody><tr>- <td>name</td>+ <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 "SELECT 你好;" 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 name of the identity provider to delete.-Format: idps/{identity_provider} </p></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>@@ -6608,8 +6132,8 @@ Format: idps/{identity_provider} </p></td>- <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>+ <h3 id="bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse">TaskRunLogEntry.CommandExecute.CommandResponse</h3>+ <p>Command execution response.</p><table class="field-table">@@ -6619,32 +6143,32 @@ Format: idps/{identity_provider} </p></td><tbody><tr>- <td>identifier</td>- <td><a href="#string">string</a></td>+ <td>log_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>Identifier is the field name of the unique identifier in 3rd-party idp user info. Required. </p></td>+ <td><p>When the response was logged. </p></td></tr><tr>- <td>display_name</td>+ <td>error</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>+ <td><p>Error message if command execution failed. </p></td></tr><tr>- <td>phone</td>- <td><a href="#string">string</a></td>+ <td>affected_rows</td>+ <td><a href="#int64">int64</a></td><td></td>- <td><p>Phone is the field name of primary phone in 3rd-party idp user info. Optional. </p></td>+ <td><p>Total affected rows. </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>+ <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't support it. Caller should fallback to `affected_rows` in that case. </p></td></tr></tbody>@@ -6654,8 +6178,8 @@ Mainly used for OIDC: https://developer.okta.com/docs/guides/customize-tokens-gr- <h3 id="bytebase.v1.GetIdentityProviderRequest">GetIdentityProviderRequest</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.ComputeDiff">TaskRunLogEntry.ComputeDiff</h3>+ <p>Schema diff computation details.</p><table class="field-table">@@ -6665,11 +6189,24 @@ Mainly used for OIDC: https://developer.okta.com/docs/guides/customize-tokens-gr<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 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>The name of the identity provider to retrieve.-Format: idps/{idp} </p></td>+ <td><p>Error message if computation failed. </p></td></tr></tbody>@@ -6679,8 +6216,8 @@ Format: idps/{idp} </p></td>- <h3 id="bytebase.v1.IdentityProvider">IdentityProvider</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.DatabaseSync">TaskRunLogEntry.DatabaseSync</h3>+ <p>Database synchronization details.</p><table class="field-table">@@ -6690,39 +6227,24 @@ Format: idps/{idp} </p></td><tbody><tr>- <td>name</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 name of the identity provider.-Format: idps/{idp} </p></td>+ <td><p>When the database sync started. </p></td></tr><tr>- <td>title</td>- <td><a href="#string">string</a></td>+ <td>end_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>The display title of the identity provider. </p></td>+ <td><p>When the database sync ended. </p></td></tr><tr>- <td>domain</td>+ <td>error</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>config</td>- <td><a href="#bytebase.v1.IdentityProviderConfig">IdentityProviderConfig</a></td>- <td></td>- <td><p>The configuration details for the identity provider. </p></td>+ <td><p>Error message if sync failed. </p></td></tr></tbody>@@ -6732,8 +6254,8 @@ Format: idps/{idp} </p></td>- <h3 id="bytebase.v1.IdentityProviderConfig">IdentityProviderConfig</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.GhostMigration">TaskRunLogEntry.GhostMigration</h3>+ <p>gh-ost migration details.</p><table class="field-table">@@ -6743,24 +6265,24 @@ Format: idps/{idp} </p></td><tbody><tr>- <td>oauth2_config</td>- <td><a href="#bytebase.v1.OAuth2IdentityProviderConfig">OAuth2IdentityProviderConfig</a></td>+ <td>start_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>OAuth2 protocol configuration. </p></td>+ <td><p>When the gh-ost migration started. </p></td></tr><tr>- <td>oidc_config</td>- <td><a href="#bytebase.v1.OIDCIdentityProviderConfig">OIDCIdentityProviderConfig</a></td>+ <td>end_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>OIDC protocol configuration. </p></td>+ <td><p>When the gh-ost migration ended. </p></td></tr><tr>- <td>ldap_config</td>- <td><a href="#bytebase.v1.LDAPIdentityProviderConfig">LDAPIdentityProviderConfig</a></td>+ <td>error</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>LDAP protocol configuration. </p></td>+ <td><p>Error message if the gh-ost migration failed. </p></td></tr></tbody>@@ -6770,8 +6292,8 @@ Format: idps/{idp} </p></td>- <h3 id="bytebase.v1.LDAPIdentityProviderConfig">LDAPIdentityProviderConfig</h3>- <p>LDAPIdentityProviderConfig is the structure for LDAP identity provider config.</p>+ <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup">TaskRunLogEntry.PriorBackup</h3>+ <p>Prior backup operation details.</p><table class="field-table">@@ -6781,72 +6303,100 @@ Format: idps/{idp} </p></td><tbody><tr>- <td>host</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>Host is the hostname or IP address of the LDAP server, e.g.,-"ldap.example.com". </p></td>+ <td><p>When the backup started. </p></td></tr><tr>- <td>port</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>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>+ <td><p>When the backup ended. </p></td></tr><tr>- <td>skip_tls_verify</td>- <td><a href="#bool">bool</a></td>+ <td>prior_backup_detail</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail">TaskRunLogEntry.PriorBackup.PriorBackupDetail</a></td><td></td>- <td><p>SkipTLSVerify controls whether to skip TLS certificate verification. </p></td>+ <td><p>The backup details. </p></td></tr><tr>- <td>bind_dn</td>+ <td>error</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>+ <td><p>Error message if the backup failed. </p></td></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail">TaskRunLogEntry.PriorBackup.PriorBackupDetail</h3>+ <p>Prior backup detail for rollback purposes.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>+<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>+ <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></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item</h3>+ <p>A single backup table mapping.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>+<tr>- <td>base_dn</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>BaseDN is the base DN to search for users, e.g., "ou=users,dc=example,dc=com". </p></td>+ <td><p>The original table information. </p></td></tr><tr>- <td>user_filter</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>UserFilter is the filter to search for users, e.g., "(uid=%s)". </p></td>+ <td><p>The target backup table information. </p></td></tr><tr>- <td>security_protocol</td>- <td><a href="#bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol">LDAPIdentityProviderConfig.SecurityProtocol</a></td>+ <td>start_position</td>+ <td><a href="#bytebase.v1.Position">Position</a></td><td></td>- <td><p>SecurityProtocol is the security protocol to be used for establishing-connections with the LDAP server. </p></td>+ <td><p>The start position in the SQL statement. </p></td></tr><tr>- <td>field_mapping</td>- <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td>+ <td>end_position</td>+ <td><a href="#bytebase.v1.Position">Position</a></td><td></td>- <td><p>FieldMapping is the mapping of the user attributes returned by the LDAP-server. </p></td>+ <td><p>The end position in the SQL statement. </p></td></tr></tbody>@@ -6856,8 +6406,8 @@ server. </p></td>- <h3 id="bytebase.v1.LDAPIdentityProviderTestRequestContext">LDAPIdentityProviderTestRequestContext</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table</h3>+ <p>Table information.</p><table class="field-table">@@ -6867,17 +6417,25 @@ server. </p></td><tbody><tr>- <td>username</td>+ <td>database</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>+ <td><p>The database information.+Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} </p></td></tr><tr>- <td>password</td>+ <td>schema</td><td><a href="#string">string</a></td><td></td>- <td><p>The password of the directory user. </p></td>+ <td><p>The schema name. </p></td>+ </tr>++ <tr>+ <td>table</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The table name. </p></td></tr></tbody>@@ -6887,8 +6445,8 @@ server. </p></td>- <h3 id="bytebase.v1.ListIdentityProvidersRequest">ListIdentityProvidersRequest</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.ReleaseFileExecute">TaskRunLogEntry.ReleaseFileExecute</h3>+ <p>Release file execution details.</p><table class="field-table">@@ -6898,12 +6456,17 @@ server. </p></td><tbody><tr>- <td>parent</td>+ <td>version</td><td><a href="#string">string</a></td><td></td>- <td><p>The parent workspace whose identity providers should be listed. It must be-the workspace the caller's credential belongs to.-Format: workspaces/{workspace} </p></td>+ <td><p>The version of the file being executed (e.g., "0001"). </p></td>+ </tr>++ <tr>+ <td>file_path</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The file path within the release (e.g., "2.2/V0001_create_table.sql"). </p></td></tr></tbody>@@ -6913,8 +6476,8 @@ Format: workspaces/{workspace} </p></td>- <h3 id="bytebase.v1.ListIdentityProvidersResponse">ListIdentityProvidersResponse</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.RetryInfo">TaskRunLogEntry.RetryInfo</h3>+ <p>Retry information for failed operations.</p><table class="field-table">@@ -6924,90 +6487,24 @@ Format: workspaces/{workspace} </p></td><tbody><tr>- <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>- </table>------ <h3 id="bytebase.v1.OAuth2IdentityProviderConfig">OAuth2IdentityProviderConfig</h3>- <p>OAuth2IdentityProviderConfig is the structure for OAuth2 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>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></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>+ <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>skip_tls_verify</td>- <td><a href="#bool">bool</a></td>+ <td>retry_count</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>Whether to skip TLS certificate verification. </p></td>+ <td><p>Current retry attempt number. </p></td></tr><tr>- <td>auth_style</td>- <td><a href="#bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</a></td>+ <td>maximum_retries</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The authentication style for client credentials. </p></td>+ <td><p>Maximum number of retries allowed. </p></td></tr></tbody>@@ -7017,8 +6514,8 @@ Format: workspaces/{workspace} </p></td>- <h3 id="bytebase.v1.OAuth2IdentityProviderTestRequestContext">OAuth2IdentityProviderTestRequestContext</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.SchemaDump">TaskRunLogEntry.SchemaDump</h3>+ <p>Schema dump operation details.</p><table class="field-table">@@ -7028,10 +6525,24 @@ Format: workspaces/{workspace} </p></td><tbody><tr>- <td>code</td>+ <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>error</td><td><a href="#string">string</a></td><td></td>- <td><p>Authorize code from website. </p></td>+ <td><p>Error message if the schema dump failed. </p></td></tr></tbody>@@ -7041,8 +6552,8 @@ Format: workspaces/{workspace} </p></td>- <h3 id="bytebase.v1.OIDCIdentityProviderConfig">OIDCIdentityProviderConfig</h3>- <p>OIDCIdentityProviderConfig is the structure for OIDC identity provider config.</p>+ <h3 id="bytebase.v1.TaskRunLogEntry.TransactionControl">TaskRunLogEntry.TransactionControl</h3>+ <p>Transaction control operation details.</p><table class="field-table">@@ -7052,61 +6563,17 @@ Format: workspaces/{workspace} </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>type</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.TransactionControl.Type">TaskRunLogEntry.TransactionControl.Type</a></td><td></td>- <td><p>The authentication style for client credentials. </p></td>+ <td><p>The type of transaction control. </p></td></tr><tr>- <td>auth_endpoint</td>+ <td>error</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>Error message if the operation failed. </p></td></tr></tbody>@@ -7116,7 +6583,7 @@ Should be fetched from the well-known configuration file of the OIDC provider. <- <h3 id="bytebase.v1.OIDCIdentityProviderTestRequestContext">OIDCIdentityProviderTestRequestContext</h3>+ <h3 id="bytebase.v1.TaskRunSession">TaskRunSession</h3><p></p>@@ -7127,10 +6594,17 @@ 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>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>@@ -7140,8 +6614,8 @@ Should be fetched from the well-known configuration file of the OIDC provider. <- <h3 id="bytebase.v1.TestIdentityProviderRequest">TestIdentityProviderRequest</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunSession.Postgres">TaskRunSession.Postgres</h3>+ <p>PostgreSQL session information.</p><table class="field-table">@@ -7151,31 +6625,24 @@ 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></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>session</td>+ <td><a href="#bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</a></td><td></td>- <td><p> </p></td>+ <td><p>`session` is the session of the task run executing commands. </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>+ <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>ldap_context</td>- <td><a href="#bytebase.v1.LDAPIdentityProviderTestRequestContext">LDAPIdentityProviderTestRequestContext</a></td>- <td></td>- <td><p>LDAP credentials context for test connection. </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>@@ -7185,8 +6652,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.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</h3>+ <p>PostgreSQL session information read from `pg_stat_activity`.</p><table class="field-table">@@ -7196,121 +6663,101 @@ 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>pid</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Process ID of the session. </p></td></tr><tr>- <td>user_info</td>- <td><a href="#bytebase.v1.TestIdentityProviderResponse.UserInfoEntry">TestIdentityProviderResponse.UserInfoEntry</a></td>+ <td>blocked_by_pids</td>+ <td><a href="#string">string</a></td><td>repeated</td>- <td><p>The matched user info from the claims. </p></td>+ <td><p>PIDs of sessions blocking this session. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.TestIdentityProviderResponse.ClaimsEntry">TestIdentityProviderResponse.ClaimsEntry</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>query</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Current query being executed. </p></td></tr><tr>- <td>value</td>+ <td>state</td><td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>+ <td>optional</td>+ <td><p>Session state (active, idle, etc.). </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.TestIdentityProviderResponse.UserInfoEntry">TestIdentityProviderResponse.UserInfoEntry</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>wait_event_type</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Wait event type if session is waiting. </p></td>+ </tr><tr>- <td>key</td>+ <td>wait_event</td><td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>+ <td>optional</td>+ <td><p>Specific wait event if session is waiting. </p></td></tr><tr>- <td>value</td>+ <td>datname</td><td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>+ <td>optional</td>+ <td><p>Database name. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.UpdateIdentityProviderRequest">UpdateIdentityProviderRequest</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>usename</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>User name. </p></td>+ </tr><tr>- <td>identity_provider</td>- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>+ <td>application_name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The identity provider to update.--The identity provider's `name` field is used to identify the identity provider to update.-Format: idps/{identity_provider} </p></td>+ <td><p>Application name. </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>+ <td>client_addr</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Client IP address. </p></td></tr><tr>- <td>allow_missing</td>- <td><a href="#bool">bool</a></td>+ <td>client_port</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Client port number. </p></td>+ </tr>++ <tr>+ <td>backend_start</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></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>+ <td><p>When the backend process started. </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>+ </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></tr></tbody>@@ -7322,7 +6769,7 @@ In this situation, `update_mask` is ignored. </p></td>- <h3 id="bytebase.v1.IdentityProviderType">IdentityProviderType</h3>+ <h3 id="bytebase.v1.Task.Status">Task.Status</h3><p></p><table class="enum-table"><thead>@@ -7331,33 +6778,57 @@ In this situation, `update_mask` is ignored. </p></td><tbody><tr>- <td>IDENTITY_PROVIDER_TYPE_UNSPECIFIED</td>+ <td>STATUS_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified identity provider type.</p></td>+ <td><p>Unspecified status.</p></td></tr><tr>- <td>OAUTH2</td>+ <td>NOT_STARTED</td><td>1</td>- <td><p>OAuth 2.0 authentication protocol.</p></td>+ <td><p>Task has not started and is awaiting its turn in the deployment sequence.</p></td></tr><tr>- <td>OIDC</td>+ <td>PENDING</td><td>2</td>- <td><p>OpenID Connect authentication protocol.</p></td>+ <td><p>Task is ready to run and waiting for approval or scheduled time.</p></td></tr><tr>- <td>LDAP</td>+ <td>RUNNING</td><td>3</td>- <td><p>LDAP directory service authentication.</p></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.LDAPIdentityProviderConfig.SecurityProtocol">LDAPIdentityProviderConfig.SecurityProtocol</h3>+ <h3 id="bytebase.v1.Task.Type">Task.Type</h3><p></p><table class="enum-table"><thead>@@ -7366,27 +6837,35 @@ In this situation, `update_mask` is ignored. </p></td><tbody><tr>- <td>SECURITY_PROTOCOL_UNSPECIFIED</td>+ <td>TYPE_UNSPECIFIED</td><td>0</td>- <td><p></p></td>+ <td><p>Unspecified task type.</p></td></tr><tr>- <td>START_TLS</td>+ <td>GENERAL</td><td>1</td>- <td><p>StartTLS is the security protocol that starts with an unencrypted connection and then upgrades to TLS.</p></td>+ <td><p>General task for miscellaneous operations.</p></td></tr><tr>- <td>LDAPS</td>+ <td>DATABASE_CREATE</td><td>2</td>- <td><p>LDAPS is the security protocol that uses TLS from the beginning.</p></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.OAuth2AuthStyle">OAuth2AuthStyle</h3>+ <h3 id="bytebase.v1.TaskRun.Status">TaskRun.Status</h3><p></p><table class="enum-table"><thead>@@ -7395,94 +6874,257 @@ In this situation, `update_mask` is ignored. </p></td><tbody><tr>- <td>OAUTH2_AUTH_STYLE_UNSPECIFIED</td>+ <td>STATUS_UNSPECIFIED</td><td>0</td>- <td><p></p></td>+ <td><p>Unspecified status.</p></td></tr><tr>- <td>IN_PARAMS</td>+ <td>PENDING</td><td>1</td>- <td><p>IN_PARAMS sends the "client_id" and "client_secret" in the POST body-as application/x-www-form-urlencoded parameters.</p></td>+ <td><p>Task run is queued and waiting to start execution.</p></td></tr><tr>- <td>IN_HEADER</td>+ <td>RUNNING</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>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.IdentityProviderService">IdentityProviderService</h3>- <p>IdentityProviderService manages external identity providers for SSO authentication.</p>+ <h3 id="bytebase.v1.TaskRunLogEntry.TransactionControl.Type">TaskRunLogEntry.TransactionControl.Type</h3>+ <p>Transaction control type.</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>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>TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified type.</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'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>+ <td>BEGIN</td>+ <td>1</td>+ <td><p>Begin transaction.</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>COMMIT</td>+ <td>2</td>+ <td><p>Commit transaction.</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>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>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>TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified type.</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>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>@@ -7506,9 +7148,9 @@ Permissions required: bb.identityProviders.update</p></td><tr>- <td>GetIdentityProvider</td>+ <td>GetRollout</td><td>GET</td>- <td>/v1/{name=idps/*}</td>+ <td>/v1/{name=projects/*/plans/*/rollout}</td><td></td></tr>@@ -7516,16 +7158,29 @@ Permissions required: bb.identityProviders.update</p></td><tr>- <td>ListIdentityProviders</td>+ <td>ListRollouts</td><td>GET</td>- <td>/v1/idps</td>+ <td>/v1/{parent=projects/*}/rollouts</td><td></td></tr>+++<tr>- <td>ListIdentityProviders</td>+ <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=workspaces/*}/idps</td>+ <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*}/taskRuns</td><td></td></tr>@@ -7533,29 +7188,29 @@ Permissions required: bb.identityProviders.update</p></td><tr>- <td>CreateIdentityProvider</td>- <td>POST</td>- <td>/v1/idps</td>- <td>identity_provider</td>+ <td>GetTaskRun</td>+ <td>GET</td>+ <td>/v1/{name=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}</td>+ <td></td></tr><tr>- <td>UpdateIdentityProvider</td>- <td>PATCH</td>- <td>/v1/{identity_provider.name=idps/*}</td>- <td>identity_provider</td>+ <td>GetTaskRunLog</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}/log</td>+ <td></td></tr><tr>- <td>DeleteIdentityProvider</td>- <td>DELETE</td>- <td>/v1/{name=idps/*}</td>+ <td>GetTaskRunSession</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}/session</td><td></td></tr>@@ -7563,9 +7218,39 @@ Permissions required: bb.identityProviders.update</p></td><tr>- <td>TestIdentityProvider</td>+ <td>BatchRunTasks</td><td>POST</td>- <td>/v1/idps/*:test</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>@@ -7577,12 +7262,12 @@ Permissions required: bb.identityProviders.update</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/query_history_service.proto">v1/query_history_service.proto</h2><a href="#title">Top</a></div><p></p>- <h3 id="bytebase.v1.BatchCancelTaskRunsRequest">BatchCancelTaskRunsRequest</h3>+ <h3 id="bytebase.v1.GetQueryHistoryRequest">GetQueryHistoryRequest</h3><p></p>@@ -7593,20 +7278,11 @@ Permissions required: bb.identityProviders.update</p></td><tbody><tr>- <td>parent</td>+ <td>name</td><td><a href="#string">string</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>- </tr>-- <tr>- <td>task_runs</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><p>The name of the query history to retrieve.+Format: projects/{project}/queryHistories/{id} </p></td></tr></tbody>@@ -7616,14 +7292,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.ListQueryHistoriesRequest">ListQueryHistoriesRequest</h3><p></p>@@ -7637,30 +7306,43 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/task<td>parent</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 parent project whose query histories are listed.+Format: projects/{project}+Use "projects/-" to list query histories across all projects+(https://google.aip.dev/159); this requires the bb.queryHistories.list+permission on the workspace. </p></td></tr><tr>- <td>tasks</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>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>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>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>skip_prior_backup</td>- <td><a href="#bool">bool</a></td>+ <td>filter</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>Filter is the filter to apply on the list query histories.+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Supported filter:+- creator: the user full name in "users/{email}" format, support "==" operator.++For example:+creator == "users/{email}" </p></td></tr></tbody>@@ -7670,14 +7352,7 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p>- <h3 id="bytebase.v1.BatchRunTasksResponse">BatchRunTasksResponse</h3>- <p></p>------ <h3 id="bytebase.v1.BatchSkipTasksRequest">BatchSkipTasksRequest</h3>+ <h3 id="bytebase.v1.ListQueryHistoriesResponse">ListQueryHistoriesResponse</h3><p></p>@@ -7688,26 +7363,19 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p><tbody><tr>- <td>parent</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>-- <tr>- <td>tasks</td>- <td><a href="#string">string</a></td>+ <td>query_histories</td>+ <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td><td>repeated</td>- <td><p>The tasks to skip.-Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p></td>+ <td><p>The list of query histories. </p></td></tr><tr>- <td>reason</td>+ <td>next_page_token</td><td><a href="#string">string</a></td><td></td>- <td><p>The reason for skipping the tasks. </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></tbody>@@ -7717,14 +7385,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.QueryHistory">QueryHistory</h3><p></p>@@ -7735,119 +7396,61 @@ 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 parent plan for which this rollout will be created.-Format: projects/{project}/plans/{plan} </p></td>+ <td><p>The name for the query history.+Format: projects/{project}/queryHistories/{id} </p></td></tr><tr>- <td>target</td>+ <td>database</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 "", no stages are created. </p></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></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.GetRolloutRequest">GetRolloutRequest</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>creator</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> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.GetTaskRunLogRequest">GetTaskRunLogRequest</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>create_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p> </p></td>+ </tr><tr>- <td>parent</td>+ <td>statement</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> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.GetTaskRunRequest">GetTaskRunRequest</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>error</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>optional</td>+ <td><p> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.GetTaskRunSessionRequest">GetTaskRunSessionRequest</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>duration</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td></td>+ <td><p> </p></td>+ </tr><tr>- <td>parent</td>- <td><a href="#string">string</a></td>+ <td>type</td>+ <td><a href="#bytebase.v1.QueryHistory.Type">QueryHistory.Type</a></td><td></td>- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>+ <td><p> </p></td></tr></tbody>@@ -7857,7 +7460,7 @@ Format: projects/{project}/plans/{plan}/rollout </p></td>- <h3 id="bytebase.v1.ListRolloutsRequest">ListRolloutsRequest</h3>+ <h3 id="bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</h3><p></p>@@ -7871,18 +7474,19 @@ Format: projects/{project}/plans/{plan}/rollout </p></td><td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The parent, which owns this collection of rollouts.+ <td><p>The parent project to search query histories in.Format: projects/{project}-Use "projects/-" to list all rollouts from all projects. </p></td>+The AIP-159 wildcard "projects/-" 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 rollouts to return. The service may return fewer than-this value.-If unspecified, at most 10 rollouts will be returned.+ <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>@@ -7890,37 +7494,43 @@ The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td><td>page_token</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>A page token, received from a previous `ListQueryHistory` 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 used to filter rollouts returned in the list.+ <td><p>Filter is the filter to apply on the search query historyThe syntax and semantics of CEL are documented at https://github.com/google/cel-spec-Supported filters:-- update_time: rollout update time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.-- task_type: the task type, support "in" operator, check the Task.Type enum for the values.+Supported filter:+- project: the project full name in "projects/{id}" format, support "==" operator.+- database: the database full name in "instances/{id}/databases/{name}" or "projects/{project}/instances/{id}/databases/{name}" format, support "==" operator.+- instance: the instance full name in "instances/{id}" or "projects/{project}/instances/{id}" format, support "==" operator.+- type: the type, should be "QUERY" or "EXPORT", support "==" operator.+- statement: the SQL statement, support "==" and ".contains()" operators.For example:-update_time >= "2025-01-02T15:04:05Z07:00"-task_type in ["DATABASE_MIGRATE", "DATABASE_CREATE"] </p></td>- </tr>-- </tbody>- </table>--+project == "projects/{project}"+database == "instances/{instance}/databases/{database}"+instance == "instances/{instance}"+type == "QUERY"+type == "EXPORT"+statement == "SELECT 1;"+statement.contains("select")+type == "QUERY" && statement.contains("select") </p></td>+ </tr>++ </tbody>+ </table>++- <h3 id="bytebase.v1.ListRolloutsResponse">ListRolloutsResponse</h3>+ <h3 id="bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</h3><p></p>@@ -7931,18 +7541,19 @@ task_type in ["DATABASE_MIGRATE", "DATABASE_CREATE"] </p></td><tbody><tr>- <td>rollouts</td>- <td><a href="#bytebase.v1.Rollout">Rollout</a></td>+ <td>query_histories</td>+ <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td><td>repeated</td>- <td><p>The rollouts from the specified request. </p></td>+ <td><p>The list of history. </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>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>@@ -7952,54 +7563,135 @@ If this field is omitted, there are no subsequent pages. </p></td>- <h3 id="bytebase.v1.ListTaskRunsRequest">ListTaskRunsRequest</h3>+++ <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'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's own query history)</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>parent</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 "projects/{project}/plans/{plan}/rollout/stages/-/tasks/-" to list all taskRuns from a rollout. </p></td>- </tr>- <tr>- <td>page_size</td>- <td><a href="#int32">int32</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>- </tr>+ <tr>+ <td>SearchQueryHistories</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*}/queryHistories:search</td>+ <td>*</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 `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>++++ <tr>+ <td>ListQueryHistories</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*}/queryHistories</td>+ <td></td>+ </tr>+++++ <tr>+ <td>GetQueryHistory</td>+ <td>GET</td>+ <td>/v1/{name=projects/*/queryHistories/*}</td>+ <td></td>+ </tr>+</tbody></table>--+- <h3 id="bytebase.v1.ListTaskRunsResponse">ListTaskRunsResponse</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>@@ -8010,42 +7702,42 @@ 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>+ <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>next_page_token</td>+ <td>statement</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 SQL statement to execute. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.PreviewTaskRunRollbackRequest">PreviewTaskRunRollbackRequest</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>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>name</td>+ <td>schema</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>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></tr></tbody>@@ -8055,7 +7747,7 @@ If this field is omitted, there are no subsequent pages. </p></td>- <h3 id="bytebase.v1.PreviewTaskRunRollbackResponse">PreviewTaskRunRollbackResponse</h3>+ <h3 id="bytebase.v1.AdminExecuteResponse">AdminExecuteResponse</h3><p></p>@@ -8066,10 +7758,10 @@ 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>results</td>+ <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>+ <td>repeated</td>+ <td><p>The query results. </p></td></tr></tbody>@@ -8079,7 +7771,7 @@ If this field is omitted, there are no subsequent pages. </p></td>- <h3 id="bytebase.v1.Rollout">Rollout</h3>+ <h3 id="bytebase.v1.Advice">Advice</h3><p></p>@@ -8090,89 +7782,53 @@ 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><a href="#string">string</a></td>+ <td>status</td>+ <td><a href="#bytebase.v1.Advice.Level">Advice.Level</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>+ <td><p>The advice level. </p></td></tr><tr>- <td>create_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>code</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p> </p></td>+ <td><p>The advice code. </p></td></tr><tr>- <td>update_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>title</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The advice title. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.Stage">Stage</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>content</td><td><a href="#string">string</a></td><td></td>- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}-Use "-" for {stage} when the stage has no environment or deleted environment. </p></td>+ <td><p>The advice content. </p></td></tr><tr>- <td>id</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>id is the environment id of the stage.-e.g., "prod".-Use "-" when the stage has no environment or deleted environment. </p></td>+ <td><p>The start_position is inclusive and the end_position is exclusive.+TODO: use range instead </p></td></tr><tr>- <td>environment</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>environment is the environment of the stage.-Format: environments/{environment} for valid environments, or "environments/-" for stages without environment or with deleted environments. </p></td>+ <td><p> </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>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>@@ -8182,7 +7838,7 @@ Format: environments/{environment} for valid environments, or "environments/- <h3 id="bytebase.v1.Task">Task</h3>+ <h3 id="bytebase.v1.ExportRequest">ExportRequest</h3><p></p>@@ -8196,97 +7852,72 @@ Format: environments/{environment} for valid environments, or "environments/<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>+ <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>spec_id</td>+ <td>statement</td><td><a href="#string">string</a></td><td></td>- <td><p>A UUID4 string that uniquely identifies the Spec. </p></td>+ <td><p>The SQL statement to execute. </p></td></tr><tr>- <td>status</td>- <td><a href="#bytebase.v1.Task.Status">Task.Status</a></td>+ <td>limit</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>Status is the status of the task. </p></td>+ <td><p>The maximum number of rows to return. </p></td></tr><tr>- <td>skipped_reason</td>- <td><a href="#string">string</a></td>+ <td>format</td>+ <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td><td></td>- <td><p>The reason why the task was skipped. </p></td>+ <td><p>The export format. </p></td></tr><tr>- <td>type</td>- <td><a href="#bytebase.v1.Task.Type">Task.Type</a></td>+ <td>admin</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p> </p></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>target</td>+ <td>password</td><td><a href="#string">string</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>- </tr>-- <tr>- <td>database_create</td>- <td><a href="#bytebase.v1.Task.DatabaseCreate">Task.DatabaseCreate</a></td>- <td></td>- <td><p> </p></td>+ <td><p>The zip password provide by users. </p></td></tr><tr>- <td>database_update</td>- <td><a href="#bytebase.v1.Task.DatabaseUpdate">Task.DatabaseUpdate</a></td>+ <td>data_source_id</td>+ <td><a href="#string">string</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>+ <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>run_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>schema</td>+ <td><a href="#string">string</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>The default schema to search objects. Equals to the current schema in+Oracle and search path in Postgres. </p></td></tr>- </tbody>- </table>------ <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>container</td><td><a href="#string">string</a></td>- <td></td>- <td><p>Format: projects/{project}/sheets/{sheet} </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>@@ -8296,8 +7927,8 @@ If there are no task runs or the task run is not scheduled, it will be empty. </- <h3 id="bytebase.v1.Task.DatabaseUpdate">Task.DatabaseUpdate</h3>- <p>Payload for updating a database schema.</p>+ <h3 id="bytebase.v1.ExportResponse">ExportResponse</h3>+ <p></p><table class="field-table">@@ -8307,17 +7938,19 @@ If there are no task runs or the task run is not scheduled, it will be empty. </<tbody><tr>- <td>sheet</td>- <td><a href="#string">string</a></td>+ <td>content</td>+ <td><a href="#bytes">bytes</a></td><td></td>- <td><p>Format: projects/{project}/sheets/{sheet} </p></td>+ <td><p>The export file content. </p></td></tr><tr>- <td>release</td>+ <td>applied_access_grant</td><td><a href="#string">string</a></td><td></td>- <td><p>Format: projects/{project}/releases/{release} </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>@@ -8327,7 +7960,7 @@ 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.MaskingReason">MaskingReason</h3><p></p>@@ -8338,77 +7971,52 @@ If there are no task runs or the task run is not scheduled, it will be empty. </<tbody><tr>- <td>name</td>+ <td>semantic_type_id</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 semantic type that triggered masking (e.g., "SSN", "email", "phone"). </p></td></tr><tr>- <td>creator</td>+ <td>semantic_type_title</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>update_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p> </p></td>+ <td><p>Human-readable semantic type title. </p></td></tr><tr>- <td>status</td>- <td><a href="#bytebase.v1.TaskRun.Status">TaskRun.Status</a></td>+ <td>masking_rule_id</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The current execution status of the task run. </p></td>+ <td><p>The masking rule ID that matched (if applicable). </p></td></tr><tr>- <td>detail</td>+ <td>algorithm</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>+ <td><p>The masking algorithm used. </p></td></tr><tr>- <td>start_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>context</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The time when the task run started execution. </p></td>+ <td><p>Additional context (e.g., "Matched global rule: PII Protection"). </p></td></tr><tr>- <td>has_prior_backup</td>- <td><a href="#bool">bool</a></td>+ <td>classification_level</td>+ <td><a href="#int32">int32</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><p>The classification level that triggered masking. </p></td></tr><tr>- <td>scheduler_info</td>- <td><a href="#bytebase.v1.TaskRun.SchedulerInfo">TaskRun.SchedulerInfo</a></td>+ <td>semantic_type_icon</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>Icon associated with the semantic type (if any). </p></td></tr></tbody>@@ -8418,8 +8026,8 @@ 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.QueryOption">QueryOption</h3>+ <p></p><table class="field-table">@@ -8429,17 +8037,17 @@ 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>redis_run_commands_on</td>+ <td><a href="#bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</a></td><td></td>- <td><p>The time when the scheduling info was reported. </p></td>+ <td><p> </p></td></tr><tr>- <td>waiting_cause</td>- <td><a href="#bytebase.v1.TaskRun.SchedulerInfo.WaitingCause">TaskRun.SchedulerInfo.WaitingCause</a></td>+ <td>mssql_explain_format</td>+ <td><a href="#bytebase.v1.QueryOption.MSSQLExplainFormat">QueryOption.MSSQLExplainFormat</a></td><td></td>- <td><p>The cause for the task run waiting. </p></td>+ <td><p> </p></td></tr></tbody>@@ -8449,8 +8057,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.QueryRequest">QueryRequest</h3>+ <p></p><table class="field-table">@@ -8460,10 +8068,67 @@ 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 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>@@ -8473,7 +8138,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.QueryResponse">QueryResponse</h3><p></p>@@ -8484,17 +8149,19 @@ This can only be set when creating the task run calling BatchRunTasks. </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}/tasks/{task}/taskRuns/{taskRun}/log </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><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>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>@@ -8504,7 +8171,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.QueryResult">QueryResult</h3><p></p>@@ -8515,87 +8182,96 @@ 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>+ <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>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>+ <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>replica_id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The replica ID for this log entry. </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>schema_dump</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.SchemaDump">TaskRunLogEntry.SchemaDump</a></td>+ <td>rows_count</td>+ <td><a href="#int64">int64</a></td><td></td>- <td><p>Schema dump details (if type is SCHEMA_DUMP). </p></td>+ <td><p> </p></td></tr><tr>- <td>command_execute</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.CommandExecute">TaskRunLogEntry.CommandExecute</a></td>+ <td>error</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Command execution details (if type is COMMAND_EXECUTE). </p></td>+ <td><p>The error message if the query failed. </p></td></tr><tr>- <td>database_sync</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.DatabaseSync">TaskRunLogEntry.DatabaseSync</a></td>+ <td>latency</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td><td></td>- <td><p>Database sync details (if type is DATABASE_SYNC). </p></td>+ <td><p>The time it takes to execute the query. </p></td></tr><tr>- <td>transaction_control</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.TransactionControl">TaskRunLogEntry.TransactionControl</a></td>+ <td>statement</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Transaction control details (if type is TRANSACTION_CONTROL). </p></td>+ <td><p>The query statement for the result. </p></td></tr><tr>- <td>prior_backup</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup">TaskRunLogEntry.PriorBackup</a></td>+ <td>postgres_error</td>+ <td><a href="#bytebase.v1.QueryResult.PostgresError">QueryResult.PostgresError</a></td><td></td>- <td><p>Prior backup details (if type is PRIOR_BACKUP). </p></td>+ <td><p> </p></td></tr><tr>- <td>retry_info</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.RetryInfo">TaskRunLogEntry.RetryInfo</a></td>+ <td>syntax_error</td>+ <td><a href="#bytebase.v1.QueryResult.SyntaxError">QueryResult.SyntaxError</a></td><td></td>- <td><p>Retry information details (if type is RETRY_INFO). </p></td>+ <td><p> </p></td></tr><tr>- <td>compute_diff</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.ComputeDiff">TaskRunLogEntry.ComputeDiff</a></td>+ <td>permission_denied</td>+ <td><a href="#bytebase.v1.PermissionDeniedDetail">PermissionDeniedDetail</a></td><td></td>- <td><p>Compute diff details (if type is COMPUTE_DIFF). </p></td>+ <td><p> </p></td></tr><tr>- <td>release_file_execute</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.ReleaseFileExecute">TaskRunLogEntry.ReleaseFileExecute</a></td>+ <td>command_error</td>+ <td><a href="#bytebase.v1.QueryResult.CommandError">QueryResult.CommandError</a></td><td></td>- <td><p>Release file execution details (if type is RELEASE_FILE_EXECUTE). </p></td>+ <td><p> </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>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's RAISE NOTICE, MSSQL's PRINT, or Oracle'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>@@ -8605,8 +8281,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.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">@@ -8616,33 +8292,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 "SELECT 你好;" 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>command_type</td>+ <td><a href="#bytebase.v1.QueryResult.CommandError.Type">QueryResult.CommandError.Type</a></td><td></td>- <td><p>The response from executing the command. </p></td>+ <td><p>Disallowed command_type. </p></td></tr></tbody>@@ -8652,8 +8305,8 @@ Example: For "SELECT 你好;" 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.QueryResult.Message">QueryResult.Message</h3>+ <p></p><table class="field-table">@@ -8663,32 +8316,17 @@ Example: For "SELECT 你好;" 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>level</td>+ <td><a href="#bytebase.v1.QueryResult.Message.Level">QueryResult.Message.Level</a></td><td></td>- <td><p>When the response was logged. </p></td>+ <td><p> </p></td></tr><tr>- <td>error</td>+ <td>content</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't support it. Caller should fallback to `affected_rows` in that case. </p></td>+ <td><p> </p></td></tr></tbody>@@ -8698,8 +8336,8 @@ Example: For "SELECT 你好;" 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.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">@@ -8709,145 +8347,122 @@ Example: For "SELECT 你好;" 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>severity</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>When diff computation started. </p></td>+ <td><p> </p></td></tr><tr>- <td>end_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>code</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>When diff computation ended. </p></td>+ <td><p> </p></td></tr><tr>- <td>error</td>+ <td>message</td><td><a href="#string">string</a></td><td></td>- <td><p>Error message if computation failed. </p></td>+ <td><p> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.TaskRunLogEntry.DatabaseSync">TaskRunLogEntry.DatabaseSync</h3>- <p>Database synchronization 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>detail</td>+ <td><a href="#string">string</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>hint</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>When the database sync started. </p></td>+ <td><p> </p></td></tr><tr>- <td>end_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>position</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>When the database sync ended. </p></td>+ <td><p> </p></td></tr><tr>- <td>error</td>+ <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>Error message if sync failed. </p></td>+ <td><p> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.TaskRunLogEntry.GhostMigration">TaskRunLogEntry.GhostMigration</h3>- <p>gh-ost migration 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>where</td>+ <td><a href="#string">string</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>schema_name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>When the gh-ost migration started. </p></td>+ <td><p> </p></td></tr><tr>- <td>end_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>table_name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>When the gh-ost migration ended. </p></td>+ <td><p> </p></td></tr><tr>- <td>error</td>+ <td>column_name</td><td><a href="#string">string</a></td><td></td>- <td><p>Error message if the gh-ost migration failed. </p></td>+ <td><p> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup">TaskRunLogEntry.PriorBackup</h3>- <p>Prior backup 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>data_type_name</td>+ <td><a href="#string">string</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>constraint_name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>When the backup started. </p></td>+ <td><p> </p></td></tr><tr>- <td>end_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>file</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>When the backup ended. </p></td>+ <td><p> </p></td></tr><tr>- <td>prior_backup_detail</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail">TaskRunLogEntry.PriorBackup.PriorBackupDetail</a></td>+ <td>line</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The backup details. </p></td>+ <td><p> </p></td></tr><tr>- <td>error</td>+ <td>routine</td><td><a href="#string">string</a></td><td></td>- <td><p>Error message if the backup failed. </p></td>+ <td><p> </p></td></tr></tbody>@@ -8857,8 +8472,8 @@ Example: For "SELECT 你好;" 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.QueryResult.SyntaxError">QueryResult.SyntaxError</h3>+ <p>Syntax error with position information for editor highlighting</p><table class="field-table">@@ -8868,10 +8483,10 @@ Example: For "SELECT 你好;" 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>start_position</td>+ <td><a href="#bytebase.v1.Position">Position</a></td>+ <td></td>+ <td><p>Position information for highlighting in editor </p></td></tr></tbody>@@ -8881,8 +8496,8 @@ Example: For "SELECT 你好;" 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.QueryRow">QueryRow</h3>+ <p></p><table class="field-table">@@ -8892,31 +8507,10 @@ Example: For "SELECT 你好;" 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></td>- <td><p>The original table information. </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></td>- <td><p>The target backup table information. </p></td>- </tr>-- <tr>- <td>start_position</td>- <td><a href="#bytebase.v1.Position">Position</a></td>- <td></td>- <td><p>The start position in the SQL statement. </p></td>- </tr>-- <tr>- <td>end_position</td>- <td><a href="#bytebase.v1.Position">Position</a></td>- <td></td>- <td><p>The end position in the SQL statement. </p></td>+ <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></tr></tbody>@@ -8926,8 +8520,8 @@ Example: For "SELECT 你好;" 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.RowValue">RowValue</h3>+ <p></p><table class="field-table">@@ -8937,163 +8531,98 @@ Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents<tbody><tr>- <td>database</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 database information.-Format: instances/{instance}/databases/{database} or projects/{project}/instances/{instance}/databases/{database} </p></td>+ <td><p> </p></td></tr><tr>- <td>schema</td>- <td><a href="#string">string</a></td>+ <td>bool_value</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The schema name. </p></td>+ <td><p> </p></td></tr><tr>- <td>table</td>- <td><a href="#string">string</a></td>+ <td>bytes_value</td>+ <td><a href="#bytes">bytes</a></td><td></td>- <td><p>The table name. </p></td>+ <td><p> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.TaskRunLogEntry.ReleaseFileExecute">TaskRunLogEntry.ReleaseFileExecute</h3>- <p>Release file 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>version</td>- <td><a href="#string">string</a></td>+ <td>double_value</td>+ <td><a href="#double">double</a></td><td></td>- <td><p>The version of the file being executed (e.g., "0001"). </p></td>+ <td><p> </p></td></tr><tr>- <td>file_path</td>- <td><a href="#string">string</a></td>+ <td>float_value</td>+ <td><a href="#float">float</a></td><td></td>- <td><p>The file path within the release (e.g., "2.2/V0001_create_table.sql"). </p></td>+ <td><p> </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>error</td>- <td><a href="#string">string</a></td>+ <td>int32_value</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The error that triggered the retry. </p></td>+ <td><p> </p></td></tr><tr>- <td>retry_count</td>- <td><a href="#int32">int32</a></td>+ <td>int64_value</td>+ <td><a href="#int64">int64</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>string_value</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Maximum number of retries allowed. </p></td>+ <td><p> </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>start_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>uint32_value</td>+ <td><a href="#uint32">uint32</a></td><td></td>- <td><p>When the schema dump started. </p></td>+ <td><p> </p></td></tr><tr>- <td>end_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>uint64_value</td>+ <td><a href="#uint64">uint64</a></td><td></td>- <td><p>When the schema dump ended. </p></td>+ <td><p> </p></td></tr><tr>- <td>error</td>- <td><a href="#string">string</a></td>+ <td>value_value</td>+ <td><a href="#google.protobuf.Value">google.protobuf.Value</a></td><td></td>- <td><p>Error message if the schema dump failed. </p></td>+ <td><p>value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.TaskRunLogEntry.TransactionControl">TaskRunLogEntry.TransactionControl</h3>- <p>Transaction control 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>type</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.TransactionControl.Type">TaskRunLogEntry.TransactionControl.Type</a></td>+ <td>timestamp_value</td>+ <td><a href="#bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</a></td><td></td>- <td><p>The type of transaction control. </p></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>error</td>- <td><a href="#string">string</a></td>+ <td>timestamp_tz_value</td>+ <td><a href="#bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</a></td><td></td>- <td><p>Error message if the operation failed. </p></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>@@ -9103,7 +8632,7 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance- <h3 id="bytebase.v1.TaskRunSession">TaskRunSession</h3>+ <h3 id="bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</h3><p></p>@@ -9114,55 +8643,17 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance<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}/session </p></td>- </tr>-- <tr>- <td>postgres</td>- <td><a href="#bytebase.v1.TaskRunSession.Postgres">TaskRunSession.Postgres</a></td>+ <td>google_timestamp</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>PostgreSQL session information. </p></td>+ <td><p> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.TaskRunSession.Postgres">TaskRunSession.Postgres</h3>- <p>PostgreSQL session 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>session</td>- <td><a href="#bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</a></td>+ <td>accuracy</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>`session` is the session of the task run executing commands. </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>- </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><p>The accuracy is the number of digits after the decimal point. </p></td></tr></tbody>@@ -9172,8 +8663,8 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance- <h3 id="bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</h3>- <p>PostgreSQL session information read from `pg_stat_activity`.</p>+ <h3 id="bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</h3>+ <p></p><table class="field-table">@@ -9183,101 +8674,36 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance<tbody><tr>- <td>pid</td>- <td><a href="#string">string</a></td>+ <td>google_timestamp</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>Process ID of the session. </p></td>- </tr>-- <tr>- <td>blocked_by_pids</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>PIDs of sessions blocking this session. </p></td>+ <td><p> </p></td></tr><tr>- <td>query</td>+ <td>zone</td><td><a href="#string">string</a></td><td></td>- <td><p>Current query being executed. </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>- </tr>-- <tr>- <td>wait_event_type</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Wait event type if session is waiting. </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>- </tr>-- <tr>- <td>datname</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Database name. </p></td>- </tr>-- <tr>- <td>usename</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>User name. </p></td>+ <td><p>Zone is the time zone abbreviations in timezone database such as "PDT",+"PST". https://en.wikipedia.org/wiki/List_of_tz_database_time_zones We+retrieve the time zone information from the timestamptz field in the+database. A timestamp is in UTC or epoch time, and with zone info, we can+convert it to a local time string. Zone and offset are returned by+time.Time.Zone() </p></td></tr><tr>- <td>application_name</td>- <td><a href="#string">string</a></td>+ <td>offset</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>Application name. </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>- </tr>-- <tr>- <td>client_port</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Client port number. </p></td>+ <td><p>The offset is in seconds east of UTC </p></td></tr><tr>- <td>backend_start</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>accuracy</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>When the backend process started. </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>- </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><p> </p></td></tr></tbody>@@ -9289,8 +8715,8 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance- <h3 id="bytebase.v1.Task.Status">Task.Status</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>@@ -9298,57 +8724,64 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance<tbody><tr>- <td>STATUS_UNSPECIFIED</td>+ <td>ADVICE_LEVEL_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified status.</p></td>+ <td><p>Unspecified advice level.</p></td></tr><tr>- <td>NOT_STARTED</td>+ <td>SUCCESS</td><td>1</td>- <td><p>Task has not started and is awaiting its turn in the deployment sequence.</p></td>+ <td><p>Success status indicating the check passed without issues.</p></td></tr><tr>- <td>PENDING</td>+ <td>WARNING</td><td>2</td>- <td><p>Task is ready to run and waiting for approval or scheduled time.</p></td>+ <td><p>Warning status indicating potential issues that should be reviewed.</p></td></tr><tr>- <td>RUNNING</td>+ <td>ERROR</td><td>3</td>- <td><p>Task is currently executing.</p></td>+ <td><p>Error status indicating critical issues that must be addressed.</p></td></tr>- <tr>- <td>DONE</td>- <td>4</td>- <td><p>Task completed successfully.</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>FAILED</td>- <td>5</td>- <td><p>Task execution failed with errors.</p></td>+ <td>RULE_TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified rule type.</p></td></tr><tr>- <td>CANCELED</td>- <td>6</td>- <td><p>Task execution was canceled by a user.</p></td>+ <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>SKIPPED</td>- <td>7</td>- <td><p>Task was skipped and will not be executed.</p></td>+ <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.Task.Type">Task.Type</h3>+ <h3 id="bytebase.v1.QueryOption.MSSQLExplainFormat">QueryOption.MSSQLExplainFormat</h3><p></p><table class="enum-table"><thead>@@ -9357,35 +8790,27 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance<tbody><tr>- <td>TYPE_UNSPECIFIED</td>+ <td>MSSQL_EXPLAIN_FORMAT_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified task type.</p></td>+ <td><p>defaults to SHOWPLAN_ALL</p></td></tr><tr>- <td>GENERAL</td>+ <td>MSSQL_EXPLAIN_FORMAT_ALL</td><td>1</td>- <td><p>General task for miscellaneous operations.</p></td>+ <td><p>SHOWPLAN_ALL</p></td></tr><tr>- <td>DATABASE_CREATE</td>+ <td>MSSQL_EXPLAIN_FORMAT_XML</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>+ <td><p>SHOWPLAN_XML</p></td></tr></tbody></table>- <h3 id="bytebase.v1.TaskRun.Status">TaskRun.Status</h3>+ <h3 id="bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</h3><p></p><table class="enum-table"><thead>@@ -9394,52 +8819,28 @@ Use payload DatabaseUpdate.</p></td><tbody><tr>- <td>STATUS_UNSPECIFIED</td>+ <td>REDIS_RUN_COMMANDS_ON_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified status.</p></td>+ <td><p>UNSPECIFIED defaults to SINGLE_NODE.</p></td></tr><tr>- <td>PENDING</td>+ <td>SINGLE_NODE</td><td>1</td>- <td><p>Task run is queued and waiting to start execution.</p></td>+ <td><p>Execute Redis commands on a single node in the cluster.</p></td></tr><tr>- <td>RUNNING</td>+ <td>ALL_NODES</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>+ <td><p>Execute Redis commands on all nodes in the cluster for cluster-wide operations.</p></td></tr></tbody></table>- <h3 id="bytebase.v1.TaskRunLogEntry.TransactionControl.Type">TaskRunLogEntry.TransactionControl.Type</h3>- <p>Transaction control type.</p>+ <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>@@ -9449,32 +8850,32 @@ Use payload DatabaseUpdate.</p></td><tr><td>TYPE_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified type.</p></td>+ <td><p></p></td></tr><tr>- <td>BEGIN</td>+ <td>DDL</td><td>1</td>- <td><p>Begin transaction.</p></td>+ <td><p></p></td></tr><tr>- <td>COMMIT</td>+ <td>DML</td><td>2</td>- <td><p>Commit transaction.</p></td>+ <td><p></p></td></tr><tr>- <td>ROLLBACK</td>+ <td>NON_READ_ONLY</td><td>3</td>- <td><p>Rollback transaction.</p></td>+ <td><p></p></td></tr></tbody></table>- <h3 id="bytebase.v1.TaskRunLogEntry.Type">TaskRunLogEntry.Type</h3>- <p>The type of log entry.</p>+ <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>@@ -9482,63 +8883,45 @@ Use payload DatabaseUpdate.</p></td><tbody><tr>- <td>TYPE_UNSPECIFIED</td>+ <td>LEVEL_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified type.</p></td>+ <td><p>Unspecified message level.</p></td></tr><tr>- <td>SCHEMA_DUMP</td>+ <td>INFO</td><td>1</td>- <td><p>Schema dump operation.</p></td>+ <td><p>Informational message.</p></td></tr><tr>- <td>COMMAND_EXECUTE</td>+ <td>WARNING</td><td>2</td>- <td><p>Command execution.</p></td>+ <td><p>Warning message indicating potential issues.</p></td></tr><tr>- <td>DATABASE_SYNC</td>+ <td>DEBUG</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>+ <td><p>Debug message for development and troubleshooting.</p></td></tr><tr>- <td>COMPUTE_DIFF</td>- <td>8</td>- <td><p>Schema diff computation.</p></td>+ <td>LOG</td>+ <td>4</td>+ <td><p>General log message.</p></td></tr><tr>- <td>RELEASE_FILE_EXECUTE</td>- <td>9</td>- <td><p>Release file execution.</p></td>+ <td>NOTICE</td>+ <td>5</td>+ <td><p>Notice message for important information.</p></td></tr><tr>- <td>GHOST_MIGRATION</td>- <td>10</td>- <td><p>gh-ost online migration.</p></td>+ <td>EXCEPTION</td>+ <td>6</td>+ <td><p>Exception message indicating error conditions.</p></td></tr></tbody>@@ -9548,8 +8931,8 @@ Use payload DatabaseUpdate.</p></td>- <h3 id="bytebase.v1.RolloutService">RolloutService</h3>- <p>RolloutService manages the execution of deployment plans.</p>+ <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>@@ -9557,99 +8940,93 @@ Use payload DatabaseUpdate.</p></td><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>+ <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>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>+ <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>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>+ <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's own query histories)</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>+ <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>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>+ <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's own query history)</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>+ <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>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>+ <td>Method Name</td>+ <td>Option</td></tr>+ </thead>+ <tbody><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>+ <td>SearchQueryHistories</td>+ <td><p>true</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>+ <td>ListQueryHistories</td>+ <td><p>true</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>+ <td>GetQueryHistory</td>+ <td><p>true</p></td></tr>- </tbody>- </table>-+ </tbody>+ </table>+@@ -9668,69 +9045,26 @@ Permissions required: bb.taskRuns.list</p></td><tr>- <td>GetRollout</td>- <td>GET</td>- <td>/v1/{name=projects/*/plans/*/rollout}</td>- <td></td>- </tr>----- <tr>- <td>ListRollouts</td>- <td>GET</td>- <td>/v1/{parent=projects/*}/rollouts</td>- <td></td>- </tr>----- <tr>- <td>CreateRollout</td>+ <td>Query</td><td>POST</td>- <td>/v1/{parent=projects/*/plans/*}/rollout</td>+ <td>/v1/{name=instances/*/databases/*}:query</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>+ <td>Query</td>+ <td>POST</td>+ <td>/v1/{name=projects/*/instances/*/databases/*}:query</td>+ <td>*</td></tr><tr>- <td>GetTaskRunSession</td>+ <td>AdminExecute</td><td>GET</td>- <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}/session</td>+ <td>/v1:adminExecute</td><td></td></tr>@@ -9738,56 +9072,122 @@ Permissions required: bb.taskRuns.list</p></td><tr>- <td>BatchRunTasks</td>+ <td>Export</td><td>POST</td>- <td>/v1/{parent=projects/*/plans/*/rollout/stages/*}/tasks:batchRun</td>+ <td>/v1/{name=instances/*/databases/*}:export</td><td>*</td></tr>---<tr>- <td>BatchSkipTasks</td>+ <td>Export</td><td>POST</td>- <td>/v1/{parent=projects/*/plans/*/rollout/stages/*}/tasks:batchSkip</td>+ <td>/v1/{name=projects/*/instances/*/databases/*}:export</td><td>*</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>+ <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 plan check run to cancel.+Format: projects/{project}/plans/{plan}/planCheckRun </p></td>+ </tr>- <tr>- <td>BatchCancelTaskRuns</td>- <td>POST</td>- <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*}/taskRuns:batchCancel</td>- <td>*</td>- </tr>--+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.CancelPlanCheckRunResponse">CancelPlanCheckRunResponse</h3>+ <p></p>++++++ <h3 id="bytebase.v1.CreatePlanRequest">CreatePlanRequest</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 project where this plan will be created.+Format: projects/{project} </p></td>+ </tr>- <tr>- <td>PreviewTaskRunRollback</td>- <td>POST</td>- <td>/v1/{name=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}:previewRollback</td>- <td>*</td>- </tr>+ <tr>+ <td>plan</td>+ <td><a href="#bytebase.v1.Plan">Plan</a></td>+ <td></td>+ <td><p>The plan to create. </p></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.GetPlanCheckRunRequest">GetPlanCheckRunRequest</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 plan check run to retrieve.+Format: projects/{project}/plans/{plan}/planCheckRun </p></td>+ </tr>++ </tbody>+ </table>+++- <h3 id="bytebase.v1.GetQueryHistoryRequest">GetQueryHistoryRequest</h3>+ <h3 id="bytebase.v1.GetPlanRequest">GetPlanRequest</h3><p></p>@@ -9801,8 +9201,8 @@ Permissions required: bb.taskRuns.list</p></td><td>name</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>The name of the plan to retrieve.+Format: projects/{project}/plans/{plan} </p></td></tr></tbody>@@ -9812,7 +9212,7 @@ Format: projects/{project}/queryHistories/{id} </p></td>- <h3 id="bytebase.v1.ListQueryHistoriesRequest">ListQueryHistoriesRequest</h3>+ <h3 id="bytebase.v1.ListPlansRequest">ListPlansRequest</h3><p></p>@@ -9826,20 +9226,18 @@ Format: projects/{project}/queryHistories/{id} </p></td><td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The parent project whose query histories are listed.+ <td><p>The parent, which owns this collection of plans.Format: projects/{project}-Use "projects/-" to list query histories across all projects-(https://google.aip.dev/159); this requires the bb.queryHistories.list-permission on the workspace. </p></td>+Use "projects/-" to list all plans from all projects. </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.+ <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>@@ -9847,22 +9245,34 @@ The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td><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>+ <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>filter</td><td><a href="#string">string</a></td><td></td>- <td><p>Filter is the filter to apply on the list query histories.+ <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 filter:-- creator: the user full name in "users/{email}" format, support "==" operator.+Supported filters:+- creator: the plan creator full name in "users/{email or id}" format, support "==" operator.+- create_time: the plan create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.+- has_rollout: whether the plan has rollout, support "==" operator, the value should be "true" or "false".+- title: the plan title, support "==" operator for exact match and ".contains()" operator for case-insensitive substring match.+- spec_type: the plan spec config type, support "==" operator, the value should be "create_database_config" or "change_database_config".+- state: the plan state, support "==" operator, the value should be "ACTIVE" or "DELETED".For example:-creator == "users/{email}" </p></td>+creator == "users/[email protected]" && create_time >= "2025-01-02T15:04:05Z07:00"+title == "My Plan"+title.contains("database migration")+spec_type == "change_database_config"+state == "ACTIVE" </p></td></tr></tbody>@@ -9872,7 +9282,7 @@ creator == "users/{email}" </p></td>- <h3 id="bytebase.v1.ListQueryHistoriesResponse">ListQueryHistoriesResponse</h3>+ <h3 id="bytebase.v1.ListPlansResponse">ListPlansResponse</h3><p></p>@@ -9883,19 +9293,18 @@ creator == "users/{email}" </p></td><tbody><tr>- <td>query_histories</td>- <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>+ <td>plans</td>+ <td><a href="#bytebase.v1.Plan">Plan</a></td><td>repeated</td>- <td><p>The list of query histories. </p></td>+ <td><p>The plans 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 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>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>@@ -9905,7 +9314,7 @@ Pass this value in the page_token field in the subsequent call to- <h3 id="bytebase.v1.QueryHistory">QueryHistory</h3>+ <h3 id="bytebase.v1.Plan">Plan</h3><p></p>@@ -9919,23 +9328,53 @@ Pass this value in the page_token field in the subsequent call to<td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name for the query history.-Format: projects/{project}/queryHistories/{id} </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>database</td>+ <td>state</td>+ <td><a href="#bytebase.v1.State">State</a></td>+ <td></td>+ <td><p>The state of the plan. </p></td>+ </tr>++ <tr>+ <td>issue</td><td><a href="#string">string</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 issue associated with the plan.+Can be empty.+Format: projects/{project}/issues/{issue} </p></td>+ </tr>++ <tr>+ <td>title</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The title of the plan. </p></td>+ </tr>++ <tr>+ <td>description</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The description of the plan. </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><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Format: users/[email protected] </p></td></tr><tr>@@ -9946,31 +9385,62 @@ Format: instances/{instance}/databases/{databaseName} or projects/{project}/inst</tr><tr>- <td>statement</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>error</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p> </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>duration</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td>has_rollout</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p> </p></td>+ <td><p>Whether the plan has started the rollout. </p></td></tr><tr>- <td>type</td>- <td><a href="#bytebase.v1.QueryHistory.Type">QueryHistory.Type</a></td>+ <td>approval_status</td>+ <td><a href="#bytebase.v1.ApprovalStatus">ApprovalStatus</a></td><td></td>- <td><p> </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>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><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></tr></tbody>@@ -9980,7 +9450,7 @@ Format: instances/{instance}/databases/{databaseName} or projects/{project}/inst- <h3 id="bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</h3>+ <h3 id="bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</h3><p></p>@@ -9991,56 +9461,35 @@ Format: instances/{instance}/databases/{databaseName} or projects/{project}/inst<tbody><tr>- <td>parent</td>+ <td>targets</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 "projects/-" is not supported; use-ListQueryHistories for cross-project reads. </p></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>page_size</td>- <td><a href="#int32">int32</a></td>+ <td>sheet</td>+ <td><a href="#string">string</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>The resource name of the sheet.+Format: projects/{project}/sheets/{sheet} </p></td></tr><tr>- <td>page_token</td>+ <td>release</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 resource name of the release.+Format: projects/{project}/releases/{release} </p></td></tr><tr>- <td>filter</td>- <td><a href="#string">string</a></td>+ <td>enable_prior_backup</td>+ <td><a href="#bool">bool</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 "projects/{id}" format, support "==" operator.-- database: the database full name in "instances/{id}/databases/{name}" or "projects/{project}/instances/{id}/databases/{name}" format, support "==" operator.-- instance: the instance full name in "instances/{id}" or "projects/{project}/instances/{id}" format, support "==" operator.-- type: the type, should be "QUERY" or "EXPORT", support "==" operator.-- statement: the SQL statement, support "==" and ".contains()" operators.--For example:-project == "projects/{project}"-database == "instances/{instance}/databases/{database}"-instance == "instances/{instance}"-type == "QUERY"-type == "EXPORT"-statement == "SELECT 1;"-statement.contains("select")-type == "QUERY" && statement.contains("select") </p></td>+ <td><p>If set, a backup of the modified data will be created automatically before any changes are applied. </p></td></tr></tbody>@@ -10050,7 +9499,7 @@ type == "QUERY" && statement.contains("select") </p></td- <h3 id="bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</h3>+ <h3 id="bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</h3><p></p>@@ -10061,19 +9510,62 @@ type == "QUERY" && statement.contains("select") </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>target</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></tr><tr>- <td>next_page_token</td>+ <td>database</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-`ListQueryHistory` method to retrieve the next page of history. </p></td>+ <td><p>The name of the database to create. </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>+ </tr>++ <tr>+ <td>character_set</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>character_set is the character set of the database. </p></td>+ </tr>++ <tr>+ <td>collation</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>collation is the collation of the database. </p></td>+ </tr>++ <tr>+ <td>cluster</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>cluster is the cluster of the database. This is only applicable to ClickHouse for "ON CLUSTER <<cluster>>". </p></td>+ </tr>++ <tr>+ <td>owner</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 "WITH OWNER <<owner>>". </p></td>+ </tr>++ <tr>+ <td>environment</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The environment resource.+Format: environments/prod where prod is the environment resource ID. </p></td></tr></tbody>@@ -10083,135 +9575,38 @@ Pass this value in the page_token field in the subsequent call to+ <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>key</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>value</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>+++- <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'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's own query history)</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>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>GetQueryHistory</td>- <td>GET</td>- <td>/v1/{name=projects/*/queryHistories/*}</td>- <td></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>+ <h3 id="bytebase.v1.Plan.RolloutStageSummary">Plan.RolloutStageSummary</h3><p></p>@@ -10222,42 +9617,18 @@ Permissions required: None (only returns the caller's own query history)</p><tbody><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>stage</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>+ <td><p>The stage resource name.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </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>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>@@ -10267,7 +9638,7 @@ CosmosDB only. </p></td>- <h3 id="bytebase.v1.AdminExecuteResponse">AdminExecuteResponse</h3>+ <h3 id="bytebase.v1.Plan.Spec">Plan.Spec</h3><p></p>@@ -10278,10 +9649,24 @@ 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>+ <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></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>change_database_config</td>+ <td><a href="#bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</a></td>+ <td></td>+ <td><p> </p></td></tr></tbody>@@ -10291,7 +9676,7 @@ CosmosDB only. </p></td>- <h3 id="bytebase.v1.Advice">Advice</h3>+ <h3 id="bytebase.v1.Plan.TaskStatusCount">Plan.TaskStatusCount</h3><p></p>@@ -10303,52 +9688,16 @@ CosmosDB only. </p></td><tr><td>status</td>- <td><a href="#bytebase.v1.Advice.Level">Advice.Level</a></td>+ <td><a href="#bytebase.v1.Task.Status">Task.Status</a></td><td></td>- <td><p>The advice level. </p></td>+ <td><p>The task status. </p></td></tr><tr>- <td>code</td>+ <td>count</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></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>+ <td><p>The number of tasks in the status. </p></td></tr></tbody>@@ -10358,7 +9707,7 @@ TODO: use range instead </p></td>- <h3 id="bytebase.v1.ExportRequest">ExportRequest</h3>+ <h3 id="bytebase.v1.PlanCheckRun">PlanCheckRun</h3><p></p>@@ -10372,72 +9721,35 @@ TODO: use range instead </p></td><td>name</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>- </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>+ <td><p>Format: projects/{project}/plans/{plan}/planCheckRun </p></td></tr><tr>- <td>format</td>- <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>+ <td>status</td>+ <td><a href="#bytebase.v1.PlanCheckRun.Status">PlanCheckRun.Status</a></td><td></td>- <td><p>The export format. </p></td>+ <td><p> </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>results</td>+ <td><a href="#bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</a></td>+ <td>repeated</td>+ <td><p> </p></td></tr><tr>- <td>password</td>+ <td>error</td><td><a href="#string">string</a></td><td></td>- <td><p>The zip password provide by users. </p></td>+ <td><p>error is set if the Status is FAILED. </p></td></tr><tr>- <td>data_source_id</td>- <td><a href="#string">string</a></td>+ <td>create_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</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>+ <td><p> </p></td></tr></tbody>@@ -10447,7 +9759,7 @@ CosmosDB only. </p></td>- <h3 id="bytebase.v1.ExportResponse">ExportResponse</h3>+ <h3 id="bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</h3><p></p>@@ -10458,85 +9770,60 @@ CosmosDB only. </p></td><tbody><tr>- <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>status</td>+ <td><a href="#bytebase.v1.Advice.Level">Advice.Level</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><p> </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>title</td><td><a href="#string">string</a></td><td></td>- <td><p>The semantic type that triggered masking (e.g., "SSN", "email", "phone"). </p></td>+ <td><p> </p></td></tr><tr>- <td>semantic_type_title</td>+ <td>content</td><td><a href="#string">string</a></td><td></td>- <td><p>Human-readable semantic type title. </p></td>+ <td><p> </p></td></tr><tr>- <td>masking_rule_id</td>- <td><a href="#string">string</a></td>+ <td>code</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The masking rule ID that matched (if applicable). </p></td>+ <td><p> </p></td></tr><tr>- <td>algorithm</td>+ <td>target</td><td><a href="#string">string</a></td><td></td>- <td><p>The masking algorithm used. </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>context</td>- <td><a href="#string">string</a></td>+ <td>type</td>+ <td><a href="#bytebase.v1.PlanCheckRun.Result.Type">PlanCheckRun.Result.Type</a></td><td></td>- <td><p>Additional context (e.g., "Matched global rule: PII Protection"). </p></td>+ <td><p> </p></td></tr><tr>- <td>classification_level</td>- <td><a href="#int32">int32</a></td>+ <td>sql_summary_report</td>+ <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</a></td><td></td>- <td><p>The classification level that triggered masking. </p></td>+ <td><p> </p></td></tr><tr>- <td>semantic_type_icon</td>- <td><a href="#string">string</a></td>+ <td>sql_review_report</td>+ <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</a></td><td></td>- <td><p>Icon associated with the semantic type (if any). </p></td>+ <td><p> </p></td></tr></tbody>@@ -10546,7 +9833,7 @@ Empty when the user was authorized through normal ACL rather than a grant. </p><- <h3 id="bytebase.v1.QueryOption">QueryOption</h3>+ <h3 id="bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</h3><p></p>@@ -10557,15 +9844,15 @@ Empty when the user was authorized through normal ACL rather than a grant. </p><<tbody><tr>- <td>redis_run_commands_on</td>- <td><a href="#bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</a></td>+ <td>start_position</td>+ <td><a href="#bytebase.v1.Position">Position</a></td><td></td>- <td><p> </p></td>+ <td><p>Position of the SQL statement. </p></td></tr><tr>- <td>mssql_explain_format</td>- <td><a href="#bytebase.v1.QueryOption.MSSQLExplainFormat">QueryOption.MSSQLExplainFormat</a></td>+ <td>end_position</td>+ <td><a href="#bytebase.v1.Position">Position</a></td><td></td><td><p> </p></td></tr>@@ -10577,7 +9864,7 @@ Empty when the user was authorized through normal ACL rather than a grant. </p><- <h3 id="bytebase.v1.QueryRequest">QueryRequest</h3>+ <h3 id="bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</h3><p></p>@@ -10588,69 +9875,19 @@ Empty when the user was authorized through normal ACL rather than a grant. </p><<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>+ <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>query_option</td>- <td><a href="#bytebase.v1.QueryOption">QueryOption</a></td>+ <td>affected_rows</td>+ <td><a href="#int64">int64</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>@@ -10658,7 +9895,7 @@ CosmosDB only. </p></td>- <h3 id="bytebase.v1.QueryResponse">QueryResponse</h3>+ <h3 id="bytebase.v1.RunPlanChecksRequest">RunPlanChecksRequest</h3><p></p>@@ -10669,19 +9906,20 @@ 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>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The plan to run plan checks.+Format: projects/{project}/plans/{plan} </p></td></tr><tr>- <td>applied_access_grant</td>+ <td>spec_id</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>+ <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>@@ -10691,7 +9929,14 @@ Empty when the user was authorized through normal ACL rather than a grant. </p><- <h3 id="bytebase.v1.QueryResult">QueryResult</h3>+ <h3 id="bytebase.v1.RunPlanChecksResponse">RunPlanChecksResponse</h3>+ <p></p>++++++ <h3 id="bytebase.v1.UpdatePlanRequest">UpdatePlanRequest</h3><p></p>@@ -10702,96 +9947,876 @@ Empty when the user was authorized through normal ACL rather than a grant. </p><<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>plan</td>+ <td><a href="#bytebase.v1.Plan">Plan</a></td><td></td>- <td><p> </p></td>+ <td><p>The plan to update.++The plan's `name` field is used to identify the plan to update.+Format: projects/{project}/plans/{plan} </p></td></tr><tr>- <td>error</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 error message if the query failed. </p></td>+ <td><p>The list of fields to update. </p></td></tr><tr>- <td>latency</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td>allow_missing</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The time it takes to execute the query. </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>- <tr>- <td>statement</td>+ </tbody>+ </table>++++++++ <h3 id="bytebase.v1.PlanCheckRun.Result.Type">PlanCheckRun.Result.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>STATEMENT_ADVISE</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_SUMMARY_REPORT</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>GHOST_SYNC</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <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>+ </thead>+ <tbody>++ <tr>+ <td>STATUS_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>RUNNING</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>++ <tr>+ <td>CANCELED</td>+ <td>4</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++++++ <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>+ </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>+ </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>+ </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>+ </tr>++ <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>+ </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>+ </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>+ </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>+ </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>GetPlan</td>+ <td>GET</td>+ <td>/v1/{name=projects/*/plans/*}</td>+ <td></td>+ </tr>+++++ <tr>+ <td>ListPlans</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*}/plans</td>+ <td></td>+ </tr>+++++ <tr>+ <td>CreatePlan</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*}/plans</td>+ <td>plan</td>+ </tr>+++++ <tr>+ <td>UpdatePlan</td>+ <td>PATCH</td>+ <td>/v1/{plan.name=projects/*/plans/*}</td>+ <td>plan</td>+ </tr>+++++ <tr>+ <td>GetPlanCheckRun</td>+ <td>GET</td>+ <td>/v1/{name=projects/*/plans/*/planCheckRun}</td>+ <td></td>+ </tr>+++++ <tr>+ <td>RunPlanChecks</td>+ <td>POST</td>+ <td>/v1/{name=projects/*/plans/*}:runPlanChecks</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>CancelPlanCheckRun</td>+ <td>POST</td>+ <td>/v1/{name=projects/*/plans/*/planCheckRun}:cancel</td>+ <td>*</td>+ </tr>+++ </tbody>+ </table>+++++ <div class="file-heading">+ <h2 id="v1/issue_service.proto">v1/issue_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.ApprovalFlow">ApprovalFlow</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>roles</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>The roles required for approval in order. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.ApprovalTemplate">ApprovalTemplate</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>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><a href="#string">string</a></td>+ <td></td>+ <td><p>The title of the approval template. </p></td>+ </tr>++ <tr>+ <td>description</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The description of the approval template. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.ApproveIssueRequest">ApproveIssueRequest</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 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>+ </table>++++++ <h3 id="bytebase.v1.BatchUpdateIssuesStatusRequest">BatchUpdateIssuesStatusRequest</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 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><a href="#string">string</a></td>+ <td></td>+ <td><p>The reason for the status change. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.BatchUpdateIssuesStatusResponse">BatchUpdateIssuesStatusResponse</h3>+ <p></p>++++++ <h3 id="bytebase.v1.CreateIssueCommentRequest">CreateIssueCommentRequest</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 create. </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><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>+ </table>++++++ <h3 id="bytebase.v1.GetIssueRequest">GetIssueRequest</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 retrieve.+Format: projects/{project}/issues/{issue} </p></td>+ </tr>++ <tr>+ <td>force</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>If set to true, bypass cache and fetch the latest data. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.Issue">Issue</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.+Format: projects/{project}/issues/{issue} </p></td>+ </tr>++ <tr>+ <td>title</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The title of the issue. </p></td>+ </tr>++ <tr>+ <td>description</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The description of the issue. </p></td>+ </tr>++ <tr>+ <td>type</td>+ <td><a href="#bytebase.v1.Issue.Type">Issue.Type</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>status</td>+ <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>+ <td></td>+ <td><p>The status of the issue. </p></td>+ </tr>++ <tr>+ <td>approvers</td>+ <td><a href="#bytebase.v1.Issue.Approver">Issue.Approver</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>+ </tr>++ <tr>+ <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>update_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p> </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>+ </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 query statement for the result. </p></td>+ <td><p>The access grant associated with this issue.+Format: projects/{project}/accessGrants/{access_grant} </p></td></tr><tr>- <td>postgres_error</td>- <td><a href="#bytebase.v1.QueryResult.PostgresError">QueryResult.PostgresError</a></td>+ <td>draft</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p> </p></td>+ <td><p>Whether this issue is a Draft Review Issue. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.Issue.Approver">Issue.Approver</h3>+ <p>Approvers and their approval status for the issue.</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.Issue.Approver.Status">Issue.Approver.Status</a></td>+ <td></td>+ <td><p>The new status. </p></td></tr><tr>- <td>syntax_error</td>- <td><a href="#bytebase.v1.QueryResult.SyntaxError">QueryResult.SyntaxError</a></td>+ <td>principal</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Format: users/[email protected] </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.IssueComment">IssueComment</h3>+ <p>A comment on an issue.</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}/issueComments/{issueComment-uid} </p></td>+ </tr>++ <tr>+ <td>comment</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The text content of the comment. </p></td>+ </tr>++ <tr>+ <td>payload</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>TODO: use struct message instead. </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>permission_denied</td>- <td><a href="#bytebase.v1.PermissionDeniedDetail">PermissionDeniedDetail</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>command_error</td>- <td><a href="#bytebase.v1.QueryResult.CommandError">QueryResult.CommandError</a></td>+ <td>creator</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Format: users/{email} </p></td>+ </tr>++ <tr>+ <td>approval</td>+ <td><a href="#bytebase.v1.IssueComment.Approval">IssueComment.Approval</a></td>+ <td></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>+ </table>++++++ <h3 id="bytebase.v1.IssueComment.Approval">IssueComment.Approval</h3>+ <p>Approval event 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>status</td>+ <td><a href="#bytebase.v1.IssueComment.Approval.Status">IssueComment.Approval.Status</a></td><td></td>+ <td><p>The approval status. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.IssueComment.IssueUpdate">IssueComment.IssueUpdate</h3>+ <p>Issue update event 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>from_title</td>+ <td><a href="#string">string</a></td>+ <td>optional</td><td><p> </p></td></tr><tr>- <td>messages</td>- <td><a href="#bytebase.v1.QueryResult.Message">QueryResult.Message</a></td>+ <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>Informational or debug messages returned by the database engine during query execution.-Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle's DBMS_OUTPUT.PUT_LINE. </p></td>+ <td><p> </p></td></tr><tr>- <td>masked</td>- <td><a href="#bytebase.v1.MaskingReason">MaskingReason</a></td>+ <td>to_labels</td>+ <td><a href="#string">string</a></td><td>repeated</td>- <td><p>Masking reasons for each column (empty for non-masked columns). </p></td>+ <td><p> </p></td></tr></tbody>@@ -10801,8 +10826,8 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'- <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>+ <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">@@ -10812,10 +10837,17 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'<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>+ <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>to_specs</td>+ <td><a href="#bytebase.v1.Plan.Spec">Plan.Spec</a></td>+ <td>repeated</td>+ <td><p> </p></td></tr></tbody>@@ -10825,7 +10857,14 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'- <h3 id="bytebase.v1.QueryResult.Message">QueryResult.Message</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>@@ -10836,17 +10875,31 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'<tbody><tr>- <td>level</td>- <td><a href="#bytebase.v1.QueryResult.Message.Level">QueryResult.Message.Level</a></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>content</td>+ <td>page_size</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>+ </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 `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>@@ -10856,8 +10909,8 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'- <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.ListIssueCommentsResponse">ListIssueCommentsResponse</h3>+ <p></p><table class="field-table">@@ -10867,122 +10920,295 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'<tbody><tr>- <td>severity</td>+ <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>+ </tr>++ <tr>+ <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>+ </table>++++++ <h3 id="bytebase.v1.ListIssuesRequest">ListIssuesRequest</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>code</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 issues.+Format: projects/{project} </p></td></tr><tr>- <td>message</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 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>detail</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 `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>hint</td>+ <td>filter</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></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 "users/{email or id}" format, support "==" operator.+- status: the issue status, support "==" and "in" operator, check the IssueStatus enum for the values.+- create_time: issue create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.+- type: the issue type, support "==" and "in" operator, check the Type enum in the Issue message for the values.+- labels: the issue labels, support "==" and "in" operator.+- risk_level: the issue risk level, support "in" operator, check the RiskLevel enum for the values.+- approval_status: issue approval status, support "==" operator.+- current_approver: the issue approver, should in "users/{email} format", support "==" operator.++For example:+creator == "users/[email protected]" && status in ["OPEN", "DONE"]+status == "CANCELED" && type == "DATABASE_CHANGE"+labels in ["label1", "label2"]+risk_level in ["HIGH", "MODERATE"]+create_time >= "2025-01-02T15:04:05Z07:00" </p></td></tr><tr>- <td>position</td>- <td><a href="#int32">int32</a></td>+ <td>query</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Query is the query statement. </p></td></tr><tr>- <td>internal_position</td>- <td><a href="#int32">int32</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 = "create_time desc"+- order_by = "update_time asc" </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>internal_query</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>+ </table>++++++ <h3 id="bytebase.v1.RejectIssueRequest">RejectIssueRequest</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>name</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The name of the issue to add a rejection.+Format: projects/{project}/issues/{issue} </p></td></tr><tr>- <td>schema_name</td>+ <td>comment</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The comment explaining the rejection decision. </p></td></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.RequestIssueRequest">RequestIssueRequest</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>table_name</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>column_name</td>+ <td>comment</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The comment explaining the request. </p></td></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.RetryIssueApprovalRequest">RetryIssueApprovalRequest</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>data_type_name</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>constraint_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: "rule" or "guideline". The name+addresses a slot, not an execution. </p></td></tr><tr>- <td>file</td>- <td><a href="#string">string</a></td>+ <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>line</td>- <td><a href="#int32">int32</a></td>+ <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> </p></td>+ <td><p>When the run reached a terminal status. Unset while AVAILABLE or+RUNNING. </p></td></tr><tr>- <td>routine</td>+ <td>error</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></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>@@ -10992,8 +11218,8 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'- <h3 id="bytebase.v1.QueryResult.SyntaxError">QueryResult.SyntaxError</h3>- <p>Syntax error with position information for editor highlighting</p>+ <h3 id="bytebase.v1.RoleGrant">RoleGrant</h3>+ <p></p><table class="field-table">@@ -11003,10 +11229,33 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'<tbody><tr>- <td>start_position</td>- <td><a href="#bytebase.v1.Position">Position</a></td>+ <td>role</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Position information for highlighting in editor </p></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>@@ -11016,7 +11265,7 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'- <h3 id="bytebase.v1.QueryRow">QueryRow</h3>+ <h3 id="bytebase.v1.RunReviewRequest">RunReviewRequest</h3><p></p>@@ -11027,10 +11276,10 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'<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>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun} </p></td></tr></tbody>@@ -11040,7 +11289,7 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'- <h3 id="bytebase.v1.RowValue">RowValue</h3>+ <h3 id="bytebase.v1.SearchIssuesRequest">SearchIssuesRequest</h3><p></p>@@ -11051,98 +11300,97 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'<tbody><tr>- <td>null_value</td>- <td><a href="#google.protobuf.NullValue">google.protobuf.NullValue</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <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>parent</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The parent, which owns this collection of issues.+Format: projects/{project}+Use the wildcard "projects/-" to search across collections (AIP-159); the+result is restricted to the projects where the caller holds+bb.issues.get. For a concrete project, the caller must hold bb.issues.get+on that project or the request is denied. </p></td></tr><tr>- <td>int32_value</td>+ <td>page_size</td><td><a href="#int32">int32</a></td><td></td>- <td><p> </p></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>int64_value</td>- <td><a href="#int64">int64</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 `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>string_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 issues returned in the list.+Check the filter field in the ListIssuesRequest message. </p></td></tr><tr>- <td>uint32_value</td>- <td><a href="#uint32">uint32</a></td>+ <td>query</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Query is the query statement. </p></td></tr><tr>- <td>uint64_value</td>- <td><a href="#uint64">uint64</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 = "create_time desc"+- order_by = "update_time asc" </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>+ </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>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>+ <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>timestamp_tz_value</td>- <td><a href="#bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</a></td>+ <td>next_page_token</td>+ <td><a href="#string">string</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>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>@@ -11152,7 +11400,7 @@ accurately represents the timestamp with location information. </p></td>- <h3 id="bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</h3>+ <h3 id="bytebase.v1.UpdateIssueCommentRequest">UpdateIssueCommentRequest</h3><p></p>@@ -11163,17 +11411,33 @@ 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 issue name+Format: projects/{project}/issues/{issue} </p></td></tr><tr>- <td>accuracy</td>- <td><a href="#int32">int32</a></td>+ <td>issue_comment</td>+ <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td><td></td>- <td><p>The accuracy is the number of digits after the decimal point. </p></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>@@ -11183,7 +11447,7 @@ accurately represents the timestamp with location information. </p></td>- <h3 id="bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</h3>+ <h3 id="bytebase.v1.UpdateIssueRequest">UpdateIssueRequest</h3><p></p>@@ -11194,36 +11458,28 @@ 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></td>- <td><p> </p></td>- </tr>-- <tr>- <td>zone</td>- <td><a href="#string">string</a></td>+ <td>issue</td>+ <td><a href="#bytebase.v1.Issue">Issue</a></td><td></td>- <td><p>Zone is the time zone abbreviations in timezone database such as "PDT",-"PST". https://en.wikipedia.org/wiki/List_of_tz_database_time_zones We-retrieve the time zone information from the timestamptz field in the-database. A timestamp is in UTC or epoch time, and with zone info, we can-convert it to a local time string. Zone and offset are returned by-time.Time.Zone() </p></td>+ <td><p>The issue to update.++The issue's `name` field is used to identify the issue to update.+Format: projects/{project}/issues/{issue} </p></td></tr><tr>- <td>offset</td>- <td><a href="#int32">int32</a></td>+ <td>update_mask</td>+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td><td></td>- <td><p>The offset is in seconds east of UTC </p></td>+ <td><p>The list of fields to update. </p></td></tr><tr>- <td>accuracy</td>- <td><a href="#int32">int32</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 issue is not found, a new issue will be created.+In this situation, `update_mask` is ignored. </p></td></tr></tbody>@@ -11235,8 +11491,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.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>@@ -11244,34 +11500,34 @@ time.Time.Zone() </p></td><tbody><tr>- <td>ADVICE_LEVEL_UNSPECIFIED</td>+ <td>STATUS_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified advice level.</p></td>+ <td><p>Unspecified status.</p></td></tr><tr>- <td>SUCCESS</td>+ <td>PENDING</td><td>1</td>- <td><p>Success status indicating the check passed without issues.</p></td>+ <td><p>Awaiting approval.</p></td></tr><tr>- <td>WARNING</td>+ <td>APPROVED</td><td>2</td>- <td><p>Warning status indicating potential issues that should be reviewed.</p></td>+ <td><p>Approved.</p></td></tr><tr>- <td>ERROR</td>+ <td>REJECTED</td><td>3</td>- <td><p>Error status indicating critical issues that must be addressed.</p></td>+ <td><p>Rejected.</p></td></tr></tbody></table>- <h3 id="bytebase.v1.Advice.RuleType">Advice.RuleType</h3>- <p>RuleType indicates the source of the linting rule.</p>+ <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>@@ -11279,30 +11535,34 @@ time.Time.Zone() </p></td><tbody><tr>- <td>RULE_TYPE_UNSPECIFIED</td>+ <td>TYPE_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified rule type.</p></td>+ <td><p>Unspecified issue type.</p></td></tr><tr>- <td>PARSER_BASED</td>+ <td>DATABASE_CHANGE</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>+ <td><p>Database schema or data change.</p></td></tr><tr>- <td>AI_POWERED</td>+ <td>ROLE_GRANT</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>+ <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.QueryOption.MSSQLExplainFormat">QueryOption.MSSQLExplainFormat</h3>- <p></p>+ <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>@@ -11310,28 +11570,34 @@ These are custom, flexible checks powered by AI models.</p></td><tbody><tr>- <td>MSSQL_EXPLAIN_FORMAT_UNSPECIFIED</td>+ <td>STATUS_UNSPECIFIED</td><td>0</td>- <td><p>defaults to SHOWPLAN_ALL</p></td>+ <td><p>Unspecified status.</p></td></tr><tr>- <td>MSSQL_EXPLAIN_FORMAT_ALL</td>+ <td>PENDING</td><td>1</td>- <td><p>SHOWPLAN_ALL</p></td>+ <td><p>Approval pending.</p></td></tr><tr>- <td>MSSQL_EXPLAIN_FORMAT_XML</td>+ <td>APPROVED</td><td>2</td>- <td><p>SHOWPLAN_XML</p></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.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</h3>- <p></p>+ <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>@@ -11339,27 +11605,40 @@ These are custom, flexible checks powered by AI models.</p></td><tbody><tr>- <td>REDIS_RUN_COMMANDS_ON_UNSPECIFIED</td>+ <td>STATUS_UNSPECIFIED</td><td>0</td>- <td><p>UNSPECIFIED defaults to SINGLE_NODE.</p></td>+ <td><p></p></td></tr><tr>- <td>SINGLE_NODE</td>+ <td>AVAILABLE</td><td>1</td>- <td><p>Execute Redis commands on a single node in the cluster.</p></td>+ <td><p>Created and claimable by any replica.</p></td></tr><tr>- <td>ALL_NODES</td>+ <td>RUNNING</td><td>2</td>- <td><p>Execute Redis commands on all nodes in the cluster for cluster-wide operations.</p></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.QueryResult.CommandError.Type">QueryResult.CommandError.Type</h3>+ <h3 id="bytebase.v1.ReviewRun.Type">ReviewRun.Type</h3><p></p><table class="enum-table"><thead>@@ -11374,143 +11653,155 @@ These are custom, flexible checks powered by AI models.</p></td></tr><tr>- <td>DDL</td>+ <td>RULE</td><td>1</td>- <td><p></p></td>+ <td><p>Review against the standard rules.</p></td></tr><tr>- <td>DML</td>+ <td>GUIDELINE</td><td>2</td>- <td><p></p></td>- </tr>-- <tr>- <td>NON_READ_ONLY</td>- <td>3</td>- <td><p></p></td>+ <td><p>Review against natural-language guidelines, performed by AI.</p></td></tr></tbody></table>- <h3 id="bytebase.v1.QueryResult.Message.Level">QueryResult.Message.Level</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>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>LEVEL_UNSPECIFIED</td>- <td>0</td>- <td><p>Unspecified message level.</p></td>+ <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>INFO</td>- <td>1</td>- <td><p>Informational message.</p></td>+ <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>WARNING</td>- <td>2</td>- <td><p>Warning message indicating potential issues.</p></td>+ <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>DEBUG</td>- <td>3</td>- <td><p>Debug message for development and troubleshooting.</p></td>+ <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 & query.+Permissions required: bb.issues.get</p></td></tr><tr>- <td>LOG</td>- <td>4</td>- <td><p>General log message.</p></td>+ <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's properties such as title, description, or labels.+Permissions required: bb.issues.update</p></td></tr><tr>- <td>NOTICE</td>- <td>5</td>- <td><p>Notice message for important information.</p></td>+ <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>EXCEPTION</td>- <td>6</td>- <td><p>Exception message indicating error conditions.</p></td>+ <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>- </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>+ <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>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>+ <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>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's own query histories)</p></td>+ <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>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>+ <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>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's own query history)</p></td>+ <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>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>+ <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'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>@@ -11519,62 +11810,114 @@ Permissions required: bb.databases.get</p></td>- <h4>Methods with deprecated option</h4>+ <h4>Methods with HTTP bindings</h4><table><thead><tr><td>Method Name</td>- <td>Option</td>+ <td>Method</td>+ <td>Pattern</td>+ <td>Body</td></tr></thead><tbody>++<tr>- <td>SearchQueryHistories</td>- <td><p>true</p></td>+ <td>GetIssue</td>+ <td>GET</td>+ <td>/v1/{name=projects/*/issues/*}</td>+ <td></td></tr>+++<tr>- <td>ListQueryHistories</td>- <td><p>true</p></td>+ <td>CreateIssue</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*}/issues</td>+ <td>issue</td></tr>+++<tr>- <td>GetQueryHistory</td>- <td><p>true</p></td>+ <td>ListIssues</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*}/issues</td>+ <td></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>+ <td>SearchIssues</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*}/issues:search</td>+ <td>*</td></tr>- </thead>- <tbody>+<tr>- <td>Query</td>+ <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/{name=instances/*/databases/*}:query</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>Query</td>+ <td>ApproveIssue</td><td>POST</td>- <td>/v1/{name=projects/*/instances/*/databases/*}:query</td>+ <td>/v1/{name=projects/*/issues/*}:approve</td><td>*</td></tr>@@ -11582,26 +11925,39 @@ Permissions required: bb.databases.get</p></td><tr>- <td>AdminExecute</td>- <td>GET</td>- <td>/v1:adminExecute</td>- <td></td>+ <td>RejectIssue</td>+ <td>POST</td>+ <td>/v1/{name=projects/*/issues/*}:reject</td>+ <td>*</td></tr><tr>- <td>Export</td>+ <td>RequestIssue</td><td>POST</td>- <td>/v1/{name=instances/*/databases/*}:export</td>+ <td>/v1/{name=projects/*/issues/*}:request</td><td>*</td></tr>+++<tr>- <td>Export</td>+ <td>RetryIssueApproval</td><td>POST</td>- <td>/v1/{name=projects/*/instances/*/databases/*}:export</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>@@ -11613,12 +11969,12 @@ Permissions required: bb.databases.get</p></td><div class="file-heading">- <h2 id="v1/plan_service.proto">v1/plan_service.proto</h2><a href="#title">Top</a>+ <h2 id="v1/setting_service.proto">v1/setting_service.proto</h2><a href="#title">Top</a></div><p></p>- <h3 id="bytebase.v1.CancelPlanCheckRunRequest">CancelPlanCheckRunRequest</h3>+ <h3 id="bytebase.v1.AISetting">AISetting</h3><p></p>@@ -11629,100 +11985,45 @@ Permissions required: bb.databases.get</p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>+ <td>enabled</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The name of the plan check run to cancel.-Format: projects/{project}/plans/{plan}/planCheckRun </p></td>+ <td><p> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.CancelPlanCheckRunResponse">CancelPlanCheckRunResponse</h3>- <p></p>------ <h3 id="bytebase.v1.CreatePlanRequest">CreatePlanRequest</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>provider</td>+ <td><a href="#bytebase.v1.AISetting.Provider">AISetting.Provider</a></td>+ <td></td>+ <td><p> </p></td>+ </tr><tr>- <td>parent</td>+ <td>endpoint</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> </p></td></tr><tr>- <td>plan</td>- <td><a href="#bytebase.v1.Plan">Plan</a></td>+ <td>api_key</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The plan to create. </p></td>+ <td><p> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.GetPlanCheckRunRequest">GetPlanCheckRunRequest</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>model</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> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.GetPlanRequest">GetPlanRequest</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>version</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> </p></td></tr></tbody>@@ -11732,7 +12033,7 @@ Format: projects/{project}/plans/{plan} </p></td>- <h3 id="bytebase.v1.ListPlansRequest">ListPlansRequest</h3>+ <h3 id="bytebase.v1.Algorithm">Algorithm</h3><p></p>@@ -11743,56 +12044,31 @@ Format: projects/{project}/plans/{plan} </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>The parent, which owns this collection of plans.-Format: projects/{project}-Use "projects/-" to list all plans from all projects. </p></td>+ <td><p> </p></td></tr><tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>+ <td>range_mask</td>+ <td><a href="#bytebase.v1.Algorithm.RangeMask">Algorithm.RangeMask</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> </p></td></tr><tr>- <td>page_token</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>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> </p></td></tr><tr>- <td>filter</td>- <td><a href="#string">string</a></td>+ <td>inner_outer_mask</td>+ <td><a href="#bytebase.v1.Algorithm.InnerOuterMask">Algorithm.InnerOuterMask</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 "users/{email or id}" format, support "==" operator.-- create_time: the plan create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.-- has_rollout: whether the plan has rollout, support "==" operator, the value should be "true" or "false".-- title: the plan title, support "==" operator for exact match and ".contains()" operator for case-insensitive substring match.-- spec_type: the plan spec config type, support "==" operator, the value should be "create_database_config" or "change_database_config".-- state: the plan state, support "==" operator, the value should be "ACTIVE" or "DELETED".--For example:-creator == "users/[email protected]" && create_time >= "2025-01-02T15:04:05Z07:00"-title == "My Plan"-title.contains("database migration")-spec_type == "change_database_config"-state == "ACTIVE" </p></td>+ <td><p> </p></td></tr></tbody>@@ -11802,7 +12078,7 @@ state == "ACTIVE" </p></td>- <h3 id="bytebase.v1.ListPlansResponse">ListPlansResponse</h3>+ <h3 id="bytebase.v1.Algorithm.FullMask">Algorithm.FullMask</h3><p></p>@@ -11813,18 +12089,11 @@ state == "ACTIVE" </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>- </tr>-- <tr>- <td>next_page_token</td>+ <td>substitution</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>substitution is the string used to replace the original value, the+max length of the string is 16 bytes. </p></td></tr></tbody>@@ -11834,7 +12103,7 @@ If this field is omitted, there are no subsequent pages. </p></td>- <h3 id="bytebase.v1.Plan">Plan</h3>+ <h3 id="bytebase.v1.Algorithm.InnerOuterMask">Algorithm.InnerOuterMask</h3><p></p>@@ -11845,122 +12114,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></td>- <td><p>The name of the plan.-`plan` is a system generated ID.-Format: projects/{project}/plans/{plan} </p></td>- </tr>-- <tr>- <td>state</td>- <td><a href="#bytebase.v1.State">State</a></td>- <td></td>- <td><p>The state of the plan. </p></td>- </tr>-- <tr>- <td>issue</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The issue associated with the plan.-Can be empty.-Format: projects/{project}/issues/{issue} </p></td>- </tr>-- <tr>- <td>title</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The title of the plan. </p></td>- </tr>-- <tr>- <td>description</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The description of the plan. </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><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>prefix_len</td>+ <td><a href="#int32">int32</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>suffix_len</td>+ <td><a href="#int32">int32</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>type</td>+ <td><a href="#bytebase.v1.Algorithm.InnerOuterMask.MaskType">Algorithm.InnerOuterMask.MaskType</a></td><td></td>- <td><p>The lifecycle status of the linked issue.-Unspecified when no linked issue exists. </p></td>+ <td><p> </p></td></tr><tr>- <td>last_plan_editor</td>+ <td>substitution</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><p> </p></td></tr></tbody>@@ -11970,7 +12148,7 @@ this falls back to the Plan creator. </p></td>- <h3 id="bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</h3>+ <h3 id="bytebase.v1.Algorithm.MD5Mask">Algorithm.MD5Mask</h3><p></p>@@ -11981,35 +12159,10 @@ this falls back to the Plan creator. </p></td><tbody><tr>- <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 resource name of the sheet.-Format: projects/{project}/sheets/{sheet} </p></td>- </tr>-- <tr>- <td>release</td>+ <td>salt</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>salt is the salt value to generate a different hash that with the word alone. </p></td></tr></tbody>@@ -12019,7 +12172,7 @@ Format: projects/{project}/releases/{release} </p></td>- <h3 id="bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</h3>+ <h3 id="bytebase.v1.Algorithm.RangeMask">Algorithm.RangeMask</h3><p></p>@@ -12030,62 +12183,11 @@ Format: projects/{project}/releases/{release} </p></td><tbody><tr>- <td>target</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>- </tr>-- <tr>- <td>database</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the database to create. </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>- </tr>-- <tr>- <td>character_set</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>character_set is the character set of the database. </p></td>- </tr>-- <tr>- <td>collation</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>collation is the collation of the database. </p></td>- </tr>-- <tr>- <td>cluster</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>cluster is the cluster of the database. This is only applicable to ClickHouse for "ON CLUSTER <<cluster>>". </p></td>- </tr>-- <tr>- <td>owner</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 "WITH OWNER <<owner>>". </p></td>- </tr>-- <tr>- <td>environment</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The environment resource.-Format: environments/prod where prod is the environment resource ID. </p></td>+ <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></tr></tbody>@@ -12095,7 +12197,7 @@ Format: environments/prod where prod is the environment resource ID. </p></td>- <h3 id="bytebase.v1.Plan.PlanCheckRunStatusCountEntry">Plan.PlanCheckRunStatusCountEntry</h3>+ <h3 id="bytebase.v1.Algorithm.RangeMask.Slice">Algorithm.RangeMask.Slice</h3><p></p>@@ -12106,17 +12208,27 @@ Format: environments/prod where prod is the environment resource ID. </p></td><tbody><tr>- <td>key</td>- <td><a href="#string">string</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 "你好world", character index 2 refers to 'w' (the 3rd character). </p></td></tr><tr>- <td>value</td>+ <td>end</td><td><a href="#int32">int32</a></td><td></td>- <td><p> </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>substitution</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>substitution is the string used to replace the OriginalValue[start:end). </p></td></tr></tbody>@@ -12126,7 +12238,7 @@ Format: environments/prod where prod is the environment resource ID. </p></td>- <h3 id="bytebase.v1.Plan.RolloutStageSummary">Plan.RolloutStageSummary</h3>+ <h3 id="bytebase.v1.Announcement">Announcement</h3><p></p>@@ -12137,18 +12249,25 @@ Format: environments/prod where prod is the environment resource ID. </p></td><tbody><tr>- <td>stage</td>+ <td>text</td><td><a href="#string">string</a></td><td></td>- <td><p>The stage resource name.-Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>+ <td><p>The text of announcement </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>link</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>+ </tr>++ <tr>+ <td>theme</td>+ <td><a href="#bytebase.v1.Announcement.AnnouncementTheme">Announcement.AnnouncementTheme</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></tr></tbody>@@ -12158,7 +12277,7 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>- <h3 id="bytebase.v1.Plan.Spec">Plan.Spec</h3>+ <h3 id="bytebase.v1.Announcement.AnnouncementTheme">Announcement.AnnouncementTheme</h3><p></p>@@ -12169,22 +12288,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>background</td>+ <td><a href="#google.type.Color">google.type.Color</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>text</td>+ <td><a href="#google.type.Color">google.type.Color</a></td><td></td><td><p> </p></td></tr>@@ -12196,7 +12308,7 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>- <h3 id="bytebase.v1.Plan.TaskStatusCount">Plan.TaskStatusCount</h3>+ <h3 id="bytebase.v1.AppIMSetting">AppIMSetting</h3><p></p>@@ -12207,17 +12319,10 @@ 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></td>- <td><p>The task status. </p></td>- </tr>-- <tr>- <td>count</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>The number of tasks in the status. </p></td>+ <td>settings</td>+ <td><a href="#bytebase.v1.AppIMSetting.IMSetting">AppIMSetting.IMSetting</a></td>+ <td>repeated</td>+ <td><p> </p></td></tr></tbody>@@ -12227,7 +12332,7 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>- <h3 id="bytebase.v1.PlanCheckRun">PlanCheckRun</h3>+ <h3 id="bytebase.v1.AppIMSetting.DingTalk">AppIMSetting.DingTalk</h3><p></p>@@ -12238,36 +12343,53 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td><tbody><tr>- <td>name</td>+ <td>client_id</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>client_secret</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>robot_code</td>+ <td><a href="#string">string</a></td>+ <td></td><td><p> </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>error</td>+ <td>app_id</td><td><a href="#string">string</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>app_secret</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr>@@ -12279,7 +12401,7 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>- <h3 id="bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</h3>+ <h3 id="bytebase.v1.AppIMSetting.IMSetting">AppIMSetting.IMSetting</h3><p></p>@@ -12290,58 +12412,50 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td><tbody><tr>- <td>status</td>- <td><a href="#bytebase.v1.Advice.Level">Advice.Level</a></td>+ <td>type</td>+ <td><a href="#bytebase.v1.WebhookType">WebhookType</a></td><td></td><td><p> </p></td></tr><tr>- <td>title</td>- <td><a href="#string">string</a></td>+ <td>slack</td>+ <td><a href="#bytebase.v1.AppIMSetting.Slack">AppIMSetting.Slack</a></td><td></td><td><p> </p></td></tr><tr>- <td>content</td>- <td><a href="#string">string</a></td>+ <td>feishu</td>+ <td><a href="#bytebase.v1.AppIMSetting.Feishu">AppIMSetting.Feishu</a></td><td></td><td><p> </p></td></tr><tr>- <td>code</td>- <td><a href="#int32">int32</a></td>+ <td>wecom</td>+ <td><a href="#bytebase.v1.AppIMSetting.Wecom">AppIMSetting.Wecom</a></td><td></td><td><p> </p></td></tr><tr>- <td>target</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>- </tr>-- <tr>- <td>type</td>- <td><a href="#bytebase.v1.PlanCheckRun.Result.Type">PlanCheckRun.Result.Type</a></td>+ <td>lark</td>+ <td><a href="#bytebase.v1.AppIMSetting.Lark">AppIMSetting.Lark</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>dingtalk</td>+ <td><a href="#bytebase.v1.AppIMSetting.DingTalk">AppIMSetting.DingTalk</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>teams</td>+ <td><a href="#bytebase.v1.AppIMSetting.Teams">AppIMSetting.Teams</a></td><td></td><td><p> </p></td></tr>@@ -12353,7 +12467,7 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance- <h3 id="bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</h3>+ <h3 id="bytebase.v1.AppIMSetting.Lark">AppIMSetting.Lark</h3><p></p>@@ -12364,15 +12478,15 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance<tbody><tr>- <td>start_position</td>- <td><a href="#bytebase.v1.Position">Position</a></td>+ <td>app_id</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Position of 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>app_secret</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr>@@ -12384,7 +12498,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.AppIMSetting.Slack">AppIMSetting.Slack</h3><p></p>@@ -12395,15 +12509,8 @@ 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>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>token</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr>@@ -12415,7 +12522,7 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance- <h3 id="bytebase.v1.RunPlanChecksRequest">RunPlanChecksRequest</h3>+ <h3 id="bytebase.v1.AppIMSetting.Teams">AppIMSetting.Teams</h3><p></p>@@ -12426,340 +12533,24 @@ Format: instances/{instance}/databases/{database} or projects/{project}/instance<tbody><tr>- <td>name</td>+ <td>tenant_id</td><td><a href="#string">string</a></td><td></td>- <td><p>The plan to run plan checks.-Format: projects/{project}/plans/{plan} </p></td>+ <td><p>Azure AD tenant ID (Directory ID). </p></td></tr><tr>- <td>spec_id</td>+ <td>client_id</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>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.RunPlanChecksResponse">RunPlanChecksResponse</h3>- <p></p>------ <h3 id="bytebase.v1.UpdatePlanRequest">UpdatePlanRequest</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</td>- <td><a href="#bytebase.v1.Plan">Plan</a></td>- <td></td>- <td><p>The plan to update.--The plan'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></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 plan is not found, a new plan will be created.-In this situation, `update_mask` is ignored. </p></td>+ <td><p>Azure AD application (client) ID. </p></td></tr>- </tbody>- </table>-------- <h3 id="bytebase.v1.PlanCheckRun.Result.Type">PlanCheckRun.Result.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>STATEMENT_ADVISE</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>STATEMENT_SUMMARY_REPORT</td>- <td>2</td>- <td><p></p></td>- </tr>-- <tr>- <td>GHOST_SYNC</td>- <td>3</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-- <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>- </thead>- <tbody>-- <tr>- <td>STATUS_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>RUNNING</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>-- <tr>- <td>CANCELED</td>- <td>4</td>- <td><p></p></td>- </tr>-- </tbody>- </table>------ <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>- </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>- </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>- </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>- </tr>-- <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>- </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>- </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>- </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>- </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>GetPlan</td>- <td>GET</td>- <td>/v1/{name=projects/*/plans/*}</td>- <td></td>- </tr>----- <tr>- <td>ListPlans</td>- <td>GET</td>- <td>/v1/{parent=projects/*}/plans</td>- <td></td>- </tr>----- <tr>- <td>CreatePlan</td>- <td>POST</td>- <td>/v1/{parent=projects/*}/plans</td>- <td>plan</td>- </tr>----- <tr>- <td>UpdatePlan</td>- <td>PATCH</td>- <td>/v1/{plan.name=projects/*/plans/*}</td>- <td>plan</td>- </tr>----- <tr>- <td>GetPlanCheckRun</td>- <td>GET</td>- <td>/v1/{name=projects/*/plans/*/planCheckRun}</td>- <td></td>- </tr>----- <tr>- <td>RunPlanChecks</td>- <td>POST</td>- <td>/v1/{name=projects/*/plans/*}:runPlanChecks</td>- <td>*</td>- </tr>----- <tr>- <td>CancelPlanCheckRun</td>- <td>POST</td>- <td>/v1/{name=projects/*/plans/*/planCheckRun}:cancel</td>- <td>*</td>- </tr>--- </tbody>- </table>----- <div class="file-heading">- <h2 id="v1/issue_service.proto">v1/issue_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.v1.ApprovalFlow">ApprovalFlow</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>roles</td>+ <td>client_secret</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>Azure AD client secret. </p></td></tr></tbody>@@ -12769,7 +12560,7 @@ Permissions required: bb.planCheckRuns.run</p></td>- <h3 id="bytebase.v1.ApprovalTemplate">ApprovalTemplate</h3>+ <h3 id="bytebase.v1.AppIMSetting.Wecom">AppIMSetting.Wecom</h3><p></p>@@ -12780,24 +12571,24 @@ Permissions required: bb.planCheckRuns.run</p></td><tbody><tr>- <td>flow</td>- <td><a href="#bytebase.v1.ApprovalFlow">ApprovalFlow</a></td>+ <td>corp_id</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The approval flow definition. </p></td>+ <td><p> </p></td></tr><tr>- <td>title</td>+ <td>agent_id</td><td><a href="#string">string</a></td><td></td>- <td><p>The title of the approval template. </p></td>+ <td><p> </p></td></tr><tr>- <td>description</td>+ <td>secret</td><td><a href="#string">string</a></td><td></td>- <td><p>The description of the approval template. </p></td>+ <td><p> </p></td></tr></tbody>@@ -12807,7 +12598,7 @@ Permissions required: bb.planCheckRuns.run</p></td>- <h3 id="bytebase.v1.ApproveIssueRequest">ApproveIssueRequest</h3>+ <h3 id="bytebase.v1.DataClassificationSetting">DataClassificationSetting</h3><p></p>@@ -12818,18 +12609,10 @@ Permissions required: bb.planCheckRuns.run</p></td><tbody><tr>- <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>configs</td>+ <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig">DataClassificationSetting.DataClassificationConfig</a></td>+ <td>repeated</td>+ <td><p> </p></td></tr></tbody>@@ -12839,7 +12622,7 @@ Format: projects/{project}/issues/{issue} </p></td>- <h3 id="bytebase.v1.BatchUpdateIssuesStatusRequest">BatchUpdateIssuesStatusRequest</h3>+ <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig">DataClassificationSetting.DataClassificationConfig</h3><p></p>@@ -12850,35 +12633,32 @@ Format: projects/{project}/issues/{issue} </p></td><tbody><tr>- <td>parent</td>+ <td>id</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>+ <td><p>id is the uuid for classification. Each project can chose one classification config. </p></td></tr><tr>- <td>issues</td>+ <td>title</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>+ <td></td>+ <td><p> </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>+ <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>reason</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The reason for the status change. </p></td>+ <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]+-[0-9]+-[0-9]+ format. </p></td></tr></tbody>@@ -12888,14 +12668,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.DataClassificationSetting.DataClassificationConfig.ClassificationEntry">DataClassificationSetting.DataClassificationConfig.ClassificationEntry</h3><p></p>@@ -12906,18 +12679,17 @@ Format: projects/{project}/issues/{issue} </p></td><tbody><tr>- <td>parent</td>+ <td>key</td><td><a href="#string">string</a></td><td></td>- <td><p>The issue name-Format: projects/{project}/issues/{issue} </p></td>+ <td><p> </p></td></tr><tr>- <td>issue_comment</td>- <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>+ <td>value</td>+ <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification">DataClassificationSetting.DataClassificationConfig.DataClassification</a></td><td></td>- <td><p>The comment to create. </p></td>+ <td><p> </p></td></tr></tbody>@@ -12927,7 +12699,7 @@ Format: projects/{project}/issues/{issue} </p></td>- <h3 id="bytebase.v1.CreateIssueRequest">CreateIssueRequest</h3>+ <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification">DataClassificationSetting.DataClassificationConfig.DataClassification</h3><p></p>@@ -12938,18 +12710,24 @@ Format: projects/{project}/issues/{issue} </p></td><tbody><tr>- <td>parent</td>+ <td>id</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>id is the classification id in [0-9]+-[0-9]+-[0-9]+ format. </p></td></tr><tr>- <td>issue</td>- <td><a href="#bytebase.v1.Issue">Issue</a></td>+ <td>title</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The issue to create. </p></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>@@ -12959,7 +12737,7 @@ Format: projects/{project} </p></td>- <h3 id="bytebase.v1.GetIssueRequest">GetIssueRequest</h3>+ <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level">DataClassificationSetting.DataClassificationConfig.Level</h3><p></p>@@ -12970,18 +12748,17 @@ Format: projects/{project} </p></td><tbody><tr>- <td>name</td>+ <td>title</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><p> </p></td></tr><tr>- <td>force</td>- <td><a href="#bool">bool</a></td>+ <td>level</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>If set to true, bypass cache and fetch the latest data. </p></td>+ <td><p>The numeric level for ordering. Higher = more sensitive. </p></td></tr></tbody>@@ -12991,7 +12768,7 @@ Format: projects/{project}/issues/{issue} </p></td>- <h3 id="bytebase.v1.Issue">Issue</h3>+ <h3 id="bytebase.v1.EmailSetting">EmailSetting</h3><p></p>@@ -13002,126 +12779,90 @@ Format: projects/{project}/issues/{issue} </p></td><tbody><tr>- <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>- </tr>-- <tr>- <td>title</td>+ <td>from</td><td><a href="#string">string</a></td><td></td>- <td><p>The title of the issue. </p></td>+ <td><p> </p></td></tr><tr>- <td>description</td>+ <td>from_name</td><td><a href="#string">string</a></td><td></td>- <td><p>The description of the issue. </p></td>+ <td><p> </p></td></tr><tr><td>type</td>- <td><a href="#bytebase.v1.Issue.Type">Issue.Type</a></td>+ <td><a href="#bytebase.v1.EmailSetting.Type">EmailSetting.Type</a></td><td></td><td><p> </p></td></tr><tr>- <td>status</td>- <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>+ <td>smtp</td>+ <td><a href="#bytebase.v1.EmailSetting.SMTPConfig">EmailSetting.SMTPConfig</a></td><td></td>- <td><p>The status of the issue. </p></td>- </tr>-- <tr>- <td>approvers</td>- <td><a href="#bytebase.v1.Issue.Approver">Issue.Approver</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>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.EmailSetting.SMTPConfig">EmailSetting.SMTPConfig</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>creator</td>+ <td>host</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>update_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>port</td>+ <td><a href="#int32">int32</a></td><td></td><td><p> </p></td></tr><tr>- <td>plan</td>+ <td>username</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>- </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>+ <td><p> </p></td></tr><tr>- <td>labels</td>+ <td>password</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>+ <td><p> </p></td></tr><tr>- <td>access_grant</td>- <td><a href="#string">string</a></td>+ <td>encryption</td>+ <td><a href="#bytebase.v1.EmailSetting.SMTPConfig.Encryption">EmailSetting.SMTPConfig.Encryption</a></td><td></td>- <td><p>The access grant associated with this issue.-Format: projects/{project}/accessGrants/{access_grant} </p></td>+ <td><p> </p></td></tr><tr>- <td>draft</td>- <td><a href="#bool">bool</a></td>+ <td>authentication</td>+ <td><a href="#bytebase.v1.EmailSetting.SMTPConfig.Authentication">EmailSetting.SMTPConfig.Authentication</a></td><td></td>- <td><p>Whether this issue is a Draft Review Issue. </p></td>+ <td><p> </p></td></tr></tbody>@@ -13131,8 +12872,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.EnvironmentSetting">EnvironmentSetting</h3>+ <p></p><table class="field-table">@@ -13142,17 +12883,10 @@ 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></td>- <td><p>The new status. </p></td>- </tr>-- <tr>- <td>principal</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Format: users/[email protected] </p></td>+ <td>environments</td>+ <td><a href="#bytebase.v1.EnvironmentSetting.Environment">EnvironmentSetting.Environment</a></td>+ <td>repeated</td>+ <td><p> </p></td></tr></tbody>@@ -13162,8 +12896,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.EnvironmentSetting.Environment">EnvironmentSetting.Environment</h3>+ <p></p><table class="field-table">@@ -13176,70 +12910,118 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td><td>name</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 environment.+Format: environments/{environment}.+Output only. </p></td></tr><tr>- <td>comment</td>+ <td>id</td><td><a href="#string">string</a></td><td></td>- <td><p>The text content of the comment. </p></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>payload</td>+ <td>title</td><td><a href="#string">string</a></td><td></td>- <td><p>TODO: use struct message instead. </p></td>+ <td><p>The display name of the environment. </p></td></tr><tr>- <td>create_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>+ <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>update_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <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.EnvironmentSetting.Environment.TagsEntry">EnvironmentSetting.Environment.TagsEntry</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>creator</td>+ <td>key</td><td><a href="#string">string</a></td><td></td>- <td><p>Format: users/{email} </p></td>+ <td><p> </p></td></tr><tr>- <td>approval</td>- <td><a href="#bytebase.v1.IssueComment.Approval">IssueComment.Approval</a></td>+ <td>value</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Approval event. </p></td>+ <td><p> </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>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.GetSettingRequest">GetSettingRequest</h3>+ <p>The request message for getting a 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>plan_update</td>- <td><a href="#bytebase.v1.IssueComment.PlanUpdate">IssueComment.PlanUpdate</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Plan update event. </p></td>+ <td><p>The resource name of the setting. </p></td></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.GetSettingResponse">GetSettingResponse</h3>+ <p>The response message for getting a 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>review_submission</td>- <td><a href="#bytebase.v1.IssueComment.ReviewSubmission">IssueComment.ReviewSubmission</a></td>+ <td>setting</td>+ <td><a href="#bytebase.v1.Setting">Setting</a></td><td></td>- <td><p>Review submission event. </p></td>+ <td><p> </p></td></tr></tbody>@@ -13249,8 +13031,15 @@ 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.ListSettingsRequest">ListSettingsRequest</h3>+ <p></p>++++++ <h3 id="bytebase.v1.ListSettingsResponse">ListSettingsResponse</h3>+ <p></p><table class="field-table">@@ -13260,10 +13049,10 @@ 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></td>- <td><p>The approval status. </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>@@ -13273,8 +13062,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.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">@@ -13284,59 +13073,76 @@ 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>+ <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>to_title</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p> </p></td>+ <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'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>- <tr>- <td>from_description</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p> </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>to_description</td>+ <td>id</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></td><td><p> </p></td></tr><tr>- <td>to_status</td>- <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>- <td>optional</td>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td><td><p> </p></td></tr><tr>- <td>from_labels</td>+ <td>monaco_base</td><td><a href="#string">string</a></td>- <td>repeated</td>+ <td></td><td><p> </p></td></tr><tr>- <td>to_labels</td>- <td><a href="#string">string</a></td>+ <td>tokens</td>+ <td><a href="#bytebase.v1.SQLEditorThemeSetting.TokensEntry">SQLEditorThemeSetting.TokensEntry</a></td><td>repeated</td>- <td><p> </p></td>+ <td><p>CSS token colors. </p></td></tr></tbody>@@ -13346,8 +13152,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.SQLEditorThemeSetting.TokensEntry">SQLEditorThemeSetting.TokensEntry</h3>+ <p></p><table class="field-table">@@ -13357,16 +13163,16 @@ 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>key</td>+ <td><a href="#string">string</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>repeated</td>+ <td>value</td>+ <td><a href="#google.type.Color">google.type.Color</a></td>+ <td></td><td><p> </p></td></tr>@@ -13377,14 +13183,31 @@ 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.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.ListIssueCommentsRequest">ListIssueCommentsRequest</h3>+ <h3 id="bytebase.v1.SemanticTypeSetting.SemanticType">SemanticTypeSetting.SemanticType</h3><p></p>@@ -13395,31 +13218,38 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td><tbody><tr>- <td>parent</td>+ <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>description</td><td><a href="#string">string</a></td><td></td>- <td><p>Format: projects/{projects}/issues/{issue} </p></td>+ <td><p>the description of the semantic type, it can be empty. </p></td></tr><tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>+ <td>algorithm</td>+ <td><a href="#bytebase.v1.Algorithm">Algorithm</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>icon</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>icon is the icon for semantic type, it can be emoji or base64 encoded image. </p></td></tr></tbody>@@ -13429,8 +13259,8 @@ the call that provided the page token. </p></td>- <h3 id="bytebase.v1.ListIssueCommentsResponse">ListIssueCommentsResponse</h3>- <p></p>+ <h3 id="bytebase.v1.Setting">Setting</h3>+ <p>The schema of setting.</p><table class="field-table">@@ -13440,18 +13270,19 @@ 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>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The resource name of the setting.+Format: settings/{setting}+Example: "settings/SEMANTIC_TYPES" </p></td></tr><tr>- <td>next_page_token</td>- <td><a href="#string">string</a></td>+ <td>value</td>+ <td><a href="#bytebase.v1.SettingValue">SettingValue</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 configuration value of the setting. </p></td></tr></tbody>@@ -13461,8 +13292,8 @@ If this field is omitted, there are no subsequent pages. </p></td>- <h3 id="bytebase.v1.ListIssuesRequest">ListIssuesRequest</h3>- <p></p>+ <h3 id="bytebase.v1.SettingValue">SettingValue</h3>+ <p>The data in setting value.</p><table class="field-table">@@ -13472,78 +13303,66 @@ 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>app_im</td>+ <td><a href="#bytebase.v1.AppIMSetting">AppIMSetting</a></td><td></td>- <td><p>The parent, which owns this collection of issues.-Format: projects/{project} </p></td>+ <td><p> </p></td></tr><tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>+ <td>workspace_profile</td>+ <td><a href="#bytebase.v1.WorkspaceProfileSetting">WorkspaceProfileSetting</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>+ <td><p> </p></td></tr><tr>- <td>page_token</td>- <td><a href="#string">string</a></td>+ <td>workspace_approval</td>+ <td><a href="#bytebase.v1.WorkspaceApprovalSetting">WorkspaceApprovalSetting</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>+ <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 issues returned in the list.-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filters:-- creator: issue creator full name in "users/{email or id}" format, support "==" operator.-- status: the issue status, support "==" and "in" operator, check the IssueStatus enum for the values.-- create_time: issue create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.-- type: the issue type, support "==" and "in" operator, check the Type enum in the Issue message for the values.-- labels: the issue labels, support "==" and "in" operator.-- risk_level: the issue risk level, support "in" operator, check the RiskLevel enum for the values.-- approval_status: issue approval status, support "==" operator.-- current_approver: the issue approver, should in "users/{email} format", support "==" operator.--For example:-creator == "users/[email protected]" && status in ["OPEN", "DONE"]-status == "CANCELED" && type == "DATABASE_CHANGE"-labels in ["label1", "label2"]-risk_level in ["HIGH", "MODERATE"]-create_time >= "2025-01-02T15:04:05Z07:00" </p></td>+ <td><p> </p></td></tr><tr>- <td>query</td>- <td><a href="#string">string</a></td>+ <td>semantic_type</td>+ <td><a href="#bytebase.v1.SemanticTypeSetting">SemanticTypeSetting</a></td><td></td>- <td><p>Query is the query statement. </p></td>+ <td><p> </p></td></tr><tr>- <td>order_by</td>- <td><a href="#string">string</a></td>+ <td>ai</td>+ <td><a href="#bytebase.v1.AISetting">AISetting</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 = "create_time desc"-- order_by = "update_time asc" </p></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>environment</td>+ <td><a href="#bytebase.v1.EnvironmentSetting">EnvironmentSetting</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>email</td>+ <td><a href="#bytebase.v1.EmailSetting">EmailSetting</a></td>+ <td></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>@@ -13553,7 +13372,7 @@ For example:- <h3 id="bytebase.v1.ListIssuesResponse">ListIssuesResponse</h3>+ <h3 id="bytebase.v1.TestEmailSettingRequest">TestEmailSettingRequest</h3><p></p>@@ -13564,18 +13383,24 @@ For example:<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>+ <td>parent</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td></tr><tr>- <td>next_page_token</td>+ <td>email_setting</td>+ <td><a href="#bytebase.v1.EmailSetting">EmailSetting</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>to</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>@@ -13585,7 +13410,7 @@ If this field is omitted, there are no subsequent pages. </p></td>- <h3 id="bytebase.v1.RejectIssueRequest">RejectIssueRequest</h3>+ <h3 id="bytebase.v1.TestEmailSettingResponse">TestEmailSettingResponse</h3><p></p>@@ -13596,18 +13421,17 @@ 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>success</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The name of the issue to add a rejection.-Format: projects/{project}/issues/{issue} </p></td>+ <td><p> </p></td></tr><tr>- <td>comment</td>+ <td>error</td><td><a href="#string">string</a></td><td></td>- <td><p>The comment explaining the rejection decision. </p></td>+ <td><p> </p></td></tr></tbody>@@ -13617,8 +13441,8 @@ Format: projects/{project}/issues/{issue} </p></td>- <h3 id="bytebase.v1.RequestIssueRequest">RequestIssueRequest</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">@@ -13628,18 +13452,32 @@ Format: projects/{project}/issues/{issue} </p></td><tbody><tr>- <td>name</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 name of the issue to request a issue.-Format: projects/{project}/issues/{issue} </p></td>+ <td><p>The setting to update. </p></td></tr><tr>- <td>comment</td>- <td><a href="#string">string</a></td>+ <td>validate_only</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The comment explaining the request. </p></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>allow_missing</td>+ <td><a href="#bool">bool</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></td>+ <td><p> </p></td></tr></tbody>@@ -13649,7 +13487,7 @@ Format: projects/{project}/issues/{issue} </p></td>- <h3 id="bytebase.v1.RetryIssueApprovalRequest">RetryIssueApprovalRequest</h3>+ <h3 id="bytebase.v1.WorkspaceApprovalSetting">WorkspaceApprovalSetting</h3><p></p>@@ -13660,11 +13498,10 @@ Format: projects/{project}/issues/{issue} </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the issue whose approval-finding should be retried.-Format: projects/{project}/issues/{issue} </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>@@ -13674,7 +13511,7 @@ Format: projects/{project}/issues/{issue} </p></td>- <h3 id="bytebase.v1.ReviewRun">ReviewRun</h3>+ <h3 id="bytebase.v1.WorkspaceApprovalSetting.Rule">WorkspaceApprovalSetting.Rule</h3><p></p>@@ -13685,50 +13522,50 @@ Format: projects/{project}/issues/{issue} </p></td><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: "rule" or "guideline". 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>template</td>+ <td><a href="#bytebase.v1.ApprovalTemplate">ApprovalTemplate</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>condition</td>+ <td><a href="#google.type.Expr">google.type.Expr</a></td><td></td>- <td><p>When the run reached a terminal status. Unset while AVAILABLE or-RUNNING. </p></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 "==", "!=", "<", "<=", ">", ">=" operations.+statement.table_rows: table row count number, support "==", "!=", "<", "<=", ">", ">=" operations.+resource.environment_id: the environment resource id, support "==", "!=", "in [xx]", "!(in [xx])" operations.+resource.project_id: the project resource id, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.+resource.db_engine: the database engine type, support "==", "!=", "in [xx]", "!(in [xx])" operations. Check the Engine enum for values.+statement.sql_type: the SQL type, support "==", "!=", "in [xx]", "!(in [xx])" operations.+resource.database_name: the database name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.+resource.schema_name: the schema name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.+resource.table_name: the table name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.+statement.text: the SQL statement, support "contains()", "matches()", "startsWith()", "endsWith()" operations.+request.expiration_days: the role expiration days for the request, support "==", "!=", "<", "<=", ">", ">=" operations.+request.role: the request role full name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.++When source is CHANGE_DATABASE, support: statement.*, resource.* (excluding request.*)+When source is CREATE_DATABASE, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name+When source is REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role+When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_name, request.unmask, request.data_export++For examples:+resource.environment_id == "prod" && statement.affected_rows >= 100+resource.table_name.matches("sensitive_.*") && resource.db_engine == "MYSQL" </p></td></tr><tr>- <td>error</td>- <td><a href="#string">string</a></td>+ <td>source</td>+ <td><a href="#bytebase.v1.WorkspaceApprovalSetting.Rule.Source">WorkspaceApprovalSetting.Rule.Source</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> </p></td></tr></tbody>@@ -13738,7 +13575,7 @@ review results on a DONE run). </p></td>- <h3 id="bytebase.v1.RoleGrant">RoleGrant</h3>+ <h3 id="bytebase.v1.WorkspaceProfileSetting">WorkspaceProfileSetting</h3><p></p>@@ -13749,168 +13586,180 @@ review results on a DONE run). </p></td><tbody><tr>- <td>role</td>+ <td>external_url</td><td><a href="#string">string</a></td><td></td>- <td><p>The requested role.-Format: roles/EXPORTER. </p></td>+ <td><p>The external URL is used for sso authentication callback. </p></td></tr><tr>- <td>user</td>- <td><a href="#string">string</a></td>+ <td>disallow_signup</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The user to be granted.-Format: users/{email}. </p></td>+ <td><p>Disallow self-service signup, users can only be invited by the owner. </p></td></tr><tr>- <td>condition</td>- <td><a href="#google.type.Expr">google.type.Expr</a></td>+ <td>require_mfa</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The condition for the role. Same as the condition in IAM Binding message. </p></td>+ <td><p>Require MFA for all users. </p></td></tr><tr>- <td>expiration</td>+ <td>refresh_token_duration</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>+ <td><p>The duration for refresh token. Default is 7 days. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.RunReviewRequest">RunReviewRequest</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></td>+ <td><p>The setting of custom announcement </p></td>+ </tr><tr>- <td>name</td>+ <td>maximum_request_expiration</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td></td>+ <td><p>The max expiration duration for data access requests. </p></td>+ </tr>++ <tr>+ <td>domains</td><td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>The workspace domain, e.g., bytebase.com. </p></td>+ </tr>++ <tr>+ <td>enforce_identity_domain</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun} </p></td>+ <td><p>Only user and group from the domains can be created and login. </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>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>parent</td>- <td><a href="#string">string</a></td>+ <td>disallow_password_signin</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The parent, which owns this collection of issues.-Format: projects/{project}-Use the wildcard "projects/-" to search across collections (AIP-159); the-result is restricted to the projects where the caller holds-bb.issues.get. For a concrete project, the caller must hold bb.issues.get-on that project or the request is denied. </p></td>+ <td><p>Whether password sign-in is disabled for all end users. </p></td></tr><tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>+ <td>enable_metric_collection</td>+ <td><a href="#bool">bool</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>+ <td><p>Whether to enable metric collection for the workspace. </p></td></tr><tr>- <td>page_token</td>- <td><a href="#string">string</a></td>+ <td>inactive_session_timeout</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</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>+ <td><p>The session expiration time if not activity detected for the user. Value <= 0 means no limit. </p></td></tr><tr>- <td>filter</td>- <td><a href="#string">string</a></td>+ <td>enable_audit_log_stdout</td>+ <td><a href="#bool">bool</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>+ <td><p>Whether to enable audit logging to stdout in structured JSON format.+Requires TEAM or ENTERPRISE license. </p></td></tr><tr>- <td>query</td>- <td><a href="#string">string</a></td>+ <td>watermark</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>Query is the query statement. </p></td>+ <td><p>Whether to display watermark on pages.+Requires ENTERPRISE license. </p></td></tr><tr>- <td>order_by</td>- <td><a href="#string">string</a></td>+ <td>password_restriction</td>+ <td><a href="#bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</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 = "create_time desc"-- order_by = "update_time asc" </p></td>+ <td><p>Password restriction settings. </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>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>issues</td>- <td><a href="#bytebase.v1.Issue">Issue</a></td>- <td>repeated</td>- <td><p>The issues from the specified request. </p></td>+ <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>next_page_token</td>+ <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 <= 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 + 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>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>Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id+OR a custom theme'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'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 "generate" and "regenerate". </p></td></tr></tbody>@@ -13920,7 +13769,7 @@ If this field is omitted, there are no subsequent pages. </p></td>- <h3 id="bytebase.v1.UpdateIssueCommentRequest">UpdateIssueCommentRequest</h3>+ <h3 id="bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</h3><p></p>@@ -13931,75 +13780,52 @@ 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>min_length</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The issue name-Format: projects/{project}/issues/{issue} </p></td>+ <td><p>min_length is the minimum length for password, should no less than 8. </p></td></tr><tr>- <td>issue_comment</td>- <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>+ <td>require_number</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The comment to update. </p></td>+ <td><p>require_number requires the password must contains at least one number. </p></td></tr><tr>- <td>update_mask</td>- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td>require_letter</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The list of fields to update. </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>allow_missing</td>+ <td>require_uppercase_letter</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>+ <td><p>require_uppercase_letter requires the password must contains at least one upper case letter. </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>require_special_character</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The issue to update.--The issue's `name` field is used to identify the issue to update.-Format: projects/{project}/issues/{issue} </p></td>+ <td><p>require_special_character requires the password must contains at least one special character. </p></td></tr><tr>- <td>update_mask</td>- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td>require_reset_password_for_first_login</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The list of fields to update. </p></td>+ <td><p>require_reset_password_for_first_login requires users to reset their password after the 1st login. </p></td></tr><tr>- <td>allow_missing</td>- <td><a href="#bool">bool</a></td>+ <td>password_rotation</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</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>+ <td><p>password_rotation requires users to reset their password after the duration. </p></td></tr></tbody>@@ -14011,8 +13837,8 @@ In this situation, `update_mask` is ignored. </p></td>- <h3 id="bytebase.v1.Issue.Approver.Status">Issue.Approver.Status</h3>- <p>The approval status of an approver.</p>+ <h3 id="bytebase.v1.AISetting.Provider">AISetting.Provider</h3>+ <p></p><table class="enum-table"><thead><tr><td>Name</td><td>Number</td><td>Description</td></tr>@@ -14020,34 +13846,40 @@ In this situation, `update_mask` is ignored. </p></td><tbody><tr>- <td>STATUS_UNSPECIFIED</td>+ <td>PROVIDER_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified status.</p></td>+ <td><p></p></td></tr><tr>- <td>PENDING</td>+ <td>OPEN_AI</td><td>1</td>- <td><p>Awaiting approval.</p></td>+ <td><p></p></td></tr><tr>- <td>APPROVED</td>+ <td>CLAUDE</td><td>2</td>- <td><p>Approved.</p></td>+ <td><p></p></td></tr><tr>- <td>REJECTED</td>+ <td>GEMINI</td><td>3</td>- <td><p>Rejected.</p></td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>AZURE_OPENAI</td>+ <td>4</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.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>@@ -14055,34 +13887,58 @@ In this situation, `update_mask` is ignored. </p></td><tbody><tr>- <td>TYPE_UNSPECIFIED</td>+ <td>MASK_TYPE_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified issue type.</p></td>+ <td><p></p></td></tr><tr>- <td>DATABASE_CHANGE</td>+ <td>INNER</td><td>1</td>- <td><p>Database schema or data change.</p></td>+ <td><p></p></td></tr><tr>- <td>ROLE_GRANT</td>+ <td>OUTER</td><td>2</td>- <td><p>Role grant request.</p></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>ACCESS_GRANT</td>- <td>4</td>- <td><p>Temporary access grant request.</p></td>+ <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>- <h3 id="bytebase.v1.IssueComment.Approval.Status">IssueComment.Approval.Status</h3>- <p>Approval status values.</p>+ <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>@@ -14090,34 +13946,40 @@ In this situation, `update_mask` is ignored. </p></td><tbody><tr>- <td>STATUS_UNSPECIFIED</td>+ <td>AUTHENTICATION_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified status.</p></td>+ <td><p></p></td></tr><tr>- <td>PENDING</td>+ <td>AUTHENTICATION_NONE</td><td>1</td>- <td><p>Approval pending.</p></td>+ <td><p></p></td></tr><tr>- <td>APPROVED</td>+ <td>PLAIN</td><td>2</td>- <td><p>Approved.</p></td>+ <td><p></p></td></tr><tr>- <td>REJECTED</td>+ <td>LOGIN</td><td>3</td>- <td><p>Rejected.</p></td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>CRAM_MD5</td>+ <td>4</td>+ <td><p></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>+ <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>@@ -14125,41 +13987,57 @@ In this situation, `update_mask` is ignored. </p></td><tbody><tr>- <td>STATUS_UNSPECIFIED</td>+ <td>ENCRYPTION_UNSPECIFIED</td><td>0</td><td><p></p></td></tr><tr>- <td>AVAILABLE</td>+ <td>ENCRYPTION_NONE</td><td>1</td>- <td><p>Created and claimable by any replica.</p></td>+ <td><p></p></td></tr><tr>- <td>RUNNING</td>+ <td>STARTTLS</td><td>2</td><td><p></p></td></tr><tr>- <td>DONE</td>+ <td>SSL_TLS</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>+ <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>TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></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>+ <td>SMTP</td>+ <td>1</td>+ <td><p></p></td></tr></tbody></table>- <h3 id="bytebase.v1.ReviewRun.Type">ReviewRun.Type</h3>- <p></p>+ <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>@@ -14167,161 +14045,190 @@ review passed: whether problems remain is judged from open comments.</p></td><tbody><tr>- <td>TYPE_UNSPECIFIED</td>+ <td>CAPABILITY_UNSPECIFIED</td><td>0</td><td><p></p></td></tr><tr>- <td>RULE</td>+ <td>DISABLED</td><td>1</td>- <td><p>Review against the standard rules.</p></td>+ <td><p>MCP connections are rejected.</p></td></tr><tr>- <td>GUIDELINE</td>- <td>2</td>- <td><p>Review against natural-language guidelines, performed by AI.</p></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'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's RBAC.</p></td></tr></tbody></table>----- <h3 id="bytebase.v1.IssueService">IssueService</h3>- <p>IssueService manages issues for tracking database changes and tasks.</p>+ <h3 id="bytebase.v1.Setting.SettingName">Setting.SettingName</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>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>+ <td>SETTING_NAME_UNSPECIFIED</td>+ <td>0</td>+ <td><p></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>+ <td>WORKSPACE_PROFILE</td>+ <td>1</td>+ <td><p></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>+ <td>WORKSPACE_APPROVAL</td>+ <td>2</td>+ <td><p></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 & query.-Permissions required: bb.issues.get</p></td>+ <td>APP_IM</td>+ <td>3</td>+ <td><p></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's properties such as title, description, or labels.-Permissions required: bb.issues.update</p></td>+ <td>AI</td>+ <td>4</td>+ <td><p></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>+ <td>DATA_CLASSIFICATION</td>+ <td>5</td>+ <td><p></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>+ <td>SEMANTIC_TYPES</td>+ <td>6</td>+ <td><p></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>ENVIRONMENT</td>+ <td>7</td>+ <td><p></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>EMAIL</td>+ <td>8</td>+ <td><p></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>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>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>SOURCE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></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>CHANGE_DATABASE</td>+ <td>1</td>+ <td><p></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's authorization model).</p></td>+ <td>CREATE_DATABASE</td>+ <td>2</td>+ <td><p></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>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>@@ -14345,9 +14252,9 @@ Permissions required: bb.reviewRuns.run</p></td><tr>- <td>GetIssue</td>+ <td>ListSettings</td><td>GET</td>- <td>/v1/{name=projects/*/issues/*}</td>+ <td>/v1/settings</td><td></td></tr>@@ -14355,130 +14262,294 @@ Permissions required: bb.reviewRuns.run</p></td><tr>- <td>CreateIssue</td>- <td>POST</td>- <td>/v1/{parent=projects/*}/issues</td>- <td>issue</td>+ <td>GetSetting</td>+ <td>GET</td>+ <td>/v1/{name=settings/*}</td>+ <td></td></tr><tr>- <td>ListIssues</td>- <td>GET</td>- <td>/v1/{parent=projects/*}/issues</td>- <td></td>+ <td>UpdateSetting</td>+ <td>PATCH</td>+ <td>/v1/{setting.name=settings/*}</td>+ <td>setting</td></tr><tr>- <td>SearchIssues</td>+ <td>TestEmailSetting</td><td>POST</td>- <td>/v1/{parent=projects/*}/issues:search</td>+ <td>/v1/{parent=workspaces/*}/settings/EMAIL:test</td><td>*</td></tr>+ </tbody>+ </table>+++++ <div class="file-heading">+ <h2 id="v1/actuator_service.proto">v1/actuator_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.ActuatorInfo">ActuatorInfo</h3>+ <p>System information and configuration for the Bytebase instance.</p><p>Actuator concept is similar to the Spring Boot Actuator.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>version</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The Bytebase server version. </p></td>+ </tr>+ <tr>+ <td>git_commit</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The git commit hash of the build. </p></td>+ </tr>- <tr>- <td>UpdateIssue</td>- <td>PATCH</td>- <td>/v1/{issue.name=projects/*/issues/*}</td>- <td>issue</td>- </tr>+ <tr>+ <td>saas</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether the Bytebase instance is running in SaaS mode where some features cannot be edited by users. </p></td>+ </tr>-+ <tr>+ <td>external_url</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The external URL where users or webhook callbacks access Bytebase. </p></td>+ </tr>++ <tr>+ <td>last_active_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p>The last time any API call was made, refreshed on each request. </p></td>+ </tr>+ <tr>+ <td>workspace</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The unique identifier for the workspace.+Format: workspaces/{id} </p></td>+ </tr>- <tr>- <td>ListIssueComments</td>- <td>GET</td>- <td>/v1/{parent=projects/*/issues/*}/issueComments</td>- <td></td>- </tr>+ <tr>+ <td>unlicensed_features</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>List of features that are not licensed. </p></td>+ </tr>-+ <tr>+ <td>activated_instance_count</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>The number of activated database instances. </p></td>+ </tr>+ <tr>+ <td>total_instance_count</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>The total number of database instances. </p></td>+ </tr>- <tr>- <td>CreateIssueComment</td>- <td>POST</td>- <td>/v1/{parent=projects/*/issues/*}:comment</td>- <td>issue_comment</td>- </tr>+ <tr>+ <td>external_url_from_flag</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether the external URL is set via command-line flag (and thus cannot be changed via UI). </p></td>+ </tr>-+ <tr>+ <td>replica_count</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>The number of active replicas (servers sharing the same database). </p></td>+ </tr>+ <tr>+ <td>default_project</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The default project for unassigned databases.+Format: projects/{id} </p></td>+ </tr>- <tr>- <td>UpdateIssueComment</td>- <td>PATCH</td>- <td>/v1/{parent=projects/*/issues/*}:comment</td>- <td>issue_comment</td>- </tr>+ <tr>+ <td>user_count_in_iam</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>The number of users in the workspace IAM (for seat limit display). </p></td>+ </tr>-+ <tr>+ <td>active_vcs_user_count</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>The number of active VCS users seen in the active window. </p></td>+ </tr>+ <tr>+ <td>sample</td>+ <td><a href="#bytebase.v1.SampleInfo">SampleInfo</a></td>+ <td></td>+ <td><p>Sample setup availability and provisioned resources. </p></td>+ </tr>- <tr>- <td>BatchUpdateIssuesStatus</td>- <td>POST</td>- <td>/v1/{parent=projects/*}/issues:batchUpdateStatus</td>- <td>*</td>- </tr>+ <tr>+ <td>mcp_setting</td>+ <td><a href="#bytebase.v1.MCPSetting">MCPSetting</a></td>+ <td></td>+ <td><p>The MCP (Model Context Protocol) setting in the current workspace. </p></td>+ </tr>-+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.GetActuatorInfoRequest">GetActuatorInfoRequest</h3>+ <p>Request message for getting actuator information.</p>++++++ <h3 id="bytebase.v1.SampleInfo">SampleInfo</h3>+ <p>SampleInfo describes sample setup availability and provisioned resources.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>+ <tr>+ <td>available</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether sample setup is currently available. </p></td>+ </tr>- <tr>- <td>ApproveIssue</td>- <td>POST</td>- <td>/v1/{name=projects/*/issues/*}:approve</td>- <td>*</td>- </tr>+ <tr>+ <td>instances</td>+ <td><a href="#bytebase.v1.SampleInfo.Instance">SampleInfo.Instance</a></td>+ <td>repeated</td>+ <td><p>The provisioned sample instances. </p></td>+ </tr>-+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.SampleInfo.Instance">SampleInfo.Instance</h3>+ <p>Instance describes one provisioned sample instance.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>+ <tr>+ <td>instance</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The provisioned sample instance.+Format: instances/{instance} or projects/{project}/instances/{instance} </p></td>+ </tr>- <tr>- <td>RejectIssue</td>- <td>POST</td>- <td>/v1/{name=projects/*/issues/*}:reject</td>- <td>*</td>- </tr>+ <tr>+ <td>expire_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p>The time when the provisioned sample instance expires. </p></td>+ </tr>+ </tbody>+ </table>++++++++++++ <h3 id="bytebase.v1.ActuatorService">ActuatorService</h3>+ <p>ActuatorService manages system health and operational information.</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>RequestIssue</td>- <td>POST</td>- <td>/v1/{name=projects/*/issues/*}:request</td>- <td>*</td>+ <td>GetActuatorInfo</td>+ <td><a href="#bytebase.v1.GetActuatorInfoRequest">GetActuatorInfoRequest</a></td>+ <td><a href="#bytebase.v1.ActuatorInfo">ActuatorInfo</a></td>+ <td><p>Gets system information and health status of the Bytebase instance.+The workspace is resolved from the authenticated session.+Permissions required: None (authentication required)</p></td></tr>---+ </tbody>+ </table>+++++ <h4>Methods with HTTP bindings</h4>+ <table>+ <thead><tr>- <td>RetryIssueApproval</td>- <td>POST</td>- <td>/v1/{name=projects/*/issues/*}:retryApproval</td>- <td>*</td>+ <td>Method Name</td>+ <td>Method</td>+ <td>Pattern</td>+ <td>Body</td></tr>-+ </thead>+ <tbody><tr>- <td>RunReview</td>- <td>POST</td>- <td>/v1/{name=projects/*/issues/*/reviewRuns/*}:run</td>- <td>*</td>+ <td>GetActuatorInfo</td>+ <td>GET</td>+ <td>/v1/actuator/info</td>+ <td></td></tr>@@ -14489,13 +14560,13 @@ 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/ai_service.proto">v1/ai_service.proto</h2><a href="#title">Top</a></div><p></p>- <h3 id="bytebase.v1.AISetting">AISetting</h3>- <p></p>+ <h3 id="bytebase.v1.AIChatMessage">AIChatMessage</h3>+ <p>A single message in the conversation.</p><table class="field-table">@@ -14505,45 +14576,62 @@ Permissions required: bb.reviewRuns.run</p></td><tbody><tr>- <td>enabled</td>- <td><a href="#bool">bool</a></td>+ <td>role</td>+ <td><a href="#bytebase.v1.AIChatMessageRole">AIChatMessageRole</a></td><td></td>- <td><p> </p></td>+ <td><p>The role of the message sender. </p></td></tr><tr>- <td>provider</td>- <td><a href="#bytebase.v1.AISetting.Provider">AISetting.Provider</a></td>- <td></td>- <td><p> </p></td>+ <td>content</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>The text content of the message. Optional for assistant messages that only contain tool calls. </p></td></tr><tr>- <td>endpoint</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>+ <td>tool_calls</td>+ <td><a href="#bytebase.v1.AIChatToolCall">AIChatToolCall</a></td>+ <td>repeated</td>+ <td><p>Tool calls made by the assistant. Only present in assistant messages. </p></td></tr><tr>- <td>api_key</td>+ <td>tool_call_id</td><td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>+ <td>optional</td>+ <td><p>The ID of the tool call this message is responding to. Only present in tool messages. </p></td></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.AIChatRequest">AIChatRequest</h3>+ <p>Request message for AIService.Chat.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>+<tr>- <td>model</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>+ <td>messages</td>+ <td><a href="#bytebase.v1.AIChatMessage">AIChatMessage</a></td>+ <td>repeated</td>+ <td><p>The conversation messages. </p></td></tr><tr>- <td>version</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>+ <td>tool_definitions</td>+ <td><a href="#bytebase.v1.AIChatToolDefinition">AIChatToolDefinition</a></td>+ <td>repeated</td>+ <td><p>The tool definitions available to the AI. </p></td></tr></tbody>@@ -14553,8 +14641,8 @@ Permissions required: bb.reviewRuns.run</p></td>- <h3 id="bytebase.v1.Algorithm">Algorithm</h3>- <p></p>+ <h3 id="bytebase.v1.AIChatResponse">AIChatResponse</h3>+ <p>Response message for AIService.Chat.</p><table class="field-table">@@ -14564,31 +14652,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></td>- <td><p> </p></td>+ <td>content</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>The text content of the AI response. Optional when the response only contains tool calls. </p></td></tr><tr>- <td>md5_mask</td>- <td><a href="#bytebase.v1.Algorithm.MD5Mask">Algorithm.MD5Mask</a></td>- <td></td>- <td><p> </p></td>+ <td>tool_calls</td>+ <td><a href="#bytebase.v1.AIChatToolCall">AIChatToolCall</a></td>+ <td>repeated</td>+ <td><p>Tool calls the AI wants to make. </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>+ <td>usage</td>+ <td><a href="#bytebase.v1.AIChatUsage">AIChatUsage</a></td>+ <td>optional</td>+ <td><p>Token usage for this provider call, when available. </p></td></tr></tbody>@@ -14598,8 +14679,8 @@ Permissions required: bb.reviewRuns.run</p></td>- <h3 id="bytebase.v1.Algorithm.FullMask">Algorithm.FullMask</h3>- <p></p>+ <h3 id="bytebase.v1.AIChatToolCall">AIChatToolCall</h3>+ <p>A tool call made by the AI.</p><table class="field-table">@@ -14609,11 +14690,32 @@ Permissions required: bb.reviewRuns.run</p></td><tbody><tr>- <td>substitution</td>+ <td>id</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 unique ID of this tool call. </p></td>+ </tr>++ <tr>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the tool to call. </p></td>+ </tr>++ <tr>+ <td>arguments</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The JSON-encoded arguments to pass to the tool. </p></td>+ </tr>++ <tr>+ <td>metadata</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Opaque provider-specific metadata (e.g., Gemini thought_signature).+Frontend must echo this back unchanged when sending tool results. </p></td></tr></tbody>@@ -14623,8 +14725,8 @@ max length of the string is 16 bytes. </p></td>- <h3 id="bytebase.v1.Algorithm.InnerOuterMask">Algorithm.InnerOuterMask</h3>- <p></p>+ <h3 id="bytebase.v1.AIChatToolDefinition">AIChatToolDefinition</h3>+ <p>A tool definition that the AI can invoke.</p><table class="field-table">@@ -14634,31 +14736,24 @@ max length of the string is 16 bytes. </p></td><tbody><tr>- <td>prefix_len</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>suffix_len</td>- <td><a href="#int32">int32</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The name of the tool. </p></td></tr><tr>- <td>type</td>- <td><a href="#bytebase.v1.Algorithm.InnerOuterMask.MaskType">Algorithm.InnerOuterMask.MaskType</a></td>+ <td>description</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>A description of what the tool does. </p></td></tr><tr>- <td>substitution</td>+ <td>parameters_schema</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The JSON Schema describing the tool's parameters. </p></td></tr></tbody>@@ -14668,8 +14763,8 @@ max length of the string is 16 bytes. </p></td>- <h3 id="bytebase.v1.Algorithm.MD5Mask">Algorithm.MD5Mask</h3>- <p></p>+ <h3 id="bytebase.v1.AIChatUsage">AIChatUsage</h3>+ <p>Token usage for a single AI provider call.</p><table class="field-table">@@ -14679,10 +14774,10 @@ max length of the string is 16 bytes. </p></td><tbody><tr>- <td>salt</td>- <td><a href="#string">string</a></td>+ <td>total_tokens</td>+ <td><a href="#int32">int32</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>Total tokens used by the provider call. </p></td></tr></tbody>@@ -14692,8 +14787,111 @@ max length of the string is 16 bytes. </p></td>- <h3 id="bytebase.v1.Algorithm.RangeMask">Algorithm.RangeMask</h3>- <p></p>+++ <h3 id="bytebase.v1.AIChatMessageRole">AIChatMessageRole</h3>+ <p>Role of a chat message.</p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>AI_CHAT_MESSAGE_ROLE_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified role.</p></td>+ </tr>++ <tr>+ <td>AI_CHAT_MESSAGE_ROLE_SYSTEM</td>+ <td>1</td>+ <td><p>System message providing instructions.</p></td>+ </tr>++ <tr>+ <td>AI_CHAT_MESSAGE_ROLE_USER</td>+ <td>2</td>+ <td><p>User message.</p></td>+ </tr>++ <tr>+ <td>AI_CHAT_MESSAGE_ROLE_ASSISTANT</td>+ <td>3</td>+ <td><p>Assistant (AI) message.</p></td>+ </tr>++ <tr>+ <td>AI_CHAT_MESSAGE_ROLE_TOOL</td>+ <td>4</td>+ <td><p>Tool result message.</p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.AIService">AIService</h3>+ <p>AIService provides AI chat capabilities for the page agent.</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>Chat</td>+ <td><a href="#bytebase.v1.AIChatRequest">AIChatRequest</a></td>+ <td><a href="#bytebase.v1.AIChatResponse">AIChatResponse</a></td>+ <td><p>Chat sends a conversation with tool definitions to the configured AI provider+and returns the AI response.</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>Chat</td>+ <td>POST</td>+ <td>/v1/ai/chat</td>+ <td>*</td>+ </tr>+++ </tbody>+ </table>+++++ <div class="file-heading">+ <h2 id="v1/iam_policy.proto">v1/iam_policy.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.Binding">Binding</h3>+ <p>Binding associates members with a role and optional conditions.</p><table class="field-table">@@ -14703,11 +14901,66 @@ 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>role</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The role that is assigned to the members.+Format: roles/{role} </p></td>+ </tr>++ <tr>+ <td>members</td>+ <td><a href="#string">string</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><p>Specifies the principals requesting access for a Bytebase resource.+For users, the member should be: user:{email}+For groups, the member should be: group:{email}+For service accounts, the member should be: serviceAccount:{email}+For workload identities, the member should be: workloadIdentity:{email} </p></td>+ </tr>++ <tr>+ <td>condition</td>+ <td><a href="#google.type.Expr">google.type.Expr</a></td>+ <td></td>+ <td><p>The condition that is associated with this binding, only used in the project IAM policy.+If the condition evaluates to true, then this binding applies to the current request.+If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding.+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Support variables:+resource.database: the canonical database full name in "instances/{instance}/databases/{database}" or "projects/{project}/instances/{instance}/databases/{database}" format, used by any role with SQL Editor read (e.g. "roles/sqlEditorUser", "roles/sqlEditorReadUser") or write (bb.sql.ddl / bb.sql.dml) access, support "==" operator.+resource.schema_name: the schema name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, support "==" operator.+resource.table_name: the table name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, support "==" operator.+resource.environment_id: the environment to allow the DDL/DML operation in the SQL Editor, only works for the role with bb.sql.ddl or bb.sql.dml permissions. Support "in" operator.+request.time: the expiration. Only support "<" operation in `request.time < timestamp("{ISO datetime string format}")`.++Known limitations of table/schema-scoped DDL/DML grants:+- The scope only gates the write target, not the read sources of a write: e.g. `INSERT INTO granted_table SELECT * FROM other_table` may read `other_table` without a grant on it, so a table-scoped write grant is not an exfiltration boundary.+- It must be paired with a database/project-level read grant: a table-scoped grant alone does not satisfy the SQL Editor query method permission (bb.databases.get).+- A resource.schema_name-scoped grant only authorizes a write whose schema is unambiguous — qualify the table (schema.table) or select the schema for the SQL Editor session. An unqualified write whose effective schema cannot be determined ahead of execution is denied (qualify it, or use a table-only grant).+- Multi-statement batches are authorized at the database level: an earlier statement can rebind the session's default schema or database mid-batch, so per-table/schema scoping is dropped and a table/schema-scoped grant requires a database-level grant. The database-level check is still per target database — a qualified cross-database write is gated by a grant on its own database, not the request database — but an unqualified write whose session default is rebound mid-batch is evaluated against the database it literally names, so qualify cross-database writes or run them as single statements.+- A write target in a different project than the SQL-Editor session's database is denied: the per-target check evaluates the session project's IAM policy, so a cross-project write is failed closed (to write it, open the SQL Editor on a database in the target project).+- Enforcement is on the statement's literal write target; writes routed elsewhere by a view/synonym, or into a temporary schema (e.g. pg_temp), are evaluated against what the statement names, not the ultimate base object.+- Write-target gating uses an ALLOWLIST of statement types the resolver models. It does NOT cover every syntactically-identifiable cross-database write; statement types off the allowlist are authorized against the request database. The allowlist is:+ - Modeled table/data writes (per-table/schema-scopable): INSERT/UPDATE/DELETE/TRUNCATE/MERGE, LOAD DATA, IMPORT INTO, CREATE TABLE AS / SELECT INTO, and table-level CREATE/DROP/ALTER/RENAME/index.+ - Modeled non-table object DDL (gated at the DATABASE level by the object's own explicit database/schema qualifier; an unqualified name keeps the request-database check): CREATE/ALTER/DROP of view, procedure/function/routine, trigger, sequence, synonym, type, and (Oracle) package and cluster; plus Oracle ALTER/DROP MATERIALIZED VIEW (Oracle CREATE MATERIALIZED VIEW is not modeled — see below).+ NOT modeled (these fall back to the request-database check, so a qualified cross-database one is authorized against the request database): MySQL CREATE TRIGGER and CREATE/ALTER/DROP EVENT (bare-string AST names); MSSQL ALTER of view/procedure/function/trigger (no ALTER node in the grammar); Oracle CREATE MATERIALIZED VIEW and the niche object DDL — dimension, attribute dimension, hierarchy, analytic view, JSON duality view, materialized zonemap, operator, in-memory join group, property graph, vector index, index type, domain; COPY ... FROM; and engine-specific bulk-load / deprecated text writes. A structural "write-target object database" extraction layer to remove this allowlist dependence is tracked as a follow-up.+ - Out of scope (read sources / indirect effects): the tables a write READS (INSERT … SELECT, MERGE … USING, CREATE TABLE AS … SELECT) and objects reached indirectly via views/synonyms/function bodies/triggers are NOT gated.+ Invariant: for a statement ON the modeled allowlist that explicitly names a different database as its write target, the ACL uses that target database, not the request database. Statement types OFF the allowlist are authorized against the request database.++For example:+resource.database == "instances/local-pg/databases/postgres" && resource.schema_name in ["public","another_schema"]+resource.database == "instances/local-pg/databases/bytebase" && resource.schema_name == "public" && resource.table_name in ["audit_log"]+resource.database == "instances/local-pg/databases/postgres" && resource.environment_id in ["test"]+request.time < timestamp("2025-04-26T11:24:48.655Z") </p></td>+ </tr>++ <tr>+ <td>parsed_expr</td>+ <td><a href="#google.api.expr.v1alpha1.Expr">google.api.expr.v1alpha1.Expr</a></td>+ <td></td>+ <td><p>The parsed expression of the condition. </p></td></tr></tbody>@@ -14717,8 +14970,8 @@ But frontend can be started with a single rule easily. </p></td>- <h3 id="bytebase.v1.Algorithm.RangeMask.Slice">Algorithm.RangeMask.Slice</h3>- <p></p>+ <h3 id="bytebase.v1.BindingDelta">BindingDelta</h3>+ <p>A single change to a binding.</p><table class="field-table">@@ -14728,27 +14981,32 @@ 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>action</td>+ <td><a href="#bytebase.v1.BindingDelta.Action">BindingDelta.Action</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 "你好world", character index 2 refers to 'w' (the 3rd character). </p></td>+ <td><p>The action that was performed on a Binding. </p></td></tr><tr>- <td>end</td>- <td><a href="#int32">int32</a></td>+ <td>role</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>Role that is assigned to `members`.+For example, `roles/projectOwner`. </p></td></tr><tr>- <td>substitution</td>+ <td>member</td><td><a href="#string">string</a></td><td></td>- <td><p>substitution is the string used to replace the OriginalValue[start:end). </p></td>+ <td><p>Follows the same format of Binding.members. </p></td>+ </tr>++ <tr>+ <td>condition</td>+ <td><a href="#google.type.Expr">google.type.Expr</a></td>+ <td></td>+ <td><p>The condition that is associated with this binding. </p></td></tr></tbody>@@ -14758,8 +15016,8 @@ Uses character indices (not byte offsets) for display-oriented masking. </p></td- <h3 id="bytebase.v1.Announcement">Announcement</h3>- <p></p>+ <h3 id="bytebase.v1.GetIamPolicyRequest">GetIamPolicyRequest</h3>+ <p>Request message for getting an IAM policy.</p><table class="field-table">@@ -14769,25 +15027,12 @@ Uses character indices (not byte offsets) for display-oriented masking. </p></td<tbody><tr>- <td>text</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The text of announcement </p></td>- </tr>-- <tr>- <td>link</td>+ <td>resource</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>- </tr>-- <tr>- <td>theme</td>- <td><a href="#bytebase.v1.Announcement.AnnouncementTheme">Announcement.AnnouncementTheme</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 name of the resource to get the IAM policy.+Format: projects/{project}+Format: workspaces/{workspace} </p></td></tr></tbody>@@ -14797,8 +15042,8 @@ frontend-only concept that seeds these colors; the store only holds them. </p></- <h3 id="bytebase.v1.Announcement.AnnouncementTheme">Announcement.AnnouncementTheme</h3>- <p></p>+ <h3 id="bytebase.v1.IamPolicy">IamPolicy</h3>+ <p>IAM policy that binds members to roles.</p><table class="field-table">@@ -14808,17 +15053,21 @@ frontend-only concept that seeds these colors; the store only holds them. </p></<tbody><tr>- <td>background</td>- <td><a href="#google.type.Color">google.type.Color</a></td>- <td></td>- <td><p> </p></td>+ <td>bindings</td>+ <td><a href="#bytebase.v1.Binding">Binding</a></td>+ <td>repeated</td>+ <td><p>Collection of binding.+A binding binds one or more project members to a single project role. </p></td></tr><tr>- <td>text</td>- <td><a href="#google.type.Color">google.type.Color</a></td>+ <td>etag</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The current etag of the policy, returned by GetIamPolicy and SetIamPolicy.+Sending it back on SetIamPolicy makes the write conditional: if the policy+changed since the read, the call returns ABORTED. Omitting it applies the+write unconditionally, overwriting any concurrent change (AIP-154). </p></td></tr></tbody>@@ -14828,8 +15077,8 @@ frontend-only concept that seeds these colors; the store only holds them. </p></- <h3 id="bytebase.v1.AppIMSetting">AppIMSetting</h3>- <p></p>+ <h3 id="bytebase.v1.PolicyDelta">PolicyDelta</h3>+ <p>Describes changes between two IAM policies.</p><table class="field-table">@@ -14839,10 +15088,10 @@ frontend-only concept that seeds these colors; the store only holds them. </p></<tbody><tr>- <td>settings</td>- <td><a href="#bytebase.v1.AppIMSetting.IMSetting">AppIMSetting.IMSetting</a></td>+ <td>binding_deltas</td>+ <td><a href="#bytebase.v1.BindingDelta">BindingDelta</a></td><td>repeated</td>- <td><p> </p></td>+ <td><p>The delta for Bindings between two policies. </p></td></tr></tbody>@@ -14852,8 +15101,8 @@ frontend-only concept that seeds these colors; the store only holds them. </p></- <h3 id="bytebase.v1.AppIMSetting.DingTalk">AppIMSetting.DingTalk</h3>- <p></p>+ <h3 id="bytebase.v1.SetIamPolicyRequest">SetIamPolicyRequest</h3>+ <p>Request message for setting an IAM policy.</p><table class="field-table">@@ -14863,24 +15112,27 @@ frontend-only concept that seeds these colors; the store only holds them. </p></<tbody><tr>- <td>client_id</td>+ <td>resource</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The name of the resource to set the IAM policy.+Format: projects/{project}+Format: workspaces/{workspace} </p></td></tr><tr>- <td>client_secret</td>- <td><a href="#string">string</a></td>+ <td>policy</td>+ <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td><td></td><td><p> </p></td></tr><tr>- <td>robot_code</td>+ <td>etag</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The current etag of the policy. Equivalent to setting `policy.etag`;+supplying both with different values returns INVALID_ARGUMENT. </p></td></tr></tbody>@@ -14890,8 +15142,51 @@ 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.BindingDelta.Action">BindingDelta.Action</h3>+ <p>Type of action performed on a binding.</p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>ACTION_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified action.</p></td>+ </tr>++ <tr>+ <td>ADD</td>+ <td>1</td>+ <td><p>Add a binding.</p></td>+ </tr>++ <tr>+ <td>REMOVE</td>+ <td>2</td>+ <td><p>Remove a binding.</p></td>+ </tr>++ </tbody>+ </table>++++++++ <div class="file-heading">+ <h2 id="v1/audit_log_service.proto">v1/audit_log_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.AuditData">AuditData</h3>+ <p>Additional audit data specific to certain operations.</p><table class="field-table">@@ -14901,17 +15196,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></td>- <td><p> </p></td>- </tr>-- <tr>- <td>app_secret</td>- <td><a href="#string">string</a></td>+ <td>policy_delta</td>+ <td><a href="#bytebase.v1.PolicyDelta">PolicyDelta</a></td><td></td>- <td><p> </p></td>+ <td><p>Changes to IAM policies. </p></td></tr></tbody>@@ -14921,8 +15209,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.AuditLog">AuditLog</h3>+ <p>Audit log entry recording system activity or API call.</p><table class="field-table">@@ -14932,145 +15220,102 @@ 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>The name of the log.+Formats:+- projects/{project}/auditLogs/{uid}+- workspaces/{workspace}/auditLogs/{uid} </p></td></tr><tr>- <td>slack</td>- <td><a href="#bytebase.v1.AppIMSetting.Slack">AppIMSetting.Slack</a></td>+ <td>create_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p> </p></td>+ <td><p>The timestamp when the audit log was created. </p></td></tr><tr>- <td>feishu</td>- <td><a href="#bytebase.v1.AppIMSetting.Feishu">AppIMSetting.Feishu</a></td>+ <td>user</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The user who performed the action.+Format: users/{email} </p></td></tr><tr>- <td>wecom</td>- <td><a href="#bytebase.v1.AppIMSetting.Wecom">AppIMSetting.Wecom</a></td>+ <td>method</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The method or action being audited.+For example: /bytebase.v1.SQLService/Query or bb.project.repository.push </p></td></tr><tr>- <td>lark</td>- <td><a href="#bytebase.v1.AppIMSetting.Lark">AppIMSetting.Lark</a></td>+ <td>severity</td>+ <td><a href="#bytebase.v1.AuditLog.Severity">AuditLog.Severity</a></td><td></td>- <td><p> </p></td>+ <td><p>The severity level of this audit log entry. </p></td></tr><tr>- <td>dingtalk</td>- <td><a href="#bytebase.v1.AppIMSetting.DingTalk">AppIMSetting.DingTalk</a></td>+ <td>resource</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The resource associated with this audit log. </p></td></tr><tr>- <td>teams</td>- <td><a href="#bytebase.v1.AppIMSetting.Teams">AppIMSetting.Teams</a></td>+ <td>request</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The request payload in JSON format. </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>app_id</td>+ <td>response</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The response payload in JSON format.+Some fields may be omitted if they are too large or contain sensitive information. </p></td></tr><tr>- <td>app_secret</td>- <td><a href="#string">string</a></td>+ <td>status</td>+ <td><a href="#google.rpc.Status">google.rpc.Status</a></td><td></td>- <td><p> </p></td>+ <td><p>The status of the operation. </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>token</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> </p></td>+ <td><p>The duration of the operation. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.AppIMSetting.Teams">AppIMSetting.Teams</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>tenant_id</td>- <td><a href="#string">string</a></td>+ <td>service_data</td>+ <td><a href="#google.protobuf.Any">google.protobuf.Any</a></td><td></td>- <td><p>Azure AD tenant ID (Directory ID). </p></td>+ <td><p>Service-specific metadata about the request, response, and activities. </p></td></tr><tr>- <td>client_id</td>- <td><a href="#string">string</a></td>+ <td>request_metadata</td>+ <td><a href="#bytebase.v1.RequestMetadata">RequestMetadata</a></td><td></td>- <td><p>Azure AD application (client) ID. </p></td>+ <td><p>Metadata about the request context. </p></td></tr><tr>- <td>client_secret</td>- <td><a href="#string">string</a></td>+ <td>mcp_delegation</td>+ <td><a href="#bytebase.v1.MCPDelegation">MCPDelegation</a></td><td></td>- <td><p>Azure AD client secret. </p></td>+ <td><p>MCP delegation provenance. Present exactly when the audited call arrived+through the MCP server's delegated credential; never set for public API+calls. Presence of this message is the MCP-origin marker. </p></td></tr></tbody>@@ -15080,8 +15325,8 @@ frontend-only concept that seeds these colors; the store only holds them. </p></- <h3 id="bytebase.v1.AppIMSetting.Wecom">AppIMSetting.Wecom</h3>- <p></p>+ <h3 id="bytebase.v1.ExportAuditLogsRequest">ExportAuditLogsRequest</h3>+ <p>Request message for exporting audit logs.</p><table class="field-table">@@ -15091,94 +15336,54 @@ 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></tr><tr>- <td>agent_id</td>+ <td>filter</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The filter of the log. It should be a valid CEL expression.+Check the filter field in the SearchAuditLogsRequest message. </p></td></tr><tr>- <td>secret</td>+ <td>order_by</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The order by of the log.+Only support order by create_time. The default sorting order is ascending.+For example:+ - order_by = "create_time asc"+ - order_by = "create_time desc" </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>configs</td>- <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig">DataClassificationSetting.DataClassificationConfig</a></td>- <td>repeated</td>- <td><p> </p></td>+ <td>format</td>+ <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>+ <td></td>+ <td><p>The export format. </p></td></tr>- </tbody>- </table>------ <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>page_size</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>id is the uuid for classification. Each project can chose one classification config. </p></td>+ <td><p>The maximum number of logs to return.+The service may return fewer than this value.+If unspecified, at most 10 log entries will be returned.+The maximum value is 5000; values above 5000 will be coerced to 5000. </p></td></tr><tr>- <td>title</td>+ <td>page_token</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]+-[0-9]+-[0-9]+ format. </p></td>+ <td><p>A page token, received from a previous `ExportAuditLogs` call.+Provide this to retrieve the subsequent page. </p></td></tr></tbody>@@ -15188,8 +15393,8 @@ The id should in [0-9]+-[0-9]+-[0-9]+ format. </p></td>- <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry">DataClassificationSetting.DataClassificationConfig.ClassificationEntry</h3>- <p></p>+ <h3 id="bytebase.v1.ExportAuditLogsResponse">ExportAuditLogsResponse</h3>+ <p>Response message for exporting audit logs.</p><table class="field-table">@@ -15199,17 +15404,19 @@ The id should in [0-9]+-[0-9]+-[0-9]+ format. </p></td><tbody><tr>- <td>key</td>- <td><a href="#string">string</a></td>+ <td>content</td>+ <td><a href="#bytes">bytes</a></td><td></td>- <td><p> </p></td>+ <td><p>The exported audit log content in the requested format. </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 to retrieve next page of log entities.+Pass this value in the page_token field in the subsequent call+to retrieve the next page of log entities. </p></td></tr></tbody>@@ -15219,8 +15426,8 @@ The id should in [0-9]+-[0-9]+-[0-9]+ format. </p></td>- <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification">DataClassificationSetting.DataClassificationConfig.DataClassification</h3>- <p></p>+ <h3 id="bytebase.v1.MCPDelegation">MCPDelegation</h3>+ <p>Provenance of a call that reached the API through the MCP (Model Context</p><p>Protocol) server's delegated credential. The values are copied verbatim from</p><p>the verified credential's grant state; empty fields record that the grant</p><p>stored nothing (legacy sessions), never a resolved or synthesized value.</p><table class="field-table">@@ -15230,24 +15437,37 @@ The id should in [0-9]+-[0-9]+-[0-9]+ format. </p></td><tbody><tr>- <td>id</td>+ <td>scope</td><td><a href="#string">string</a></td><td></td>- <td><p>id is the classification id in [0-9]+-[0-9]+-[0-9]+ format. </p></td>+ <td><p>The OAuth2 grant's consented scope, e.g. "mcp:read-only".+Empty when the grant recorded no scope. </p></td></tr><tr>- <td>title</td>+ <td>resource</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The grant's stored MCP resource URI.+Empty for pre-grant legacy sessions. </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>client_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The OAuth2 client the grant was consented to.+Empty for legacy web-session tokens at /mcp. </p></td>+ </tr>++ <tr>+ <td>correlation_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Correlates the audit rows an MCP session produces. Minted at the /mcp+boundary and session-scoped: the MCP SDK hands tool handlers the+initialize-time context, so one MCP session carries one correlation ID+across all of its tool calls. </p></td></tr></tbody>@@ -15257,8 +15477,8 @@ The id should in [0-9]+-[0-9]+-[0-9]+ format. </p></td>- <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level">DataClassificationSetting.DataClassificationConfig.Level</h3>- <p></p>+ <h3 id="bytebase.v1.RequestMetadata">RequestMetadata</h3>+ <p>Metadata about the incoming request.</p><table class="field-table">@@ -15268,17 +15488,18 @@ The id should in [0-9]+-[0-9]+-[0-9]+ format. </p></td><tbody><tr>- <td>title</td>+ <td>caller_ip</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The IP address of the request originator. </p></td></tr><tr>- <td>level</td>- <td><a href="#int32">int32</a></td>+ <td>caller_supplied_user_agent</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 user agent string provided by the caller.+This is supplied by the client and is not authenticated. </p></td></tr></tbody>@@ -15288,8 +15509,8 @@ The id should in [0-9]+-[0-9]+-[0-9]+ format. </p></td>- <h3 id="bytebase.v1.EmailSetting">EmailSetting</h3>- <p></p>+ <h3 id="bytebase.v1.SearchAuditLogsRequest">SearchAuditLogsRequest</h3>+ <p>Request message for searching audit logs.</p><table class="field-table">@@ -15299,31 +15520,64 @@ The id should in [0-9]+-[0-9]+-[0-9]+ format. </p></td><tbody><tr>- <td>from</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>from_name</td>+ <td>filter</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The filter of the log. It should be a valid CEL expression.+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Supported filter:+- method: the API name, can be found in the docs. Usually "/bytebase.v1.…", for example "/bytebase.v1.UserService/CreateUser"; entries written outside the v1 API carry their own prefix, such as "/bytebase.mcp.Session/Authorize" or "/bytebase.cli.Recovery/ResetUserPassword". Support "==" operator.+- resource: the resource the entry is about, support "==" operator.+- severity: support "==" operator, check Severity enum in AuditLog message for values.+- user: the actor, should in "users/{email}" format, support "==" operator.+- create_time: support ">=" and "<=" operator.+- mcp: true selects the entries MCP produced, false the rest. A boolean, not a string. Support "==" operator.+- mcp_correlation_id: the MCP session an entry belongs to, taken from an entry's mcp_delegation.correlation_id. Support "==" operator. Entries MCP produced outside a session — a refused connection or consent — carry none and match no value here.++For example:+ - filter = "method == '/bytebase.v1.SQLService/Query'"+ - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR'"+ - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && user == 'users/[email protected]'"+ - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && create_time <= '2021-01-01T00:00:00Z' && create_time >= '2020-01-01T00:00:00Z'"+ - filter = "mcp == true"+ - filter = "mcp_correlation_id == '0b7f1a3c-1d2e-4f56-8a90-1b2c3d4e5f60'" </p></td></tr><tr>- <td>type</td>- <td><a href="#bytebase.v1.EmailSetting.Type">EmailSetting.Type</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 the log.+Only support order by create_time. The default sorting order is ascending.+For example:+ - order_by = "create_time asc"+ - order_by = "create_time desc" </p></td></tr><tr>- <td>smtp</td>- <td><a href="#bytebase.v1.EmailSetting.SMTPConfig">EmailSetting.SMTPConfig</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 logs to return.+The service may return fewer than this value.+If unspecified, at most 10 log entries will be returned.+The maximum value is 5000; values above 5000 will be coerced to 5000. </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 `SearchLogs` call.+Provide this to retrieve the subsequent page. </p></td></tr></tbody>@@ -15333,8 +15587,8 @@ The id should in [0-9]+-[0-9]+-[0-9]+ format. </p></td>- <h3 id="bytebase.v1.EmailSetting.SMTPConfig">EmailSetting.SMTPConfig</h3>- <p></p>+ <h3 id="bytebase.v1.SearchAuditLogsResponse">SearchAuditLogsResponse</h3>+ <p>Response message for searching audit logs.</p><table class="field-table">@@ -15344,45 +15598,19 @@ The id should in [0-9]+-[0-9]+-[0-9]+ 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><a href="#string">string</a></td>- <td></td>+ <td>audit_logs</td>+ <td><a href="#bytebase.v1.AuditLog">AuditLog</a></td>+ <td>repeated</td><td><p> </p></td></tr><tr>- <td>password</td>+ <td>next_page_token</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>+ <td><p>A token to retrieve next page of log entities.+Pass this value in the page_token field in the subsequent call+to retrieve the next page of log entities. </p></td></tr></tbody>@@ -15392,31 +15620,166 @@ The id should in [0-9]+-[0-9]+-[0-9]+ format. </p></td>- <h3 id="bytebase.v1.EnvironmentSetting">EnvironmentSetting</h3>- <p></p>+++ <h3 id="bytebase.v1.AuditLog.Severity">AuditLog.Severity</h3>+ <p>Severity level for audit log entries.</p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>SEVERITY_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified severity level.</p></td>+ </tr>++ <tr>+ <td>DEBUG</td>+ <td>1</td>+ <td><p>Debug-level information.</p></td>+ </tr>++ <tr>+ <td>INFO</td>+ <td>2</td>+ <td><p>Informational messages.</p></td>+ </tr>++ <tr>+ <td>NOTICE</td>+ <td>3</td>+ <td><p>Notable events.</p></td>+ </tr>++ <tr>+ <td>WARNING</td>+ <td>4</td>+ <td><p>Warning conditions.</p></td>+ </tr>++ <tr>+ <td>ERROR</td>+ <td>5</td>+ <td><p>Error conditions.</p></td>+ </tr>++ <tr>+ <td>CRITICAL</td>+ <td>6</td>+ <td><p>Critical conditions.</p></td>+ </tr>++ <tr>+ <td>ALERT</td>+ <td>7</td>+ <td><p>Action must be taken immediately.</p></td>+ </tr>++ <tr>+ <td>EMERGENCY</td>+ <td>8</td>+ <td><p>System is unusable.</p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.AuditLogService">AuditLogService</h3>+ <p>AuditLogService manages audit logs for system activities and API calls.</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>SearchAuditLogs</td>+ <td><a href="#bytebase.v1.SearchAuditLogsRequest">SearchAuditLogsRequest</a></td>+ <td><a href="#bytebase.v1.SearchAuditLogsResponse">SearchAuditLogsResponse</a></td>+ <td><p>Searches audit logs with optional filtering and pagination.+Permissions required: bb.auditLogs.search</p></td>+ </tr>++ <tr>+ <td>ExportAuditLogs</td>+ <td><a href="#bytebase.v1.ExportAuditLogsRequest">ExportAuditLogsRequest</a></td>+ <td><a href="#bytebase.v1.ExportAuditLogsResponse">ExportAuditLogsResponse</a></td>+ <td><p>Exports audit logs in a specified format for external analysis.+Permissions required: bb.auditLogs.export</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>environments</td>- <td><a href="#bytebase.v1.EnvironmentSetting.Environment">EnvironmentSetting.Environment</a></td>- <td>repeated</td>- <td><p> </p></td>- </tr>+ <tr>+ <td>SearchAuditLogs</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*}/auditLogs:search</td>+ <td>*</td>+ </tr>++ <tr>+ <td>SearchAuditLogs</td>+ <td>POST</td>+ <td>/v1/auditLogs:search</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>ExportAuditLogs</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*}/auditLogs:export</td>+ <td>*</td>+ </tr>++ <tr>+ <td>ExportAuditLogs</td>+ <td>POST</td>+ <td>/v1/auditLogs:export</td>+ <td>*</td>+ </tr>++</tbody></table>--+- <h3 id="bytebase.v1.EnvironmentSetting.Environment">EnvironmentSetting.Environment</h3>+ <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>@@ -15427,42 +15790,28 @@ The id should in [0-9]+-[0-9]+-[0-9]+ format. </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>The resource name of the environment.-Format: environments/{environment}.-Output only. </p></td>+ <td><p>The identity provider to create. </p></td></tr><tr>- <td>id</td>+ <td>identity_provider_id</td><td><a href="#string">string</a></td><td></td>- <td><p>The resource id of the environment.+ <td><p>The ID to use for the identity provider, which will become the final component of+the identity provider's resource name.+This value should be 4-63 characters, and valid charactersare /[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>validate_only</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p> </p></td>+ <td><p>If set to true, the request will be validated without actually creating the identity provider. </p></td></tr></tbody>@@ -15472,7 +15821,7 @@ are /[a-z][0-9]-/. </p></td>- <h3 id="bytebase.v1.EnvironmentSetting.Environment.TagsEntry">EnvironmentSetting.Environment.TagsEntry</h3>+ <h3 id="bytebase.v1.DeleteIdentityProviderRequest">DeleteIdentityProviderRequest</h3><p></p>@@ -15483,17 +15832,11 @@ 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>- </tr>-- <tr>- <td>value</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 to delete.+Format: idps/{identity_provider} </p></td></tr></tbody>@@ -15503,8 +15846,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.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">@@ -15514,10 +15857,32 @@ are /[a-z][0-9]-/. </p></td><tbody><tr>- <td>name</td>+ <td>identifier</td><td><a href="#string">string</a></td><td></td>- <td><p>The resource name of the setting. </p></td>+ <td><p>Identifier is the field name of the unique identifier in 3rd-party idp user info. Required. </p></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></tbody>@@ -15527,8 +15892,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.GetIdentityProviderRequest">GetIdentityProviderRequest</h3>+ <p></p><table class="field-table">@@ -15538,10 +15903,11 @@ are /[a-z][0-9]-/. </p></td><tbody><tr>- <td>setting</td>- <td><a href="#bytebase.v1.Setting">Setting</a></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 to retrieve.+Format: idps/{idp} </p></td></tr></tbody>@@ -15551,14 +15917,7 @@ are /[a-z][0-9]-/. </p></td>- <h3 id="bytebase.v1.ListSettingsRequest">ListSettingsRequest</h3>- <p></p>------ <h3 id="bytebase.v1.ListSettingsResponse">ListSettingsResponse</h3>+ <h3 id="bytebase.v1.IdentityProvider">IdentityProvider</h3><p></p>@@ -15569,10 +15928,39 @@ are /[a-z][0-9]-/. </p></td><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>+ <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>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>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>@@ -15582,8 +15970,8 @@ are /[a-z][0-9]-/. </p></td>- <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>+ <h3 id="bytebase.v1.IdentityProviderConfig">IdentityProviderConfig</h3>+ <p></p><table class="field-table">@@ -15593,31 +15981,24 @@ are /[a-z][0-9]-/. </p></td><tbody><tr>- <td>capability</td>- <td><a href="#bytebase.v1.MCPSetting.Capability">MCPSetting.Capability</a></td>+ <td>oauth2_config</td>+ <td><a href="#bytebase.v1.OAuth2IdentityProviderConfig">OAuth2IdentityProviderConfig</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>+ <td><p>OAuth2 protocol configuration. </p></td></tr><tr>- <td>ignore_masking_exemptions</td>- <td><a href="#bool">bool</a></td>+ <td>oidc_config</td>+ <td><a href="#bytebase.v1.OIDCIdentityProviderConfig">OIDCIdentityProviderConfig</a></td><td></td>- <td><p>Whether a request that arrived over MCP stops applying the caller'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>+ <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>@@ -15627,8 +16008,8 @@ a confidentiality boundary. </p></td>- <h3 id="bytebase.v1.SQLEditorThemeSetting">SQLEditorThemeSetting</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">@@ -15638,62 +16019,72 @@ a confidentiality boundary. </p></td><tbody><tr>- <td>id</td>+ <td>host</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Host is the hostname or IP address of the LDAP server, e.g.,+"ldap.example.com". </p></td></tr><tr>- <td>name</td>- <td><a href="#string">string</a></td>+ <td>port</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p> </p></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>monaco_base</td>+ <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> </p></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>tokens</td>- <td><a href="#bytebase.v1.SQLEditorThemeSetting.TokensEntry">SQLEditorThemeSetting.TokensEntry</a></td>- <td>repeated</td>- <td><p>CSS token colors. </p></td>+ <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>- </tbody>- </table>------ <h3 id="bytebase.v1.SQLEditorThemeSetting.TokensEntry">SQLEditorThemeSetting.TokensEntry</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>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., "ou=users,dc=example,dc=com". </p></td>+ </tr><tr>- <td>key</td>+ <td>user_filter</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>UserFilter is the filter to search for users, e.g., "(uid=%s)". </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>value</td>- <td><a href="#google.type.Color">google.type.Color</a></td>+ <td>field_mapping</td>+ <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td><td></td>- <td><p> </p></td>+ <td><p>FieldMapping is the mapping of the user attributes returned by the LDAP+server. </p></td></tr></tbody>@@ -15703,7 +16094,7 @@ a confidentiality boundary. </p></td>- <h3 id="bytebase.v1.SemanticTypeSetting">SemanticTypeSetting</h3>+ <h3 id="bytebase.v1.LDAPIdentityProviderTestRequestContext">LDAPIdentityProviderTestRequestContext</h3><p></p>@@ -15714,10 +16105,17 @@ a confidentiality boundary. </p></td><tbody><tr>- <td>types</td>- <td><a href="#bytebase.v1.SemanticTypeSetting.SemanticType">SemanticTypeSetting.SemanticType</a></td>- <td>repeated</td>- <td><p> </p></td>+ <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></tbody>@@ -15727,7 +16125,7 @@ a confidentiality boundary. </p></td>- <h3 id="bytebase.v1.SemanticTypeSetting.SemanticType">SemanticTypeSetting.SemanticType</h3>+ <h3 id="bytebase.v1.ListIdentityProvidersRequest">ListIdentityProvidersRequest</h3><p></p>@@ -15738,38 +16136,12 @@ a confidentiality boundary. </p></td><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>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>parent</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>+ <td><p>The parent workspace whose identity providers should be listed. It must be+the workspace the caller's credential belongs to.+Format: workspaces/{workspace} </p></td></tr></tbody>@@ -15779,8 +16151,8 @@ a confidentiality boundary. </p></td>- <h3 id="bytebase.v1.Setting">Setting</h3>- <p>The schema of setting.</p>+ <h3 id="bytebase.v1.ListIdentityProvidersResponse">ListIdentityProvidersResponse</h3>+ <p></p><table class="field-table">@@ -15790,19 +16162,10 @@ a confidentiality boundary. </p></td><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: "settings/SEMANTIC_TYPES" </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>+ <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>@@ -15812,8 +16175,8 @@ Example: "settings/SEMANTIC_TYPES" </p></td>- <h3 id="bytebase.v1.SettingValue">SettingValue</h3>- <p>The data in setting value.</p>+ <h3 id="bytebase.v1.OAuth2IdentityProviderConfig">OAuth2IdentityProviderConfig</h3>+ <p>OAuth2IdentityProviderConfig is the structure for OAuth2 identity provider config.</p><table class="field-table">@@ -15823,66 +16186,66 @@ Example: "settings/SEMANTIC_TYPES" </p></td><tbody><tr>- <td>app_im</td>- <td><a href="#bytebase.v1.AppIMSetting">AppIMSetting</a></td>+ <td>auth_url</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The authorization endpoint URL for OAuth2 flow. </p></td></tr><tr>- <td>workspace_profile</td>- <td><a href="#bytebase.v1.WorkspaceProfileSetting">WorkspaceProfileSetting</a></td>+ <td>token_url</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The token endpoint URL for exchanging authorization code. </p></td></tr><tr>- <td>workspace_approval</td>- <td><a href="#bytebase.v1.WorkspaceApprovalSetting">WorkspaceApprovalSetting</a></td>+ <td>user_info_url</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The user information endpoint URL. </p></td></tr><tr>- <td>data_classification</td>- <td><a href="#bytebase.v1.DataClassificationSetting">DataClassificationSetting</a></td>+ <td>client_id</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The OAuth2 client identifier. </p></td></tr><tr>- <td>semantic_type</td>- <td><a href="#bytebase.v1.SemanticTypeSetting">SemanticTypeSetting</a></td>+ <td>client_secret</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The OAuth2 client secret for authentication. </p></td></tr><tr>- <td>ai</td>- <td><a href="#bytebase.v1.AISetting">AISetting</a></td>- <td></td>- <td><p> </p></td>+ <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>environment</td>- <td><a href="#bytebase.v1.EnvironmentSetting">EnvironmentSetting</a></td>+ <td>field_mapping</td>+ <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td><td></td>- <td><p> </p></td>+ <td><p>Mapping configuration for user attributes from OAuth2 response. </p></td></tr><tr>- <td>email</td>- <td><a href="#bytebase.v1.EmailSetting">EmailSetting</a></td>+ <td>skip_tls_verify</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p> </p></td>+ <td><p>Whether to skip TLS certificate verification. </p></td></tr><tr>- <td>mcp</td>- <td><a href="#bytebase.v1.MCPSetting">MCPSetting</a></td>+ <td>auth_style</td>+ <td><a href="#bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</a></td><td></td>- <td><p> </p></td>+ <td><p>The authentication style for client credentials. </p></td></tr></tbody>@@ -15892,7 +16255,7 @@ Example: "settings/SEMANTIC_TYPES" </p></td>- <h3 id="bytebase.v1.TestEmailSettingRequest">TestEmailSettingRequest</h3>+ <h3 id="bytebase.v1.OAuth2IdentityProviderTestRequestContext">OAuth2IdentityProviderTestRequestContext</h3><p></p>@@ -15903,24 +16266,10 @@ Example: "settings/SEMANTIC_TYPES" </p></td><tbody><tr>- <td>parent</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>email_setting</td>- <td><a href="#bytebase.v1.EmailSetting">EmailSetting</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>to</td>+ <td>code</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Authorize code from website. </p></td></tr></tbody>@@ -15930,8 +16279,8 @@ Example: "settings/SEMANTIC_TYPES" </p></td>- <h3 id="bytebase.v1.TestEmailSettingResponse">TestEmailSettingResponse</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">@@ -15941,63 +16290,61 @@ Example: "settings/SEMANTIC_TYPES" </p></td><tbody><tr>- <td>success</td>- <td><a href="#bool">bool</a></td>+ <td>issuer</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The OIDC issuer URL for the identity provider. </p></td></tr><tr>- <td>error</td>+ <td>client_id</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The OIDC client identifier. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.UpdateSettingRequest">UpdateSettingRequest</h3>- <p>The request message for updating or creating a 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>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>setting</td>- <td><a href="#bytebase.v1.Setting">Setting</a></td>+ <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>The setting to update. </p></td>+ <td><p>Mapping configuration for user attributes from OIDC claims. </p></td></tr><tr>- <td>validate_only</td>+ <td>skip_tls_verify</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>+ <td><p>Whether to skip TLS certificate verification. </p></td></tr><tr>- <td>allow_missing</td>- <td><a href="#bool">bool</a></td>+ <td>auth_style</td>+ <td><a href="#bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</a></td><td></td>- <td><p> </p></td>+ <td><p>The authentication style for client credentials. </p></td></tr><tr>- <td>update_mask</td>- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td>auth_endpoint</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></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>@@ -16007,7 +16354,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.OIDCIdentityProviderTestRequestContext">OIDCIdentityProviderTestRequestContext</h3><p></p>@@ -16018,10 +16365,10 @@ 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>repeated</td>- <td><p> </p></td>+ <td>code</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Authorize code from OIDC provider. </p></td></tr></tbody>@@ -16031,7 +16378,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.TestIdentityProviderRequest">TestIdentityProviderRequest</h3><p></p>@@ -16042,50 +16389,31 @@ 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>identity_provider</td>+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>+ <td></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>condition</td>- <td><a href="#google.type.Expr">google.type.Expr</a></td>+ <td>oidc_context</td>+ <td><a href="#bytebase.v1.OIDCIdentityProviderTestRequestContext">OIDCIdentityProviderTestRequestContext</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 "==", "!=", "<", "<=", ">", ">=" operations.-statement.table_rows: table row count number, support "==", "!=", "<", "<=", ">", ">=" operations.-resource.environment_id: the environment resource id, support "==", "!=", "in [xx]", "!(in [xx])" operations.-resource.project_id: the project resource id, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.-resource.db_engine: the database engine type, support "==", "!=", "in [xx]", "!(in [xx])" operations. Check the Engine enum for values.-statement.sql_type: the SQL type, support "==", "!=", "in [xx]", "!(in [xx])" operations.-resource.database_name: the database name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.-resource.schema_name: the schema name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.-resource.table_name: the table name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.-statement.text: the SQL statement, support "contains()", "matches()", "startsWith()", "endsWith()" operations.-request.expiration_days: the role expiration days for the request, support "==", "!=", "<", "<=", ">", ">=" operations.-request.role: the request role full name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.--When source is CHANGE_DATABASE, support: statement.*, resource.* (excluding request.*)-When source is CREATE_DATABASE, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name-When source is REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role-When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_name, request.unmask, request.data_export--For examples:-resource.environment_id == "prod" && statement.affected_rows >= 100-resource.table_name.matches("sensitive_.*") && resource.db_engine == "MYSQL" </p></td>+ <td><p>OIDC authentication context for test connection. </p></td></tr><tr>- <td>source</td>- <td><a href="#bytebase.v1.WorkspaceApprovalSetting.Rule.Source">WorkspaceApprovalSetting.Rule.Source</a></td>+ <td>ldap_context</td>+ <td><a href="#bytebase.v1.LDAPIdentityProviderTestRequestContext">LDAPIdentityProviderTestRequestContext</a></td><td></td>- <td><p> </p></td>+ <td><p>LDAP credentials context for test connection. </p></td></tr></tbody>@@ -16095,7 +16423,7 @@ resource.table_name.matches("sensitive_.*") && resource.db_engin- <h3 id="bytebase.v1.WorkspaceProfileSetting">WorkspaceProfileSetting</h3>+ <h3 id="bytebase.v1.TestIdentityProviderResponse">TestIdentityProviderResponse</h3><p></p>@@ -16106,180 +16434,48 @@ resource.table_name.matches("sensitive_.*") && resource.db_engin<tbody><tr>- <td>external_url</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The external URL is used for sso authentication callback. </p></td>- </tr>-- <tr>- <td>disallow_signup</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Disallow self-service signup, users can only be invited by the owner. </p></td>- </tr>-- <tr>- <td>require_mfa</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Require MFA for all users. </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>-- <tr>- <td>announcement</td>- <td><a href="#bytebase.v1.Announcement">Announcement</a></td>- <td></td>- <td><p>The setting of custom announcement </p></td>- </tr>-- <tr>- <td>maximum_request_expiration</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>- <td></td>- <td><p>The max expiration duration for data access requests. </p></td>- </tr>-- <tr>- <td>domains</td>- <td><a href="#string">string</a></td>+ <td>claims</td>+ <td><a href="#bytebase.v1.TestIdentityProviderResponse.ClaimsEntry">TestIdentityProviderResponse.ClaimsEntry</a></td><td>repeated</td>- <td><p>The workspace domain, e.g., bytebase.com. </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>-- <tr>- <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>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 <= 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 <= 0. </p></td>+ <td><p>The map of claims returned by the identity provider. </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>+ <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>- <tr>- <td>allow_email_code_signin</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Allow signin/signup using email + a 6-digit one-time verification code.-Requires the EMAIL setting to be configured on the workspace. </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.TestIdentityProviderResponse.ClaimsEntry">TestIdentityProviderResponse.ClaimsEntry</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_theme_id</td>+ <td>key</td><td><a href="#string">string</a></td><td></td>- <td><p>Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id-OR a custom theme'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'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>+ <td><p> </p></td></tr><tr>- <td>directory_sync_token_configured</td>- <td><a href="#bool">bool</a></td>+ <td>value</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 "generate" and "regenerate". </p></td>+ <td><p> </p></td></tr></tbody>@@ -16289,7 +16485,7 @@ offering "generate" and "regenerate". </p></td>- <h3 id="bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</h3>+ <h3 id="bytebase.v1.TestIdentityProviderResponse.UserInfoEntry">TestIdentityProviderResponse.UserInfoEntry</h3><p></p>@@ -16300,52 +16496,59 @@ offering "generate" and "regenerate". </p></td><tbody><tr>- <td>min_length</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>min_length is the minimum length for password, should no less than 8. </p></td>- </tr>-- <tr>- <td>require_number</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>require_number requires the password must contains at least one number. </p></td>- </tr>-- <tr>- <td>require_letter</td>- <td><a href="#bool">bool</a></td>+ <td>key</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> </p></td></tr><tr>- <td>require_uppercase_letter</td>- <td><a href="#bool">bool</a></td>+ <td>value</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>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.UpdateIdentityProviderRequest">UpdateIdentityProviderRequest</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_special_character</td>- <td><a href="#bool">bool</a></td>+ <td>identity_provider</td>+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td><td></td>- <td><p>require_special_character requires the password must contains at least one special character. </p></td>+ <td><p>The identity provider to update.++The identity provider's `name` field is used to identify the identity provider to update.+Format: idps/{identity_provider} </p></td></tr><tr>- <td>require_reset_password_for_first_login</td>- <td><a href="#bool">bool</a></td>+ <td>update_mask</td>+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</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>The list of fields to update. </p></td></tr><tr>- <td>password_rotation</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td>allow_missing</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>password_rotation requires users to reset their password after the duration. </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>@@ -16357,7 +16560,7 @@ offering "generate" and "regenerate". </p></td>- <h3 id="bytebase.v1.AISetting.Provider">AISetting.Provider</h3>+ <h3 id="bytebase.v1.IdentityProviderType">IdentityProviderType</h3><p></p><table class="enum-table"><thead>@@ -16366,98 +16569,33 @@ offering "generate" and "regenerate". </p></td><tbody><tr>- <td>PROVIDER_UNSPECIFIED</td>+ <td>IDENTITY_PROVIDER_TYPE_UNSPECIFIED</td><td>0</td>- <td><p></p></td>+ <td><p>Unspecified identity provider type.</p></td></tr><tr>- <td>OPEN_AI</td>+ <td>OAUTH2</td><td>1</td>- <td><p></p></td>+ <td><p>OAuth 2.0 authentication protocol.</p></td></tr><tr>- <td>CLAUDE</td>+ <td>OIDC</td><td>2</td>- <td><p></p></td>+ <td><p>OpenID Connect authentication protocol.</p></td></tr><tr>- <td>GEMINI</td>+ <td>LDAP</td><td>3</td>- <td><p></p></td>- </tr>-- <tr>- <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>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>-- <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>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>+ <td><p>LDAP directory service authentication.</p></td></tr></tbody></table>- <h3 id="bytebase.v1.EmailSetting.SMTPConfig.Authentication">EmailSetting.SMTPConfig.Authentication</h3>+ <h3 id="bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol">LDAPIdentityProviderConfig.SecurityProtocol</h3><p></p><table class="enum-table"><thead>@@ -16466,39 +16604,27 @@ Default to this mode.</p></td><tbody><tr>- <td>AUTHENTICATION_UNSPECIFIED</td>+ <td>SECURITY_PROTOCOL_UNSPECIFIED</td><td>0</td><td><p></p></td></tr><tr>- <td>AUTHENTICATION_NONE</td>+ <td>START_TLS</td><td>1</td>- <td><p></p></td>+ <td><p>StartTLS is the security protocol that starts with an unencrypted connection and then upgrades to TLS.</p></td></tr><tr>- <td>PLAIN</td>+ <td>LDAPS</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>+ <td><p>LDAPS is the security protocol that uses TLS from the beginning.</p></td></tr></tbody></table>- <h3 id="bytebase.v1.EmailSetting.SMTPConfig.Encryption">EmailSetting.SMTPConfig.Encryption</h3>+ <h3 id="bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</h3><p></p><table class="enum-table"><thead>@@ -16507,248 +16633,94 @@ Default to this mode.</p></td><tbody><tr>- <td>ENCRYPTION_UNSPECIFIED</td>+ <td>OAUTH2_AUTH_STYLE_UNSPECIFIED</td><td>0</td><td><p></p></td></tr><tr>- <td>ENCRYPTION_NONE</td>+ <td>IN_PARAMS</td><td>1</td>- <td><p></p></td>+ <td><p>IN_PARAMS sends the "client_id" and "client_secret" in the POST body+as application/x-www-form-urlencoded parameters.</p></td></tr><tr>- <td>STARTTLS</td>+ <td>IN_HEADER</td><td>2</td>- <td><p></p></td>- </tr>-- <tr>- <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>TYPE_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>SMTP</td>- <td>1</td>- <td><p></p></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.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'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'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>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>+ <h3 id="bytebase.v1.IdentityProviderService">IdentityProviderService</h3>+ <p>IdentityProviderService manages external identity providers for SSO authentication.</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>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>+ <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>REQUEST_ACCESS</td>- <td>5</td>- <td><p></p></td>- </tr>-- </tbody>- </table>---+ <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's workspace.+The login page reads AuthService.GetAuthenticationInfo instead,+which publishes only the fields a browser needs to start an SSO redirect.-- <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>+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>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>+ <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>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>+ <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>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>+ <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>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>+ <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>@@ -16772,9 +16744,9 @@ Permissions required: bb.settings.set</p></td><tr>- <td>ListSettings</td>+ <td>GetIdentityProvider</td><td>GET</td>- <td>/v1/settings</td>+ <td>/v1/{name=idps/*}</td><td></td></tr>@@ -16782,9 +16754,16 @@ Permissions required: bb.settings.set</p></td><tr>- <td>GetSetting</td>+ <td>ListIdentityProviders</td><td>GET</td>- <td>/v1/{name=settings/*}</td>+ <td>/v1/idps</td>+ <td></td>+ </tr>++ <tr>+ <td>ListIdentityProviders</td>+ <td>GET</td>+ <td>/v1/{parent=workspaces/*}/idps</td><td></td></tr>@@ -16792,19 +16771,39 @@ Permissions required: bb.settings.set</p></td><tr>- <td>UpdateSetting</td>+ <td>CreateIdentityProvider</td>+ <td>POST</td>+ <td>/v1/idps</td>+ <td>identity_provider</td>+ </tr>+++++ <tr>+ <td>UpdateIdentityProvider</td><td>PATCH</td>- <td>/v1/{setting.name=settings/*}</td>- <td>setting</td>+ <td>/v1/{identity_provider.name=idps/*}</td>+ <td>identity_provider</td></tr><tr>- <td>TestEmailSetting</td>+ <td>DeleteIdentityProvider</td>+ <td>DELETE</td>+ <td>/v1/{name=idps/*}</td>+ <td></td>+ </tr>+++++ <tr>+ <td>TestIdentityProvider</td><td>POST</td>- <td>/v1/{parent=workspaces/*}/settings/EMAIL:test</td>+ <td>/v1/idps/*:test</td><td>*</td></tr>@@ -36389,7 +36388,7 @@ For project-level: {name}@{project-id}.workload.bytebase.com </p></td><td></td><td><p>Optional JWKS endpoint. When empty, use OIDC discovery from issuer_url. </p></td></tr>-+</tbody></table>@@ -36430,7 +36429,7 @@ For project-level: {name}@{project-id}.workload.bytebase.com </p></td><td>3</td><td><p></p></td></tr>-+</tbody></table>@@ -36624,13 +36623,6 @@ Permissions required: bb.workloadIdentities.undelete</p></td>- <h3 id="bytebase.v1.GetMCPInfoRequest">GetMCPInfoRequest</h3>- <p></p>-----<h3 id="bytebase.v1.GetWorkspaceRequest">GetWorkspaceRequest</h3><p></p>@@ -36711,63 +36703,6 @@ Use "workspaces/-" to get the current/default workspace. </p></td>- <h3 id="bytebase.v1.MCPInfo">MCPInfo</h3>- <p>MCPInfo is what MCP does in this workspace: the ceiling in force, and</p><p>whether masking narrows what a session reads under it.</p><p>This is the only API a served MCP session or the consent page can read the</p><p>ceiling from. SettingService/GetSetting is served by no ceiling, and its</p><p>answer is cached besides.</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><a href="#string">string</a></td>- <td></td>- <td><p>The workspace this describes. Format: workspaces/{workspace}. Not this-message's own resource name — MCPInfo is not a named resource and there is-nothing to get it by. </p></td>- </tr>-- <tr>- <td>capability</td>- <td><a href="#bytebase.v1.MCPSetting.Capability">MCPSetting.Capability</a></td>- <td></td>- <td><p>The ceiling in force for this workspace. Any value outside the enum this-build serves, CAPABILITY_UNSPECIFIED included, means no ceiling could be-resolved from the stored row and every MCP connection is refused. A stored-name nothing resolves arrives as CAPABILITY_UNSPECIFIED; a number a newer-release wrote arrives verbatim. </p></td>- </tr>-- <tr>- <td>ignore_masking_exemptions</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Whether this workspace stops applying the caller's own unmasking-provisioning to MCP requests. It narrows what a session reads only where-Bytebase masks by column and consults exemptions; elsewhere it suppresses-nothing. </p></td>- </tr>-- <tr>- <td>data_masking_available</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Whether data masking is licensed for this workspace. When false nothing is-masked whatever an engine supports, so the toggle above suppresses nothing.-Licensing can also be set per instance, so a true here is the workspace-answer, not a promise about every instance. </p></td>- </tr>-- </tbody>- </table>-----<h3 id="bytebase.v1.RotateDirectorySyncTokenRequest">RotateDirectorySyncTokenRequest</h3><p></p>@@ -36959,22 +36894,6 @@ caller is the last workspace admin.</p></td>Permissions required: bb.workspaces.setIamPolicy</p></td></tr>- <tr>- <td>GetMCPInfo</td>- <td><a href="#bytebase.v1.GetMCPInfoRequest">GetMCPInfoRequest</a></td>- <td><a href="#bytebase.v1.MCPInfo">MCPInfo</a></td>- <td><p>Gets what MCP (Model Context Protocol) does in this workspace: the-capability ceiling in force, and whether masking narrows what a session-reads under it. The workspace is resolved from the authenticated session.--Served to MCP sessions. An agent asking what it may do here is the point:-the response says nothing a session's own denials do not already say, one-refusal at a time, and knowing it up front is what stops the agent-planning work the ceiling was never going to serve.--Permissions required: None (authentication required)</p></td>- </tr>-<tr><td>RotateDirectorySyncToken</td><td><a href="#bytebase.v1.RotateDirectorySyncTokenRequest">RotateDirectorySyncTokenRequest</a></td>@@ -37076,16 +36995,6 @@ Permissions required: bb.workspaces.rotateDirectorySyncToken</p></td>- <tr>- <td>GetMCPInfo</td>- <td>GET</td>- <td>/v1/mcp/info</td>- <td></td>- </tr>----<tr><td>RotateDirectorySyncToken</td><td>POST</td>@@ -37291,3 +37200,4 @@ Permissions required: bb.workspaces.rotateDirectorySyncToken</p></td></table></body></html>+diff --git a/proto/v1/v1/actuator_service.proto b/proto/v1/v1/actuator_service.protoindex 1ffe3b4cd7..866fdf3468 100644--- a/proto/v1/v1/actuator_service.proto+++ b/proto/v1/v1/actuator_service.proto@@ -8,6 +8,7 @@ import "google/api/field_behavior.proto";import "google/api/resource.proto";import "google/protobuf/timestamp.proto";import "v1/annotation.proto";+import "v1/setting_service.proto";option go_package = "github.com/bytebase/bytebase/backend/generated-go/v1";@@ -99,4 +100,7 @@ message ActuatorInfo {// Sample setup availability and provisioned resources.SampleInfo sample = 29 [(google.api.field_behavior) = OUTPUT_ONLY];++ // The MCP (Model Context Protocol) setting in the current workspace.+ MCPSetting mcp_setting = 30 [(google.api.field_behavior) = OUTPUT_ONLY];}diff --git a/proto/v1/v1/workspace_service.proto b/proto/v1/v1/workspace_service.protoindex cf9478adda..b64543d790 100644--- a/proto/v1/v1/workspace_service.proto+++ b/proto/v1/v1/workspace_service.proto@@ -10,7 +10,6 @@ import "google/protobuf/field_mask.proto";import "v1/annotation.proto";import "v1/auth_service.proto";import "v1/iam_policy.proto";-import "v1/setting_service.proto";option go_package = "github.com/bytebase/bytebase/backend/generated-go/v1";@@ -97,22 +96,6 @@ service WorkspaceService {option (bytebase.v1.mcp_denial_reason) = ADMINISTERS_THE_WORKSPACE;}- // Gets what MCP (Model Context Protocol) does in this workspace: the- // capability ceiling in force, and whether masking narrows what a session- // reads under it. The workspace is resolved from the authenticated session.- //- // Served to MCP sessions. An agent asking what it may do here is the point:- // the response says nothing a session's own denials do not already say, one- // refusal at a time, and knowing it up front is what stops the agent- // planning work the ceiling was never going to serve.- //- // Permissions required: None (authentication required)- rpc GetMCPInfo(GetMCPInfoRequest) returns (MCPInfo) {- option (google.api.http) = {get: "/v1/mcp/info"};- option (google.api.method_signature) = "";- option (bytebase.v1.mcp_method_class) = READ;- }-// Mints a new directory sync (SCIM) token, immediately invalidating the// previous one. The plaintext token is returned exactly once and cannot be// retrieved afterwards; only its hash is stored. Callers that lose it must@@ -132,45 +115,6 @@ service WorkspaceService {}}-message GetMCPInfoRequest {}--// MCPInfo is what MCP does in this workspace: the ceiling in force, and-// whether masking narrows what a session reads under it.-//-// This is the only API a served MCP session or the consent page can read the-// ceiling from. SettingService/GetSetting is served by no ceiling, and its-// answer is cached besides.-message MCPInfo {- // The workspace this describes. Format: workspaces/{workspace}. Not this- // message's own resource name — MCPInfo is not a named resource and there is- // nothing to get it by.- string workspace = 1 [(google.api.field_behavior) = OUTPUT_ONLY];-- // The ceiling in force for this workspace. Any value outside the enum this- // build serves, CAPABILITY_UNSPECIFIED included, means no ceiling could be- // resolved from the stored row and every MCP connection is refused. A stored- // name nothing resolves arrives as CAPABILITY_UNSPECIFIED; a number a newer- // release wrote arrives verbatim.- MCPSetting.Capability capability = 2 [(google.api.field_behavior) = OUTPUT_ONLY];-- // Was the mode-contents half of this message: the serving table, the served- // method list, and the per-engine enforcement facts. Shipped in 3.22.0.- reserved 3, 4, 5;- reserved "modes", "methods", "engines";-- // Whether this workspace stops applying the caller's own unmasking- // provisioning to MCP requests. It narrows what a session reads only where- // Bytebase masks by column and consults exemptions; elsewhere it suppresses- // nothing.- bool ignore_masking_exemptions = 6 [(google.api.field_behavior) = OUTPUT_ONLY];-- // Whether data masking is licensed for this workspace. When false nothing is- // masked whatever an engine supports, so the toggle above suppresses nothing.- // Licensing can also be set per instance, so a true here is the workspace- // answer, not a promise about every instance.- bool data_masking_available = 7 [(google.api.field_behavior) = OUTPUT_ONLY];-}-message RotateDirectorySyncTokenRequest {// The workspace whose directory sync token is rotated.// Format: workspaces/{workspace}