# get()

Canonical URL: https://developers.iagenify.com/sdk/ref/hosts/get/
Language: en

`api.hosts.get(id) → Promise<Host>`

One host, with its current deploy, its domains and its certificate state — re-read from the platform.

Status: GET · free · re-reads the certificate

```javascript
const host = await api.hosts.get(id);

host.current;      // the deploy currently online
host.certificate;  // "none" | "pending" | "active"
host.domains_;     // the customer domains attached
```

## This is how a pending certificate is followed {#certificate}

```javascript
let host = await api.hosts.get(id);

while (host.certificate === "pending") {
  await new Promise((r) => setTimeout(r, 10_000));
  host = await api.hosts.get(id);
}
```

Nothing notifies you. The state is re-read when a host is read, which is what makes a short poll the right shape after a deploy on a fresh address level.

## current is what is online {#current}

The deploy that answers now — which is not always the most recent, after a [rollback](/sdk/ref/host/rollback). [deploys()](/sdk/ref/host/deploys) is the history.

## The attached domains come with it {#domains}

`domains.list()` reads the same thing with a request of its own, which is useful after attaching one.

## Errors {#errors}

An unknown identifier answers 404 — including one belonging to another account, which is the same answer on purpose.

- [Host](/sdk/ref/host): What a host carries, and what you can do to it.
- [deploys()](/sdk/ref/host/deploys): The history.

```python
host = api.hosts.get(host_id)

host.current       # the deploy currently online
host.certificate   # "none" | "pending" | "active"
host.domains_      # the customer domains attached
```

```python
import time

host = api.hosts.get(host_id)

while host.certificate == "pending":
    time.sleep(10)
    host = api.hosts.get(host_id)
```
