Áú»¢¶Ä²©

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.

graphprototype.create

³¢±ð¨ª°ù¨¢²õ

object graphprototype.create(object/array graphPrototypes)

Ez a m¨®dszer lehet?v¨¦ teszi ¨²j gr¨¢f protot¨ªpusok l¨¦trehoz¨¢s¨¢t.

Ez a m¨®dszer csak az Admin ¨¦s a Kiemelt rendszergazda sz¨¢m¨¢ra ¨¦rhet? el felhaszn¨¢l¨®i t¨ªpusok. A met¨®dus megh¨ªv¨¢s¨¢ra vonatkoz¨® enged¨¦lyek felhaszn¨¢l¨®i szerepk?rben visszavonhat¨®k be¨¢ll¨ªt¨¢sok. L¨¢sd: User roles tov¨¢bbi inform¨¢ci¨®¨¦rt.

Parameters

(object/array) Graph prototypes to create.

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

Parameter Type Description
gitems
(required)
array Graph items to be created for the graph prototypes. Graph items can reference both items and item prototypes, but at least one item prototype must be present.

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

(object) Egy objektumot ad vissza, amely tartalmazza a l¨¦trehozott gr¨¢f azonos¨ªt¨®it protot¨ªpusok a "graphids" tulajdons¨¢g alatt. A visszak¨¹ld?tt azonos¨ªt¨®k sorrendje megfelel az ¨¢tadott gr¨¢f protot¨ªpusok sorrendj¨¦nek.

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

Creating a graph prototype

Create a graph prototype with two items.

Request:

{
           "jsonrpc": "2.0",
           "method": "graphprototype.create",
           "params": {
               "name": "Disk space usage {#FSNAME}",
               "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

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

CGraphPrototype::create() in ui/include/classes/api/services/CGraphPrototype.php.