Get Dashboard Lineage Data

<< Click to Display Table of Contents >>

Current:  System Integration > WebAPI 

Get Dashboard Lineage Data

Previous pageReturn to chapter overviewNext page

Request address

http://ip:port/bi/api?action=getDbLineage&token=xxxx

Request message

Request parameter

required parameter:xmlData (required)

<?xml version="1.0" encoding="UTF-8"?>

<info>      

<user></user>  

<getdata>      

<dbpath>table</dbpath>    

</getdata> </info>

parametric description

Parameter is node information :

1) user(optional):The target user name you want to view

2) dbpath(required):dashboard path

Sample

function getDbLineage() {

        var xml = getXml();

        $.post("http://" + ip + ":" + port + "/" + project + "/api?action=getDbLineage&token=xxxx",

           {xmlData : xml},

           function(result) {

           writeXml(result);

        });

     }

Response message

Response result

 

1) Successful operation

<?xml version="1.0" encoding="utf-8"?>

<lineage>

 <nodes>

   <node>

     <id>1</id>

     <root>true</root>

     <name>86表格</name>

     <detailType>16640</detailType>

     <detailTypeString>报告</detailTypeString>

     <type>1</type>

     <path>webapi/getDbLineage/86表格</path>

     <assetPath>webapi/getDbLineage/86表格</assetPath>

     <isAsset>true</isAsset>

     <read>true</read>

   </node>

   <node>

     <id>2</id>

     <root>false</root>

     <name>表1</name>

     <detailType>2</detailType>

     <detailTypeString>表</detailTypeString>

     <type>2</type>

     <isAsset>false</isAsset>

   </node>

   <node>

     <id>3</id>

     <root>false</root>

     <name>交叉表1</name>

     <detailType>3</detailType>

     <detailTypeString>交叉表</detailTypeString>

     <type>2</type>

     <isAsset>false</isAsset>

   </node>

   <node>

     <id>4</id>

     <root>false</root>

     <name>自由式表格1</name>

     <detailType>16</detailType>

     <detailTypeString>自由式表格</detailTypeString>

     <type>2</type>

     <isAsset>false</isAsset>

   </node>

   <node>

     <id>5</id>

     <root>false</root>

     <name>ExcelQuery</name>

     <detailType>16905</detailType>

     <detailTypeString>Excel数据集</detailTypeString>

     <type>3</type>

     <path>webapi/getQueryData/ExcelQuery</path>

     <assetPath>webapi/getQueryData/ExcelQuery</assetPath>

     <isAsset>true</isAsset>

     <read>true</read>

   </node>

   <node>

     <id>6</id>

     <root>false</root>

     <name>咖啡中国市场销售数据</name>

     <detailType>16897</detailType>

     <detailTypeString>SQL数据集</detailTypeString>

     <type>3</type>

     <path>咖啡中国市场销售数据</path>

     <assetPath>咖啡中国市场销售数据</assetPath>

     <isAsset>true</isAsset>

     <read>true</read>

   </node>

   <node>

     <id>7</id>

     <root>false</root>

     <name>自定义SQL语句</name>

     <qryPath>咖啡中国市场销售数据</qryPath>

     <qryType>16897</qryType>

     <detailType>16897</detailType>

     <detailTypeString>SQL语句</detailTypeString>

     <type>5</type>

     <isAsset>false</isAsset>

   </node>

   <node>

     <id>8</id>

     <root>false</root>

     <name>自定义数据源</name>

     <detailType>5</detailType>

     <detailTypeString>Generic</detailTypeString>

     <type>6</type>

     <read>true</read>

   </node>

 </nodes>

 <relations>

   <relation>

     <source>1</source>

     <target>2</target>

   </relation>

   <relation>

     <source>1</source>

     <target>3</target>

   </relation>

   <relation>

     <source>1</source>

     <target>4</target>

   </relation>

   <relation>

     <source>2</source>

     <target>6</target>

   </relation>

   <relation>

     <source>3</source>

     <target>5</target>

   </relation>

   <relation>

     <source>4</source>

     <target>5</target>

   </relation>

   <relation>

     <source>6</source>

     <target>7</target>

   </relation>

   <relation>

     <source>7</source>

     <target>8</target>

   </relation>

 </relations>

