[comment]: # translation:outdated

[comment]: # ({f53ff4b2-f53ff4b2})
# templatedashboard.get

[comment]: # ({/f53ff4b2-f53ff4b2})

[comment]: # ({ea4b34b2-ebdc9145})
### Описание

`integer/array templatedashboard.get(параметры объекта)`

Метод позволяет получить шаблоны панелей мониторинга в соответствии с заданными параметрами.

::: noteclassic
Этот метод доступен пользователям любого типа.
Разрешения на вызов метода можно отозвать в настройках ролей пользователя.
Дополнительную информацию см. в разделе [Роли пользователей](/manual/web_interface/frontend_sections/users/user_roles).
:::

[comment]: # ({/ea4b34b2-ebdc9145})

[comment]: # ({new-4ba697bd})
### Parameters

`(object)` Parameters defining the desired output.

The method supports the following parameters.

|Parameter|[Type](/manual/api/reference_commentary#data_types)|Description|
|---------|---------------------------------------------------|-----------|
|dashboardids|string/array|Return only template dashboards with the given IDs.|
|templateids|string/arary|Return only template dashboards that belong to the given templates.|
|selectPages|query|Return a [pages](/manual/api/reference/templatedashboard/object#template_dashboard_page) property with template dashboard pages, correctly ordered.|
|sortfield|string/array|Sort the result by the given properties.<br><br>Possible values are: `dashboardid` and `name`.|
|countOutput|boolean|These parameters being common for all `get` methods are described in detail in the [reference commentary](/manual/api/reference_commentary#common_get_method_parameters).|
|editable|boolean|^|
|excludeSearch|boolean|^|
|filter|object|^|
|limit|integer|^|
|output|query|^|
|preservekeys|boolean|^|
|search|object|^|
|searchByAny|boolean|^|
|searchWildcardsEnabled|boolean|^|
|sortorder|string/array|^|
|startSearch|boolean|^|

[comment]: # ({/new-4ba697bd})

[comment]: # ({7223bab1-7223bab1})
### Возвращаемые значения

`(целое число/массив)` Возвращает либо:

- · массив объектов;
- · количество извлеченных объектов, если использовался параметр `countOutput`.

[comment]: # ({/7223bab1-7223bab1})

[comment]: # ({b41637d2-b41637d2})
### Примеры

[comment]: # ({/b41637d2-b41637d2})

[comment]: # ({new-62e5fb34})
#### Retrieving template dashboards

Retrieve all template dashboards with widgets for a specified template.

Request:

``` {.java}
{
    "jsonrpc": "2.0",
    "method": "templatedashboard.get",
    "params": {
        "output": "extend",
        "selectPages": "extend",
        "templateids": "10001"
    },
    "auth": "038e1d7b1735c6a5436ee9eae095879e",
    "id": 1
}
```

Response:

``` {.java}
{
    "jsonrpc": "2.0",
    "result": [
        {
            "dashboardid": "23",
            "name": "Docker overview",
            "templateid": "10001",
            "display_period": "30",
            "auto_start": "1",
            "uuid": "6dfcbe0bc5ad400ea9c1c2dd7649282f",
            "pages": [
                {
                    "dashboard_pageid": "1",
                    "name": "",
                    "display_period": "0",
                    "widgets": [
                        {
                            "widgetid": "220",
                            "type": "graph",
                            "name": "",
                            "x": "0",
                            "y": "0",
                            "width": "12",
                            "height": "5",
                            "view_mode": "0",
                            "fields": [
                                {
                                    "type": "6",
                                    "name": "graphid",
                                    "value": "1125"
                                }
                            ]
                        },
                        {
                            "widgetid": "221",
                            "type": "graph",
                            "name": "",
                            "x": "12",
                            "y": "0",
                            "width": "12",
                            "height": "5",
                            "view_mode": "0",
                            "fields": [
                                {
                                    "type": "6",
                                    "name": "graphid",
                                    "value": "1129"
                                }
                            ]
                        },
                        {
                            "widgetid": "222",
                            "type": "graph",
                            "name": "",
                            "x": "0",
                            "y": "5",
                            "width": "12",
                            "height": "5",
                            "view_mode": "0",
                            "fields": [
                                {
                                    "type": "6",
                                    "name": "graphid",
                                    "value": "1128"
                                }
                            ]
                        },
                        {
                            "widgetid": "223",
                            "type": "graph",
                            "name": "",
                            "x": "12",
                            "y": "5",
                            "width": "12",
                            "height": "5",
                            "view_mode": "0",
                            "fields": [
                                {
                                    "type": "6",
                                    "name": "graphid",
                                    "value": "1126"
                                }
                            ]
                        },
                        {
                            "widgetid": "224",
                            "type": "graph",
                            "name": "",
                            "x": "0",
                            "y": "10",
                            "width": "12",
                            "height": "5",
                            "view_mode": "0",
                            "fields": [
                                {
                                    "type": "6",
                                    "name": "graphid",
                                    "value": "1127"
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    ],
    "id": 1
}
```

[comment]: # ({/new-62e5fb34})

[comment]: # ({new-1171cc63})
### See also

-   [Template dashboard page](object#template_dashboard_page)
-   [Template dashboard widget](object#template_dashboard_widget)
-   [Template dashboard widget
    field](object#template_dashboard_widget_field)

[comment]: # ({/new-1171cc63})

[comment]: # ({ddadb6a1-ddadb6a1})
### Источник

CTemplateDashboard::get() в
*ui/include/classes/api/services/CTemplateDashboard.php*.

[comment]: # ({/ddadb6a1-ddadb6a1})
