integer/array dashboard.get(object parameters)
El método permite recuperar tableros de acuerdo con los parámetros suministrados.
Este método está disponible para usuarios de cualquier tipo. Los permisos para llamar al método se pueden revocar en la configuración de roles de usuario. Ver Roles de usuario para más información.
(objeto)
Parámetros que definen la salida deseada.
El método admite los siguientes parámetros.
Parámetro | Tipo | Descripción |
---|---|---|
dashboardids | string/array | Devuelve solo tableros con los ID proporcionados. |
selectPages | query | Devuelve una propiedad pages con las páginas del tablero, correctamente ordenadas. |
selectUsers | query | Devuelve una propiedad users con los usuarios con los que se comparte el tablero. |
selectUserGroups | query | Devuelve una propiedad userGroups con los grupos de usuarios con los que se comparte el tablero. |
sortfield | string/array | Ordena el resultado según las propiedades dadas. El valor posible es: dashboardid . |
countOutput | boolean | Estos parámetros, que son comunes para todos los métodos get , se describen en detalle en la página comentario de referencia. |
editable | booleano | |
excludeSearch | booleano | |
filter | objeto | |
limit | entero | |
output | consulta | |
preservekeys | booleano | |
search | objeto | |
searchByAny | booleano | |
searchWildcardsEnabled | booleano | |
sortorder | cadena/matriz | |
startSearch | booleano |
(entero/matriz)
Devuelve:
countOutput
ha sido usado.Recupere todos los datos sobre los tableros "1" y "2".
Solicitud:
{
"jsonrpc": "2.0",
"method": "dashboard.get",
"params": {
"output": "extend",
"selectPages": "extend",
"selectUsers": "extend",
"selectUserGroups": "extend",
"dashboardids": [
"1",
"2"
]
},
"auth": "038e1d7b1735c6a5436ee9eae095879e",
"id": 1
}
Respuesta:
{
"jsonrpc": "2.0",
"result": [
{
"dashboardid": "1",
"name": "Dashboard",
"userid": "1",
"private": "0",
"display_period": "30",
"auto_start": "1",
"users": [],
"userGroups": [],
"pages": [
{
"dashboard_pageid": "1",
"name": "",
"display_period": "0",
"widgets": [
{
"widgetid": "9",
"type": "systeminfo",
"name": "",
"x": "12",
"y": "8",
"width": "12",
"height": "5",
"view_mode": "0",
"fields": []
},
{
"widgetid": "8",
"type": "problemsbysv",
"name": "",
"x": "12",
"y": "4",
"width": "12",
"height": "4",
"view_mode": "0",
"fields": []
},
{
"widgetid": "7",
"type": "problemhosts",
"name": "",
"x": "12",
"y": "0",
"width": "12",
"height": "4",
"view_mode": "0",
"fields": []
},
{
"widgetid": "6",
"type": "discovery",
"name": "",
"x": "6",
"y": "9",
"width": "6",
"height": "4",
"view_mode": "0",
"fields": []
},
{
"widgetid": "5",
"type": "web",
"name": "",
"x": "0",
"y": "9",
"width": "6",
"height": "4",
"view_mode": "0",
"fields": []
},
{
"widgetid": "4",
"type": "problems",
"name": "",
"x": "0",
"y": "3",
"width": "12",
"height": "6",
"view_mode": "0",
"fields": []
},
{
"widgetid": "3",
"type": "favmaps",
"name": "",
"x": "8",
"y": "0",
"width": "4",
"height": "3",
"view_mode": "0",
"fields": []
},
{
"widgetid": "1",
"type": "favgraphs",
"name": "",
"x": "0",
"y": "0",
"width": "4",
"height": "3",
"view_mode": "0",
"fields": []
}
]
},
{
"dashboard_pageid": "2",
"name": "",
"display_period": "0",
"widgets": []
},
{
"dashboard_pageid": "3",
"name": "Custom page name",
"display_period": "60",
"widgets": []
}
]
},
{
"dashboardid": "2",
"name": "My dashboard",
"userid": "1",
"private": "1",
"display_period": "60",
"auto_start": "1",
"users": [
{
"userid": "4",
"permission": "3"
}
],
"userGroups": [
{
"usrgrpid": "7",
"permission": "2"
}
],
"pages": [
{
"dashboard_pageid": "4",
"name": "",
"display_period": "0",
"widgets": [
{
"widgetid": "10",
"type": "problems",
"name": "",
"x": "0",
"y": "0",
"width": "12",
"height": "5",
"view_mode": "0",
"fields": [
{
"type": "2",
"name": "groupids",
"value": "4"
}
]
}
]
}
]
}
],
"id": 1
}
CDashboard::get() en ui/include/classes/api/services/CDashboard.php.