Esta es una traducción de la página de documentación original en español. Ayúdanos a mejorarla.

map.update

Descripción

object map.update(object/array maps)

Este método permite actualizar mapas existentes.

Este método está disponible para usuarios de cualquier tipo. Los permisos pata llamar al método se pueden revocar en la configuración de roles de usuario. Ver Roles de usuario para más información.

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 standard map properties, the method accepts the following parameters.

Parameter Type Description
links array Map links to replace the existing links.
selements array Map elements to replace the existing elements.
urls array Map URLs to replace the existing URLs.
users array Map user shares to replace the existing elements.
userGroups array Map user group shares to replace the existing elements.
shapes array Map shapes to replace the existing shapes.
lines array Map lines to replace the existing lines.

To create map links between new map elements you'll need to set an element's 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. See example for map.create.

Valores de retorno

(objeto) Devuelve un objeto que contiene los ID de los mapas actualizados bajo la propiedad sysmapids.

Ejemplos

Resize a map

Change the size of the map to 1200x1200 pixels.

Request:

{
           "jsonrpc": "2.0",
           "method": "map.update",
           "params": {
               "sysmapid": "8",
               "width": 1200,
               "height": 1200
           },
           "auth": "038e1d7b1735c6a5436ee9eae095879e",
           "id": 1
       }

Response:

{
           "jsonrpc": "2.0",
           "result": {
               "sysmapids": [
                   "8"
               ]
           },
           "id": 1
       }

Change map owner

Available only for admins and super admins.

Request:

{
           "jsonrpc": "2.0",
           "method": "map.update",
           "params": {
               "sysmapid": "9",
               "userid": "1"
           },
           "auth": "038e1d7b1735c6a5436ee9eae095879e",
           "id": 2
       }

Response:

{
           "jsonrpc": "2.0",
           "result": {
               "sysmapids": [
                   "9"
               ]
           },
           "id": 2
       }

Ver también

Fuente

CMap::update() en ui/include/classes/api/services/CMap.php.