<< Click to Display Table of Contents >> Copy and Paste Dashboard/Data Set/Connection |
![]() ![]() ![]() |
Version: 9.1
Request address |
http://ip:port/bi/api?action=copyAndPaste&token=xxxx |
|
Request message |
Request parameter |
required parameter:xmlData (required) <?xml version="1.0" encoding="UTF-8"?> <info> <ref> <path>test</path> <type>sql</type> </ref> <newPath>Test folder/test</newPath> </info |
parametric description |
1) path (required): the path of the node to be copied. 2) type (required): the type of node to be copied, including data source, data set, and report. 3) newPath (required): the new path of the node. Description: 1) The new path of the node must exist. 2) If the resource of the target path already exists, rename it: original name_copy. |
|
Sample |
function copyAndPaste() { var xml = getXml(); $.post("http://" + ip + ":" + port + "/" + project + "/api?action=copyAndPaste&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>Test folder/test</message> </result> </results>> 2) Operation failed <?xml version="1.0" encoding="UTF-8"?> <results> <result> <level>6</level> The <message> folder "Test folder" could not be found. </message> </result> </results> or <?xml version="1.0" encoding="UTF-8"?> <results> <result> <level>6</level> <message>The resource "test" does not exist. </message> </result> </results> |
Result description |
The response result information is xml. direct parse. 1) Level return type, different values represent different return status, see appendix. 2) Message is the interface operation result information. |