object screen.create(object/array screens)
此方法允许创建新的聚合图形
(object/array)
创建聚合图形
此外 standard screen properties,此方法接受以下参数:
Parameter | Type | Description |
---|---|---|
screenitems | array | 为聚合图形创建聚合图形项 |
users | array | 聚合图形用户共享在聚合图形上创建 |
userGroups | array | 聚合图形用户组共享在聚合图形上创建 |
(object)
返回一个对象,该对象包含在screenids
属性下创建的聚合图形的id。返回的id的顺序与传递的聚合图形的顺序相匹配。
创建一个2行3列名字叫"Graphs"的聚合图形,并且在表格的左上角添加一个图形。
Request:
{
"jsonrpc": "2.0",
"method": "screen.create",
"params": {
"name": "Graphs",
"hsize": 3,
"vsize": 2,
"screenitems": [
{
"resourcetype": 0,
"resourceid": "612",
"rowspan": 1,
"colspan": 1,
"x": 0,
"y": 0
}
]
},
"auth": "038e1d7b1735c6a5436ee9eae095879e",
"id": 1
}
Response:
创建一个两种共享类型的聚合图形(用户和用户组)
Request:
{
"jsonrpc": "2.0",
"method": "screen.create",
"params": {
"name": "Screen sharing",
"hsize": 3,
"vsize": 2,
"users": [
{
"userid": "4",
"permission": "3"
}
],
"userGroups": [
{
"usrgrpid": "7",
"permission": "2"
}
]
},
"auth": "038e1d7b1735c6a5436ee9eae095879e",
"id": 1
}
Response:
CScreen::create() in frontends/php/include/classes/api/services/CScreen.php.