[comment]: # translation:outdated

[comment]: # ({new-49270b24})
# 13 Host card

[comment]: # ({/new-49270b24})

[comment]: # ({new-dbef1114})
### Description

These parameters and the possible property values for the respective dashboard widget field objects allow to configure
the [*Host card*](/manual/web_interface/frontend_sections/dashboards/widgets/host_card) widget in `dashboard.create` and `dashboard.update` methods.

::: noteimportant
Widget `fields` properties are not validated during the creation or update of a dashboard.
This allows users to modify [built-in widgets](/manual/web_interface/frontend_sections/dashboards/widgets) and create [custom widgets](/devel/modules/tutorials/widget), but also introduces the risk of creating or updating widgets incorrectly.
To ensure the successful creation or update of the *Host card* widget, please refer to the parameter behavior outlined in the tables below.
:::

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

[comment]: # ({new-7ad965d8})
### Parameters

The following parameters are supported for the *Host card* widget.

|Parameter|<|[type](/manual/api/reference/dashboard/object#dashboard-widget-field)|name|value|
|-|--------|--|--------|-------------------------------|
|*Refresh interval*|<|0|rf_rate|0 - No refresh;<br>10 - 10 seconds;<br>30 - 30 seconds;<br>60 - *(default)* 1 minute;<br>120 - 2 minutes;<br>600 - 10 minutes;<br>900 - 15 minutes.|
|*Host*|<|3|hostid.0|[Host](/manual/api/reference/host/get) ID.<br><br>[Parameter behavior](/manual/api/reference_commentary#parameter-behavior):<br>- *required* if *Host (Widget/Dashboard)* is not set<br><br>This parameter is not supported if configuring the widget on a [template dashboard](/manual/api/reference/templatedashboard/object).|
|<|*Host (Widget/Dashboard)*|1|hostid.\_reference|Instead of [Host](/manual/api/reference/host/get) ID:<br>`DASHBOARD.hostid` - set the [*Host* selector](/manual/web_interface/frontend_sections/dashboards/widgets#override-host) as the data source for host;<br>`ABCDE._hostid` - set a [compatible widget](/manual/web_interface/frontend_sections/dashboards/widgets#widget-compatibility) (with its *Reference* parameter set to "`ABCDE`") as the data source for host.<br><br>[Parameter behavior](/manual/api/reference_commentary#parameter-behavior):<br>- *required* if *Host* is not set<br><br>This parameter is not supported if configuring the widget on a [template dashboard](/manual/api/reference/templatedashboard/object).|
|*Show suppressed problems*|<|0|show_suppressed|0 - *(default)* Disabled;<br>1 - Enabled.|
|*Show*|<|0|sections.0|0 - Host groups;<br>1 - Description;<br>2 - Monitoring;<br>3 - Availability;<br>4 - Monitored by;<br>5 - Templates;<br>6 - Inventory;<br>7 - Tags.<br><br>Note: The number in the property name references section order in the section list. To configure multiple sections, create a dashboard widget field object for each section with an incremented number in the property name.|

The following parameters are supported if *Show* is set to "Inventory".

|Parameter|[type](/manual/api/reference/dashboard/object#dashboard-widget-field)|name|value|
|-----|-|-----|-------------------|
|*Inventory fields*|0|inventory.0|[Inventory](/manual/api/reference/host/object#host-inventory) ID.<br><br>Note: To configure multiple inventory fields, create a dashboard widget field object for each inventory field with an incremented number in the property name.|

[comment]: # ({/new-7ad965d8})

[comment]: # ({new-9735261c})
### Examples

The following examples aim to only describe the configuration of the dashboard widget field objects for the *Host card* widget.
For more information on configuring a dashboard, see [`dashboard.create`](/manual/api/reference/dashboard/create).

[comment]: # ({/new-9735261c})

[comment]: # ({new-095f7dfe})
#### Configuring a *Host card* widget

Configure a *Host card* widget that displays these sections: "Monitoring", "Availability", "Monitored by", "Inventory", and "Tags".

[Request](/manual/api#performing-requests):

```json
{
    "jsonrpc": "2.0",
    "method": "dashboard.create",
    "params": {
        "name": "My dashboard",
        "display_period": 30,
        "auto_start": 1,
        "pages": [
            {
                "widgets": [
                    {
                        "type": "hostcard",
                        "name": "Host card",
                        "x": 0,
                        "y": 0,
                        "width": 14,
                        "height": 7,
                        "view_mode": 0,
                        "fields": [
                            {
                                "type": 3,
                                "name": "hostid.0",
                                "value": 10084
                            },
                            {
                                "type": 0,
                                "name": "show_suppressed",
                                "value": 1
                            },
                            {
                                "type": 0,
                                "name": "sections.0",
                                "value": 2
                            },
                            {
                                "type": 0,
                                "name": "sections.1",
                                "value": 3
                            },
                            {
                                "type": 0,
                                "name": "sections.2",
                                "value": 4
                            },
                            {
                                "type": 0,
                                "name": "sections.3",
                                "value": 6
                            },
                            {
                                "type": 0,
                                "name": "sections.4",
                                "value": 7
                            },
                            {
                                "type": 0,
                                "name": "inventory.0",
                                "value": 25
                            },
                            {
                                "type": 0,
                                "name": "inventory.1",
                                "value": 26
                            }
                        ]
                    }
                ]
            }
        ],
        "userGroups": [
            {
                "usrgrpid": 7,
                "permission": 2
            }
        ],
        "users": [
            {
                "userid": 1,
                "permission": 3
            }
        ]
    },
    "id": 1
}
```

Response:

```json
{
    "jsonrpc": "2.0",
    "result": {
        "dashboardids": [
            "3"
        ]
    },
    "id": 1
}
```

[comment]: # ({/new-095f7dfe})

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

-   [Dashboard widget field](/manual/api/reference/dashboard/object#dashboard-widget-field)
-   [`dashboard.create`](/manual/api/reference/dashboard/create)
-   [`dashboard.update`](/manual/api/reference/dashboard/update)

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