[comment]: # ({34f25b55-34f25b55})
# apiinfo.version

[comment]: # ({/34f25b55-34f25b55})

[comment]: # ({bc32199a-bc32199a})
### 説明

`string apiinfo.version(array)`

このメソッドは、Zabbix APIのバージョンを取得することができます。

::: noteimportant
このメソッドは認証されていないユーザーのみが使用でき、JSON-RPCリクエストで`auth`パラメーターを指定せずに呼び出す必要があります。
:::

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

[comment]: # ({4fa8a419-4fa8a419})
### パラメーター

`(array)` このメソッドは空の配列を受け入れます。

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

[comment]: # ({53521d11-53521d11})
### 戻り値

`(string)` Zabbix APIのバージョンを返します。

::: notetip
Zabbix 2.0.4以降、APIのバージョンはZabbixのバージョンと一致します。
:::

[comment]: # ({/53521d11-53521d11})

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

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

[comment]: # ({35e02b6a-6ba4bdd0})
#### APIバージョンの取得

Zabbix APIのバージョンを取得します。

リクエスト:

```json
{
    "jsonrpc": "2.0",
    "method": "apiinfo.version",
    "params": [],
    "id": 1
}
```

レスポンス:

```json
{
    "jsonrpc": "2.0",
    "result": "4.0.0",
    "id": 1
}
```

[comment]: # ({/35e02b6a-6ba4bdd0})

[comment]: # ({25499b5e-25499b5e})
### ソース

CAPIInfo::version() in *ui/include/classes/api/services/CAPIInfo.php*.

[comment]: # ({/25499b5e-25499b5e})
