graph.update

説明

object graph.update(object/array graphs)

この方法によって、既存のグラフを更新することができます。

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

パラメータ

(object/array) 更新されるグラフのプロパティ

各グラフには graphid プロパティを定義する必要があり、その他のプロパティは任意である。渡されたプロパティのみが
更新され、その他のプロパティは変更されません。

standard graph 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 プロパティの下で更新されたグラフのIDを含むオブジェクトを返す。

Y スケールの最大値を設定する

Yスケールの最大値を固定値100に設定します。

Request:

{
    "jsonrpc": "2.0",
    "method": "graph.update",
    "params": {
        "graphid": "439",
        "ymax_type": 1,
        "yaxismax": 100
    },
    "auth": "038e1d7b1735c6a5436ee9eae095879e",
    "id": 1
}

Response:

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

ソース

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