graphprototype.update

説明

object graphprototype.update(object/array graphPrototypes)

この方法により、既存の graph prototypes を更新することができる。

このメソッドは、Admin および Super admin ユーザータイプにのみ使用できます。このメソッドを呼び出す許可は、ユーザーロール設定で
取り消すことができます。
詳細については、User rolesを参照してください。

パラメータ

(object/array) 更新する Graph prototype プロパティ

graph prototype ごとに graphid プロパティを定義する必要がある。他のプロパティはすべてオプションである。
渡されたプロパティのみが更新され、他のプロパティは変更されません。

standard graph prototype properties に加えて、このメソッドは以下のパラメータを受け付けます。

パラメータ Type 説明
gitems array Graph items to replace existing graph items. If a graph item has the gitemid property defined it will be updated, otherwise a new graph item will be created.

戻り値

(object) graphids プロパティの下で更新された graph prototypes の ID を含むオブジェクトを返します。

graph prototype のサイズを変更する

graph prototype のサイズを 1100 から 400 ピクセルに変更します。

Request:

{
    "jsonrpc": "2.0",
    "method": "graphprototype.update",
    "params": {
        "graphid": "439",
        "width": 1100,
        "height": 400
    },
    "auth": "038e1d7b1735c6a5436ee9eae095879e",
    "id": 1
}

Response:

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

ソース

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