manual:api:reference:valuemap:update

Differences

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

Link to this comparison view

Next revision
Previous revision
manual:api:reference:valuemap:update [2015/10/20 10:43]
iivs created valuemap.update method page
manual:api:reference:valuemap:update [2021/05/05 16:54] (current)
gcalenko [ZBXNEXT-114,ZBXNEXT-6572] updated example
Line 6: Line 6:
  
 This method allows to update existing value maps. This method allows to update existing value maps.
 +
 +<​note>​This method is only available to //Super admin// user type. Permissions to call the method can be revoked in user role settings. See [[:​manual/​web_interface/​frontend_sections/​administration/​user_roles|User roles]] for more information.</​note>​
  
 ==== Parameters ==== ==== Parameters ====
Line 24: Line 26:
  
 Request: Request:
-<​code ​js>+<​code ​java>
 { {
     "​jsonrpc":​ "​2.0",​     "​jsonrpc":​ "​2.0",​
Line 38: Line 40:
  
 Response: Response:
-<​code ​js>+<​code ​java>
 { {
     "​jsonrpc":​ "​2.0",​     "​jsonrpc":​ "​2.0",​
Line 53: Line 55:
  
 Request: Request:
-<​code ​js>+<​code ​java>
 { {
     "​jsonrpc":​ "​2.0",​     "​jsonrpc":​ "​2.0",​
Line 61: Line 63:
         "​mappings":​ [         "​mappings":​ [
             {             {
 +                "​type":​ "​0",​
                 "​value":​ "​0",​                 "​value":​ "​0",​
                 "​newvalue":​ "​Online"​                 "​newvalue":​ "​Online"​
             },             },
             {             {
 +                "​type":​ "​0",​
                 "​value":​ "​1",​                 "​value":​ "​1",​
                 "​newvalue":​ "​Offline"​                 "​newvalue":​ "​Offline"​
Line 76: Line 80:
  
 Response: Response:
-<​code ​js>+<​code ​java>
 { {
     "​jsonrpc":​ "​2.0",​     "​jsonrpc":​ "​2.0",​
Line 90: Line 94:
 ==== Source ==== ==== Source ====
  
-CValueMap::​update() in //frontends/​php/​include/​classes/​api/​services/​CValueMap.php//​.+CValueMap::​update() in //ui/​include/​classes/​api/​services/​CValueMap.php//​.