serverinfo_get
Retrieve a Zabbix server instance's server ID and last access time, plus its last database update (active HA node), using the server UUID.
Instructions
Retrieve information about a Zabbix server instance (Zabbix 8.0+): its serverid and lastaccess, the time of its last update to the database (for an HA cluster the active node's). serverid is required: the server's UUIDv7, returned as 'serverid' by settings_get (8.0+) and shown in the frontend under Reports / System information. For the API version use apiinfo_version, for HA nodes hanode_get, for queue and status health_check.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output | No | Properties of the serverinfo object to return. Pass 'extend' for all, 'count' for the number of matches only, or a comma-separated list of property names. Default when omitted: 'extend'. Properties: lastaccess, serverid. | |
| server | No | Target Zabbix server. Available: default. Defaults to 'default' if omitted. | |
| raw_json | No | Strips the security disclaimer preamble from the response so it is pure JSON. Default: false. Requires the bearer token to have 'allow_raw_json' explicitly enabled by an operator in the admin portal - tokens without that policy receive a PolicyError instead. WARNING: setting true bypasses the prompt-injection mitigation marker that wraps untrusted Zabbix data (host names, item descriptions, problem text). LLM clients (Claude, GPT, Cursor, ...) should leave this false; only programmatic non-LLM consumers (Python scripts, n8n workflows that json.loads the result) should set true. | |
| serverid | Yes | ID (UUID) of the Zabbix server to describe. | |
| extra_params | No | Other native serverinfo.get parameters, merged into the request as-is. serverinfo.get has no parameters beyond the typed ones. Any other key is refused here, because Zabbix would silently ignore it. For a parameter you are sure exists on your release but is not listed, use zabbix_raw_api_call. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |