syntax = "proto3"; package rill.admin.v1; option go_package = "github.com/rilldata/rill/proto/gen/rill/admin/v1;adminv1"; import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/struct.proto"; import "rill/runtime/v1/export_format.proto"; import "rill/runtime/v1/expression.proto"; import "validate/validate.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { title: "Rill Admin API"; description: "Rill Admin API enables programmatic management of Rill Cloud resources, including organizations, projects, and user access. It provides endpoints for creating, updating, and deleting these resources, as well as managing authentication and permissions." }; external_docs: { description: "Rill API Documentation"; url: "https://docs.rilldata.com"; }; }; service AdminService { // Ping returns information about the server rpc Ping(PingRequest) returns (PingResponse) { option (google.api.http) = {get: "/v1/ping"}; } // ListOrganizations lists all the organizations currently managed by the admin rpc ListOrganizations(ListOrganizationsRequest) returns (ListOrganizationsResponse) { option (google.api.http) = {get: "/v1/orgs"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // GetOrganization returns information about a specific organization rpc GetOrganization(GetOrganizationRequest) returns (GetOrganizationResponse) { option (google.api.http) = {get: "/v1/orgs/{org}"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // GetOrganizationNameForDomain finds the org name for a custom domain. // If the application detects it is running on a non-default domain, it can use this to find the org to present. // It can be called without being authenticated. rpc GetOrganizationNameForDomain(GetOrganizationNameForDomainRequest) returns (GetOrganizationNameForDomainResponse) { option (google.api.http) = {get: "/v1/organization-for-domain/{domain}"}; } // CreateOrganization creates a new organization rpc CreateOrganization(CreateOrganizationRequest) returns (CreateOrganizationResponse) { option (google.api.http) = { post: "/v1/orgs", body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // DeleteOrganization deletes an organization rpc DeleteOrganization(DeleteOrganizationRequest) returns (DeleteOrganizationResponse) { option (google.api.http) = {delete: "/v1/orgs/{org}"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // UpdateOrganization updates an organization rpc UpdateOrganization(UpdateOrganizationRequest) returns (UpdateOrganizationResponse) { option (google.api.http) = { patch: "/v1/orgs/{org}", body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // ListProjectsForOrganization lists all the projects currently available for a given organization. rpc ListProjectsForOrganization(ListProjectsForOrganizationRequest) returns (ListProjectsForOrganizationResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/projects"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // ListProjectsForOrganizationAndUser lists all the projects that an organization member user has access to. // It does not include projects that the user has access to through a usergroup. rpc ListProjectsForOrganizationAndUser(ListProjectsForOrganizationAndUserRequest) returns (ListProjectsForOrganizationAndUserResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/projects-for-user"}; } // ListProjectsForFingerprint lists all projects the current user has access to that match the provided local project details. // This can be used to produce a short list of cloud projects that are likely to have been deployed from a local project. rpc ListProjectsForFingerprint(ListProjectsForFingerprintRequest) returns (ListProjectsForFingerprintResponse) { option (google.api.http) = {get: "/v1/projects-for-fingerprint"}; } // GetProject returns information about a specific project rpc GetProject(GetProjectRequest) returns (GetProjectResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/projects/{project}"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // ListProjectsForUserByName returns projects matching a name accessible by the logged in user rpc ListProjectsForUserByName(ListProjectsForUserByNameRequest) returns (ListProjectsForUserByNameResponse) { option (google.api.http) = {get: "/v1/projects"}; } // GetProject returns information about a specific project rpc GetProjectByID(GetProjectByIDRequest) returns (GetProjectByIDResponse) { option (google.api.http) = {get: "/v1/projects/{id}"}; } // SearchProjectNames returns project names matching the pattern rpc SearchProjectNames(SearchProjectNamesRequest) returns (SearchProjectNamesResponse) { option (google.api.http) = {get: "/v1/superuser/projects/search"}; } // CreateProject creates a new project rpc CreateProject(CreateProjectRequest) returns (CreateProjectResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/projects", body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // DeleteProject deletes a project rpc DeleteProject(DeleteProjectRequest) returns (DeleteProjectResponse) { option (google.api.http) = {delete: "/v1/orgs/{org}/projects/{project}"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // UpdateProject updates a project rpc UpdateProject(UpdateProjectRequest) returns (UpdateProjectResponse) { option (google.api.http) = { patch: "/v1/orgs/{org}/projects/{project}", body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // GetProjectVariables returns project variables. rpc GetProjectVariables(GetProjectVariablesRequest) returns (GetProjectVariablesResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/projects/{project}/variables"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // UpdateProjectVariables updates variables for a project. rpc UpdateProjectVariables(UpdateProjectVariablesRequest) returns (UpdateProjectVariablesResponse) { option (google.api.http) = { put: "/v1/orgs/{org}/projects/{project}/variables", body: "*" }; } // CreateAsset returns a one time signed URL using which any asset can be uploaded. rpc CreateAsset(CreateAssetRequest) returns (CreateAssetResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/create_asset", body: "*" }; } // RedeployProject creates a new production deployment for a project. // If the project currently has another production deployment, the old deployment will be deprovisioned. // This RPC can be used to redeploy a project that has been hibernated. rpc RedeployProject(RedeployProjectRequest) returns (RedeployProjectResponse) { option (google.api.http) = {post: "/v1/orgs/{org}/projects/{project}/redeploy"}; } // HibernateProject hibernates a project by tearing down its deployments. rpc HibernateProject(HibernateProjectRequest) returns (HibernateProjectResponse) { option (google.api.http) = {post: "/v1/orgs/{org}/projects/{project}/hibernate"}; } // ListDeployments lists deployments for a project. rpc ListDeployments(ListDeploymentsRequest) returns (ListDeploymentsResponse) { option (google.api.http) = { get: "/v1/orgs/{org}/projects/{project}/deployments" }; } // CreateDeployment creates a new deployment for a project. rpc CreateDeployment(CreateDeploymentRequest) returns (CreateDeploymentResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/projects/{project}/deployments", body: "*" }; } // GetDeployment returns runtime info and access token on behalf of a specific user, or alternatively for a raw set of JWT attributes rpc GetDeployment(GetDeploymentRequest) returns (GetDeploymentResponse) { option (google.api.http) = { post: "/v1/deployments/{deployment_id}/credentials", body: "*" }; } // StartDeployment starts a deployment. rpc StartDeployment(StartDeploymentRequest) returns (StartDeploymentResponse) { option (google.api.http) = { post: "/v1/deployments/{deployment_id}/start", body: "*" }; } // StopDeployment stops a deployment. rpc StopDeployment(StopDeploymentRequest) returns (StopDeploymentResponse) { option (google.api.http) = { post: "/v1/deployments/{deployment_id}/stop", body: "*" }; } // DeleteDeployment deletes a deployment. rpc DeleteDeployment(DeleteDeploymentRequest) returns (DeleteDeploymentResponse) { option (google.api.http) = { delete: "/v1/deployments/{deployment_id}" }; } // TriggerReconcile triggers reconcile for the project's prod deployment. // DEPRECATED: Clients should call CreateTrigger directly on the deployed runtime instead. rpc TriggerReconcile(TriggerReconcileRequest) returns (TriggerReconcileResponse) { option (google.api.http) = { post: "/v1/deployments/{deployment_id}/reconcile", body: "*" }; } // TriggerRefreshSources refresh the source for production deployment. // DEPRECATED: Clients should call CreateTrigger directly on the deployed runtime instead. rpc TriggerRefreshSources(TriggerRefreshSourcesRequest) returns (TriggerRefreshSourcesResponse) { option (google.api.http) = { post: "/v1/deployments/{deployment_id}/refresh", body: "*" }; } // TriggerRedeploy is similar to RedeployProject. // DEPRECATED: Use RedeployProject instead. rpc TriggerRedeploy(TriggerRedeployRequest) returns (TriggerRedeployResponse) { option (google.api.http) = { post: "/v1/projects/-/redeploy", body: "*" }; } // Provision provisions a new resource for a deployment. // If an existing resource matches the request, it will be returned without provisioning a new resource. rpc Provision(ProvisionRequest) returns (ProvisionResponse) { option (google.api.http) = { post: "/v1/deployments/{deployment_id}/provision", body: "*" }; } // GetDeploymentConfig returns the configuration for a deployment that the runtime should apply. // This is called by the runtime to pull its Variables and Annotations from the admin service. rpc GetDeploymentConfig(GetDeploymentConfigRequest) returns (GetDeploymentConfigResponse) { option (google.api.http) = {get: "/v1/deployments/{deployment_id}/config"}; } // ListRoles lists all the roles available for orgs and projects. rpc ListRoles(ListRolesRequest) returns (ListRolesResponse) { option (google.api.http) = {get: "/v1/roles"}; } // ListOrganizationMemberUsers lists all the org members rpc ListOrganizationMemberUsers(ListOrganizationMemberUsersRequest) returns (ListOrganizationMemberUsersResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/members"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // ListOrganizationInvites lists all the org invites rpc ListOrganizationInvites(ListOrganizationInvitesRequest) returns (ListOrganizationInvitesResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/invites"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // AddOrganizationMemberUser adds a user to the organization rpc AddOrganizationMemberUser(AddOrganizationMemberUserRequest) returns (AddOrganizationMemberUserResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/members", body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // RemoveOrganizationMemberUser removes member from the organization rpc RemoveOrganizationMemberUser(RemoveOrganizationMemberUserRequest) returns (RemoveOrganizationMemberUserResponse) { option (google.api.http) = {delete: "/v1/orgs/{org}/members/{email}"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // LeaveOrganization removes the current user from the organization rpc LeaveOrganization(LeaveOrganizationRequest) returns (LeaveOrganizationResponse) { option (google.api.http) = {delete: "/v1/orgs/{org}/members/current"}; } // SetOrganizationMemberUserRole sets the role for the member rpc SetOrganizationMemberUserRole(SetOrganizationMemberUserRoleRequest) returns (SetOrganizationMemberUserRoleResponse) { option (google.api.http) = { put: "/v1/orgs/{org}/members/{email}", body: "*" }; } // GetOrganizationMemberUser gets the member details rpc GetOrganizationMemberUser(GetOrganizationMemberUserRequest) returns (GetOrganizationMemberUserResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/members/{email}"}; } // ListUsergroupsForProjectAndUser returns the user groups for a user within a project rpc ListUsergroupsForProjectAndUser(ListUsergroupsForProjectAndUserRequest) returns (ListUsergroupsForProjectAndUserResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/projects/{project}/members/{email}/usergroups"}; } // UpdateOrganizationMemberUserAttributes updates the attributes for a member rpc UpdateOrganizationMemberUserAttributes(UpdateOrganizationMemberUserAttributesRequest) returns (UpdateOrganizationMemberUserAttributesResponse) { option (google.api.http) = { put: "/v1/orgs/{org}/members/{email}/attributes", body: "*" }; } // ListProjectMemberUsers lists all the project members rpc ListProjectMemberUsers(ListProjectMemberUsersRequest) returns (ListProjectMemberUsersResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/projects/{project}/members"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // ListProjectInvites lists all the project invites rpc ListProjectInvites(ListProjectInvitesRequest) returns (ListProjectInvitesResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/projects/{project}/invites"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // AddProjectMemberUser adds a member to the project rpc AddProjectMemberUser(AddProjectMemberUserRequest) returns (AddProjectMemberUserResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/projects/{project}/members", body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // RemoveProjectMemberUser removes member from the project rpc RemoveProjectMemberUser(RemoveProjectMemberUserRequest) returns (RemoveProjectMemberUserResponse) { option (google.api.http) = {delete: "/v1/orgs/{org}/projects/{project}/members/{email}"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // SetProjectMemberUserRole sets the role for the member rpc SetProjectMemberUserRole(SetProjectMemberUserRoleRequest) returns (SetProjectMemberUserRoleResponse) { option (google.api.http) = { put: "/v1/orgs/{org}/projects/{project}/members/{email}", body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // GetProjectMemberUser gets the member details rpc GetProjectMemberUser(GetProjectMemberUserRequest) returns (GetProjectMemberUserResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/projects/{project}/members/{email}"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // ListUsergroupsForOrganizationAndUser lists the user groups that an organization member user has access to. rpc ListUsergroupsForOrganizationAndUser(ListUsergroupsForOrganizationAndUserRequest) returns (ListUsergroupsForOrganizationAndUserResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/usergroups-for-user"}; } // CreateUsergroup creates a user group in the organization rpc CreateUsergroup(CreateUsergroupRequest) returns (CreateUsergroupResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/usergroups", body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // GetUsergroup returns the user group details rpc GetUsergroup(GetUsergroupRequest) returns (GetUsergroupResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/usergroups/{usergroup}"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // UpdateUsergroup updates a user group's name and/or description rpc UpdateUsergroup(UpdateUsergroupRequest) returns (UpdateUsergroupResponse) { option (google.api.http) = { patch: "/v1/orgs/{org}/usergroups/{usergroup}", body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // ListOrganizationMemberUsergroups lists the organization's user groups rpc ListOrganizationMemberUsergroups(ListOrganizationMemberUsergroupsRequest) returns (ListOrganizationMemberUsergroupsResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/usergroups"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // ListProjectMemberUsergroups lists the user groups assigned to a project rpc ListProjectMemberUsergroups(ListProjectMemberUsergroupsRequest) returns (ListProjectMemberUsergroupsResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/projects/{project}/usergroups"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // DeleteUsergroup deletes the user group from the organization rpc DeleteUsergroup(DeleteUsergroupRequest) returns (DeleteUsergroupResponse) { option (google.api.http) = {delete: "/v1/orgs/{org}/usergroups/{usergroup}"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // AddOrganizationMemberUsergroupRole adds the role for the user group rpc AddOrganizationMemberUsergroup(AddOrganizationMemberUsergroupRequest) returns (AddOrganizationMemberUsergroupResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/usergroups/{usergroup}/role", body: "*" }; } // SetOrganizationMemberUsergroupRole sets the role for the user group rpc SetOrganizationMemberUsergroupRole(SetOrganizationMemberUsergroupRoleRequest) returns (SetOrganizationMemberUsergroupRoleResponse) { option (google.api.http) = { put: "/v1/orgs/{org}/usergroups/{usergroup}/role", body: "*" }; } // RemoveOrganizationMemberUsergroup revokes the organization-level role for the user group rpc RemoveOrganizationMemberUsergroup(RemoveOrganizationMemberUsergroupRequest) returns (RemoveOrganizationMemberUsergroupResponse) { option (google.api.http) = {delete: "/v1/orgs/{org}/usergroups/{usergroup}/role"}; } // AddProjectMemberUsergroup adds a user group to the project with a role rpc AddProjectMemberUsergroup(AddProjectMemberUsergroupRequest) returns (AddProjectMemberUsergroupResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/projects/{project}/usergroups/{usergroup}/roles", body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // SetProjectMemberUsergroupRole sets the role for the user group rpc SetProjectMemberUsergroupRole(SetProjectMemberUsergroupRoleRequest) returns (SetProjectMemberUsergroupRoleResponse) { option (google.api.http) = { put: "/v1/orgs/{org}/projects/{project}/usergroups/{usergroup}/roles", body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // RemoveProjectMemberUsergroup revokes the project-level role for the user group rpc RemoveProjectMemberUsergroup(RemoveProjectMemberUsergroupRequest) returns (RemoveProjectMemberUsergroupResponse) { option (google.api.http) = { delete: "/v1/orgs/{org}/projects/{project}/usergroups/{usergroup}/roles" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // AddUsergroupMemberUser adds a member to the user group rpc AddUsergroupMemberUser(AddUsergroupMemberUserRequest) returns (AddUsergroupMemberUserResponse) { option (google.api.http) = { put: "/v1/orgs/{org}/usergroups/{usergroup}/members/{email}", body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // ListUsergroupMemberUsers lists all the user group members rpc ListUsergroupMemberUsers(ListUsergroupMemberUsersRequest) returns (ListUsergroupMemberUsersResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/usergroups/{usergroup}/members"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // RemoveUsergroupMemberUser removes member from the user group rpc RemoveUsergroupMemberUser(RemoveUsergroupMemberUserRequest) returns (RemoveUsergroupMemberUserResponse) { option (google.api.http) = {delete: "/v1/orgs/{org}/usergroups/{usergroup}/members/{email}"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { extensions: { key: "x-visibility" value: { string_value: "public" } } }; } // GetUser returns user by email rpc GetUser(GetUserRequest) returns (GetUserResponse) { option (google.api.http) = {get: "/v1/users"}; } // GetCurrentUser returns the currently authenticated user (if any) rpc GetCurrentUser(GetCurrentUserRequest) returns (GetCurrentUserResponse) { option (google.api.http) = { get: "/v1/users/current" }; } // DeleteUser deletes the user from the organization by email rpc DeleteUser(DeleteUserRequest) returns (DeleteUserResponse) { option (google.api.http) = {delete: "/v1/users/{email}"}; } // ListUserAuthTokens lists the current user's auth tokens. // You can optionally pass "current" instead of the user ID to list the current user's tokens. rpc ListUserAuthTokens(ListUserAuthTokensRequest) returns (ListUserAuthTokensResponse) { option (google.api.http) = {get: "/v1/users/{user_id}/tokens"}; } // IssueUserAuthToken issues an access token for the current user. // You can optionally pass "current" instead of the user ID to issue a token for the current user. rpc IssueUserAuthToken(IssueUserAuthTokenRequest) returns (IssueUserAuthTokenResponse) { option (google.api.http) = { post: "/v1/users/{user_id}/tokens", body: "*" }; } // RevokeUserAuthToken revokes a user access token. // You can optionally pass "current" instead of the token ID to revoke the current token. rpc RevokeUserAuthToken(RevokeUserAuthTokenRequest) returns (RevokeUserAuthTokenResponse) { option (google.api.http) = {delete: "/v1/users/-/tokens/{token_id}"}; } // RevokeAllUserAuthTokens revokes all access and refresh tokens for a user. // You can optionally pass "current" instead of the user ID to revoke all tokens for the current user. rpc RevokeAllUserAuthTokens(RevokeAllUserAuthTokensRequest) returns (RevokeAllUserAuthTokensResponse) { option (google.api.http) = {delete: "/v1/users/{user_id}/tokens"}; } // RevokeRepresentativeAuthTokens revokes all active tokens created by the current user to act on behalf of the specified user. // This is primarily used for "unassume" flows. rpc RevokeRepresentativeAuthTokens(RevokeRepresentativeAuthTokensRequest) returns (RevokeRepresentativeAuthTokensResponse) { option (google.api.http) = { delete: "/v1/users/-/tokens/representing/{email}" }; } // IssueRepresentativeAuthToken returns the temporary token for given email. // Deprecated: Use IssueUserAuthToken with the represent_email option instead. rpc IssueRepresentativeAuthToken(IssueRepresentativeAuthTokenRequest) returns (IssueRepresentativeAuthTokenResponse) { option (google.api.http) = { post: "/v1/tokens/represent", body: "*" }; } // RevokeCurrentAuthToken revoke the current auth token. // Deprecated: Use RevokeUserAuthToken with ID set to "current" instead. rpc RevokeCurrentAuthToken(RevokeCurrentAuthTokenRequest) returns (RevokeCurrentAuthTokenResponse) { option (google.api.http) = {delete: "/v1/tokens/current"}; } // GetGithubRepoRequest returns info about a Github repo based on the caller's installations. // If the caller has not granted access to the repository, instructions for granting access are returned. rpc GetGithubRepoStatus(GetGithubRepoStatusRequest) returns (GetGithubRepoStatusResponse) { option (google.api.http) = {get: "/v1/github/repositories"}; } // GetGithubUserStatus returns info about a Github user account based on the caller's installations. // If we don't have access to user's personal account tokens or it is expired, instructions for granting access are returned. rpc GetGithubUserStatus(GetGithubUserStatusRequest) returns (GetGithubUserStatusResponse) { option (google.api.http) = {get: "/v1/github/user"}; } rpc ListGithubUserRepos(ListGithubUserReposRequest) returns (ListGithubUserReposResponse) { option (google.api.http) = {get: "/v1/github/user/repositories"}; } // CreateGithubPullRequest creates a Github PR from the specified branch in the project's connected Github repository to the primary branch. rpc CreateGithubPullRequest(CreateGithubPullRequestRequest) returns (CreateGithubPullRequestResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/projects/{project}/github/pr", body: "*" }; } // GetGithubPullRequest returns the status of the PR for the specified branch, if it exists. rpc GetGithubPullRequest(GetGithubPullRequestRequest) returns (GetGithubPullRequestResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/projects/{project}/github/pr/{branch}"}; } // Connects a rill managed project to github. // Replaces the contents of the remote repo with the contents of the project. rpc ConnectProjectToGithub(ConnectProjectToGithubRequest) returns (ConnectProjectToGithubResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/projects/{project}/connect-to-github", body: "*" }; } // CreateManagedGitRepo creates a new rill managed git repo for the organization. rpc CreateManagedGitRepo(CreateManagedGitRepoRequest) returns (CreateManagedGitRepoResponse) { option (google.api.http) = { put: "/v1/orgs/{org}/create-managed-git-repo", body: "*" }; } // GetCloneCredentials returns credentials and other details for a project's Git repository or archive path if git repo is not configured. rpc GetCloneCredentials(GetCloneCredentialsRequest) returns (GetCloneCredentialsResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/projects/{project}/clone-credentials"}; } // CreateWhitelistedDomain adds a domain to the whitelist rpc CreateWhitelistedDomain(CreateWhitelistedDomainRequest) returns (CreateWhitelistedDomainResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/whitelisted", body: "*" }; } // RemoveWhitelistedDomain removes a domain from the whitelist list rpc RemoveWhitelistedDomain(RemoveWhitelistedDomainRequest) returns (RemoveWhitelistedDomainResponse) { option (google.api.http) = {delete: "/v1/orgs/{org}/whitelisted/{domain}"}; } // ListWhitelistedDomains lists all the whitelisted domains for the organization rpc ListWhitelistedDomains(ListWhitelistedDomainsRequest) returns (ListWhitelistedDomainsResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/whitelisted"}; } // GetUsersByEmail returns users by email rpc SearchUsers(SearchUsersRequest) returns (SearchUsersResponse) { option (google.api.http) = {get: "/v1/users/search"}; } // SearchProjectUsers returns users who has access to to a project (including org members that have access through a usergroup) rpc SearchProjectUsers(SearchProjectUsersRequest) returns (SearchProjectUsersResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/projects/{project}/users/search"}; } // ListSuperusers lists all the superusers rpc ListSuperusers(ListSuperusersRequest) returns (ListSuperusersResponse) { option (google.api.http) = {get: "/v1/superuser/members"}; } // GetDeploymentCredentials returns runtime info and access token on behalf of a specific user, or alternatively for a raw set of JWT attributes // DEPRECATED: Clients should call GetDeployment instead. rpc GetDeploymentCredentials(GetDeploymentCredentialsRequest) returns (GetDeploymentCredentialsResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/projects/{project}/credentials", body: "*" }; } // GetIFrame returns the iframe URL for the given project rpc GetIFrame(GetIFrameRequest) returns (GetIFrameResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/projects/{project}/iframe", body: "*" }; } // SetSuperuser adds/remove a superuser rpc SetSuperuser(SetSuperuserRequest) returns (SetSuperuserResponse) { option (google.api.http) = { post: "/v1/superuser/members", body: "*" }; } // SudoGetResource returns details about a resource by ID lookup rpc SudoGetResource(SudoGetResourceRequest) returns (SudoGetResourceResponse) { option (google.api.http) = {get: "/v1/superuser/resource"}; } // SudoUpdateUserQuotas update the quotas for users rpc SudoUpdateUserQuotas(SudoUpdateUserQuotasRequest) returns (SudoUpdateUserQuotasResponse) { option (google.api.http) = { patch: "/v1/superuser/quotas/user", body: "*" }; } // SudoUpdateOrganizationQuotas update the quotas available for orgs rpc SudoUpdateOrganizationQuotas(SudoUpdateOrganizationQuotasRequest) returns (SudoUpdateOrganizationQuotasResponse) { option (google.api.http) = { patch: "/v1/superuser/quotas/organization", body: "*" }; } // SudoUpdateOrganizationBillingCustomer update the billing customer for the organization rpc SudoUpdateOrganizationBillingCustomer(SudoUpdateOrganizationBillingCustomerRequest) returns (SudoUpdateOrganizationBillingCustomerResponse) { option (google.api.http) = { patch: "/v1/superuser/organization/billing/customer_id", body: "*" }; } // SudoExtendTrial extends the trial period for an organization rpc SudoExtendTrial(SudoExtendTrialRequest) returns (SudoExtendTrialResponse) { option (google.api.http) = { post: "/v1/superuser/organization/trial/extend", body: "*" }; } // SudoGrantTrialCredits grants additional trial credits to an organization on the credit-based trial plan. rpc SudoGrantTrialCredits(SudoGrantTrialCreditsRequest) returns (SudoGrantTrialCreditsResponse) { option (google.api.http) = { post: "/v1/superuser/organization/trial/grant-credits", body: "*" }; } // SudoReportUsage reports a mock usage event for an organization. rpc SudoReportUsage(SudoReportUsageRequest) returns (SudoReportUsageResponse) { option (google.api.http) = { post: "/v1/superuser/organization/billing/report-usage", body: "*" }; } // SudoUpdateOrganizationCustomDomain updates the custom domain for an organization. // It only updates the custom domain in the database, which is used to ensure correct redirects. // The DNS records and ingress TLS must be configured separately. rpc SudoUpdateOrganizationCustomDomain(SudoUpdateOrganizationCustomDomainRequest) returns (SudoUpdateOrganizationCustomDomainResponse) { option (google.api.http) = { patch: "/v1/superuser/organization/custom-domain", body: "*" }; } // SudoUpdateAnnotations endpoint for superusers to update project annotations rpc SudoUpdateAnnotations(SudoUpdateAnnotationsRequest) returns (SudoUpdateAnnotationsResponse) { option (google.api.http) = { patch: "/v1/superuser/projects/annotations", body: "*" }; } // SudoIssueRuntimeManagerToken returns a runtime JWT with full manager permissions for a runtime. rpc SudoIssueRuntimeManagerToken(SudoIssueRuntimeManagerTokenRequest) returns (SudoIssueRuntimeManagerTokenResponse) { option (google.api.http) = { post: "/v1/superuser/deployments/manager-token", body: "*" }; } // SudoDeleteOrganizationBillingIssue deletes a billing issue of a type for the organization rpc SudoDeleteOrganizationBillingIssue(SudoDeleteOrganizationBillingIssueRequest) returns (SudoDeleteOrganizationBillingIssueResponse) { option (google.api.http) = { delete: "/v1/superuser/organizations/{org}/billing/issues/{type}" }; } // SudoUpdateOrganizationBillingMessage sets (overriding any existing) a custom message banner for the organization rpc SudoUpdateOrganizationBillingMessage(SudoUpdateOrganizationBillingMessageRequest) returns (SudoUpdateOrganizationBillingMessageResponse) { option (google.api.http) = { post: "/v1/superuser/organizations/{org}/billing/message", body: "*" }; } // SudoDeleteOrganizationBillingMessage removes the custom message banner for the organization rpc SudoDeleteOrganizationBillingMessage(SudoDeleteOrganizationBillingMessageRequest) returns (SudoDeleteOrganizationBillingMessageResponse) { option (google.api.http) = { delete: "/v1/superuser/organizations/{org}/billing/message" }; } // SudoTriggerBillingRepair triggers billing repair jobs for orgs that doesn't have billing info and puts them on trial rpc SudoTriggerBillingRepair(SudoTriggerBillingRepairRequest) returns (SudoTriggerBillingRepairResponse) { option (google.api.http) = { post: "/v1/superuser/billing/repair", body: "*" }; } // CreateProjectWhitelistedDomain adds a domain to the project's whitelisted rpc CreateProjectWhitelistedDomain(CreateProjectWhitelistedDomainRequest) returns (CreateProjectWhitelistedDomainResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/projects/{project}/whitelisted", body: "*" }; } // RemoveProjectWhitelistedDomain removes a domain from the project's whitelisted rpc RemoveProjectWhitelistedDomain(RemoveProjectWhitelistedDomainRequest) returns (RemoveProjectWhitelistedDomainResponse) { option (google.api.http) = {delete: "/v1/orgs/{org}/projects/{project}/whitelisted/{domain}"}; } // ListWhitelistedDomains lists all the whitelisted domains of the project rpc ListProjectWhitelistedDomains(ListProjectWhitelistedDomainsRequest) returns (ListProjectWhitelistedDomainsResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/projects/{project}/whitelisted"}; } // ListService returns all the services per organization rpc ListServices(ListServicesRequest) returns (ListServicesResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/services"}; } // ListProjectMemberServices returns all the services for the project for an organization rpc ListProjectMemberServices(ListProjectMemberServicesRequest) returns (ListProjectMemberServicesResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/projects/{project}/services"}; } // CreateService creates a new service per organization rpc CreateService(CreateServiceRequest) returns (CreateServiceResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/services", body: "*" }; } // GetService returns information about a specific service rpc GetService(GetServiceRequest) returns (GetServiceResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/services/{name}"}; } // UpdateService updates a service per organization rpc UpdateService(UpdateServiceRequest) returns (UpdateServiceResponse) { option (google.api.http) = { patch: "/v1/orgs/{org}/services/{name}", body: "*" }; } // SetOrganizationMemberServiceRole sets or updates the role of the service in the organization rpc SetOrganizationMemberServiceRole(SetOrganizationMemberServiceRoleRequest) returns (SetOrganizationMemberServiceRoleResponse) { option (google.api.http) = { put: "/v1/orgs/{org}/services/{name}/role", body: "*" }; } // RemoveOrganizationMemberService removes the organization role for the service rpc RemoveOrganizationMemberService(RemoveOrganizationMemberServiceRequest) returns (RemoveOrganizationMemberServiceResponse) { option (google.api.http) = {delete: "/v1/orgs/{org}/services/{name}/role"}; } // SetProjectMemberServiceRole updates the project role for the service rpc SetProjectMemberServiceRole(SetProjectMemberServiceRoleRequest) returns (SetProjectMemberServiceRoleResponse) { option (google.api.http) = { put: "/v1/orgs/{org}/projects/{project}/services/{name}/role", body: "*" }; } // RemoveProjectMemberService removes the service from the project rpc RemoveProjectMemberService(RemoveProjectMemberServiceRequest) returns (RemoveProjectMemberServiceResponse) { option (google.api.http) = {delete: "/v1/orgs/{org}/projects/{project}/services/{name}"}; } // DeleteService deletes a service per organization rpc DeleteService(DeleteServiceRequest) returns (DeleteServiceResponse) { option (google.api.http) = {delete: "/v1/orgs/{org}/services/{name}"}; } // ListServiceAuthTokens lists all the service auth tokens rpc ListServiceAuthTokens(ListServiceAuthTokensRequest) returns (ListServiceAuthTokensResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/services/{service_name}/tokens"}; } // IssueServiceAuthToken issues an access token for a service rpc IssueServiceAuthToken(IssueServiceAuthTokenRequest) returns (IssueServiceAuthTokenResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/services/{service_name}/tokens", body: "*" }; } // RevokeServiceAuthToken revoke a service's access token rpc RevokeServiceAuthToken(RevokeServiceAuthTokenRequest) returns (RevokeServiceAuthTokenResponse) { option (google.api.http) = {delete: "/v1/services/tokens/{token_id}"}; } // IssueMagicAuthToken creates a "magic" auth token that provides limited access to a specific filtered dashboard in a specific project. rpc IssueMagicAuthToken(IssueMagicAuthTokenRequest) returns (IssueMagicAuthTokenResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/projects/{project}/tokens/magic", body: "*" }; } // ListMagicAuthTokens lists all the magic auth tokens for a specific project. rpc ListMagicAuthTokens(ListMagicAuthTokensRequest) returns (ListMagicAuthTokensResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/projects/{project}/tokens/magic"}; } // GetCurrentMagicAuthToken returns information about the current magic auth token. rpc GetCurrentMagicAuthToken(GetCurrentMagicAuthTokenRequest) returns (GetCurrentMagicAuthTokenResponse) { option (google.api.http) = {get: "/v1/magic-tokens/current"}; } // RevokeMagicAuthToken revokes a magic auth token. rpc RevokeMagicAuthToken(RevokeMagicAuthTokenRequest) returns (RevokeMagicAuthTokenResponse) { option (google.api.http) = {delete: "/v1/magic-tokens/{token_id}"}; } // UpdateUserPreferences updates the preferences for the user rpc UpdateUserPreferences(UpdateUserPreferencesRequest) returns (UpdateUserPreferencesResponse) { option (google.api.http) = { put: "/v1/users/preferences", body: "*" }; } // ListBookmarks lists all the bookmarks for the user and global ones for dashboard rpc ListBookmarks(ListBookmarksRequest) returns (ListBookmarksResponse) { option (google.api.http) = {get: "/v1/users/bookmarks"}; } // GetBookmark returns the bookmark for the given user for the given project rpc GetBookmark(GetBookmarkRequest) returns (GetBookmarkResponse) { option (google.api.http) = {get: "/v1/users/bookmarks/{bookmark_id}"}; } // CreateBookmark creates a bookmark for the given user or for all users for the dashboard rpc CreateBookmark(CreateBookmarkRequest) returns (CreateBookmarkResponse) { option (google.api.http) = { post: "/v1/users/bookmarks", body: "*" }; } // UpdateBookmark updates a bookmark for the given user for the given project rpc UpdateBookmark(UpdateBookmarkRequest) returns (UpdateBookmarkResponse) { option (google.api.http) = { put: "/v1/users/bookmarks", body: "*" }; } // RemoveBookmark removes the bookmark for the given user or all users rpc RemoveBookmark(RemoveBookmarkRequest) returns (RemoveBookmarkResponse) { option (google.api.http) = {delete: "/v1/users/bookmarks/{bookmark_id}"}; } // GetRepoMeta returns credentials and other metadata for accessing a project's repo rpc GetRepoMeta(GetRepoMetaRequest) returns (GetRepoMetaResponse) { option (google.api.http) = {get: "/v1/projects/{project_id}/repo/meta"}; } // PullVirtualRepo fetches files from a project's virtual repo rpc PullVirtualRepo(PullVirtualRepoRequest) returns (PullVirtualRepoResponse) { option (google.api.http) = {get: "/v1/projects/{project_id}/repo/virtual"}; } // GetVirtualFile returns the contents of a specific virtual file in a project's virtual repo rpc GetVirtualFile(GetVirtualFileRequest) returns (GetVirtualFileResponse) { option (google.api.http) = {get: "/v1/projects/{project_id}/repo/virtual/file"}; } // DeleteVirtualFile deletes a virtual file from a project's virtual repo rpc DeleteVirtualFile(DeleteVirtualFileRequest) returns (DeleteVirtualFileResponse) { option (google.api.http) = {delete: "/v1/projects/{project_id}/repo/virtual/file"}; } // GetReportMeta returns metadata for generating a report. It's currently only called by the report reconciler in the runtime. rpc GetReportMeta(GetReportMetaRequest) returns (GetReportMetaResponse) { option (google.api.http) = { post: "/v1/projects/{project_id}/reports/meta", body: "*" }; } // GetAlertMeta returns metadata for checking an alert. It's currently only called by the alert reconciler in the runtime. rpc GetAlertMeta(GetAlertMetaRequest) returns (GetAlertMetaResponse) { option (google.api.http) = { post: "/v1/projects/{project_id}/alerts/meta", body: "*" }; } // CreateReport adds a virtual file for a report, triggers a reconcile, and waits for the report to be added to the runtime catalog rpc CreateReport(CreateReportRequest) returns (CreateReportResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/projects/{project}/reports", body: "*" }; } // EditReport edits a virtual file for a UI-managed report, triggers a reconcile, and waits for the report to be updated in the runtime rpc EditReport(EditReportRequest) returns (EditReportResponse) { option (google.api.http) = { put: "/v1/orgs/{org}/projects/{project}/reports/{name}", body: "*" }; } // UnsubscribeReport removes the calling user from a reports recipients list rpc UnsubscribeReport(UnsubscribeReportRequest) returns (UnsubscribeReportResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/projects/{project}/reports/{name}/unsubscribe", body: "*" }; } // DeleteReport deletes the virtual file for a UI-managed report, triggers a reconcile, and waits for the report to be deleted in the runtime rpc DeleteReport(DeleteReportRequest) returns (DeleteReportResponse) { option (google.api.http) = {delete: "/v1/orgs/{org}/projects/{project}/reports/{name}"}; } // TriggerReport triggers an ad-hoc report run rpc TriggerReport(TriggerReportRequest) returns (TriggerReportResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/projects/{project}/reports/{name}/trigger", body: "*" }; } // GenerateReportYAML generates YAML for a scheduled report to be copied into a project's Git repository rpc GenerateReportYAML(GenerateReportYAMLRequest) returns (GenerateReportYAMLResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/projects/{project}/reports/-/yaml", body: "*" }; } // CreateAlert adds a virtual file for an alert, triggers a reconcile, and waits for the alert to be added to the runtime catalog rpc CreateAlert(CreateAlertRequest) returns (CreateAlertResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/projects/{project}/alerts", body: "*" }; } // EditAlert edits a virtual file for a UI-managed alert, triggers a reconcile, and waits for the alert to be updated in the runtime rpc EditAlert(EditAlertRequest) returns (EditAlertResponse) { option (google.api.http) = { put: "/v1/orgs/{org}/projects/{project}/alerts/{name}", body: "*" }; } // UnsubscribeAlert removes the calling user from a alert's recipients list rpc UnsubscribeAlert(UnsubscribeAlertRequest) returns (UnsubscribeAlertResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/projects/{project}/alerts/{name}/unsubscribe", body: "*" }; } // DeleteAlert deletes the virtual file for a UI-managed alert, triggers a reconcile, and waits for the alert to be deleted in the runtime rpc DeleteAlert(DeleteAlertRequest) returns (DeleteAlertResponse) { option (google.api.http) = {delete: "/v1/orgs/{org}/projects/{project}/alerts/{name}"}; } // GenerateAlertYAML generates YAML for an alert to be copied into a project's Git repository rpc GenerateAlertYAML(GenerateAlertYAMLRequest) returns (GenerateAlertYAMLResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/projects/{project}/alerts/-/yaml", body: "*" }; } // GenerateAlertYAML generates YAML for an alert to be copied into a project's Git repository rpc GetAlertYAML(GetAlertYAMLRequest) returns (GetAlertYAMLResponse) { option (google.api.http) = { get: "/v1/orgs/{org}/projects/{project}/alerts/{name}/yaml" }; } // ListPersonalFiles lists the calling user's personal files. rpc ListPersonalFiles(ListPersonalFilesRequest) returns (ListPersonalFilesResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/projects/{project}/personal-files"}; } // CreatePersonalFile creates a personal (owner-only) resource as a virtual file in the project. rpc CreatePersonalFile(CreatePersonalFileRequest) returns (CreatePersonalFileResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/projects/{project}/personal-files", body: "*" }; } // GetPersonalFile returns the YAML body and metadata for a personal virtual file the caller owns. rpc GetPersonalFile(GetPersonalFileRequest) returns (GetPersonalFileResponse) { option (google.api.http) = { get: "/v1/orgs/{org}/projects/{project}/personal-files/{name}" }; } // EditPersonalFile updates the YAML body of a personal virtual file the caller owns. rpc EditPersonalFile(EditPersonalFileRequest) returns (EditPersonalFileResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/projects/{project}/personal-files/{name}", body: "*" }; } // DeletePersonalFile deletes a personal virtual file the caller owns. rpc DeletePersonalFile(DeletePersonalFileRequest) returns (DeletePersonalFileResponse) { option (google.api.http) = {delete: "/v1/orgs/{org}/projects/{project}/personal-files/{name}"}; } // GetBillingSubscription lists the subscription for the organization rpc GetBillingSubscription(GetBillingSubscriptionRequest) returns (GetBillingSubscriptionResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/billing/subscriptions"}; } // UpdateBillingSubscription updates the billing plan for the organization rpc UpdateBillingSubscription(UpdateBillingSubscriptionRequest) returns (UpdateBillingSubscriptionResponse) { option (google.api.http) = { patch: "/v1/orgs/{org}/billing/subscriptions", body: "*" }; } // CancelBillingSubscription cancels the billing subscription for the organization rpc CancelBillingSubscription(CancelBillingSubscriptionRequest) returns (CancelBillingSubscriptionResponse) { option (google.api.http) = { delete: "/v1/orgs/{org}/billing/subscriptions" }; } // RenewBillingSubscription renews the billing plan for the organization once cancelled rpc RenewBillingSubscription(RenewBillingSubscriptionRequest) returns (RenewBillingSubscriptionResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/billing/subscriptions/renew", body: "*" }; } // GetPaymentsPortalURL returns the URL for the billing session to collect payment method rpc GetPaymentsPortalURL(GetPaymentsPortalURLRequest) returns (GetPaymentsPortalURLResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/billing/payments/portal-url"}; } // GetBillingCreditBalance returns the organization's remaining trial credit balance rpc GetBillingCreditBalance(GetBillingCreditBalanceRequest) returns (GetBillingCreditBalanceResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/billing/credits"}; } // ListPublicBillingPlans lists all public billing plans rpc ListPublicBillingPlans(ListPublicBillingPlansRequest) returns (ListPublicBillingPlansResponse) { option (google.api.http) = {get: "/v1/billing/plans"}; } // GetBillingProjectCredentials returns credentials for the configured cloud metrics project filtered by request organization rpc GetBillingProjectCredentials(GetBillingProjectCredentialsRequest) returns (GetBillingProjectCredentialsResponse) { option (google.api.http) = { post: "/v1/billing/metrics-project-credentials", body: "*" }; } rpc RequestProjectAccess(RequestProjectAccessRequest) returns (RequestProjectAccessResponse) { option (google.api.http) = { post: "/v1/orgs/{org}/projects/{project}/request-access", body: "*" }; } rpc GetProjectAccessRequest(GetProjectAccessRequestRequest) returns (GetProjectAccessRequestResponse) { option (google.api.http) = {get: "/v1/project-access-request/{id}"}; } rpc ApproveProjectAccess(ApproveProjectAccessRequest) returns (ApproveProjectAccessResponse) { option (google.api.http) = { post: "/v1/project-access-request/{id}/approve", body: "*" }; } rpc DenyProjectAccess(DenyProjectAccessRequest) returns (DenyProjectAccessResponse) { option (google.api.http) = { post: "/v1/project-access-request/{id}/deny", body: "*" }; } // ListOrganizationBillingIssues lists all the billing issues for the organization rpc ListOrganizationBillingIssues(ListOrganizationBillingIssuesRequest) returns (ListOrganizationBillingIssuesResponse) { option (google.api.http) = {get: "/v1/orgs/{org}/billing/issues"}; } } message PingRequest {} message PingResponse { string version = 1; google.protobuf.Timestamp time = 2; } message ListOrganizationsRequest { uint32 page_size = 1 [(validate.rules).uint32 = {ignore_empty: true, lte: 1000}]; string page_token = 2; } message ListOrganizationsResponse { repeated Organization organizations = 1; string next_page_token = 2; } message GetOrganizationRequest { string org = 1; bool superuser_force_access = 2; } message GetOrganizationResponse { Organization organization = 1; OrganizationPermissions permissions = 2; } message GetOrganizationNameForDomainRequest { string domain = 1 [(validate.rules).string.min_len = 1]; } message GetOrganizationNameForDomainResponse { string name = 1; } message CreateOrganizationRequest { string name = 2 [(validate.rules).string.min_len = 1]; string description = 3; string display_name = 4; } message CreateOrganizationResponse { Organization organization = 1; } message DeleteOrganizationRequest { string org = 1; } message DeleteOrganizationResponse {} message UpdateOrganizationRequest { string org = 1 [(validate.rules).string.min_len = 1]; optional string description = 2; optional string new_name = 3; optional string display_name = 5; optional string logo_asset_id = 6; optional string logo_dark_asset_id = 18; optional string favicon_asset_id = 7; optional string thumbnail_asset_id = 9; optional string default_project_role = 8; optional string billing_email = 4 [(validate.rules).string.email = true]; } message UpdateOrganizationResponse { Organization organization = 1; } message ListProjectsForOrganizationRequest { string org = 1 [(validate.rules).string.min_len = 1]; uint32 page_size = 2 [(validate.rules).uint32 = {ignore_empty: true, lte: 1000}]; string page_token = 3; } message ListDeploymentsRequest { string org = 1 [(validate.rules).string.min_len = 1]; string project = 2 [(validate.rules).string.min_len = 1]; string environment = 3; string branch = 5; string user_id = 4; } message ListDeploymentsResponse { repeated Deployment deployments = 1; } message CreateDeploymentRequest { string org = 1 [(validate.rules).string.min_len = 1]; string project = 2 [(validate.rules).string.min_len = 1]; string environment = 3 [(validate.rules).string.min_len = 1]; // Branch to deploy from. // Must not be set for `prod` deployments, uses project's default branch. This limitation can be lifted in the future if needed. // Optional for `dev` deployments. string branch = 4; // Whether the deployment is editable and the edited changes are persisted back to the git repo. // Can't be set for `prod` deployments. bool editable = 5; } message CreateDeploymentResponse { Deployment deployment = 1; } message GetDeploymentRequest { // ID of the deployment to get credentials for. string deployment_id = 1; // Optional TTL for the returned access token in seconds. uint32 access_token_ttl_seconds = 2; // User attributes to use for security policy evaluation. oneof for { // If set, will use the attributes of the Rill user with this ID. string user_id = 3 [(validate.rules).string.min_len = 1]; // If set, will generate attributes corresponding to a user with this email. string user_email = 4 [(validate.rules).string.email = true]; // If set, will use the provided attributes outright. google.protobuf.Struct attributes = 5; } // Optional ID for an external end user of the deployment. If set, the access token enables per-user state, such as AI chat history. // Cannot be combined with `user_id`. If `user_email` matches a Rill Cloud user, their attributes are used, but this ID takes precedence for per-user state. string external_user_id = 9; // If true, superusers can access the deployment even without org/project membership. bool superuser_force_access = 10; } message GetDeploymentResponse { string runtime_host = 1; string instance_id = 2; string access_token = 3; uint32 ttl_seconds = 4; } message StartDeploymentRequest { string deployment_id = 1; } message StartDeploymentResponse { Deployment deployment = 1; } message StopDeploymentRequest { string deployment_id = 1; } message StopDeploymentResponse { string deployment_id = 1; } message DeleteDeploymentRequest { string deployment_id = 1; } message DeleteDeploymentResponse { string deployment_id = 1; } message ListProjectsForOrganizationResponse { repeated Project projects = 1; string next_page_token = 2; } message ListProjectsForOrganizationAndUserRequest { string org = 1 [(validate.rules).string.min_len = 1]; string user_id = 2 [(validate.rules).string.min_len = 1]; uint32 page_size = 3 [(validate.rules).uint32 = {ignore_empty: true, lte: 1000}]; string page_token = 4; // Only return projects where the user has a direct membership (exclude usergroup-inherited access). bool direct = 5; // Populate project_roles in the response. bool include_roles = 6; } message ListProjectsForOrganizationAndUserResponse { repeated Project projects = 1; string next_page_token = 2; // Maps project IDs to the user's direct project membership. Only populated when include_roles is true. map project_roles = 3; } message ListProjectsForFingerprintRequest { string directory_name = 1; string git_remote = 2; string sub_path = 3; string rill_mgd_git_remote = 6; } message ListProjectsForFingerprintResponse { repeated Project projects = 1; // unauthorized_project is the name of a project that matches the git_remote+sub_path but the caller does not have access to. string unauthorized_project = 3; } message GetProjectRequest { string org = 1; string project = 2; // Optional branch to get deployment for. If not set, then project's primary_branch is used. string branch = 6; uint32 access_token_ttl_seconds = 3; bool superuser_force_access = 5; bool issue_superuser_token = 4; } message GetProjectResponse { Project project = 1; Deployment deployment = 2; string jwt = 3; ProjectPermissions project_permissions = 4; } message ListProjectsForUserByNameRequest { string name = 1 [(validate.rules).string.min_len = 1]; } message ListProjectsForUserByNameResponse { repeated Project projects = 1; } message GetProjectByIDRequest { string id = 1; } message GetProjectByIDResponse { Project project = 1; } message SearchProjectNamesRequest { string name_pattern = 1; map annotations = 5; uint32 page_size = 2 [(validate.rules).uint32 = {ignore_empty: true, lte: 1000}]; string page_token = 3; } message SearchProjectNamesResponse { repeated string names = 1; string next_page_token = 2; } message GetProjectVariablesRequest { // Org the project belongs to. string org = 1 [(validate.rules).string.min_len = 1]; // Project to get variables for. string project = 2 [(validate.rules).string.min_len = 1]; // Environment to get the variables for. // If empty, only variables shared across all environments are returned. string environment = 3; // If true, return variable values for all environments. // Can't be used together with the "environment" option. bool for_all_environments = 4; } message GetProjectVariablesResponse { repeated ProjectVariable variables = 2; // Deprecated: Populated for backwards compatibility. // (Renamed from "variables" to "variables_map"). map variables_map = 1; } message ProjectVariable { // Internal ID. string id = 1; // Variable name (case insensitive). string name = 2; // Variable value. string value = 3; // Environment the variable is set for. // If empty, the variable is shared for all environments. string environment = 4; // User ID that most recently updated the variable. May be empty. string updated_by_user_id = 5; // Timestamp when the variable was created. google.protobuf.Timestamp created_on = 6; // Timestamp when the variable was last updated. google.protobuf.Timestamp updated_on = 7; } message UpdateProjectVariablesRequest { // Org the project belongs to. string org = 1 [(validate.rules).string.min_len = 1]; // Project to update variables for. string project = 2 [(validate.rules).string.min_len = 1]; // Environment to set the variables for. // If empty, the variable(s) will be used as defaults for all environments. string environment = 4; // New variable values. // It is NOT NECESSARY to pass all variables, existing variables not included in the request will be left unchanged. map variables = 3; // Variables to delete. repeated string unset_variables = 5; } message UpdateProjectVariablesResponse { // Variables that were created or updated by the request. repeated ProjectVariable variables = 2; } message SearchProjectUsersRequest { string org = 1; string project = 2; string email_query = 3; uint32 page_size = 4 [(validate.rules).uint32 = {ignore_empty: true, lte: 1000}]; string page_token = 5; } message SearchProjectUsersResponse { repeated User users = 1; string next_page_token = 2; } message GetDeploymentCredentialsRequest { // Org the deployment belongs to. string org = 1; // Project the deployment belongs to. string project = 2; // Optional branch for the deployment. If not set, defaults to the project's primary branch. string branch = 3; // Optional TTL for the returned access token in seconds. uint32 ttl_seconds = 7; // User attributes to use for security policy evaluation. oneof for { // If set, will use the attributes of the Rill user with this ID. string user_id = 4; // If set, will generate attributes corresponding to a user with this email. string user_email = 6 [(validate.rules).string.email = true]; // If set, will use the provided attributes outright. google.protobuf.Struct attributes = 5; } // Optional ID for an external end user of the deployment. If set, the access token enables per-user state, such as AI chat history. // Cannot be combined with `user_id`. If `user_email` matches a Rill Cloud user, their attributes are used, but this ID takes precedence for per-user state. string external_user_id = 9; // If true, superusers can access the deployment even without org/project membership. bool superuser_force_access = 10; } message GetDeploymentCredentialsResponse { string runtime_host = 1; string instance_id = 2; string access_token = 3; uint32 ttl_seconds = 4; } // GetIFrameRequest is the request payload for AdminService.GetIFrame. message GetIFrameRequest { // Org that owns the project to embed. string org = 1; // Project that has the resource(s) to embed. string project = 2; // Branch to embed. If not set, the production branch is used. string branch = 3; // TTL for the iframe's access token. If not set, defaults to 24 hours. uint32 ttl_seconds = 6; // User attributes to use for security policy evaluation. oneof for { // If set, will use the attributes of the Rill user with this ID. string user_id = 9; // If set, will generate attributes corresponding to a user with this email. string user_email = 10 [(validate.rules).string.email = true]; // If set, will use the provided attributes outright. google.protobuf.Struct attributes = 11; } // Optional ID for the external end user of the iframe. If set, the access token enables per-user state, such as AI chat history. // Cannot be combined with `user_id`. If `user_email` matches a Rill Cloud user, their attributes are used, but this ID takes precedence for per-user state. string external_user_id = 16; // Type of resource to embed. If not set, defaults to "rill.runtime.v1.Explore". string type = 14; // Deprecated: Alias for `type`. string kind = 4; // Name of the resource to embed. This should identify a resource that is valid for embedding, such as a dashboard or component. string resource = 5; // Theme to use for the embedded resource. string theme = 12; // Theme mode to use for the embedded resource. Valid values: "light", "dark", "system". string theme_mode = 15 [(validate.rules).string = {ignore_empty: true, in: ["light", "dark", "system"]}]; // Navigation denotes whether navigation between different resources should be enabled in the embed. bool navigation = 13; // Blob containing UI state for rendering the initial embed. Not currently supported. string state = 7; // DEPRECATED: Additional parameters to set outright in the generated URL query. map query = 8; // If true, superusers can access the project even without org/project membership. bool superuser_force_access = 17; } message GetIFrameResponse { string iframe_src = 1; string runtime_host = 2; string instance_id = 3; string access_token = 4; uint32 ttl_seconds = 5; } message ListServicesRequest { string org = 1 [(validate.rules).string.min_len = 1]; } message ListServicesResponse { repeated OrganizationMemberService services = 1; } message ListProjectMemberServicesRequest { string org = 1 [(validate.rules).string.min_len = 1]; string project = 2 [(validate.rules).string.min_len = 1]; } message ListProjectMemberServicesResponse { repeated ProjectMemberService services = 1; } message CreateServiceRequest { string name = 1 [(validate.rules).string.min_len = 1]; string org = 2 [(validate.rules).string.min_len = 1]; string org_role_name = 3; // Optional org role to assign string project = 4; // Optional project to assign role to string project_role_name = 5; // Optional project role to assign optional google.protobuf.Struct attributes = 6; } message CreateServiceResponse { Service service = 1; } message GetServiceRequest { string name = 1 [(validate.rules).string.min_len = 1]; string org = 2 [(validate.rules).string.min_len = 1]; } message GetServiceResponse { OrganizationMemberService service = 1; repeated ProjectMemberService project_memberships = 2; // All projects that the service is a member of } message UpdateServiceRequest { string name = 1 [(validate.rules).string.min_len = 1]; string org = 2 [(validate.rules).string.min_len = 1]; optional string new_name = 3; optional google.protobuf.Struct attributes = 4; } message UpdateServiceResponse { Service service = 1; } message SetOrganizationMemberServiceRoleRequest { string name = 1 [(validate.rules).string.min_len = 1]; string org = 2 [(validate.rules).string.min_len = 1]; string role = 3 [(validate.rules).string.min_len = 1]; } message SetOrganizationMemberServiceRoleResponse {} message RemoveOrganizationMemberServiceRequest { string name = 1 [(validate.rules).string.min_len = 1]; string org = 2 [(validate.rules).string.min_len = 1]; } message RemoveOrganizationMemberServiceResponse {} message RemoveProjectMemberServiceRequest { string name = 1 [(validate.rules).string.min_len = 1]; string org = 2 [(validate.rules).string.min_len = 1]; string project = 3 [(validate.rules).string.min_len = 1]; } message RemoveProjectMemberServiceResponse {} message SetProjectMemberServiceRoleRequest { string name = 1 [(validate.rules).string.min_len = 1]; string org = 2 [(validate.rules).string.min_len = 1]; string project = 3 [(validate.rules).string.min_len = 1]; string role = 5 [(validate.rules).string.min_len = 1]; } message SetProjectMemberServiceRoleResponse {} message DeleteServiceRequest { string name = 1 [(validate.rules).string.min_len = 1]; string org = 2 [(validate.rules).string.min_len = 1]; } message DeleteServiceResponse { Service service = 1; } message CreateProjectRequest { string org = 1 [(validate.rules).string.min_len = 1]; string project = 2 [(validate.rules).string.min_len = 1]; string description = 3; bool public = 4; // directory_name should be the most recently observed local directory name for the project. // See ListProjectsForFingerprint for more context. string directory_name = 16; string provisioner = 5; int64 prod_slots = 8; string subpath = 12; string primary_branch = 9; // git_remote is set for projects whose project files are stored in Git. // It currently only supports Github remotes. It should be a HTTPS remote ending in .git for github.com. // Either git_remote or archive_asset_id should be set. string git_remote = 10; // archive_asset_id is set for projects whose project files are not stored in github but are managed by rill. string archive_asset_id = 14; string prod_version = 13; int64 dev_slots = 17; bool skip_deploy = 15; // Reserved for backwards compatibility (prod_olap_driver and prod_olap_dsn) reserved 6, 7; } message CreateProjectResponse { Project project = 1; } message DeleteProjectRequest { string org = 1; string project = 2; } message DeleteProjectResponse { string id = 1; } message UpdateProjectRequest { string org = 1 [(validate.rules).string.min_len = 1]; string project = 2 [(validate.rules).string.min_len = 1]; optional string description = 3; optional bool public = 4; optional string directory_name = 15; optional string primary_branch = 5; optional string git_remote = 6; optional string subpath = 13; optional string archive_asset_id = 12; optional int64 prod_slots = 7; optional string provisioner = 8; optional string new_name = 9; optional int64 prod_ttl_seconds = 10; optional string prod_version = 11; optional int64 dev_slots = 16; optional int64 dev_ttl_seconds = 18; bool superuser_force_access = 14; optional int64 override_disk_gb = 17; } message UpdateProjectResponse { Project project = 1; } message CreateAssetRequest { string org = 1 [(validate.rules).string.min_len = 1]; string type = 2 [(validate.rules).string = {in: ["deploy", "image"]}]; string name = 3 [(validate.rules).string.min_len = 1]; // Eg. "rilldata__project_name" string extension = 4; // Eg. ".tar.gz" bool public = 5; int64 estimated_size_bytes = 6; } message CreateAssetResponse { string asset_id = 1; string signed_url = 2; map signing_headers = 3; } message RedeployProjectRequest { string org = 1; string project = 2; bool superuser_force_access = 3; } message RedeployProjectResponse {} message HibernateProjectRequest { string org = 1; string project = 2; bool superuser_force_access = 3; } message HibernateProjectResponse {} message TriggerReconcileRequest { string deployment_id = 1; } message TriggerReconcileResponse {} message TriggerRefreshSourcesRequest { string deployment_id = 1; repeated string sources = 2; } message TriggerRefreshSourcesResponse {} message TriggerRedeployRequest { // It's sufficient to pass org/project name OR deployment_id. // (To enable rehydrating hibernated projects.) string org = 2; string project = 3; string deployment_id = 1; } message TriggerRedeployResponse {} message ProvisionRequest { // Deployment to provision a resource for. // If it's blank and the request is made with a deployment access token, the deployment is inferred from the token. string deployment_id = 1; // Type of resource to provision. string type = 2; // Name of the resource to provision. // It forms a unique key together with deployment and type, which is used to de-duplicate provision requests. string name = 3; // Arguments for the provisioner call. google.protobuf.Struct args = 4; } message ProvisionResponse { ProvisionerResource resource = 1; } message GetDeploymentConfigRequest { string deployment_id = 1; } message GetDeploymentConfigResponse { // Variables for the deployment. repeated ProjectVariable variables = 7; // Deprecated: Variables for the deployment. Use `variables` instead. map variables_legacy = 1; // Annotations for the deployment (org/project metadata, etc.) map annotations = 2; // Frontend URL for the deployment. string frontend_url = 3; // Timestamp when the deployment was last updated. google.protobuf.Timestamp updated_on = 4; // Whether the deployment is git based or archive based. bool uses_archive = 5; // Duckdb connector config for the deployment google.protobuf.Struct duckdb_connector_config = 6; // Whether the deployment is editable (dev environment with changes persisted to git repo). bool editable = 8; // System variables set by the admin service that should not be overridden by user input. map system_variables = 9; } message ListRolesRequest {} message ListRolesResponse { repeated OrganizationRole organization_roles = 1; repeated ProjectRole project_roles = 2; } message ListOrganizationMemberUsersRequest { string org = 1 [(validate.rules).string.min_len = 1]; string role = 4; // Optionally filter by role bool include_counts = 5; // Optionally include counts uint32 page_size = 2 [(validate.rules).uint32 = {ignore_empty: true, lte: 1000}]; string page_token = 3; bool superuser_force_access = 6; string search_pattern = 7; // Optional search pattern to filter users by email or display name } message ListOrganizationMemberUsersResponse { repeated OrganizationMemberUser members = 1; uint32 total_count = 3; // Total number of members in the organization string next_page_token = 2; } message ListOrganizationInvitesRequest { string org = 1; uint32 page_size = 2 [(validate.rules).uint32 = {ignore_empty: true, lte: 1000}]; string page_token = 3; } message ListOrganizationInvitesResponse { repeated OrganizationInvite invites = 1; uint32 total_count = 3; // Total number of invites in the organization string next_page_token = 2; } message AddOrganizationMemberUserRequest { string org = 1 [(validate.rules).string.min_len = 1]; string email = 2 [(validate.rules).string.email = true]; string role = 3; bool superuser_force_access = 4; } message AddOrganizationMemberUserResponse { bool pending_signup = 1; } message RemoveOrganizationMemberUserRequest { string org = 1 [(validate.rules).string.min_len = 1]; string email = 2 [(validate.rules).string.email = true]; } message RemoveOrganizationMemberUserResponse {} message LeaveOrganizationRequest { string org = 1 [(validate.rules).string.min_len = 1]; } message LeaveOrganizationResponse {} message SetOrganizationMemberUserRoleRequest { string org = 1 [(validate.rules).string.min_len = 1]; string email = 2 [(validate.rules).string.email = true]; string role = 3 [(validate.rules).string.min_len = 1]; bool superuser_force_access = 4; } message SetOrganizationMemberUserRoleResponse {} message GetOrganizationMemberUserRequest { string org = 1 [(validate.rules).string.min_len = 1]; string email = 2 [(validate.rules).string.email = true]; } message GetOrganizationMemberUserResponse { OrganizationMemberUser member = 1; } message GetProjectMemberUserRequest { string org = 1 [(validate.rules).string.min_len = 1]; string project = 2 [(validate.rules).string.min_len = 1]; string email = 3 [(validate.rules).string.email = true]; } message GetProjectMemberUserResponse { ProjectMemberUser member = 1; } message ListUsergroupsForProjectAndUserRequest { string org = 1 [(validate.rules).string.min_len = 1]; string project = 2 [(validate.rules).string.min_len = 1]; string email = 3 [(validate.rules).string.min_len = 1]; } message ListUsergroupsForProjectAndUserResponse { repeated MemberUsergroup usergroups = 1; } message UpdateOrganizationMemberUserAttributesRequest { string org = 1 [(validate.rules).string.min_len = 1]; string email = 2 [(validate.rules).string.email = true]; google.protobuf.Struct attributes = 3; } message UpdateOrganizationMemberUserAttributesResponse {} message ListSuperusersRequest {} message ListSuperusersResponse { repeated User users = 1; } message SetSuperuserRequest { string email = 1 [(validate.rules).string.email = true]; bool superuser = 2; } message SetSuperuserResponse {} message SudoGetResourceRequest { oneof id { string user_id = 1; string org_id = 2; string project_id = 3; string deployment_id = 4; string instance_id = 5; } } message SudoGetResourceResponse { oneof resource { User user = 1; Organization org = 2; Project project = 3; Deployment deployment = 4; Deployment instance = 5; } } message SudoUpdateOrganizationQuotasRequest { string org = 1; optional int32 projects = 2; optional int32 deployments = 3; optional int32 slots_total = 4; optional int32 slots_per_deployment = 5; optional int32 outstanding_invites = 6; optional int64 storage_limit_bytes_per_deployment = 7; optional int32 seats = 8; } message SudoUpdateOrganizationQuotasResponse { Organization organization = 1; } message SudoUpdateOrganizationBillingCustomerRequest { string org = 1; optional string billing_customer_id = 2; optional string payment_customer_id = 3; } message SudoUpdateOrganizationBillingCustomerResponse { Organization organization = 1; Subscription subscription = 2; } message SudoExtendTrialRequest { string org = 1 [(validate.rules).string.min_len = 1]; int32 days = 2 [(validate.rules).int32 = {gt: 0, lte: 30}]; } message SudoExtendTrialResponse { google.protobuf.Timestamp trial_end = 1; } message SudoGrantTrialCreditsRequest { string org = 1 [(validate.rules).string.min_len = 1]; // Amount of trial credits to grant in USD. double amount_usd = 2 [(validate.rules).double = {gt: 0, lte: 2500}]; // Optional human-readable reason for the grant. string description = 3; } message SudoGrantTrialCreditsResponse { // The grant amount actually applied, in USD. double granted_usd = 1; } message SudoReportUsageRequest { string org = 1 [(validate.rules).string.min_len = 1]; string event_name = 2 [(validate.rules).string.min_len = 1]; double value = 3 [(validate.rules).double = {gt: 0}]; // Optional end time of the reporting window. Defaults to the current server time. google.protobuf.Timestamp end_time = 4; // Optional project name attribution for the mock event. If not set, a placeholder is used. string project_name = 5; } message SudoReportUsageResponse { string customer_id = 1; string event_name = 2; double value = 3; google.protobuf.Timestamp start_time = 4; google.protobuf.Timestamp end_time = 5; } message SudoUpdateOrganizationCustomDomainRequest { string name = 1; string custom_domain = 2; } message SudoUpdateOrganizationCustomDomainResponse { Organization organization = 1; } message SudoUpdateUserQuotasRequest { string email = 1; optional int32 singleuser_orgs = 2; optional int32 trial_orgs = 3; } message SudoUpdateUserQuotasResponse { User user = 1; } message SudoUpdateAnnotationsRequest { string org = 1 [(validate.rules).string.min_len = 1]; string project = 2 [(validate.rules).string.min_len = 1]; map annotations = 3; } message SudoUpdateAnnotationsResponse { Project project = 1; } message SudoIssueRuntimeManagerTokenRequest { string host = 1; } message SudoIssueRuntimeManagerTokenResponse { string token = 1; } message SudoDeleteOrganizationBillingIssueRequest { string org = 1; BillingIssueType type = 2; } message SudoDeleteOrganizationBillingIssueResponse {} message SudoUpdateOrganizationBillingMessageRequest { string org = 1; BillingIssueLevel level = 2; string message = 3; } message SudoUpdateOrganizationBillingMessageResponse {} message SudoDeleteOrganizationBillingMessageRequest { string org = 1; } message SudoDeleteOrganizationBillingMessageResponse {} message SudoTriggerBillingRepairRequest {} message SudoTriggerBillingRepairResponse {} message ListProjectMemberUsersRequest { string org = 1 [(validate.rules).string.min_len = 1]; string project = 2 [(validate.rules).string.min_len = 1]; string role = 5; // Optionally filter by role uint32 page_size = 3 [(validate.rules).uint32 = {ignore_empty: true, lte: 1000}]; string page_token = 4; bool superuser_force_access = 6; } message ListProjectMemberUsersResponse { repeated ProjectMemberUser members = 1; string next_page_token = 2; } message ListProjectInvitesRequest { string org = 1 [(validate.rules).string.min_len = 1]; string project = 2 [(validate.rules).string.min_len = 1]; uint32 page_size = 3 [(validate.rules).uint32 = {ignore_empty: true, lte: 1000}]; string page_token = 4; } message ListProjectInvitesResponse { repeated ProjectInvite invites = 1; string next_page_token = 2; } message AddProjectMemberUserRequest { string org = 1 [(validate.rules).string.min_len = 1]; string project = 2 [(validate.rules).string.min_len = 1]; string email = 3 [(validate.rules).string.email = true]; string role = 4 [(validate.rules).string.min_len = 1]; optional bool restrict_resources = 5; repeated ResourceName resources = 6; } message AddProjectMemberUserResponse { bool pending_signup = 1; } message RemoveProjectMemberUserRequest { string org = 1 [(validate.rules).string.min_len = 1]; string project = 2 [(validate.rules).string.min_len = 1]; string email = 3 [(validate.rules).string.email = true]; } message RemoveProjectMemberUserResponse {} message SetProjectMemberUserRoleRequest { string org = 1 [(validate.rules).string.min_len = 1]; string project = 2 [(validate.rules).string.min_len = 1]; string email = 3 [(validate.rules).string.email = true]; optional string role = 4 [(validate.rules).string.min_len = 1]; optional bool restrict_resources = 5; repeated ResourceName resources = 6; } message SetProjectMemberUserRoleResponse {} message ListUsergroupsForOrganizationAndUserRequest { string org = 1 [(validate.rules).string.min_len = 1]; string user_id = 2 [(validate.rules).string.min_len = 1]; uint32 page_size = 3 [(validate.rules).uint32 = {ignore_empty: true, lte: 1000}]; string page_token = 4; } message ListUsergroupsForOrganizationAndUserResponse { repeated Usergroup usergroups = 1; string next_page_token = 2; } message CreateUsergroupRequest { string org = 1 [(validate.rules).string.min_len = 1]; string name = 2 [(validate.rules).string.min_len = 1]; } message CreateUsergroupResponse { Usergroup usergroup = 1; } message GetUsergroupRequest { string org = 1 [(validate.rules).string.min_len = 1]; string usergroup = 2 [(validate.rules).string.min_len = 1]; uint32 page_size = 3 [(validate.rules).uint32 = {ignore_empty: true, lte: 1000}]; string page_token = 4; } message GetUsergroupResponse { Usergroup usergroup = 1; string next_page_token = 2; } message UpdateUsergroupRequest { string org = 1 [(validate.rules).string.min_len = 1]; string usergroup = 2 [(validate.rules).string.min_len = 1]; optional string new_name = 3; optional string description = 4; } message UpdateUsergroupResponse { Usergroup usergroup = 1; } message ListOrganizationMemberUsergroupsRequest { string org = 1 [(validate.rules).string.min_len = 1]; string role = 4; // Optionally filter by role bool include_counts = 5; // Optionally include counts uint32 page_size = 2 [(validate.rules).uint32 = {ignore_empty: true, lte: 1000}]; string page_token = 3; } message ListOrganizationMemberUsergroupsResponse { repeated MemberUsergroup members = 1; string next_page_token = 2; } message ListProjectMemberUsergroupsRequest { string org = 1 [(validate.rules).string.min_len = 1]; string project = 2 [(validate.rules).string.min_len = 1]; string role = 5; // Optionally filter by role bool include_counts = 6; // Optionally include counts uint32 page_size = 3 [(validate.rules).uint32 = {ignore_empty: true, lte: 1000}]; string page_token = 4; } message ListProjectMemberUsergroupsResponse { repeated MemberUsergroup members = 1; string next_page_token = 2; } message DeleteUsergroupRequest { string org = 1 [(validate.rules).string.min_len = 1]; string usergroup = 2 [(validate.rules).string.min_len = 1]; } message DeleteUsergroupResponse {} message AddOrganizationMemberUsergroupRequest { string org = 1 [(validate.rules).string.min_len = 1]; string usergroup = 2 [(validate.rules).string.min_len = 1]; string role = 3 [(validate.rules).string.min_len = 1]; } message AddOrganizationMemberUsergroupResponse {} message SetOrganizationMemberUsergroupRoleRequest { string org = 1 [(validate.rules).string.min_len = 1]; string usergroup = 2 [(validate.rules).string.min_len = 1]; string role = 3 [(validate.rules).string.min_len = 1]; } message SetOrganizationMemberUsergroupRoleResponse {} message RemoveOrganizationMemberUsergroupRequest { string org = 1 [(validate.rules).string.min_len = 1]; string usergroup = 2 [(validate.rules).string.min_len = 1]; } message RemoveOrganizationMemberUsergroupResponse {} message AddProjectMemberUsergroupRequest { string org = 1 [(validate.rules).string.min_len = 1]; string project = 2 [(validate.rules).string.min_len = 1]; string usergroup = 3 [(validate.rules).string.min_len = 1]; string role = 4 [(validate.rules).string.min_len = 1]; optional bool restrict_resources = 5; repeated ResourceName resources = 6; } message AddProjectMemberUsergroupResponse {} message SetProjectMemberUsergroupRoleRequest { string org = 1 [(validate.rules).string.min_len = 1]; string project = 2 [(validate.rules).string.min_len = 1]; string usergroup = 3 [(validate.rules).string.min_len = 1]; optional string role = 4 [(validate.rules).string.min_len = 1]; optional bool restrict_resources = 5; repeated ResourceName resources = 6; } message SetProjectMemberUsergroupRoleResponse {} message RemoveProjectMemberUsergroupRequest { string org = 1 [(validate.rules).string.min_len = 1]; string project = 2 [(validate.rules).string.min_len = 1]; string usergroup = 3 [(validate.rules).string.min_len = 1]; } message RemoveProjectMemberUsergroupResponse {} message AddUsergroupMemberUserRequest { string org = 1 [(validate.rules).string.min_len = 1]; string usergroup = 2 [(validate.rules).string.min_len = 1]; string email = 3 [(validate.rules).string.email = true]; } message AddUsergroupMemberUserResponse {} message ListUsergroupMemberUsersRequest { string org = 1 [(validate.rules).string.min_len = 1]; string usergroup = 2 [(validate.rules).string.min_len = 1]; uint32 page_size = 3 [(validate.rules).uint32 = {ignore_empty: true, lte: 1000}]; string page_token = 4; } message ListUsergroupMemberUsersResponse { repeated UsergroupMemberUser members = 1; string next_page_token = 2; } message RemoveUsergroupMemberUserRequest { string org = 1 [(validate.rules).string.min_len = 1]; string usergroup = 2 [(validate.rules).string.min_len = 1]; string email = 3 [(validate.rules).string.email = true]; } message RemoveUsergroupMemberUserResponse {} message UserPreferences { optional string time_zone = 1; } message UpdateUserPreferencesRequest { UserPreferences preferences = 1; } message UpdateUserPreferencesResponse { UserPreferences preferences = 1; } message GetUserRequest { string email = 1 [(validate.rules).string.email = true]; } message GetUserResponse { User user = 1; } message GetCurrentUserRequest {} message GetCurrentUserResponse { User user = 1; UserPreferences preferences = 2; } message DeleteUserRequest { string email = 1 [(validate.rules).string.email = true]; bool superuser_force_access = 2; } message DeleteUserResponse {} message ListUserAuthTokensRequest { // User ID to list auth tokens for. Set to "current" to list auth tokens for the current user. string user_id = 1 [(validate.rules).string.min_len = 1]; // Page size for pagination. If not set, a default page size will be used. uint32 page_size = 2 [(validate.rules).uint32 = {ignore_empty: true, lte: 1000}]; // Page token for pagination. If set, the first page of results will be returned. string page_token = 3; // Flag for superusers to override normal access checks. bool superuser_force_access = 4; // Flag to filter only refresh tokens. If not set, all tokens will be displayed. If false, only returns access tokens (non-refresh). optional bool refresh = 5; } message ListUserAuthTokensResponse { // List of auth tokens for the user. repeated UserAuthToken tokens = 1; // Page token for the next page of results. If empty, there are no more pages. string next_page_token = 2; } message IssueUserAuthTokenRequest { // User ID to issue the auth token for. // Set to "current" to issue an auth token for the current user. string user_id = 1 [(validate.rules).string.min_len = 1]; // Client ID to issue the token for. string client_id = 2 [(validate.rules).string.min_len = 1]; // Optional display name for the auth token. string display_name = 3; // Optional TTL for the auth token in minutes. Set to 0 for no expiry. Defaults to no expiry. int64 ttl_minutes = 4; // Optional email of another user to assume the identity of. // This is only allowed for superusers. string represent_email = 5 [(validate.rules).string = {ignore_empty: true, email: true}]; // Flag for superusers to override normal access checks. bool superuser_force_access = 6; } message IssueUserAuthTokenResponse { // Newly issued auth token. string token = 1; } message RevokeUserAuthTokenRequest { // ID of the auth token to revoke. // Set to "current" to revoke the current auth token. string token_id = 1; // Flag for superusers to override normal access checks. bool superuser_force_access = 2; } message RevokeUserAuthTokenResponse { } message RevokeAllUserAuthTokensRequest { // User ID to revoke all tokens for. // Set to "current" to revoke all tokens for the current user. string user_id = 1 [(validate.rules).string.min_len = 1]; // Flag for superusers to override normal access checks. bool superuser_force_access = 2; } message RevokeAllUserAuthTokensResponse { // Number of tokens revoked. int32 tokens_revoked = 1; } message RevokeRepresentativeAuthTokensRequest { // Email of the user being represented. string email = 1 [(validate.rules).string.email = true]; } message RevokeRepresentativeAuthTokensResponse { } message IssueRepresentativeAuthTokenRequest { string email = 1 [(validate.rules).string.email = true]; int64 ttl_minutes = 2; } message IssueRepresentativeAuthTokenResponse { string token = 1; } message RevokeCurrentAuthTokenRequest {} message RevokeCurrentAuthTokenResponse { } message ListBookmarksRequest { string project_id = 1; string resource_kind = 2; string resource_name = 3; } message ListBookmarksResponse { repeated Bookmark bookmarks = 1; } message GetBookmarkRequest { string bookmark_id = 1; } message GetBookmarkResponse { Bookmark bookmark = 1; } message CreateBookmarkRequest { string display_name = 1; string description = 2; string url_search = 9; string resource_kind = 4; string resource_name = 5; string project_id = 6; bool default = 7; bool shared = 8; } message CreateBookmarkResponse { Bookmark bookmark = 1; } message UpdateBookmarkRequest { string bookmark_id = 1; string display_name = 2; string description = 4; string url_search = 7; bool default = 5; bool shared = 6; } message UpdateBookmarkResponse {} message RemoveBookmarkRequest { string bookmark_id = 1; } message RemoveBookmarkResponse {} message SearchUsersRequest { string email_pattern = 1 [(validate.rules).string.min_len = 1]; uint32 page_size = 2 [(validate.rules).uint32 = {ignore_empty: true, lte: 1000}]; string page_token = 3; } message SearchUsersResponse { repeated User users = 1; string next_page_token = 2; } message RevokeServiceAuthTokenRequest { string token_id = 1; } message RevokeServiceAuthTokenResponse {} message IssueServiceAuthTokenRequest { string org = 1 [(validate.rules).string.min_len = 1]; string service_name = 2; } message IssueServiceAuthTokenResponse { string token = 1; } message ListServiceAuthTokensRequest { string org = 1 [(validate.rules).string.min_len = 1]; string service_name = 2; } message ListServiceAuthTokensResponse { repeated ServiceToken tokens = 1; } message IssueMagicAuthTokenRequest { // Org that owns the project. string org = 1 [(validate.rules).string.min_len = 1]; // Project to create the magic auth token in. string project = 2 [(validate.rules).string.min_len = 1]; // TTL for the token in minutes. Set to 0 for no expiry. Defaults to no expiry. int64 ttl_minutes = 3; // Type of resource to grant access to. string resource_type = 8 [deprecated = true]; // Name of the resource to grant access to. string resource_name = 9 [deprecated = true]; // Optional metrics view to filter mapping to apply as row filters in queries. // This will be translated to a rill.runtime.v1.SecurityRuleRowFilter with the metrics view in the condition_resources, which currently applies to metric views queries. map metrics_view_filters = 12; // Optional list of fields to limit access to. If empty, no field access rule will be added. // This will be translated to a rill.runtime.v1.SecurityRuleFieldAccess, which currently applies to dimension and measure names for explores and metrics views. repeated string fields = 6; // Optional state to store with the token. Can be fetched with GetCurrentMagicAuthToken. string state = 7; // Optional display name to store with the token. string display_name = 10; // list of resources to grant access to. repeated ResourceName resources = 11; reserved 5; } message ResourceName { string type = 1; string name = 2; } message IssueMagicAuthTokenResponse { string token = 1; string url = 2; } message ListMagicAuthTokensRequest { string org = 1 [(validate.rules).string.min_len = 1]; string project = 2 [(validate.rules).string.min_len = 1]; uint32 page_size = 3 [(validate.rules).uint32 = {ignore_empty: true, lte: 1000}]; string page_token = 4; } message ListMagicAuthTokensResponse { repeated MagicAuthToken tokens = 1; string next_page_token = 2; } message GetCurrentMagicAuthTokenRequest {} message GetCurrentMagicAuthTokenResponse { MagicAuthToken token = 1; } message RevokeMagicAuthTokenRequest { string token_id = 1; } message RevokeMagicAuthTokenResponse {} message GetGithubRepoStatusRequest { string remote = 1; } message GetGithubRepoStatusResponse { bool has_access = 1; string grant_access_url = 2; string default_branch = 3; } message GetGithubUserStatusRequest {} message GetGithubUserStatusResponse { bool has_access = 1; string grant_access_url = 2; string access_token = 3; string account = 4; GithubPermission user_installation_permission = 6; map organization_installation_permissions = 7; // DEPRECATED: Use organization_installation_permissions instead. repeated string orgs = 5 [deprecated = true]; } message ListGithubUserReposRequest {} message ListGithubUserReposResponse { message Repo { string name = 1; string owner = 2; string description = 3; string remote = 4; string default_branch = 5; } repeated Repo repos = 1; } message CreateGithubPullRequestRequest { string org = 1; string project = 2; // The head branch for the PR string branch = 3; // Optional title of the PR. If not set, a default title will be used string title = 5; /// Optional body of the PR string body = 6; } message CreateGithubPullRequestResponse { string pr_url = 1; } message GetGithubPullRequestRequest { string org = 1; string project = 2; string branch = 3; } message GetGithubPullRequestResponse { string pr_url = 1; enum State { STATE_UNSPECIFIED = 0; STATE_OPEN = 1; STATE_CLOSED_UNMERGED = 2; STATE_MERGED = 3; } State pr_state = 2; } message ConnectProjectToGithubRequest { string org = 1; string project = 2; string remote = 3; } message ConnectProjectToGithubResponse {} message CreateManagedGitRepoRequest { string org = 1; // name of the repo to create. // Note: The final name will be suffixed with a random string to ensure uniqueness. string name = 2; // whether to auto initialize the repo with a commit after creation bool auto_init = 3; } message CreateManagedGitRepoResponse { string remote = 1; string username = 2; string password = 3; string default_branch = 4; google.protobuf.Timestamp password_expires_at = 5; } enum GithubPermission { GITHUB_PERMISSION_UNSPECIFIED = 0; GITHUB_PERMISSION_READ = 1; GITHUB_PERMISSION_WRITE = 2; } message GetCloneCredentialsRequest { string org = 1 [(validate.rules).string.min_len = 1]; string project = 2 [(validate.rules).string.min_len = 1]; bool superuser_force_access = 3; } message GetCloneCredentialsResponse { string git_repo_url = 1; string git_username = 2; string git_password = 3; google.protobuf.Timestamp git_password_expires_at = 7; string git_subpath = 4; string git_primary_branch = 5; bool git_managed_repo = 8; // either archive_download_url or git related details will be set string archive_download_url = 6; } message CreateWhitelistedDomainRequest { string org = 1 [(validate.rules).string.min_len = 1]; string domain = 2 [(validate.rules).string.min_len = 1]; string role = 3 [(validate.rules).string.min_len = 1]; } message CreateWhitelistedDomainResponse {} message RemoveWhitelistedDomainRequest { string org = 1 [(validate.rules).string.min_len = 1]; string domain = 2 [(validate.rules).string.min_len = 1]; } message RemoveWhitelistedDomainResponse {} message ListWhitelistedDomainsRequest { string org = 1 [(validate.rules).string.min_len = 1]; } message ListWhitelistedDomainsResponse { repeated WhitelistedDomain domains = 1; } message CreateProjectWhitelistedDomainRequest { string org = 1 [(validate.rules).string.min_len = 1]; string project = 2 [(validate.rules).string.min_len = 1]; string domain = 3 [(validate.rules).string.min_len = 1]; string role = 4 [(validate.rules).string.min_len = 1]; } message CreateProjectWhitelistedDomainResponse {} message RemoveProjectWhitelistedDomainRequest { string org = 1 [(validate.rules).string.min_len = 1]; string project = 2 [(validate.rules).string.min_len = 1]; string domain = 3 [(validate.rules).string.min_len = 1]; } message RemoveProjectWhitelistedDomainResponse {} message ListProjectWhitelistedDomainsRequest { string org = 1 [(validate.rules).string.min_len = 1]; string project = 2 [(validate.rules).string.min_len = 1]; } message ListProjectWhitelistedDomainsResponse { repeated WhitelistedDomain domains = 1; } message GetRepoMetaRequest { // The project ID to get repository metadata for. string project_id = 1; } message GetRepoMetaResponse { // How long the returned config is valid for. Clients should call GetRepoMeta again after this time. google.protobuf.Timestamp expires_on = 2; // When the returned config was last modified. This covers all fields in the response except the ephemeral credentials embedded in git_url and archive_download_url. google.protobuf.Timestamp last_updated_on = 9; // Git remote for cloning (and maybe pushing) a Git repository. // The URL uses HTTPS with embedded username/password. string git_url = 1; // Optional subpath within the Git repository to use as the project root. string git_subpath = 3; // The branch to use for the deployment. string git_branch = 7; // Whether editing is allowed. Set to true for dev deployments. bool editable = 11; // Primary branch of the project. string primary_branch = 12; // Whether the git repo is managed by Rill. bool managed_git_repo = 10; // Signed URL for downloading a tarball of project files. If this is set, the git_* fields will be empty (and vice versa). string archive_download_url = 4; // A stable ID for the archive returned from archive_download_url. string archive_id = 5; // The creation time of the archive returned from archive_download_url. google.protobuf.Timestamp archive_created_on = 6; } message PullVirtualRepoRequest { // The project ID to pull virtual files for. string project_id = 1; // The environment to pull virtual files for. // It is optional. If the call is made with a deployment access token, it defaults to the environment of the deployment. Otherwise, it defaults to "prod". string environment = 5; // Page size for pagination. uint32 page_size = 3 [(validate.rules).uint32 = {ignore_empty: true, lte: 100}]; // Page token for pagination. string page_token = 4; // If set and the caller is a superuser, force access regardless of project permissions. bool superuser_force_access = 6; reserved 2; } message PullVirtualRepoResponse { // List of virtual files ordered by update time, most recent last. repeated VirtualFile files = 1; // Next page token for pagination. string next_page_token = 2; } message GetVirtualFileRequest { // The project ID to get the virtual file for. string project_id = 1; // The environment to get the virtual file for. // It is optional. If the call is made with a deployment access token, it defaults to the environment of the deployment. Otherwise, it defaults to "prod". string environment = 4; // The path of the virtual file to get. string path = 2; // If set and the caller is a superuser, force access regardless of project permissions. bool superuser_force_access = 3; } message GetVirtualFileResponse { // The virtual file. VirtualFile file = 1; } message DeleteVirtualFileRequest { // The project ID to delete the virtual file from. string project_id = 1; // The environment to delete the virtual file from. // It is optional. If the call is made with a deployment access token, it defaults to the environment of the deployment. Otherwise, it defaults to "prod". string environment = 2; // The path of the virtual file to delete. string path = 3; // If set and the caller is a superuser, force access regardless of project permissions. bool superuser_force_access = 4; } message DeleteVirtualFileResponse {} message GetReportMetaRequest { string project_id = 1; string report = 3; string owner_id = 5; google.protobuf.Timestamp execution_time = 6; repeated string email_recipients = 7; bool anon_recipients = 8; repeated ResourceName resources = 9; string web_open_mode = 10; string where_filter_json = 11 [deprecated = true]; repeated string accessible_fields = 12 [deprecated = true]; reserved 2, 4; } message GetReportMetaResponse { message DeliveryMeta { string open_url = 1; string export_url = 2; string edit_url = 3; string unsubscribe_url = 4; string user_id = 5; google.protobuf.Struct user_attrs = 6; // user attributes of intended recipient, will be empty for creator mode and for non Rill users } map delivery_meta = 2; reserved 1; } message GetAlertMetaRequest { string project_id = 1; string alert = 3; map annotations = 4; oneof query_for { string query_for_user_id = 5; string query_for_user_email = 6; } string owner_id = 7; repeated string email_recipients = 8; bool anon_recipients = 9; reserved 2; } message GetAlertMetaResponse { message URLs { string open_url = 1; string edit_url = 2; string unsubscribe_url = 3; } map recipient_urls = 2; google.protobuf.Struct query_for_attributes = 3; reserved 1; } message CreateReportRequest { string org = 1; string project = 2; ReportOptions options = 3 [(validate.rules).message.required = true]; } message CreateReportResponse { string name = 1; } message EditReportRequest { string org = 1; string project = 2; string name = 3; ReportOptions options = 4 [(validate.rules).message.required = true]; } message EditReportResponse { } message UnsubscribeReportRequest { string org = 1; string project = 2; string name = 3; string email = 4 [(validate.rules).string = {email: true, ignore_empty: true}]; string slack_user = 5 [(validate.rules).string = {email: true, ignore_empty: true}]; } message UnsubscribeReportResponse {} message DeleteReportRequest { string org = 1; string project = 2; string name = 3; } message DeleteReportResponse { } message TriggerReportRequest { string org = 1; string project = 2; string name = 3; } message TriggerReportResponse {} message GenerateReportYAMLRequest { string org = 1; string project = 2; ReportOptions options = 3 [(validate.rules).message.required = true]; } message GenerateReportYAMLResponse { string yaml = 1; } message CreateAlertRequest { string org = 1; string project = 2; AlertOptions options = 3 [(validate.rules).message.required = true]; } message CreateAlertResponse { string name = 1; } message EditAlertRequest { string org = 1; string project = 2; string name = 3; AlertOptions options = 4 [(validate.rules).message.required = true]; } message EditAlertResponse { } message UnsubscribeAlertRequest { string org = 1; string project = 2; string name = 3; string email = 4 [(validate.rules).string = {email: true, ignore_empty: true}]; string slack_user = 5 [(validate.rules).string = {email: true, ignore_empty: true}]; } message UnsubscribeAlertResponse {} message DeleteAlertRequest { string org = 1; string project = 2; string name = 3; } message DeleteAlertResponse { } message GenerateAlertYAMLRequest { string org = 1; string project = 2; AlertOptions options = 3 [(validate.rules).message.required = true]; } message GenerateAlertYAMLResponse { string yaml = 1; } message GetAlertYAMLRequest { string org = 1; string project = 2; string name = 3; } message GetAlertYAMLResponse { string yaml = 1; } message ListPersonalFilesRequest { string org = 1; string project = 2; } message ListPersonalFilesResponse { repeated string files = 1; } message CreatePersonalFileRequest { string org = 1; string project = 2; string display_name = 3 [(validate.rules).string.min_len = 1]; string kind = 4; // Optional: initial YAML body. If empty, the server generates a blank template for the given type. string yaml = 5; } message CreatePersonalFileResponse { string name = 1; } message GetPersonalFileRequest { string org = 1; string project = 2; string name = 3; } message GetPersonalFileResponse { string path = 1; string yaml = 2; } message EditPersonalFileRequest { string org = 1; string project = 2; string name = 3; string kind = 4; string yaml = 5; } message EditPersonalFileResponse { } message DeletePersonalFileRequest { string org = 1; string project = 2; string name = 3; } message DeletePersonalFileResponse { } message GetBillingSubscriptionRequest { string org = 1 [(validate.rules).string.min_len = 1]; bool superuser_force_access = 2; } message GetBillingSubscriptionResponse { Organization organization = 1; Subscription subscription = 2; string billing_portal_url = 3; } message UpdateBillingSubscriptionRequest { string org = 1 [(validate.rules).string.min_len = 1]; string plan_name = 2 [(validate.rules).string.min_len = 1]; bool superuser_force_access = 3; } message UpdateBillingSubscriptionResponse { Organization organization = 1; Subscription subscription = 2; } message CancelBillingSubscriptionRequest { string org = 1 [(validate.rules).string.min_len = 1]; bool superuser_force_access = 2; } message CancelBillingSubscriptionResponse {} message RenewBillingSubscriptionRequest { string org = 1 [(validate.rules).string.min_len = 1]; string plan_name = 2 [(validate.rules).string.min_len = 1]; bool superuser_force_access = 3; } message RenewBillingSubscriptionResponse { Organization organization = 1; Subscription subscription = 2; } message GetPaymentsPortalURLRequest { string org = 1 [(validate.rules).string.min_len = 1]; string return_url = 2; bool setup = 4; // If true, the returned URL will be for the first time payment method setup flow. If false, it will be for managing the billing details. bool superuser_force_access = 3; } message GetPaymentsPortalURLResponse { string url = 1; } message GetBillingCreditBalanceRequest { string org = 1 [(validate.rules).string.min_len = 1]; bool superuser_force_access = 2; } message GetBillingCreditBalanceResponse { double balance = 1; } message ListPublicBillingPlansRequest {} message ListPublicBillingPlansResponse { repeated BillingPlan plans = 1; } message GetBillingProjectCredentialsRequest { string org = 1 [(validate.rules).string.min_len = 1]; } message GetBillingProjectCredentialsResponse { string runtime_host = 1; string instance_id = 2; string access_token = 3; uint32 ttl_seconds = 4; } message TelemetryRequest { // Name passed to activity module's name arg string name = 1; // Value passed to activity module's value arg float value = 2; // Free form struct of the actual event google.protobuf.Struct event = 3; } message TelemetryResponse {} message RequestProjectAccessRequest { string org = 1; string project = 2; string role = 3; } message RequestProjectAccessResponse {} message GetProjectAccessRequestRequest { string id = 1; } message GetProjectAccessRequestResponse { string email = 1; } message ApproveProjectAccessRequest { string id = 1; string role = 2; } message ApproveProjectAccessResponse {} message DenyProjectAccessRequest { string id = 1; } message DenyProjectAccessResponse {} message ListOrganizationBillingIssuesRequest { string org = 1; bool superuser_force_access = 2; } message ListOrganizationBillingIssuesResponse { repeated BillingIssue issues = 1; } message User { string id = 1; string email = 2; string display_name = 3; string photo_url = 4; UserQuotas quotas = 5; string pylon_email_hash = 8; google.protobuf.Timestamp created_on = 6; google.protobuf.Timestamp updated_on = 7; } message Service { string id = 1; string name = 2; string org_id = 3; string org_name = 4; google.protobuf.Struct attributes = 8; google.protobuf.Timestamp created_on = 5; google.protobuf.Timestamp updated_on = 6; } message OrganizationMemberService { string id = 1; string name = 2; string org_id = 3; string org_name = 4; string role_name = 5; bool has_project_roles = 7; // True if the user has a project role in any project in the organization. google.protobuf.Struct attributes = 8; google.protobuf.Timestamp created_on = 9; google.protobuf.Timestamp updated_on = 10; } message ProjectMemberService { string id = 1; string name = 2; string org_id = 3; string org_name = 4; string org_role_name = 5; string project_id = 6; string project_name = 7; string project_role_name = 8; google.protobuf.Struct attributes = 9; google.protobuf.Timestamp created_on = 10; google.protobuf.Timestamp updated_on = 11; } message Organization { string id = 1; string name = 2; // Globally unique string display_name = 11; string description = 3; string logo_url = 12; string logo_dark_url = 18; string favicon_url = 13; string thumbnail_url = 17; string custom_domain = 10; string default_project_role_id = 16; OrganizationQuotas quotas = 4; string billing_customer_id = 7; string payment_customer_id = 8; string billing_email = 9; optional string billing_plan_name = 14; optional string billing_plan_display_name = 15; google.protobuf.Timestamp created_on = 5; google.protobuf.Timestamp updated_on = 6; } message Subscription { string id = 1; BillingPlan plan = 2; google.protobuf.Timestamp start_date = 3; google.protobuf.Timestamp end_date = 4; google.protobuf.Timestamp current_billing_cycle_start_date = 5; google.protobuf.Timestamp current_billing_cycle_end_date = 6; google.protobuf.Timestamp trial_end_date = 7; } message UserQuotas { int32 singleuser_orgs = 1; int32 trial_orgs = 2; } message OrganizationQuotas { int32 projects = 1; int32 deployments = 2; int32 slots_total = 3; int32 slots_per_deployment = 4; int32 outstanding_invites = 5; int64 storage_limit_bytes_per_deployment = 6; int32 seats = 7; } message Project { string id = 1; string name = 2; // Unique in organization string org_id = 3; string org_name = 4; string description = 5; bool public = 6; string created_by_user_id = 22; string directory_name = 26; string provisioner = 7; string git_remote = 8; // managed_git_id is set if the project is connected to a rill-managed git repo. string managed_git_id = 24; string subpath = 17; string primary_branch = 9; string archive_asset_id = 23; int64 prod_slots = 12; string primary_deployment_id = 13; int64 dev_slots = 25; string frontend_url = 16; // Note: Does NOT incorporate the parent org's custom domain. int64 prod_ttl_seconds = 18; int64 dev_ttl_seconds = 27; int64 override_disk_gb = 28; map annotations = 20; string prod_version = 21; google.protobuf.Timestamp created_on = 14; google.protobuf.Timestamp updated_on = 15; // Reserved for backwards compatibility (prod_olap_driver and prod_olap_dsn) reserved 10, 11; } enum DeploymentStatus { DEPLOYMENT_STATUS_UNSPECIFIED = 0; DEPLOYMENT_STATUS_PENDING = 1; DEPLOYMENT_STATUS_RUNNING = 2; DEPLOYMENT_STATUS_ERRORED = 4; DEPLOYMENT_STATUS_STOPPED = 5; DEPLOYMENT_STATUS_UPDATING = 6; DEPLOYMENT_STATUS_STOPPING = 7; DEPLOYMENT_STATUS_DELETING = 8; DEPLOYMENT_STATUS_DELETED = 9; } message Deployment { string id = 1; string project_id = 2; string owner_user_id = 12; string environment = 11; string branch = 4; bool editable = 13; string runtime_host = 5; string runtime_instance_id = 6; DeploymentStatus status = 7; string status_message = 8; google.protobuf.Timestamp created_on = 9; google.protobuf.Timestamp updated_on = 10; google.protobuf.Timestamp used_on = 14; } message ProvisionerResource { string id = 1; string deployment_id = 2; string type = 3; string name = 4; google.protobuf.Struct args = 5; google.protobuf.Struct config = 6; } message OrganizationPermissions { bool admin = 9; bool guest = 8; bool read_org = 1; bool manage_org = 2; bool read_projects = 3; bool create_projects = 4; bool manage_projects = 5; bool read_org_members = 6; bool manage_org_members = 7; bool manage_org_admins = 10; } message ProjectPermissions { bool admin = 21; bool read_project = 1; bool manage_project = 2; bool read_prod = 3; bool read_prod_status = 4; bool manage_prod = 5; bool read_dev = 6; bool read_dev_status = 7; bool manage_dev = 8; bool read_provisioner_resources = 19; bool manage_provisioner_resources = 20; bool read_project_members = 9; bool manage_project_members = 10; bool manage_project_admins = 22; bool create_magic_auth_tokens = 15; bool manage_magic_auth_tokens = 16; bool create_reports = 11; bool manage_reports = 12; bool create_alerts = 13; bool manage_alerts = 14; bool create_bookmarks = 17; bool manage_bookmarks = 18; } message OrganizationRole { string id = 1; string name = 2; OrganizationPermissions permissions = 3; } message ProjectRole { string id = 1; string name = 2; ProjectPermissions permissions = 3; } message OrganizationMemberUser { string user_id = 1; string user_email = 3; string user_name = 2; string user_photo_url = 7; string role_name = 4; uint32 projects_count = 8; uint32 usergroups_count = 9; google.protobuf.Struct attributes = 10; google.protobuf.Timestamp created_on = 5; google.protobuf.Timestamp updated_on = 6; } message ProjectMemberUser { string user_id = 1; string user_email = 3; string user_name = 2; string user_photo_url = 7; string role_name = 4; string org_role_name = 8; google.protobuf.Timestamp created_on = 5; google.protobuf.Timestamp updated_on = 6; bool restrict_resources = 9; repeated ResourceName resources = 10; } message UsergroupMemberUser { string user_id = 1; string user_email = 3; string user_name = 2; string user_photo_url = 7; google.protobuf.Timestamp created_on = 5; google.protobuf.Timestamp updated_on = 6; } message OrganizationInvite { string email = 1; string role_name = 2; string invited_by = 3; } message ProjectInvite { string email = 1; string role_name = 2; string org_role_name = 4; string invited_by = 3; bool restrict_resources = 5; repeated ResourceName resources = 6; } message WhitelistedDomain { string domain = 1; string role = 2; } message Bookmark { string id = 1; string display_name = 2; string description = 9; bytes data = 3; string url_search = 13; string resource_kind = 10; string resource_name = 4; string project_id = 5; string user_id = 6; bool default = 11; bool shared = 12; google.protobuf.Timestamp created_on = 7; google.protobuf.Timestamp updated_on = 8; } message ServiceToken { string id = 1; string prefix = 4; google.protobuf.Timestamp created_on = 2; google.protobuf.Timestamp expires_on = 3; } message UserAuthToken { string id = 1; string display_name = 2; string auth_client_id = 3; string auth_client_display_name = 4; string representing_user_id = 5; string prefix = 9; google.protobuf.Struct attributes = 10; bool refresh = 11; google.protobuf.Timestamp created_on = 6; google.protobuf.Timestamp expires_on = 7; google.protobuf.Timestamp used_on = 8; } message MagicAuthToken { string id = 1; string project_id = 2; string url = 13; string token = 14; google.protobuf.Timestamp created_on = 3; google.protobuf.Timestamp expires_on = 4; google.protobuf.Timestamp used_on = 5; string created_by_user_id = 6; string created_by_user_email = 7; google.protobuf.Struct attributes = 8; repeated ResourceName resources = 17; string resource_type = 15 [deprecated = true]; string resource_name = 9 [deprecated = true]; map metrics_view_filters = 18; repeated string fields = 11; string state = 12; string display_name = 16; reserved 10; } message VirtualFile { string path = 1; bytes data = 2; bool deleted = 3; google.protobuf.Timestamp updated_on = 4; } message ReportOptions { string display_name = 1; string refresh_cron = 2; string refresh_time_zone = 9; string interval_duration = 13; string resolver = 21; google.protobuf.Struct resolver_properties = 22; string query_name = 3 [deprecated = true]; // use resolver/resolver_properties instead string query_args_json = 4 [deprecated = true]; // use resolver/resolver_properties instead uint64 export_limit = 5; rill.runtime.v1.ExportFormat export_format = 6; bool export_include_header = 20; repeated string email_recipients = 8; repeated string slack_users = 10; repeated string slack_channels = 11; repeated string slack_webhooks = 12; string web_open_path = 15; // Annotation for the subpath of /org/project to open for the report. string web_open_state = 14; // Annotation for the base64-encoded UI state to open for the report. string explore = 16; // either canvas or explore should be set string canvas = 17; /* web_open_mode is used to determine how to create or disable open link for the report - send "recipient" for reports that should be opened with recipient's permissions - requires login - send "creator" for reports that should be opened with creators permissions but with locked filters - no login required - send "none" for reports that should not be opened or older reports which do not have any web_open_path */ string web_open_mode = 18; reserved 19; } message AlertOptions { string display_name = 1; string refresh_cron = 16; string refresh_time_zone = 17; string interval_duration = 2; string resolver = 13; google.protobuf.Struct resolver_properties = 14; // DEPRECATED: Use resolver and resolver_properties instead. string query_name = 3; // DEPRECATED: Use resolver and resolver_properties instead. string query_args_json = 4; string metrics_view_name = 5; bool renotify = 6; uint32 renotify_after_seconds = 7; repeated string email_recipients = 8; repeated string slack_users = 9; repeated string slack_channels = 10; repeated string slack_webhooks = 11; string web_open_path = 15; // Annotation for the subpath of /org/project to open for the report. string web_open_state = 12; // Annotation for the base64-encoded UI state to open for the report. } enum BillingPlanType { BILLING_PLAN_TYPE_UNSPECIFIED = 0; BILLING_PLAN_TYPE_TRIAL = 1; BILLING_PLAN_TYPE_TEAM = 2; BILLING_PLAN_TYPE_MANAGED = 3; BILLING_PLAN_TYPE_ENTERPRISE = 4; BILLING_PLAN_TYPE_FREE = 5; BILLING_PLAN_TYPE_PRO = 6; BILLING_PLAN_TYPE_STARTER = 7; BILLING_PLAN_TYPE_GROWTH = 8; } message BillingPlan { string id = 1; string name = 2; BillingPlanType plan_type = 9; string display_name = 3; string description = 4; uint32 trial_period_days = 5; bool default = 6; Quotas quotas = 7; bool public = 8; // TODO expose pricing information } message Quotas { string projects = 1; string deployments = 2; string slots_total = 3; string slots_per_deployment = 4; string outstanding_invites = 5; string storage_limit_bytes_per_deployment = 6; string api_calls_per_seat = 7; string seats = 8; string tokens_per_seat = 9; } message Usergroup { string group_id = 1; string group_name = 2; string group_description = 3; bool managed = 6; google.protobuf.Timestamp created_on = 4; google.protobuf.Timestamp updated_on = 5; } message MemberUsergroup { string group_id = 1; string group_name = 2; bool group_managed = 6; string role_name = 3; uint32 users_count = 7; google.protobuf.Timestamp created_on = 4; google.protobuf.Timestamp updated_on = 5; bool restrict_resources = 8; repeated ResourceName resources = 9; } enum BillingIssueType { BILLING_ISSUE_TYPE_UNSPECIFIED = 0; BILLING_ISSUE_TYPE_ON_TRIAL = 1; BILLING_ISSUE_TYPE_TRIAL_ENDED = 2; BILLING_ISSUE_TYPE_NO_PAYMENT_METHOD = 3; BILLING_ISSUE_TYPE_NO_BILLABLE_ADDRESS = 4; BILLING_ISSUE_TYPE_PAYMENT_FAILED = 5; BILLING_ISSUE_TYPE_SUBSCRIPTION_CANCELLED = 6; BILLING_ISSUE_TYPE_NEVER_SUBSCRIBED = 7; BILLING_ISSUE_TYPE_ON_CREDIT_TRIAL = 8; BILLING_ISSUE_TYPE_TRIAL_CREDITS_DEPLETED = 9; BILLING_ISSUE_TYPE_MESSAGE = 10; } enum BillingIssueLevel { BILLING_ISSUE_LEVEL_UNSPECIFIED = 0; BILLING_ISSUE_LEVEL_WARNING = 1; BILLING_ISSUE_LEVEL_ERROR = 2; } message BillingIssue { string org = 1; BillingIssueType type = 2; BillingIssueLevel level = 3; BillingIssueMetadata metadata = 4; google.protobuf.Timestamp event_time = 5; google.protobuf.Timestamp created_on = 6; } message BillingIssueMetadata { oneof metadata { BillingIssueMetadataOnTrial on_trial = 1; BillingIssueMetadataTrialEnded trial_ended = 2; BillingIssueMetadataNoPaymentMethod no_payment_method = 3; BillingIssueMetadataNoBillableAddress no_billable_address = 4; BillingIssueMetadataPaymentFailed payment_failed = 5; BillingIssueMetadataSubscriptionCancelled subscription_cancelled = 6; BillingIssueMetadataNeverSubscribed never_subscribed = 7; BillingIssueMetadataOnCreditTrial on_credit_trial = 8; BillingIssueMetadataTrialCreditsDepleted trial_credits_depleted = 9; BillingIssueMetadataMessage message = 10; } } message BillingIssueMetadataOnTrial { google.protobuf.Timestamp end_date = 1; google.protobuf.Timestamp grace_period_end_date = 2; } message BillingIssueMetadataTrialEnded { google.protobuf.Timestamp end_date = 1; google.protobuf.Timestamp grace_period_end_date = 2; } message BillingIssueMetadataNoPaymentMethod {} message BillingIssueMetadataNoBillableAddress {} message BillingIssueMetadataPaymentFailed { repeated BillingIssueMetadataPaymentFailedMeta invoices = 1; } message BillingIssueMetadataPaymentFailedMeta { string invoice_id = 1; string invoice_number = 2; string invoice_url = 3; string amount_due = 4; string currency = 5; google.protobuf.Timestamp due_date = 6; google.protobuf.Timestamp failed_on = 7; google.protobuf.Timestamp grace_period_end_date = 8; } message BillingIssueMetadataSubscriptionCancelled { google.protobuf.Timestamp end_date = 1; } message BillingIssueMetadataNeverSubscribed {} message BillingIssueMetadataOnCreditTrial { string subscription_id = 1; string plan_id = 2; double credit_allocation = 3; bool low_credit = 4; } message BillingIssueMetadataTrialCreditsDepleted { string subscription_id = 1; string plan_id = 2; google.protobuf.Timestamp depleted_on = 3; } message BillingIssueMetadataMessage { string message = 1; }