You are viewing documentation for the development version, it may be incomplete.
Join our translation project and help translate Zabbix documentation into your native language.

userdirectory.delete

説明

object userdirectory.delete(array userDirectoryIds)

このメソッドを使用すると、ユーザー ディレクトリを削除できます。ユーザーディレクトリが1つでもユーザーグループに直接使用されている場合は、削除できません。
authentication.ldap_configuredが 1 に設定されている場合、またはユーザーディレクトリがまだ残っている場合、デフォルトのLDAPユーザーディレクトリは削除できません。

このメソッドが使用できるのは、Super adminユーザータイプのみです。

パラメータ

(array) 削除するユーザーディレクトリのID。

戻り値

(object) userdirectoryidsプロパティの下にある削除されたユーザーディレクトリのIDを含むオブジェクトを返します。

複数のユーザーディレクトリの削除

2つのユーザーディレクトリを削除します。

リクエスト :

{
           "jsonrpc": "2.0",
           "method": "userdirectory.delete",
           "params": [
               "2",
               "12"
           ],
           "id": 1
       }

レスポンス :

{
           "jsonrpc": "2.0",
           "result": {
               "userdirectoryids": [
                   "2",
                   "12"
               ]
           },
           "id": 1
       }

ソース

CUserDirectory::delete() in ui/include/classes/api/services/CUserDirectory.php.