</lineage>

2)Operation failure

<?xml version="1.0" encoding="UTF-8"?>

<results>

   <result>

       <level>6</level>

       <message>User 'user1' is not found.</message>

   </result>

</results>

Result description

The response result information is xml, direct parse.

nodes:List of nodes

node:node

id:node id

root:node is the starting node selected by the query

name: the name of the node

type: type of node, including reports, component datasets, data tables (Mongo sets), custom SQL, data sources

detailType: Node detail type, applicable to the reported component type, type of data set

path: if a node reports, data set, data source, show its physical path under bihome, if a data table or Mongo collection show the selected hierarchical path

qryPath: The physical path of a dataset resource under bihome for nodes with a custom SQL type.

qryType: The type of the dataset resource (SQL dataset, Mongo dataset, etc.) for nodes with a custom SQL type.

script:script, SQL or mongo pipeline statement for SQL dataset, Mongo dataset

assetPath: the physical path of a resource under bihome

Does isAsset:node represent a resource

read: whether or not you have write permission for the resource, applies to the node that represents the resource.

relations: relationships between nodes

source:Start node of a link

target:target node of a link

Level return type, different values represent different return status, 1 indicates success, 6 indicates failure.

 

Parameter List:

type

name

detailType

name

1

DB

22016

Favorites

 

 

21248

Shared from Others

 

 

16440

Dashboard

2

component

1

Chart

 

 

2

Table

 

 

3

Pivot

 

 

4

Image

 

 

5

Calendar

 

 

6

Filter List

 

 

7

Range Filter

 

 

8

Component

 

 

9

Text

 

 

10

Gauge

 

 

11

Text Parameter

 

 

14

ComboBox

 

 

15

TAB

 

 

16

Freestyle Table

 

 

17

Form

 

 

18

Group

 

 

20

Filter Container

 

 

21

Tree Filter

 

 

22

List filter

 

 

23

Commit

 

 

26

webpage

 

 

27

Customer component

 

 

28

Carousel

3

Data Set

16897

SQL Data Set

 

 

16905

Excel Data Set

 

 

16904

Composed Data Set

 

 

16910

Self-service Data Set

 

 

16902

Emebdded Data Set

 

 

19600

Data mart Data Set

 

 

16907

Mongo Data Set

 

 

16899

Custom Data Set

 

 

16898

Script Data Set

 

 

16912

Multi-Dimension Data Set

4

Physical Form

18436

View

 

 

18438

SSAS Cube

 

 

18442

Kylin Cube

 

 

18439

Property View

 

 

18440

Analysis View

 

 

18441

Calculation View

5

Custom SQL

1

SQL Script

 

 

2

SQL Stored procedures

 

 

3

Mongo Pipeline

6

Data Source

0

Generic

 

 

1

Oracle

 

 

2

DB2

 

 

3

SQLServer

 

 

4

MySQL

 

 

5

Derby

 

 

6

Informix

 

 

7

Sybase

 

 

8

Access

 

 

9

Vertical

 

 

10

Yonghong

 

 

11

Hive

 

 

12

Mongo

 

 

13

Spark

 

 

14

Postgresql

 

 

15

Hana

 

 

16

Kylin

 

 

17

MaxCompute

 

 

18

Kingbase

 

 

19

Impala

 

 

20

HBase

 

 

21

Presto

 

 

22

AnalyticDB

 

 

23

Essbase

 

 

24

SAP BW

 

 

25

SSAS

 

 

27

Teradata

 

 

28

GBase

 

 

29

Transwarp

 

 

30

Sparking

 

 

32

HuaWeiCloudDWS

 

 

33

GaussDB

 

 

34

FusionInsightELK

 

 

35

FusionInsightHD

 

 

36

ELASTICSEARCH

 

 

37

GREENPLUM

 

 

40

ThunderEngine

 

 

41

GaussDB100