[comment]: # translation:outdated

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

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

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

`string apiinfo.version(array)`

Questo metodo consente di recuperare la versione dell'API Zabbix.

::: nota importante
Questo metodo è disponibile solo per utenti non autenticati
e deve essere chiamato senza il parametro `auth` nella richiesta JSON-RPC.
:::

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

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

`(array)` Il metodo accetta un array vuoto.

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

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

`(string)` Restituisce la versione dell'API Zabbix.

::: suggerimento
A partire da Zabbix 2.0.4 la versione delle API
corrisponde alla versione di Zabbix.
:::

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

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

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

[comment]: # ({new-6ba4bdd0})
#### Retrieving the version of the API

Retrieve the version of the Zabbix API.

Request:

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

Response:

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

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

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

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

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