Modify group

<< Click to Display Table of Contents >>

Current:  System Integration > WebAPI 

Modify group

Previous pageReturn to chapter overviewNext page

Request address

http://ip:port/bi/api?action=saveNode&type=group&token=xxxx

Request message

 

Request parameter

 

Request Parameters: xmlData(required)

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

<info>

  <ogroup>

     <name>testgroup</name>

     <parent>g1</parent>

     <roles>role1,role2</roles>

  </ogroup>

  <group>

     <name>testabc111</name>

     <parent>g2</parent>

     <roles>admin_role</roles>

  </group>

</info>

parametric description

 

The request parameter is the new group information and the original group information

1)ogroup(required):original group information. Only the name and parent parameters are in the ogroup. The name parameter is required and the parent parameter is optional.

2)group(required):new group information. The name parameter is required, and the parent and roles parameters in the group are optional.

Group attribute information is consistent with the add group interface.

Sample

 

function addGroup() {

  var xml = getXml();

  $.post("http://" + ip + ":" + port + "/" + project + "/api?action=saveNode&type=group&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 failed

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

<results>

  <result>

     <level>6</level>

     <message>Group path already exists.</message>

  </result>

</results>

or

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

<results>

  <result>

     <level>6</level>

     <message>Folder not found: g3</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.