# get()

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

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

Un host, con il suo actual deploy, i suoi dominis e il suo stato certificat — re-lee da la plataforma.

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
```

## Issí come un certificate pendente è seguit {#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);
}
```

Nada t'avunta. Lo stato è re-lettura quando un host è let, che è ciò che rende un sondaje breve la forma giusta dopo un deployment a un livello di adrese fresca.

## Attual è ciò che è on line {#current}

La diplomazion che risponde ora — che non è sempre la più recente, dopo un [rollback](/pt/sdk/ref/host/rollback). [deploys()](/pt/sdk/ref/host/deploys) è la cronologia.

## I dominis annessats a lui convien {#domains}

`domains.list()` legge la stessa cosa con una richiesta propria, che è utile dopo l'applicare.

## Erros {#errors}

Un identificatore sconosciut risponde 404 — incluso uno appartenente a un altro conto, che è la stessa risposta intenzionalmente.

- [Anfitrièr](/pt/sdk/ref/host): Que un host porta, e ce pots fare a lui.
- [deploys()](/pt/sdk/ref/host/deploys): La storia.

```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)
```
