Modify the name of the dashboard or dashboard folder

<< Click to Display Table of Contents >>

Current:  System Integration > WebAPI 

Modify the name of the dashboard or dashboard folder

Previous pageReturn to chapter overviewNext page

Request address

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

Request message

Request parameter

required parameter:xmlData(required)

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

<info>

  <odb>

     <type>dbfolder</type>

     <path>hangyeanli</path>

  </odb>

  <db>

     <type>dbfolder</type>

     <path>hangyeanli_modify</path>

  </db>

</info>

or

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

<info>

  <odb>

     <type>db</type>

     <path>hangyeanli/lingshouye</path>

  </odb>

  <db>

     <type>db</type>

     <path>hangyeanli/lingshouye_modify</path>

  </db>

</info>

parametric description

The request parameters are new user information and old user information:

1)odb(required) Corresponds to the information before you want to change the dashboard.

2)db(required) Change the information of the dashboard.

3)type(required) There are three types:dbfolder、db、dblink。

4)path(required) Corresponding to the dashboard or dashboard folder.

Sample

function changeName() {

        var xml = getXml();

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

           {xmlData : xml},

           function(result) {        

              writeXml(result);

           });

     }

Response message

Response result

 

1)Successful operation

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

<results>

  <result>

         <level>1</level>

         <message>Operates successfully</message>

  </result>

</results>

2)Operation failure

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

<results>

  <result>

     <level>6</level>

     <message>Folder “test” already exists.</message>

  </result>

</results>

or

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

<results>

<result>

<level>6</level>

<message>Folder not found: "hangyeanli/lingshouye".</message>

</result></results>

or

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

<results>

  <result>

     <level>6</level>

     <message>Asset not found:‘test2’.</message>

  </result>

</results>

or

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

<results>

  <result>

     <level>6</level>

     <message>File “TopN” has been used by another user or already exists, please update the name and save it again.</message>

  </result>

</results>

 

Result description

The response result information is xml. direct parse.

1) level return type, different values represent different return states, see Appendix.

2) message is the interface operation result information, when level is 1, it means that the saved successful message information is the saved data source information.