This is a translation of the original English documentation page. Help us make it better.

userdirectory.update

Descrizione

"oggetto userdirectory.update(object/array userDirectory)".

Questo metodo consente di aggiornare le directory utente esistenti.

Questo metodo è disponibile solo per il tipo di utente Super amministratore.

Parameters

(object/array) User directory properties to be updated.

The userdirectoryid property must be defined for each user directory, all other properties are optional.
Only the passed properties will be updated, all others will remain unchanged.

Valori restituiti

"(object)" Restituisce un oggetto contenente gli ID delle directory utente aggiornate nella proprietà "userdirectoryids".

Esempi

Update bind password for user directory

Set new bind password for a user directory.

Request:

{
           "jsonrpc": "2.0",
           "method": "userdirectory.update",
           "params": {
               "userdirectory": "2",
               "bind_password": "newldappassword"
           },
           "auth": "038e1d7b1735c6a5436ee9eae095879e",
           "id": 1
       }

Response:

{
           "jsonrpc": "2.0",
           "result": {
               "userdirectoryids": [
                   "2"
               ]
           },
           "id": 1
       }
Update mappings for user directory

Update provisioning groups mappings and media type mappings for user directory "2".

Request:

{
           "jsonrpc": "2.0",
           "method": "userdirectory.update",
           "params": {
               "userdirectoryid": "2",
               "provision_media": [
                       {
                           "name": "example.com",
                           "mediatypeid": "1",
                           "attribute": "[email protected]"
                       }
                   ],
                   "provision_groups": [
                       {
                           "name": "Zabbix administrators",
                           "roleid": "2",
                           "user_groups": [
                               {
                                   "usrgrpid": "7"
                               },
                               {
                                   "usrgrpid": "8"
                               },
                               {
                                   "usrgrpid": "11"
                               }
                           ]
                       }
                   ]
           },
           "id": 1
       }

Response:

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

Fonte

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