Áú»¢¶Ä²©

This is the documentation page for an unsupported version of Áú»¢¶Ä²©.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.

dashboard.get

Description

integer/array dashboard.get(object parameters)

La m¨¦thode permet de r¨¦cup¨¦rer des tableaux de bord en fonction des param¨¨tres donn¨¦s.

±Ê²¹°ù²¹³¾¨¨³Ù°ù±ð²õ

(object) ±Ê²¹°ù²¹³¾¨¨³Ù°ù±ð²õ d¨¦finissant la sortie souhait¨¦e.

La m¨¦thode prend en charge les param¨¨tres suivants.

±Ê²¹°ù²¹³¾¨¨³Ù°ù±ð Type Description
dashboardids cha?ne/tableau Renvoie uniquement les tableaux de bord avec les identifiants donn¨¦s.
selectWidgets °ù±ð±ç³Ü¨º³Ù±ð Renvoie les widgets de tableau de bord utilis¨¦s dans le tableau de bord avec la propri¨¦t¨¦ widgets.
selectUsers °ù±ð±ç³Ü¨º³Ù±ð Renvoie les utilisateurs avec lesquels le tableau de bord est partag¨¦ dans la propri¨¦t¨¦ users.
selectUserGroups °ù±ð±ç³Ü¨º³Ù±ð Renvoie les groupes d'utilisateurs avec lesquels le tableau de bord est partag¨¦ dans la propri¨¦t¨¦ userGroups.
sortfield cha?ne/tableau Trie le r¨¦sultat en fonction des propri¨¦t¨¦s donn¨¦es.

La valeur possible est : dashboardid.
countOutput ²ú´Ç´Ç±ô¨¦±ð²Ô Ces param¨¨tres communs ¨¤ toutes les m¨¦thodes get sont d¨¦crits en d¨¦tail dans la page de commentaire de r¨¦f¨¦rence.
editable ²ú´Ç´Ç±ô¨¦±ð²Ô
excludeSearch ²ú´Ç´Ç±ô¨¦±ð²Ô
filter object
limit entier
output °ù±ð±ç³Ü¨º³Ù±ð
preservekeys ²ú´Ç´Ç±ô¨¦±ð²Ô
search object
searchByAny ²ú´Ç´Ç±ô¨¦±ð²Ô
searchWildcardsEnabled ²ú´Ç´Ç±ô¨¦±ð²Ô
sortorder cha?ne/tableau
startSearch ²ú´Ç´Ç±ô¨¦±ð²Ô

Valeurs de retour

(entier/tableau) Retourne soit :

  • un tableau d'objets ;
  • le nombre d'objets r¨¦cup¨¦r¨¦s, si le param¨¨tre countOutput a ¨¦t¨¦ utilis¨¦.

Exemples

R¨¦cup¨¦ration d'un tableau de bord par ID

R¨¦cup¨¦rer toutes les donn¨¦es sur les tableaux de bord "1" et "2".

Requ¨ºte :

{
           "jsonrpc": "2.0",
           "method": "dashboard.get",
           "params": {
               "output": "extend",
               "selectWidgets": "extend",
               "selectUsers": "extend",
               "selectUserGroups": "extend",
               "dashboardids": [
                   "1",
                   "2"
               ]
           },
           "auth": "038e1d7b1735c6a5436ee9eae095879e",
           "id": 1
       }

R¨¦ponse :

{
           "jsonrpc": "2.0",
           "result": [
               {
                   "dashboardid": "1",
                   "name": "Dashboard",
                   "userid": "1",
                   "private": "0",
                   "users": [],
                   "userGroups": [],
                   "widgets": [
                       {
                           "widgetid": "9",
                           "type": "systeminfo",
                           "name": "",
                           "x": "6",
                           "y": "8",
                           "width": "6",
                           "height": "5",
                           "fields": []
                       },
                       {
                           "widgetid": "8",
                           "type": "problemsbysv",
                           "name": "",
                           "x": "6",
                           "y": "4",
                           "width": "6",
                           "height": "4",
                           "fields": []
                       },
                       {
                           "widgetid": "7",
                           "type": "problemhosts",
                           "name": "",
                           "x": "6",
                           "y": "0",
                           "width": "6",
                           "height": "4",
                           "fields": []
                       },
                       {
                           "widgetid": "6",
                           "type": "discovery",
                           "name": "",
                           "x": "3",
                           "y": "9",
                           "width": "3",
                           "height": "4",
                           "fields": []
                       },
                       {
                           "widgetid": "5",
                           "type": "web",
                           "name": "",
                           "x": "0",
                           "y": "9",
                           "width": "3",
                           "height": "4",
                           "fields": []
                       },
                       {
                           "widgetid": "4",
                           "type": "problems",
                           "name": "",
                           "x": "0",
                           "y": "3",
                           "width": "6",
                           "height": "6",
                           "fields": []
                       },
                       {
                           "widgetid": "3",
                           "type": "favmaps",
                           "name": "",
                           "x": "4",
                           "y": "0",
                           "width": "2",
                           "height": "3",
                           "fields": []
                       },
                       {
                           "widgetid": "2",
                           "type": "favscreens",
                           "name": "",
                           "x": "2",
                           "y": "0",
                           "width": "2",
                           "height": "3",
                           "fields": []
                       },
                       {
                           "widgetid": "1",
                           "type": "favgraphs",
                           "name": "",
                           "x": "0",
                           "y": "0",
                           "width": "2",
                           "height": "3",
                           "fields": []
                       }
                   ]
               },
               {
                   "dashboardid": "2",
                   "name": "My dashboard",
                   "userid": "1",
                   "private": "1",
                   "users": [
                       {
                           "userid": "4",
                           "permission": "3"
                       }
                   ],
                   "userGroups": [
                       {
                           "usrgrpid": "7",
                           "permission": "2"
                       }
                   ],
                   "widgets": [
                       {
                           "widgetid": "10",
                           "type": "problems",
                           "name": "",
                           "x": "0",
                           "y": "0",
                           "width": "6",
                           "height": "5",
                           "fields": [
                               {
                                   "type": "2",
                                   "name": "groupids",
                                   "value": "4"
                               }
                           ]
                       }
                   ]
               }
           ],
           "id": 1
       }

Voir aussi

Source

CDashboard::get() dans frontends/php/include/classes/api/services/CDashboard.php.