<< Click to Display Table of Contents >> 1.49 获取报告血缘分析数据 |
请求地址 |
http://ip:port/bi/api?action=getDbLineage&token=xxxx |
|
请求消息 |
请求参数 |
请求参数:xmlData(必填) <?xml version="1.0" encoding="UTF-8"?> <info> <user></user> <getdata> <dbpath>新建文件夹/血缘分析</dbpath> </getdata> </info>
|
参数描述 |
参数为节点信息: 1) user(选填):想要查看的目标用户名 2) dbpath(必填):仪表盘的路径 |
|
示例 |
function getDbLineage() { var xml = getXml(); $.post("http://" + ip + ":" + port + "/" + project + "/api?action=getDbLineage&token=xxxx", {xmlData : xml}, function(result) { writeXml(result); }); } |
|
响应消息 |
响应结果 |
操作成功 <?xml version="1.0" encoding="UTF-8"?> <info> <grid> <row> <col>{"name":"table","attrValue":"table","attrName":"报告路径"}</col> <col>{"name":"表1","attrValue":"表1","attrName":"表名称"}</col> <col>{"name":"coffee","attrValue":"coffee","attrName":"SQL数据集路径"}</col> <col>{"name":"anna","attrValue":"anna","attrName":"数据库名称"}</col> <col>{"name":"coffee","attrValue":"anna/coffee","attrName":"数据库表路径"}</col> <col>{"name":"mysql","attrValue":"数据源/mysql","attrName":"数据源MySQL路径"}</col> </row> </grid> </info> 操作失败 <?xml version="1.0" encoding="UTF-8"?> <results> <result> <level>6</level> <message>用户“user1”不存在。</message> </result> </results> |
结果描述 |
响应结果信息为xml,直接parse即可。 1)level 返回类型,不同数值代表不同返回状态,1表示成功, 6表 示失败。 |