Get Bookmark List

<< Click to Display Table of Contents >>

Current:  System Integration > WebAPI 

Get Bookmark List

Previous pageReturn to chapter overviewNext page

Request address

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

Request message

Request parameter

required parameter : xmlData(required)

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

<info>

   <user>admin</user>

   <path>bookmark</path>

</info>

parametric description

 

Node parameter information:

1) user (required): role name.

2) path (required): complete path of the node

Sample

function checkNode() {

        var xml = getXml();

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

           {xmlData : xml},

           function(result) {

           writeXml(result);

        });

     }

Response message

 

Response results

Successful operation

Get the bookmark list of the corresponding user

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

<info>

   <result>

       <user>admin</user>

       <bookmarks>[bookmark1, bookmark2]</bookmarks>

   </result>

</info>>

 

operation failed

1) The user does not exist

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

<results>

   <result>

       <level>6</level>

       <message>User 'admin2' does not exist.</message>

   </result>

</results>

2) The report does not exist

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

<results>

   <result>

       <level>1</level>

       <message>Report 'bookmark2' does not exist.</message>

   </result>

</results>

Results description

The response result information is xml, just parse it.

1) level return type, different values represent different return status, 1 means success, 6 means failure.

2) user: query object

3) bookmarks: the bookmark list of the target report of the target user