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.
(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. |
(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.
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:
CGraphPrototype::create() in ui/include/classes/api/services/CGraphPrototype.php.