This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
manual:api:reference:map:create [2017/06/15 12:47] iivs fixed typo |
manual:api:reference:map:create [2021/01/27 20:27] (current) |
||
---|---|---|---|
Line 6: | Line 6: | ||
This method allows to create new maps. | This method allows to create new maps. | ||
+ | |||
+ | <note>This method is available to users of any type. Permissions to call the method can be revoked in user role settings. See [[:manual/web_interface/frontend_sections/administration/user_roles|User roles]] for more information.</note> | ||
==== Parameters ==== | ==== Parameters ==== | ||
Line 13: | Line 15: | ||
Additionally to the [[object#map|standard map properties]], the method accepts the following parameters. | Additionally to the [[object#map|standard map properties]], the method accepts the following parameters. | ||
- | ^ Parameter ^ Type ^ Description ^ | + | ^ Parameter ^ [[:manual/api/reference_commentary#data_types|Type]] ^ Description ^ |
- | | links | array | Map links to be created on the map. | | + | | links | array | Map [[:manual/api/reference/map/object#map_link|links]] to be created on the map. | |
- | | selements | array | Map elements to be created on the map. | | + | | selements | array | Map [[:manual/api/reference/map/object#map_element|elements]] to be created on the map. | |
- | | urls | array | Map URLs to be created on the map. | | + | | urls | array | Map [[:manual/api/reference/map/object#map_url|URLs]] to be created on the map. | |
- | | users | array | Map user shares to be created on the map. | | + | | users | array | Map [[:manual/api/reference/map/object#map_user|user]] shares to be created on the map. | |
- | | userGroups | array | Map user group shares to be created on the map. | | + | | userGroups | array | Map [[:manual/api/reference/map/object#map_user_group|user group]] shares to be created on the map. | |
- | | shapes | array | Map shapes to be created on the map. | | + | | shapes | array | Map [[:manual/api/reference/map/object#map_shapes|shapes]] to be created on the map. | |
- | | lines | array | Map lines to be created on the map. | | + | | lines | array | Map [[:manual/api/reference/map/object#map_lines|lines]] to be created on the map. | |
- | <note tip>To create map links you'll need to set a map 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.]]</note> | + | <note tip>To create map links you'll need to set a map element ''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.]]</note> |
==== Return values ==== | ==== Return values ==== | ||
Line 34: | Line 36: | ||
Request: | Request: | ||
- | <code js> | + | <code java> |
{ | { | ||
"jsonrpc": "2.0", | "jsonrpc": "2.0", | ||
Line 49: | Line 51: | ||
Response: | Response: | ||
- | <code js> | + | <code java> |
{ | { | ||
"jsonrpc": "2.0", | "jsonrpc": "2.0", | ||
Line 66: | Line 68: | ||
Request: | Request: | ||
- | <code js> | + | <code java> |
{ | { | ||
"jsonrpc": "2.0", | "jsonrpc": "2.0", | ||
Line 76: | Line 78: | ||
"selements": [ | "selements": [ | ||
{ | { | ||
+ | "selementid": "1", | ||
"elements": [ | "elements": [ | ||
{"hostid": "1033"} | {"hostid": "1033"} | ||
Line 84: | Line 87: | ||
{ | { | ||
+ | "selementid": "2", | ||
"elements": [ | "elements": [ | ||
{"hostid": "1037"} | {"hostid": "1037"} | ||
Line 104: | Line 108: | ||
Response: | Response: | ||
- | <code js> | + | <code java> |
{ | { | ||
"jsonrpc": "2.0", | "jsonrpc": "2.0", | ||
Line 121: | Line 125: | ||
Request: | Request: | ||
- | <code js> | + | <code java> |
{ | { | ||
"jsonrpc": "2.0", | "jsonrpc": "2.0", | ||
Line 146: | Line 150: | ||
Response: | Response: | ||
- | <code js> | + | <code java> |
{ | { | ||
"jsonrpc": "2.0", | "jsonrpc": "2.0", | ||
Line 163: | Line 167: | ||
Request: | Request: | ||
- | <code js> | + | <code java> |
{ | { | ||
"jsonrpc": "2.0", | "jsonrpc": "2.0", | ||
Line 190: | Line 194: | ||
Response: | Response: | ||
- | <code js> | + | <code java> |
{ | { | ||
"jsonrpc": "2.0", | "jsonrpc": "2.0", | ||
Line 207: | Line 211: | ||
Request: | Request: | ||
- | <code js> | + | <code java> |
{ | { | ||
"jsonrpc": "2.0", | "jsonrpc": "2.0", | ||
Line 232: | Line 236: | ||
Response: | Response: | ||
- | <code js> | + | <code java> |
{ | { | ||
"jsonrpc": "2.0", | "jsonrpc": "2.0", | ||
Line 249: | Line 253: | ||
Request: | Request: | ||
- | <code js> | + | <code java> |
{ | { | ||
"jsonrpc": "2.0", | "jsonrpc": "2.0", | ||
Line 275: | Line 279: | ||
Response: | Response: | ||
- | <code js> | + | <code java> |
{ | { | ||
"jsonrpc": "2.0", | "jsonrpc": "2.0", | ||
Line 299: | Line 303: | ||
==== Source ==== | ==== Source ==== | ||
- | CMap::create() in //frontends/php/include/classes/api/services/CMap.php//. | + | CMap::create() in //ui/include/classes/api/services/CMap.php//. |