Áú»¢¶Ä²©

This is the documentation page for an unsupported version of Áú»¢¶Ä²©.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.

graph.create

Description

object graph.create(object/array graphs)

This method allows to create new graphs.

This method is only available to Admin and Super admin user types. Permissions to call the method can be revoked in user role settings. See User roles for more information.

Parameters

(object/array) Graphs to create.

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

Parameter Type Description
gitems
(required)
array Graph items to be created for the graph.

Visszat¨¦r¨¦si ¨¦rt¨¦kek

(object) Egy objektumot ad vissza, amely tartalmazza a l¨¦trehozott gr¨¢fok azonos¨ªt¨®it a graphids tulajdons¨¢g alatt. A visszak¨¹ld?tt azonos¨ªt¨®k sorrendje megegyezik a az ¨¢tadott grafikonok sorrendje.

±Ê¨¦±ô»å¨¢°ì

Creating a graph

Create a graph with two items.

Request:

{
           "jsonrpc": "2.0",
           "method": "graph.create",
           "params": {
               "name": "MySQL bandwidth",
               "width": 900,
               "height": 200,
               "gitems": [
                   {
                       "itemid": "22828",
                       "color": "00AA00"
                   },
                   {
                       "itemid": "22829",
                       "color": "3333FF"
                   }
               ]
           },
           "auth": "038e1d7b1735c6a5436ee9eae095879e",
           "id": 1
       }

Response:

{
           "jsonrpc": "2.0",
           "result": {
               "graphids": [
                   "652"
               ]
           },
           "id": 1
       }

L¨¢sd m¨¦g

¹ó´Ç°ù°ù¨¢²õ

CGraph::create() az ui/include/classes/api/services/CGraph.php-ban.