Zabbix Documentation 5.2

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:templatescreen:create

Differences

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

Link to this comparison view

Next revision
Previous revision
manual:api:reference:templatescreen:create [2014/09/25 14:43]
sasha Page moved from 2.4:manual:api:reference:templatescreen:create to manual:api:reference:templatescreen:create
manual:api:reference:templatescreen:create [2020/02/13 09:13]
Line 1: Line 1:
-===== templatescreen.create ===== 
  
-==== Description ==== 
- 
-''​object templatescreen.create(object/​array **templateScreens**)''​ 
- 
-This method allows to create new template screens. 
- 
-==== Parameters ==== 
- 
-''​(object/​array)''​ Template screens to create. 
- 
-Additionally to the [[2.4:​manual:​api:​reference:​templatescreen:​object#​template_screen|standard template screen properties]],​ the method accepts the following parameters. 
- 
-^ Parameter ^ Type ^ Description ^ 
-| **screenitems** | array | Template screen items to create on the screen. | 
- 
-==== Return values ==== 
- 
-''​(object)''​ Returns an object containing the IDs of the created template screens under the ''​screenids''​ property. The order of the returned IDs matches the order of the passed template screens. 
- 
-==== Examples ==== 
- 
-=== Create a template screen === 
- 
-Create a template screen named “Graphs” with 2 rows and 3 columns and add a graph to the upper-left cell. 
- 
-Request: 
-<code js> 
-{ 
-    "​jsonrpc":​ "​2.0",​ 
-    "​method":​ "​templatescreen.create",​ 
-    "​params":​ { 
-        "​name":​ "​Graphs",​ 
-        "​templateid":​ "​10047",​ 
-        "​hsize":​ 3, 
-        "​vsize":​ 2, 
-        "​screenitems":​ [ 
-            { 
-                "​resourcetype":​ 0, 
-                "​resourceid":​ "​410",​ 
-                "​x":​ 0, 
-                "​y":​ 0 
-            } 
-        ] 
-    }, 
-    "​auth":​ "​038e1d7b1735c6a5436ee9eae095879e",​ 
-    "​id":​ 1 
-} 
-</​code>​ 
- 
-Response: 
-<code js> 
-{ 
-    "​jsonrpc":​ "​2.0",​ 
-    "​result":​ { 
-        "​screenids":​ [ 
-            "​45"​ 
-        ] 
-    }, 
-    "​id":​ 1 
-} 
-</​code>​ 
- 
-==== See also ==== 
- 
-  * [[2.4:​manual:​api:​reference:​templatescreenitem:​object#​template_screen_item|Template screen item]] 
- 
-==== Source ==== 
- 
-CTemplateScreen::​create() in //​frontends/​php/​api/​classes/​CTemplateScreen.php//​.