This method allows to create new maps.

    Parameters

    (object/array) Maps to create.

    Additionally to the standard map properties, the method accepts the following parameters.

    To create map links you'll need to set a map elements to an arbitrary value and then use this value to reference this element in the links selementid1 or properties. When the element is created, this value will be replaced with the correct ID generated by Zabbix.

    (object) Returns an object containing the IDs of the created maps under the property. The order of the returned IDs matches the order of the passed maps.

    Examples

    Create an empty map

    Create a map with no elements.

    Response:

    1. {
    2. "jsonrpc": "2.0",
    3. "result": {
    4. "sysmapids": [
    5. ]
    6. },
    7. "id": 1
    8. }

    Create a host map

    Create a map with two host elements and a link between them. Note the use of temporary “selementid1” and “selementid2” values in the map link object to refer to map elements.

    Request:

    Response:

    1. {
    2. "jsonrpc": "2.0",
    3. "result": {
    4. "sysmapids": [
    5. "9"
    6. ]
    7. },
    8. "id": 1
    9. }

    Map sharing

    Create a map with two types of sharing (user and user group).

    Request:

    1. "jsonrpc": "2.0",
    2. "result": {
    3. "sysmapids": [
    4. "9"
    5. ]
    6. },
    7. "id": 1
    8. }

    Source

    CMap::create() in frontends/php/include/classes/api/services/CMap.php.