Delete all users, groups, roles

<< Click to Display Table of Contents >>

Current:  System Integration > WebAPI 

Delete all users, groups, roles

Previous pageReturn to chapter overviewNext page

Request address

http://ip:port/bi/api?action=delNode&type=all&token=xxxx

Request message

Request parameter

none

parametric description

none

Sample

function deleteAll() {

  var xml = getXml();

  $.post("http://" + ip + ":" + port + "/" + project + "/api?action=delNode&type=all&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>6</level>

         <message>user{admin}: The default system user cannot be deleted.</message>

 </result>

 <result>

                     <level>1</level>

         <message>group{g12}: Delete successfully.</message>

 </result>

        <results>

         <level>1</level>

         <message>user{hunk2}: Delete successfully.</message>

 </result>

 <result>

                    <level>6</level>

            <message>role{admin_role}: The default system role cannot be deleted.</message>

 </result>

 <result>

         <level>6</level>

         <message>role{developer_role}:The default system role cannot be deleted.</message>

 </result>

 <result>

                    <level>6</level>

            <message>role{everyone_role}:The default system role cannot be deleted.</message>

 </result>

 <result>

         <level>6</level>

         <message>role{groupAdmin_role}: The default system role cannot be deleted.</message>

 </result>

 <result>

         <level>1</level>

         <message>role{role1}: Delete successfully.</message>

 </result>

</results>

Note: The admin, admin_role, developer_role, everyone_role and groupAdmin_role roles in the system cannot be deleted. The above result indicates that the operation was successful.

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.