Zabbix Documentation 1.8

3.04.04.4 (current)| In development:5.0 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


api:user:delete

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

api:user:delete [2014/09/25 14:40] (current)
sasha Page moved from 1.8:api:user:delete to api:user:delete
Line 1: Line 1:
 +===== delete() =====
 +Available since version: **1.8**\\
 +This function allows you to delete information about one or several users. All user-related information will be removed. Method available only to super admins.
  
 +==== Parameters ====
 +Array of User IDs
 +
 +==== Returns ====
 +^Parameter^Description^
 +|**result**|Operation successful. Result will contain array of deleted User IDs.|
 +|**error**|In case of any errors|
 +
 +==== Example ====
 +Delete users by User **ID**
 +<​code>​
 +{
 +"​jsonrpc":"​2.0",​
 +"​method":"​user.delete",​
 +"​params":​[
 +      {
 +         "​userid":"​107824"​
 +      },
 +      {
 +         "​userid":"​107825"​
 +      }
 +],
 +"​auth":"​3a57200802b24cda67c4e4010b50c065",​
 +"​id":​2
 +}
 +</​code>​
 +  ​
 +Users deleted successfully:​
 +
 +<​code>​
 +{
 +"​jsonrpc":"​2.0",​
 +"​result":​{
 +   "​userids":​ ["​107824",​ "​107825"​]
 +},
 +"​id":​2
 +}
 +</​code>​
 +User does not exist:
 +
 +<​code>​
 +{
 +"​jsonrpc":"​2.0",​
 +"​error":​{
 +      "​code":​-32500,​
 +      "​message":"​Application error.",​
 +      "​data":"​[ CUser::​delete ] User does not exist"
 +},
 +"​id":​2
 +}
 +</​code>​