> Value map object

The following objects are directly related to the valuemap API.

Value map

The value map object has the following properties.

Property Type Description
valuemapid string (readonly) ID of the value map.
hostid
(required)
id Value map host or template ID.
name
(required)
string Name of the value map.
mappings
(required)
array Value mappings for current value map. The mapping object is described in detail below.
uuid string Universal unique identifier, used for linking imported value maps to already existing ones. Used only for value maps on templates. Auto-generated, if not given.

Note that for some methods (update, delete) the required/optional parameter combination is different.

Value mappings

The value mappings object defines value mappings of the value map. It has the following properties.

Property Type Description
type integer Mapping match type. For type equal 0,1,2,3,4 value field cannot be empty, for type 5 value field should be empty.

Possible values:
0 - (default) exact match ;
1 - mapping will be applied if value is greater or equal1;
2 - mapping will be applied if value is less or equal1;
3 - mapping will be applied if value is in range (ranges are inclusive), allow to define multiple ranges separated by comma character1;
4 - mapping will be applied if value match regular expression2;
5 - default value, mapping will be applied if no other match were found.
value
(required)
string Original value.

Is not required for mapping of type "default".
newvalue
(required)
string Value to which the original value is mapped to.

1 supported only for items having value type "numeric unsigned", "numeric float".
2 supported only for items having value type "character".