> Value map object

The following objects are directly related to the valuemap API.

Value map

The value map object has the following properties.

PropertyTypeDescription
valuemapidstring(readonly) ID of the value map.
hostid
(required)
idValue map host ID.
name
(required)
stringName of the value map.
mappings
(required)
arrayValue mappings for current value map. The mapping object is described in detail below.
uuidstringUniversal unique identifier, used for linking imported value maps to already existing ones. Used only for value maps on templates. Auto-generated, if not given.

For update operations this field is readonly.

Value mappings

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

PropertyTypeDescription
typeintegerMapping 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)
stringOriginal value.

Is not required for mapping of type “default”.
newvalue
(required)
stringValue 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”.