manual:api:reference:valuemap:create

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
manual:api:reference:valuemap:create [2020/11/04 11:19]
Andrejs.Griscenko [ZBXNEXT-6148] added a note about who can call this method
manual:api:reference:valuemap:create [2021/05/05 14:13] (current)
gcalenko [ZBXNEXT-114,ZBXNEXT-6572] updated valuemap.create example
Line 28: Line 28:
     "​method":​ "​valuemap.create",​     "​method":​ "​valuemap.create",​
     "​params":​ {     "​params":​ {
 +        "​hostid":​ "​50009",​
         "​name":​ "​Service state",​         "​name":​ "​Service state",​
         "​mappings":​ [         "​mappings":​ [
             {             {
-                "value": "0", +                "type": "1",
-                "​newvalue":​ "​Down"​ +
-            }, +
-            {+
                 "​value":​ "​1",​                 "​value":​ "​1",​
                 "​newvalue":​ "​Up"​                 "​newvalue":​ "​Up"​
 +            },
 +            {
 +                "​type":​ "​5",​
 +                "​newvalue":​ "​Down"​
             }             }
         ]         ]