...
Markdown |
---|
## 复制指标模型
## 接口调用方式
```java
import smartbi.net.sf.json.JSONObject;
import smartbi.sdk.ClientConnector;
import smartbi.sdk.InvokeResult;
public class MetricsModelDuplicateDemo {
public static void main(String[] args) {
// 用户名
String user = "admin";
// 密码
String password = "admin";
// Smartbi链接http://10.10.35.85:18080/smartbi
String smartbiURL = "http://localhost:8080/smartbi";
// 创建Smartbi链接对象
ClientConnector conn = new ClientConnector(smartbiURL);
// 建立此连接时,就对smartbi进行了登录
boolean ret = conn.open(user, password);
String body = "内容参考下文MetricsModelDuplicateConfig";
JSONObject obj = JSONObject.fromString(str);
// 复制指标模型模型
InvokeResult res = conn.remoteInvoke("MetricsModelForVModule", "copyAndPaste", new Object[]{body});
conn.close();
}
}
```
## 接口参数说明
### MetricsModelDuplicateConfigVO
| <strong>属性</strong> | <strong>类型</strong> | <strong>说明</strong> |
| --------------------- | --------------------- | -------------------- |
| parentId | String | 目录ID |
| id | String | 指标模型ID |
| name | String | 名称 |
| alias | String | 别名 |
| desc | String | 描述 |
| tableNameSuffix | String | 基础表名后缀,作用于系统创建的维表、事实表。若后缀不为空,则为表名添加后缀执行创建表,若后缀为空,则转为导入表 |
| fullCopy | boolean | 默认true全量复制 |
| copyPermission | boolean | 是否复制资源权限。暂未实现,敬请期待 | |
...