---
name: "Zabbix::API::Host"
section: "3pm"
platform: "linux"
package: "libzabbix-api-perl"
version: "0.009-1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/Zabbix::API::Host"
---

# Zabbix::API::Host(3pm)

## NAME

Zabbix::API::Host -- Zabbix host objects

## SYNOPSIS

```
  use Zabbix::API::Host;
  # fetch a single host by ID
  my $host = $zabbix->fetch('Host', params => { filter => { hostid => 10105 } })->[0];

  # and delete it
  $host->delete;

  # fetch an item's host
  my $item = $zabbix->fetch('Item', params => { filter => { itemid => 22379 } })->[0];
  my $host_from_item = $item->host;
```

## DESCRIPTION

Handles CRUD for Zabbix host objects.

This is a subclass of `"Zabbix::API::CRUDE"`; see there for inherited methods.

## METHODS

- *items()*

  Accessor for the host's items.

- *name()*

  Accessor for the host's name (the "host" attribute); returns the empty string if no name is set, for instance if the host has not been created on the server yet.

## SEE ALSO

Zabbix::API::CRUDE.

## AUTHOR

Fabrice Gabolde \<fabrice.gabolde@uperto.com\>

## COPYRIGHT AND LICENSE

Copyright (C) 2011 SFR

This library is free software; you can redistribute it and/or modify it under the terms of the GPLv3.
