Add Dataset Folder and Connection Folder

<< Click to Display Table of Contents >>

Current:  System Integration > WebAPI 

Add Dataset Folder and Connection Folder

Previous pageReturn to chapter overviewNext page

Request address

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

Request message

Request parameter

required parameter:xmlData (required)

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

<info>

  <path>test</path>

  <type>queryfolder</type>

</info>

parametric description

Parameter is node information :

1) Path (required): the path to the dataset folder or connection folder.

2) Type (required): the type of the added dataset folder or connection folder, which does not need to be modified. Note: type supports two types of data set folder and connection folder: queryfolder and connectionfolder.

Sample

function addQueryFolder() {

        var xml = getXml();

        $.post("http://" + ip + ":" + port + "/" + project + "/api?action=addDBFolder&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> Add 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:“test1”.</message>

  </result>

</results>

Result description