Zabbix Documentation 2.4

3.04.05.0 (current)| In development:5.2 (devel)| Unsupported:1.82.02.22.43.23.44.24.4Guidelines

User Tools

Site Tools


manual:api:reference:map:update

Differences

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

Link to this comparison view

manual:api:reference:map:update [2020/05/05 11:33]
manual:api:reference:map:update [2019/01/28 14:49] (current)
sasha <code js> => <code java>
Line 1: Line 1:
 +===== map.update =====
  
 +==== Description ====
 +
 +''​object map.update(object/​array **maps**)''​
 +
 +This method allows to update existing maps.
 +
 +==== Parameters ====
 +
 +''​(object/​array)''​ Map properties to be updated.
 +
 +The ''​mapid''​ property must be defined for each map, all other properties are optional. Only the passed properties will be updated, all others will remain unchanged.
 +
 +Additionally to the [[object#​map|standard map properties]],​ the method accepts the following parameters.
 +
 +^ Parameter ^ Type ^ Description ^
 +| links | array | Map liks to replace the existing links. |
 +| selements | array | Map elements to replace the existing elements. |
 +| urls | array | Map URLs to replace the existing URLs. |
 +
 +<note tip>To create map links between new map elements you'll need to set an elements ''​selementid''​ to an arbitrary value and then use this value to reference this element in the links ''​selementid1''​ or ''​selementid2''​ properties. When the element is created, this value will be replaced with the correct ID generated by Zabbix. [[create#​create_a_host_map|See example for map.create.]]</​note>​
 +
 +==== Return values ====
 +
 +''​(object)''​ Returns an object containing the IDs of the updated maps under the ''​sysmapids''​ property.
 +
 +==== Examples ====
 +
 +=== Resize a map ===
 +
 +Change the size of the map to 1200x1200 pixels.
 +
 +Request:
 +<code java>
 +{
 +    "​jsonrpc":​ "​2.0",​
 +    "​method":​ "​map.update",​
 +    "​params":​ {
 +        "​sysmapid":​ "​8",​
 +        "​width":​ 1200,
 +        "​height":​ 1200
 +    },
 +    "​auth":​ "​038e1d7b1735c6a5436ee9eae095879e",​
 +    "​id":​ 1
 +}
 +</​code>​
 +
 +Response:
 +<code java>
 +{
 +    "​jsonrpc":​ "​2.0",​
 +    "​result":​ {
 +        "​sysmapids":​ [
 +            "​8"​
 +        ]
 +    },
 +    "​id":​ 1
 +}
 +</​code>​
 +
 +==== See also ====
 +
 +  * [[object#​map_element|Map element]]
 +  * [[object#​map_link|Map link]]
 +  * [[object#​map_url|Map URL]]
 +
 +==== Source ====
 +
 +CMap::​update() in //​frontends/​php/​include/​classes/​api/​services/​CMap.php//​.