[comment]: # ({935965bf-0cec15ee})
# 29 URL

[comment]: # ({/935965bf-0cec15ee})

[comment]: # ({44743321-103f7d14})
### 説明

これらのパラメーターと、各ダッシュボードウィジェットフィールドオブジェクトの有効なプロパティ値を使用することで、`dashboard.create`メソッドおよび`dashboard.update`メソッドで[*URL*](/manual/web_interface/frontend_sections/dashboards/widgets/url)ウィジェットを設定できます。

::: noteimportant
ウィジェットの`fields`プロパティは、ダッシュボードの作成または更新時に検証されません。
これにより、ユーザーは[組み込みウィジェット](/manual/web_interface/frontend_sections/dashboards/widgets)を変更したり、[カスタムウィジェット](/devel/modules/tutorials/widget)を作成したりできますが、ウィジェットを誤って作成または更新してしまうリスクも生じます。
*URL*ウィジェットを正常に作成または更新するには、以下の表に記載されているパラメーターの動作を参照してください。
:::

[comment]: # ({/44743321-103f7d14})

[comment]: # ({5944f4ec-df854d95})
### パラメーター

*URL*ウィジェットでは、以下のパラメーターがサポートされています。

|パラメーター|[type](/manual/api/reference/dashboard/object#dashboard-widget-field)|name|value|
|-----|-|-----|-------------------|
|*リフレッシュ間隔*|0|rf_rate|0 - *(デフォルト)* 更新なし<br>10 - 10秒<br>30 - 30秒<br>60 - 1分<br>120 - 2分<br>600 - 10分<br>900 - 15分|
|*URL*|1|url|有効なURL文字列。<br><br>[パラメーターの動作](/manual/api/reference_commentary#parameter-behavior):<br>- *必須*|
|*ホストの上書き*|1|override_hostid.\_reference|`ABCDE._hostid` - [互換性のあるウィジェット](/manual/web_interface/frontend_sections/dashboards/widgets#widget-compatibility)(その*Reference*パラメーターを"`ABCDE`"に設定)をホストのデータソースとして設定します。<br>`DASHBOARD._hostid` - ダッシュボードの[*ホスト*セレクタ](/manual/web_interface/frontend_sections/dashboards/widgets#override-host)をホストのデータソースとして設定します。<br><br>このパラメーターは、[テンプレートダッシュボード](/manual/api/reference/templatedashboard/object)でウィジェットを構成する場合にはサポートされません。|

[comment]: # ({/5944f4ec-df854d95})

[comment]: # ({b34af70f-44ecbf19})
### 例

次の例は、*URL*ウィジェットのダッシュボードウィジェットフィールドオブジェクトの設定を説明することだけを目的としています。
ダッシュボードの設定の詳細については、[`dashboard.create`](/manual/api/reference/dashboard/create)を参照してください。

[comment]: # ({/b34af70f-44ecbf19})

[comment]: # ({6aa26102-34af51c0})
#### *URL*ウィジェットの設定

Zabbixマニュアルのホームページを表示する*URL*ウィジェットを設定します。

[リクエスト](/manual/api#performing-requests):

```json
{
    "jsonrpc": "2.0",
    "method": "dashboard.create",
    "params": {
        "name": "My dashboard",
        "display_period": 30,
        "auto_start": 1,
        "pages": [
            {
                "widgets": [
                    {
                        "type": "url",
                        "name": "URL",
                        "x": 0,
                        "y": 0,
                        "width": 36,
                        "height": 5,
                        "view_mode": 0,
                        "fields": [
                            {
                                "type": 1,
                                "name": "url",
                                "value": "https://www.zabbix.com/documentation/7.0/en"
                            }
                        ]
                    }
                ]
            }
        ],
        "userGroups": [
            {
                "usrgrpid": 7,
                "permission": 2
            }
        ],
        "users": [
            {
                "userid": 1,
                "permission": 3
            }
        ]
    },
    "id": 1
}
```

レスポンス:

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

[comment]: # ({/6aa26102-34af51c0})

[comment]: # ({e9d30322-c2753f05})
### 参照

-   [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]: # ({/e9d30322-c2753f05})
