### Start server Source: https://github.com/apache/doris-manager/blob/master/frontend/README.md Command to start the development server. ```bash npm run start ``` -------------------------------- ### Install dependencies Source: https://github.com/apache/doris-manager/blob/master/frontend/README.md Command to install frontend dependencies using npm. ```bash npm install ``` -------------------------------- ### Create space example (POST /api/space/create) Source: https://github.com/apache/doris-manager/blob/master/_autodocs/api-reference/04-permission-space.md Example of creating a user space with cluster configuration. Requires super admin privileges. The NewUserSpaceCreateReq must pass hasEmptyField() validation. ```java // POST /api/space/create(超管) NewUserSpaceCreateReq req = new NewUserSpaceCreateReq(); ClusterCreateReq cluster = new ClusterCreateReq(); cluster.setAddress("10.10.10.1"); cluster.setHttpPort(8030); cluster.setQueryPort(9030); cluster.setUser("root"); cluster.setPasswd("123456"); req.setCluster(cluster); req.setName("test-space"); long spaceId = spaceService.create(req, user); // 返回空间 ID ``` -------------------------------- ### Constants and configuration naming example Source: https://github.com/apache/doris-manager/blob/master/frontend/README.md Shows naming conventions for constants and configuration using const with UPPER_CASE naming. ```typescript const PAGINATIONS = [10, 20, 50, 100, 200]; const SERVER_URL = 'http://127.0.0.1:8001'; ``` -------------------------------- ### Start and stop manager server commands Source: https://github.com/apache/doris-manager/blob/master/docs/Doris Manager Compiling & Deploying.md Commands to start and stop the Doris Manager server. Run from the server directory of the installation package after configuration. Check logs in server/logs to verify successful startup. ```bash 启动命令: sh bin/start_manager.sh 停止命令: sh bin/stop_manager.sh ``` -------------------------------- ### operateInstance usage example Source: https://github.com/apache/doris-manager/blob/master/_autodocs/api-reference/07-control-services.md Example call to operateInstance with operate_type=INSTANCE_INSTALL, corresponding to the REST endpoint POST /api/control/instance/{instanceId}/agent/operate?operate_type=INSTANCE_INSTALL. ```java // POST /api/control/instance/{instanceId}/agent/operate?operate_type=INSTANCE_INSTALL instanceService.operateInstance(user, instanceId, "INSTANCE_INSTALL"); ``` -------------------------------- ### Build project Source: https://github.com/apache/doris-manager/blob/master/frontend/README.md Command to build the frontend project. ```bash npm run build ``` -------------------------------- ### SSH remote command execution example Source: https://github.com/apache/doris-manager/blob/master/_autodocs/api-reference/10-drivers-shell.md Example of executing a remote command during agent installation. Creates an SSH instance with user root, port 22, the key file, host 10.10.10.2, and the command `mkdir -p /root/doris`. If run() succeeds, the stdout response is retrieved via getStdoutResponse(). ```java // agent 安装时执行远程命令示例 SSH ssh = new SSH("root", 22, sshKeyFile, "10.10.10.2", "mkdir -p /root/doris"); if (ssh.run()) { String out = ssh.getStdoutResponse(); } ``` -------------------------------- ### POST /api/control/cluster/start Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Starts a Doris cluster. Requires authentication. ```APIDOC ## [POST] /api/control/cluster/start ### Description Starts a Doris cluster. Requires authentication. ### Method POST ### Endpoint /api/control/cluster/start ### Parameters #### Request Body - **ModelControlReq** (object) - Required - The control request details. ### Response #### Success Response (200) No response body. #### Response Example ```json {} ``` -------------------------------- ### HDFS import submit example Source: https://github.com/apache/doris-manager/blob/master/_autodocs/api-reference/05-construct-services.md Example of constructing an HdfsImportReq and calling submitHdfsImport. The result map contains taskId and taskName. ```java // HDFS 导入(submit 接口) HdfsImportReq req = new HdfsImportReq(); req.setName("import_task_001"); req.setFileInfo(fileInfo); // {columnSeparator, fileUrl(hdfs://...), format(TXT/ORC/PARQUET/CSV)} req.setConnectInfo(connectInfo); // {brokerName, brokerProps} req.setColumnNames(Arrays.asList("id", "name")); Map result = dataImportService.submitHdfsImport(req, user, tableId); // result: {"taskId":..., "taskName":...} ``` -------------------------------- ### Enum naming example Source: https://github.com/apache/doris-manager/blob/master/frontend/README.md Shows enum naming convention using Upper Camel Case with Enum suffix. ```typescript enum ImportTaskStatusEnum { Created: 0, Running: 1, Failed: 2, } ``` -------------------------------- ### GET /api/setting/ Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves all settings. Requires user authentication. ```APIDOC ## [GET] /api/setting/ ### Description Retrieves all settings. Requires user authentication. ### Method GET ### Endpoint /api/setting/ ### Parameters No parameters. ### Response #### Success Response (200) - **data** (List) - List of setting items #### Response Example [ { "key": "string", "value": "string" } ] ``` -------------------------------- ### GET /api/setting/reset Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Resets the system. Requires user authentication. ```APIDOC ## [GET] /api/setting/reset ### Description Resets the system. Requires user authentication. ### Method GET ### Endpoint /api/setting/reset ### Parameters No parameters. ### Response #### Success Response (200) No response body. #### Response Example No response body. ``` -------------------------------- ### GET /api/space/all Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves all user spaces. Requires user authentication. ```APIDOC ## [GET] /api/space/all ### Description Retrieves all user spaces. Requires user authentication. ### Method GET ### Endpoint /api/space/all ### Authentication 已登录 (Logged in) ### Response #### Success Response (200) - **data** (List) - List of user spaces #### Response Example ```json { "data": [] } ``` ``` -------------------------------- ### GET /api/session/initProperties Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Initializes and retrieves the session properties without requiring authentication. ```APIDOC ## [GET] /api/session/initProperties ### Description Initializes and retrieves the session properties without requiring authentication. ### Method GET ### Endpoint /api/session/initProperties ### Parameters None ### Response #### Success Response (200) - **data** (SessionSettingResp) - The session settings. #### Response Example ```json { "data": {} } ``` ``` -------------------------------- ### POST /api/build/guide/nsId/{nsId}/dbId/{dbId}/table/sql Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Generates SQL for a guided table creation. Requires authentication. ```APIDOC ## POST /api/build/guide/nsId/{nsId}/dbId/{dbId}/table/sql ### Description Generates SQL for a guided table creation. Requires authentication. ### Method POST ### Endpoint /api/build/guide/nsId/{nsId}/dbId/{dbId}/table/sql ### Parameters #### Path Parameters - **nsId** (int) - Required - Namespace ID - **dbId** (int) - Required - Database ID #### Request Body - **TableCreateReq** (object) - Required - Table creation request ### Request Example { "field1": "value" } ### Response #### Success Response (200) - **data** (String) - Generated SQL statement ``` -------------------------------- ### POST /api/build/guide/nsId/{nsId}/dbId/{dbId}/table Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Creates a table using a guided form. Requires authentication. ```APIDOC ## POST /api/build/guide/nsId/{nsId}/dbId/{dbId}/table ### Description Creates a table using a guided form. Requires authentication. ### Method POST ### Endpoint /api/build/guide/nsId/{nsId}/dbId/{dbId}/table ### Parameters #### Path Parameters - **nsId** (int) - Required - Namespace ID - **dbId** (int) - Required - Database ID #### Request Body - **TableCreateReq** (object) - Required - Table creation request ### Request Example { "field1": "value" } ### Response #### Success Response (200) - **data** (int) - The created table ID ``` -------------------------------- ### GET /api/setting/global Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves global settings. Requires super admin privileges. ```APIDOC ## [GET] /api/setting/global ### Description Retrieves global settings. Requires super admin privileges. ### Method GET ### Endpoint /api/setting/global ### Parameters No parameters. ### Response #### Success Response (200) - **data** (List) - List of setting items #### Response Example [ { "key": "string", "value": "string" } ] ``` -------------------------------- ### Agent startup command with required configuration Source: https://github.com/apache/doris-manager/blob/master/_autodocs/api-reference/08-agent.md Example shell command to launch the agent JAR. Requires --manager.server.endpoint and --agent.node.id to be specified at startup; --server.port defaults to 8001. Sets JVM heap to 1024m. ```bash # 启动示例(manager-bin/agent/bin/agent_start.sh) java -Xmx1024m -jar dm-agent.jar \ --manager.server.endpoint=10.10.10.1:8080 \ --agent.node.id=12345 \ --server.port=8001 ``` -------------------------------- ### GET /api/setting/syncLdapUser Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Synchronizes LDAP users. Requires super admin privileges. ```APIDOC ## [GET] /api/setting/syncLdapUser ### Description Synchronizes LDAP users. Requires super admin privileges. ### Method GET ### Endpoint /api/setting/syncLdapUser ### Parameters No parameters. ### Response #### Success Response (200) No response body. #### Response Example No response body. ``` -------------------------------- ### GET /api/cluster/overview 调用示例 Source: https://github.com/apache/doris-manager/blob/master/_autodocs/api-reference/05-construct-services.md 调用 clusterService.getClusterOpInfo(user) 获取集群概览。resp.diskOccupancy 取值范围为 [0,100],resp.remainDisk 单位为 GB。 ```java // GET /api/cluster/overview ClusterOverviewResp resp = clusterService.getClusterOpInfo(user); // resp.diskOccupancy ∈ [0,100], resp.remainDisk 单位为 GB ``` -------------------------------- ### GET /api/idaas/setting Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves IDAAS settings. Requires super admin privileges. ```APIDOC ## [GET] /api/idaas/setting ### Description Retrieves IDAAS settings. Requires super admin privileges. ### Method GET ### Endpoint /api/idaas/setting ### Parameters No parameters. ### Response #### Success Response (200) - **data** (IdaasSettingResp) - IDAAS settings #### Response Example { "clientId": "string", "clientSecret": "string" } ``` -------------------------------- ### GET /api/setting/{key} Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves a specific setting by key. Requires user authentication. ```APIDOC ## [GET] /api/setting/{key} ### Description Retrieves a specific setting by key. Requires user authentication. ### Method GET ### Endpoint /api/setting/{key} ### Parameters #### Path Parameters - **key** (string) - Required - Setting key ### Response #### Success Response (200) - **data** (SettingItem) - Setting item #### Response Example { "key": "string", "value": "string" } ``` -------------------------------- ### GET /api/control/module/{moduleId}/instances Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves the instances of a specific module. Requires authentication. ```APIDOC ## [GET] /api/control/module/{moduleId}/instances ### Description Retrieves the instances of a specific module. Requires authentication. ### Method GET ### Endpoint /api/control/module/{moduleId}/instances ### Parameters #### Path Parameters - **moduleId** (long) - Required - The ID of the module. ### Response #### Success Response (200) - **data** (List) - List of cluster instances. #### Response Example ```json { "data": [] } ``` ``` -------------------------------- ### GET /api/ldap/setting Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves LDAP settings. Requires super admin privileges. ```APIDOC ## [GET] /api/ldap/setting ### Description Retrieves LDAP settings. Requires super admin privileges. ### Method GET ### Endpoint /api/ldap/setting ### Parameters No parameters. ### Response #### Success Response (200) - **data** (LdapSettingResp) - LDAP settings #### Response Example { "host": "ldap.example.com", "port": 389 } ``` -------------------------------- ### Controller endpoint for initProperties Source: https://github.com/apache/doris-manager/blob/master/_autodocs/api-reference/04-permission-space.md GET endpoint /api/session/initProperties that returns initialization properties without authentication, using PropertyService.properties(). ```java // 控制器:未认证即可获取初始化配置 @GetMapping(value = "/api/session/initProperties", produces = MediaType.APPLICATION_JSON_VALUE) public Object getInitProperties(HttpServletRequest request, HttpServletResponse response) throws Exception { return ResponseEntityBuilder.ok(propertyService.properties()); } ``` -------------------------------- ### GET /api/control/cluster/{clusterId}/jdbc/service/ready Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Checks if the JDBC service for a cluster is ready. Requires authentication. ```APIDOC ## [GET] /api/control/cluster/{clusterId}/jdbc/service/ready ### Description Checks if the JDBC service for a cluster is ready. Requires authentication. ### Method GET ### Endpoint /api/control/cluster/{clusterId}/jdbc/service/ready ### Parameters #### Path Parameters - **clusterId** (long) - Required - The ID of the cluster. ### Response #### Success Response (200) - **data** (Boolean) - Whether the JDBC service is ready. #### Response Example ```json { "data": true } ``` ``` -------------------------------- ### PropertyService method signatures Source: https://github.com/apache/doris-manager/blob/master/_autodocs/api-reference/04-permission-space.md Two overloaded methods: properties() returns initialization configuration for frontend setup, properties(user) returns full session properties for a logged-in user. ```java public SessionSettingResp properties() throws Exception public SessionSettingResp properties(CoreUserEntity user) throws Exception ``` -------------------------------- ### GET /api/meta/nsId/{nsId}/databases Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves a list of databases for the specified namespace. Requires authentication. ```APIDOC ## GET /api/meta/nsId/{nsId}/databases ### Description Retrieves a list of databases for the specified namespace. Requires authentication. ### Method GET ### Endpoint /api/meta/nsId/{nsId}/databases ### Parameters #### Path Parameters - **nsId** (int) - Required - Namespace ID ### Response #### Success Response (200) - **data** (List) - List of databases #### Response Example [ {} ] ``` -------------------------------- ### GET /api/meta/dbId/{dbId}/info Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves information about a specific database. Requires authentication. ```APIDOC ## GET /api/meta/dbId/{dbId}/info ### Description Retrieves information about a specific database. Requires authentication. ### Method GET ### Endpoint /api/meta/dbId/{dbId}/info ### Parameters #### Path Parameters - **dbId** (int) - Required - Database ID ### Response #### Success Response (200) - **data** (DatabaseResp) - Database information ``` -------------------------------- ### GET /api/session/initProperties Source: https://github.com/apache/doris-manager/blob/master/_autodocs/api-reference/04-permission-space.md Retrieves the initial session properties required for frontend initialization. This endpoint is accessible without authentication and returns a SessionSettingResp object containing configuration fields such as authType, initStep, completed, humanizationStrategy, siteLocale, and applicationName. ```APIDOC ## GET /api/session/initProperties ### Description Retrieves the initial session properties required for frontend initialization. This endpoint is accessible without authentication and returns a SessionSettingResp object containing configuration fields such as authType, initStep, completed, humanizationStrategy, siteLocale, and applicationName. ### Method GET ### Endpoint /api/session/initProperties ### Response #### Success Response (200) - **authType** (string) - Authentication type - **initStep** (string) - Initialization step - **completed** (boolean) - Whether initialization is completed - **humanizationStrategy** (string) - Humanization strategy (e.g., "advanced") - **siteLocale** (string) - Site locale (e.g., "zh") - **applicationName** (string) - Application name (e.g., "Doris Studio") #### Response Example { "authType": "string", "initStep": "string", "completed": true, "humanizationStrategy": "advanced", "siteLocale": "zh", "applicationName": "Doris Studio" } ``` -------------------------------- ### Error handling example for querySql Source: https://github.com/apache/doris-manager/blob/master/_autodocs/api-reference/05-construct-services.md Shows how to handle a failed query response from querySql. The response is structured as SqlQueryResp and does not throw an exception; check the status field for 'failed' and then access error and stacktrace for details. ```java // exec_status 型失败响应已结构化为 SqlQueryResp(不会抛异常) SqlQueryResp resp = nativeQueryService.querySql(user, new SqlQueryReq(dbId, "SELECT * FROM t")); if ("failed".equals(resp.getStatus().name())) { System.err.println(resp.getError()); // 错误原因 System.err.println(resp.getStacktrace()); // 堆栈 } ``` -------------------------------- ### GET /api/setting/global/{key} Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves a specific global setting by key. Requires super admin privileges. ```APIDOC ## [GET] /api/setting/global/{key} ### Description Retrieves a specific global setting by key. Requires super admin privileges. ### Method GET ### Endpoint /api/setting/global/{key} ### Parameters #### Path Parameters - **key** (string) - Required - Setting key ### Response #### Success Response (200) - **data** (SettingItem) - Setting item #### Response Example { "key": "string", "value": "string" } ``` -------------------------------- ### GET /api/setting/ldapUsers Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves LDAP users for admin selection during initialization. No authentication required. ```APIDOC ## [GET] /api/setting/ldapUsers ### Description Retrieves LDAP users for admin selection during initialization. No authentication required. ### Method GET ### Endpoint /api/setting/ldapUsers ### Parameters #### Query Parameters - **q** (string) - Optional - Search query ### Response #### Success Response (200) - **data** (List) - List of user info #### Response Example [ { "username": "string", "email": "string" } ] ``` -------------------------------- ### AgentApplication Spring Boot entry point Source: https://github.com/apache/doris-manager/blob/master/_autodocs/api-reference/08-agent.md Main class for the dm-agent Spring Boot application. Annotated with @SpringBootApplication, @EnableScheduling, @EnableConfigurationProperties, and @ServletComponentScan. The main method starts the application via SpringApplication.run. ```java @SpringBootApplication @EnableScheduling @EnableConfigurationProperties @ServletComponentScan public class AgentApplication { public static void main(String[] args) { SpringApplication.run(AgentApplication.class, args); } } ``` -------------------------------- ### GET /api/cluster/overview Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves an overview of the cluster, including counts of databases, tables, BE/FE nodes, disk occupancy, and remaining disk space. Requires authentication. ```APIDOC ## GET /api/cluster/overview ### Description Retrieves an overview of the cluster, including counts of databases, tables, BE/FE nodes, disk occupancy, and remaining disk space. Requires authentication. ### Method GET ### Endpoint /api/cluster/overview ### Response #### Success Response (200) - **dbCount** (int) - Number of databases - **tblCount** (int) - Number of tables - **diskOccupancy** (number) - Disk occupancy - **beCount** (int) - Number of BE nodes - **feCount** (int) - Number of FE nodes - **remainDisk** (number) - Remaining disk space #### Response Example { "dbCount": 0, "tblCount": 0, "diskOccupancy": 0, "beCount": 0, "feCount": 0, "remainDisk": 0 } ``` -------------------------------- ### GET /api/meta/dbId/{dbId}/tables Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves a list of tables for the specified database. Requires authentication. ```APIDOC ## GET /api/meta/dbId/{dbId}/tables ### Description Retrieves a list of tables for the specified database. Requires authentication. ### Method GET ### Endpoint /api/meta/dbId/{dbId}/tables ### Parameters #### Path Parameters - **dbId** (int) - Required - Database ID ### Response #### Success Response (200) - **data** (List) - List of tables #### Response Example [ {} ] ``` -------------------------------- ### POST /api/setting/init/studio Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Initializes the studio with authentication type and LDAP/IDAAS settings. Requires super admin privileges. ```APIDOC ## [POST] /api/setting/init/studio ### Description Initializes the studio with authentication type and LDAP/IDAAS settings. Requires super admin privileges. ### Method POST ### Endpoint /api/setting/init/studio ### Parameters #### Request Body - **authType** (string) - Required - Authentication type - **ldapSetting** (object) - Optional - LDAP settings - **idaasSetting** (object) - Optional - IDAAS settings ### Request Example { "authType": "string", "ldapSetting": {}, "idaasSetting": {} } ### Response #### Success Response (200) No response body. #### Response Example No response body. ``` -------------------------------- ### POST /api/setting/init/ldapStudio Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Initializes the studio with LDAP settings. No authentication required. ```APIDOC ## [POST] /api/setting/init/ldapStudio ### Description Initializes the studio with LDAP settings. No authentication required. ### Method POST ### Endpoint /api/setting/init/ldapStudio ### Parameters #### Request Body - **authType** (string) - Required - Authentication type - **ldapSetting** (object) - Optional - LDAP settings - **idaasSetting** (object) - Optional - IDAAS settings ### Request Example { "authType": "string", "ldapSetting": {}, "idaasSetting": {} } ### Response #### Success Response (200) No response body. #### Response Example No response body. ``` -------------------------------- ### 创建集群控制器示例(POST /api/control/cluster/creation) Source: https://github.com/apache/doris-manager/blob/master/_autodocs/api-reference/07-control-services.md 展示如何通过 DorisClusterService.creation 方法创建 Doris 集群。需要构造 DorisClusterCreationReq 对象,设置空间信息、认证信息、主机列表、安装选项、节点配置和集群密码,然后调用 creation 方法。响应携带 requestId,前端可轮询 GET /api/control/request/{requestId}/info 获取进度。 ```java // POST /api/control/cluster/creation(超管) DorisClusterCreationReq req = new DorisClusterCreationReq(); req.setSpaceInfo(spaceReq); // NewUserSpaceCreateReq req.setAuthInfo(new PMResourceClusterAccessInfo("root", 22, sshKey)); req.setHosts(Arrays.asList("10.10.10.2", "10.10.10.3")); req.setPackageInfo("doris-1.1.0"); req.setInstallInfo("/root/doris"); req.setAgentPort(8001); req.setNodeConfig(nodeConfigList); // List req.setClusterPassword("Doris@123"); ModelControlResponse resp = clusterService.creation(user, req); // resp 携带 requestId,前端轮询 GET /api/control/request/{requestId}/info 获取进度 ``` -------------------------------- ### GET /api/session/password_reset_token_valid Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Checks if a password reset token is valid. ```APIDOC ## [GET] /api/session/password_reset_token_valid ### Description Checks if a password reset token is valid. ### Method GET ### Endpoint /api/session/password_reset_token_valid ### Parameters #### Query Parameters - **token** (string) - Required - Password reset token to validate ### Response #### Success Response (200) - **data** (boolean) - Whether the token is valid #### Response Example { "code": 0, "msg": "success", "data": true } ``` -------------------------------- ### POST /api/build/native/nsId/{nsId}/dbId/{dbId}/table Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Creates a table using native SQL. Requires authentication. ```APIDOC ## POST /api/build/native/nsId/{nsId}/dbId/{dbId}/table ### Description Creates a table using native SQL. Requires authentication. ### Method POST ### Endpoint /api/build/native/nsId/{nsId}/dbId/{dbId}/table ### Parameters #### Path Parameters - **nsId** (int) - Required - Namespace ID - **dbId** (int) - Required - Database ID #### Request Body - **body** (String) - Required - SQL statement for table creation ### Request Example "CREATE TABLE ..." ### Response #### Success Response (200) - **data** (int) - The created table ID ``` -------------------------------- ### SSH constructor and static utility methods Source: https://github.com/apache/doris-manager/blob/master/_autodocs/api-reference/10-drivers-shell.md SSH class for remote command execution via the ssh command line with a key file. After construction, run() executes `ssh -i {sshKeyFile} -p {sshPort} {user}@{host} "{command}"`. writeSshKeyFile writes the key string to a file (appending a newline). buildSshKeyFile creates the key file in the agent private key directory ($HOME/.ssh/, overridable by DORIS_SSH_KEY_DIR) and sets permissions to 600. ```java public SSH(String user, int sshPort, String sshKeyFile, String host, String command) public static void writeSshKeyFile(String sshKey, File sshKeyFile) public static File buildSshKeyFile(String fileName) ``` -------------------------------- ### JdbcSampleClient() Source: https://github.com/apache/doris-manager/blob/master/_autodocs/api-reference/10-drivers-shell.md Default constructor for the JDBC sample client. ```APIDOC ## JdbcSampleClient() ### Description Default constructor for the JDBC sample client. ### Method Constructor ### Signature `public JdbcSampleClient()` ``` -------------------------------- ### GET /api/permissions/membership Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves all user group memberships. Requires user authentication. ```APIDOC ## [GET] /api/permissions/membership ### Description Retrieves all user group memberships. Requires user authentication. ### Method GET ### Endpoint /api/permissions/membership ### Authentication 已登录 (Logged in) ### Response #### Success Response (200) - **data** (Map>) - Map of user ID to list of memberships #### Response Example ```json { "data": {} } ``` ``` -------------------------------- ### POST /api/build/nsId/{nsId}/database Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Creates a new database in the specified namespace. Requires authentication. ```APIDOC ## POST /api/build/nsId/{nsId}/database ### Description Creates a new database in the specified namespace. Requires authentication. ### Method POST ### Endpoint /api/build/nsId/{nsId}/database ### Parameters #### Path Parameters - **nsId** (int) - Required - Namespace ID #### Request Body - **name** (string) - Required - Database name - **describe** (string) - Optional - Description ### Request Example { "name": "string", "describe": "string" } ### Response #### Success Response (200) - **data** (int) - The created database ID ``` -------------------------------- ### GET /api/permissions/group Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves a list of permission groups. Requires user authentication. ```APIDOC ## [GET] /api/permissions/group ### Description Retrieves a list of permission groups. Requires user authentication. ### Method GET ### Endpoint /api/permissions/group ### Authentication 已登录 (Logged in) ### Response #### Success Response (200) - **data** (List) - List of permission groups #### Response Example ```json { "data": [] } ``` ``` -------------------------------- ### NewUserAddReq 请求模型 Source: https://github.com/apache/doris-manager/blob/master/_autodocs/types.md 新增用户请求模型,被 SettingService.addAdminUser 和 NewUserService.addUser 消费。name 或 password 为空时 hasEmptyField() 返回 true。 ```java @Data public class NewUserAddReq { private String name; private String email; private String password; public boolean hasEmptyField() { ... } // name 或 password 空 → true public boolean checkNameEmpty() { ... } } ``` -------------------------------- ### ConfigItem constructors and methods Source: https://github.com/apache/doris-manager/blob/master/_autodocs/api-reference/03-setting-config.md Static definitions for configuration items with immutable properties. Includes two constructors, getters, and enums for Visibility and Type. ```java public ConfigItem(String key, Type type, String description, boolean sensitive, Visibility visibility) public ConfigItem(String key, Type type, String defaultValue, String description, boolean sensitive, Visibility visibility, boolean isEnvSetting, String envName) public String getKey() public Type getType() public String getDefaultValue() public String getDescription() public boolean isSensitive() public Visibility getVisibility() public boolean isEnvSetting() public String getEnvName() public enum Visibility { PUBLIC, AUTHENTICATED, ADMIN, INTERNAL; } public enum Type { STRING, BOOLEAN, INTEGER, JSON, DOUBLE, TIMESTAMP; } ``` -------------------------------- ### GET /api/rest/v2/manager/node/node_list Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves a list of nodes for dropdown selection. This endpoint is a proxy to the FE. ```APIDOC ## [GET] /api/rest/v2/manager/node/node_list ### Description Retrieves a list of nodes for dropdown selection. This endpoint is a proxy to the FE. ### Method GET ### Endpoint /api/rest/v2/manager/node/node_list ### Response #### Success Response (200) - **data** (ResponseBody) - Response from FE #### Response Example ```json { "data": {} } ``` ``` -------------------------------- ### POST /api/space/create Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Creates a new user space. Requires super administrator privileges. ```APIDOC ## [POST] /api/space/create ### Description Creates a new user space. Requires super administrator privileges. ### Method POST ### Endpoint /api/space/create ### Parameters #### Request Body - **name** (string) - Required - The name of the space - **cluster** (string) - Required - The cluster associated with the space - **spaceAdminUsers** (List) - Required - List of admin users for the space - ... (other fields as per NewUserSpaceCreateReq) ### Authentication 超管 (Super admin) ### Response #### Success Response (200) - **data** (long) - The ID of the created space #### Response Example ```json { "data": 1 } ``` ``` -------------------------------- ### GET /api/rest/v2/manager/node/frontends Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves information about frontend nodes in the cluster. This endpoint is a proxy to the FE. ```APIDOC ## [GET] /api/rest/v2/manager/node/frontends ### Description Retrieves information about frontend nodes in the cluster. This endpoint is a proxy to the FE. ### Method GET ### Endpoint /api/rest/v2/manager/node/frontends ### Response #### Success Response (200) - **data** (ResponseBody) - Response from FE #### Response Example ```json { "data": {} } ``` ``` -------------------------------- ### GET /api/meta/tableId/{tableId}/info Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves information about a specific table. Requires authentication. ```APIDOC ## GET /api/meta/tableId/{tableId}/info ### Description Retrieves information about a specific table. Requires authentication. ### Method GET ### Endpoint /api/meta/tableId/{tableId}/info ### Parameters #### Path Parameters - **tableId** (int) - Required - Table ID ### Response #### Success Response (200) - **data** (TableResp) - Table information ``` -------------------------------- ### CoreUserRepository 接口示例 Source: https://github.com/apache/doris-manager/blob/master/_autodocs/api-reference/11-utils-entities.md 展示 CoreUserRepository 接口继承 JpaRepository,并包含一个自定义查询方法 findFirstByName。注意:实际方法名以源码为准,此处仅为示例。 ```java public interface CoreUserRepository extends JpaRepository { Optional findFirstByName(String name); // 实际方法名以源码为准 ... } ``` -------------------------------- ### SettingService 方法签名列表 Source: https://github.com/apache/doris-manager/blob/master/_autodocs/api-reference/03-setting-config.md 列出 SettingService 类的公开方法签名,用于系统初始化、配置读写、LDAP 用户同步等操作。 ```java public void initStudioAuthType(LdapAuthTypeReq req) throws Exception public void initStudio(InitStudioReq initStudioReq) throws Exception public void initLdapStudio(InitStudioReq initStudioReq) throws Exception public void initConfig() throws Exception public void syncLdapUser() public String addAdminUser(NewUserAddReq addReq) throws Exception public List getAllConfig(CoreUserEntity user) throws Exception public List getAllPublicConfig() public SettingItem getConfigByKey(String key) throws Exception public SettingItem getConfigByKey(String key, CoreUserEntity user) throws Exception public SettingItem amdinUpdateConfigByKey(String key, CoreUserEntity user, ConfigUpdateReq updateReq) throws Exception public SettingItem superUpdateConfigByKey(String key, ConfigUpdateReq updateReq) throws Exception public void reset(int userId) throws Exception public List getAllUsers(String q) throws Exception public void skipInitSystem() throws Exception ``` -------------------------------- ### POST /api/user/ (and /api/v2/user/) Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Creates a new user (admin only). ```APIDOC ## [POST] /api/user/ (and /api/v2/user/) ### Description Creates a new user (admin only). ### Method POST ### Endpoint /api/user/ (or /api/v2/user/) ### Parameters #### Request Body - **name** (string) - Required - User's name - **email** (string) - Required - User's email - **password** (string) - Required - User's password ### Request Example { "name": "string", "email": "string", "password": "string" } ### Response #### Success Response (200) - **data** (UserInfo) - Created user details #### Response Example { "code": 0, "msg": "success", "data": { "id": 1, "name": "string", "email": "string" } } ``` -------------------------------- ### GET /api/control/cluster/{clusterId}/nodes Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves the nodes of a specific cluster. Requires authentication. ```APIDOC ## [GET] /api/control/cluster/{clusterId}/nodes ### Description Retrieves the nodes of a specific cluster. Requires authentication. ### Method GET ### Endpoint /api/control/cluster/{clusterId}/nodes ### Parameters #### Path Parameters - **clusterId** (long) - Required - The ID of the cluster. ### Response #### Success Response (200) - **data** (List) - List of resource nodes. #### Response Example ```json { "data": [] } ``` ``` -------------------------------- ### NewUserSpaceInfo with nested SpaceAdminUserInfo Source: https://github.com/apache/doris-manager/blob/master/_autodocs/types.md Response class for user space information. Contains nested SpaceAdminUserInfo for admin users. Fields like paloAddress, paloAdminUser, and description are JSON strings. Includes status, requestId, requestType, and requestInfo for request tracking. ```java @Data @JsonInclude(NON_NULL) public class NewUserSpaceInfo { private long id; private String name; private String creator; private String description; // JSON describe private List spaceAdminUser; private List spaceAdminUserId; private String paloAddress; // JSON address private int httpPort; private int queryPort; private String paloAdminUser; // JSON user private Timestamp createTime; private Timestamp updateTime; private int adminGroupId; private int allUserGroupId; private int publicCollectionId; private String status; private long requestId; private String requestType; private boolean isRequestCompleted = true; private int eventType; private Object requestInfo; public static class SpaceAdminUserInfo { private int id; private String name; private String email; } } ``` -------------------------------- ### GET /api/control/cluster/{clusterId}/instances Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves the instances of a specific cluster. Requires authentication. ```APIDOC ## [GET] /api/control/cluster/{clusterId}/instances ### Description Retrieves the instances of a specific cluster. Requires authentication. ### Method GET ### Endpoint /api/control/cluster/{clusterId}/instances ### Parameters #### Path Parameters - **clusterId** (long) - Required - The ID of the cluster. ### Response #### Success Response (200) - **data** (List) - List of cluster instances. #### Response Example ```json { "data": [] } ``` ``` -------------------------------- ### GET /api/control/cluster/{clusterId}/modules Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves the modules of a specific cluster. Requires authentication. ```APIDOC ## [GET] /api/control/cluster/{clusterId}/modules ### Description Retrieves the modules of a specific cluster. Requires authentication. ### Method GET ### Endpoint /api/control/cluster/{clusterId}/modules ### Parameters #### Path Parameters - **clusterId** (long) - Required - The ID of the cluster. ### Response #### Success Response (200) - **data** (List) - List of cluster modules. #### Response Example ```json { "data": [] } ``` ``` -------------------------------- ### GET /api/session/properties Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves the session properties for the currently logged-in user. Requires authentication. ```APIDOC ## [GET] /api/session/properties ### Description Retrieves the session properties for the currently logged-in user. Requires authentication. ### Method GET ### Endpoint /api/session/properties ### Parameters None ### Response #### Success Response (200) - **data** (SessionSettingResp) - The session settings. #### Response Example ```json { "data": {} } ``` ``` -------------------------------- ### GET /api/email/ Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves SMTP email configuration. Requires super admin privileges. ```APIDOC ## [GET] /api/email/ ### Description Retrieves SMTP email configuration. Requires super admin privileges. ### Method GET ### Endpoint /api/email/ ### Parameters No parameters. ### Response #### Success Response (200) - **data** (List) - List of SMTP settings #### Response Example [ { "key": "email-smtp-host", "value": "smtp.example.com" } ] ``` -------------------------------- ### POST /api/import/tableId/{tableId}/hdfs/connect Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Connects to HDFS and previews data. Requires authentication. ```APIDOC ## POST /api/import/tableId/{tableId}/hdfs/connect ### Description Connects to HDFS and previews data. Requires authentication. ### Method POST ### Endpoint /api/import/tableId/{tableId}/hdfs/connect ### Parameters #### Path Parameters - **tableId** (int) - Required - Table ID #### Request Body - **host** (string) - Required - HDFS host - **port** (int) - Required - HDFS port - **fileUrl** (string) - Required - File URL - **format** (string) - Required - File format - **columnSeparator** (string) - Required - Column separator ### Request Example { "host": "string", "port": 0, "fileUrl": "string", "format": "string", "columnSeparator": "string" } ### Response #### Success Response (200) - **data** (HdfsPreviewResp) - HDFS preview response ``` -------------------------------- ### POST /api/setting/admin Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Adds a new admin user. No authentication required (final initialization step). ```APIDOC ## [POST] /api/setting/admin ### Description Adds a new admin user. No authentication required (final initialization step). ### Method POST ### Endpoint /api/setting/admin ### Parameters #### Request Body - **NewUserAddReq** (object) - Required - New user details ### Request Example { "username": "string", "password": "string" } ### Response #### Success Response (200) - **data** (String) - Session ID (set as cookie) #### Response Example "sessionId" ``` -------------------------------- ### PaloForwardManagerClient.forwardGet Source: https://github.com/apache/doris-manager/blob/master/_autodocs/api-reference/09-connectors.md Forwards a GET request to the FE manager API with login cookie and returns the response body. ```APIDOC ## [GET] /rest/v2/manager/** ### Description Forwards a GET request to the FE manager API with login cookie and returns the response body. ### Method GET ### Endpoint http://{host}:{httpPort}/rest/v2/manager/{url} ### Parameters #### Path Parameters - **url** (string) - Required - The relative URL path after /rest/v2/manager/. #### Request Body - **ClusterInfoEntity** (object) - Required - Cluster connection information. ### Request Example { "url": "some/path", "entity": {} } ### Response #### Success Response (200) - **Object** (object) - The response body parsed as ResponseBody. #### Response Example {} ``` -------------------------------- ### GET /api/rest/v2/manager/query/profile/text/{queryId} Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves the query profile in text format. This endpoint is a proxy to the FE. ```APIDOC ## [GET] /api/rest/v2/manager/query/profile/text/{queryId} ### Description Retrieves the query profile in text format. This endpoint is a proxy to the FE. ### Method GET ### Endpoint /api/rest/v2/manager/query/profile/text/{queryId} ### Parameters #### Path Parameters - **queryId** (string) - Required - Query ID ### Response #### Success Response (200) - **data** (ResponseBody) - Response from FE #### Response Example ```json { "data": {} } ``` ``` -------------------------------- ### GET /api/rest/v2/manager/query/sql/{queryId} Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves the SQL text of a specific query. This endpoint is a proxy to the FE. ```APIDOC ## [GET] /api/rest/v2/manager/query/sql/{queryId} ### Description Retrieves the SQL text of a specific query. This endpoint is a proxy to the FE. ### Method GET ### Endpoint /api/rest/v2/manager/query/sql/{queryId} ### Parameters #### Path Parameters - **queryId** (string) - Required - Query ID ### Response #### Success Response (200) - **data** (ResponseBody) - Response from FE #### Response Example ```json { "data": {} } ``` ``` -------------------------------- ### GET /api/rest/v2/manager/node/configuration_name Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Retrieves configuration item names for dropdown lists. This endpoint is a proxy to the FE. ```APIDOC ## [GET] /api/rest/v2/manager/node/configuration_name ### Description Retrieves configuration item names for dropdown lists. This endpoint is a proxy to the FE. ### Method GET ### Endpoint /api/rest/v2/manager/node/configuration_name ### Response #### Success Response (200) - **data** (ResponseBody) - Response from FE #### Response Example ```json { "data": {} } ``` ``` -------------------------------- ### GET /api/import/dbId/{dbId}/name/check Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Checks if a task name is valid and not duplicated. Requires authentication. ```APIDOC ## GET /api/import/dbId/{dbId}/name/check ### Description Checks if a task name is valid and not duplicated. Requires authentication. ### Method GET ### Endpoint /api/import/dbId/{dbId}/name/check ### Parameters #### Path Parameters - **dbId** (int) - Required - Database ID #### Query Parameters - **taskName** (string) - Required - Task name to check ### Response #### Success Response (200) No response data. Throws exception if duplicate or invalid. ``` -------------------------------- ### POST /api/meta/sync Source: https://github.com/apache/doris-manager/blob/master/_autodocs/endpoints.md Triggers a metadata synchronization. Requires authentication. ```APIDOC ## POST /api/meta/sync ### Description Triggers a metadata synchronization. Requires authentication. ### Method POST ### Endpoint /api/meta/sync ### Response #### Success Response (200) No response data (triggers sync). ```