# usage()

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

`api.hosts.usage() → Promise<Usage>`

O que il plan permite in hosting, e quanto spazio che lo che è on line toma — contra l'ogget storage del cont.

Status: free · read the zero · quota is the object storage

```javascript
const usage = await api.hosts.usage();

if (!usage.maxHosts) {
  // This plan has no hosting. Show the limit, with a link to the plans.
}
```

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `pack` | string |  | Qual plan. |
| `hosts · maxHosts` | integer |  | Quantes egìn, e quantes egìn il plan permetiu. |
| `usedBytes` | integer |  | Qued'hosts mantene on line. |
| `quotaBytes` | integer |  | **Quota de stoccaggio de objetos del cont.** |

## Legî il zero {#zero}

> **maxHosts: 0 significa che il plan non ha hosting**
>
> La stessa forma di maxeMailboxes: 0 per mail. Legga il numero invecès di corrispondere al nome di un plan — il giorno in cui i plans cambia, la pagina che coincide è quella che mente.

## quotaBytes non è un'indennità di ospitant {#quota}

E 'o stoccaggio de objetos del cont - condivisa con files, caixas de postas e tutto o resto custode per il cont. [cloud.usage()`](/pt/sdk/ref/cloud/usage) mostra il medesimo numero da oltre lattura, con object.hostingBytes` dicindu quanta di esso ospita.

## A mostrarlo {#ui}

```javascript
const u = await api.hosts.usage();

if (!u.maxHosts)             return showPlanLimit();
if (u.hosts >= u.maxHosts)   return showAtLimit();
return showCreateButton();
```

- [cloud.usage()](/pt/sdk/ref/cloud/usage): La memorzatura dietro di essa.
- [host.usage()](/pt/sdk/ref/host/usage): Un host in dettaglio.

```python
usage = api.hosts.usage()

if not usage["maxHosts"]:
    pass  # This plan has no hosting. Show the limit, with a link to the plans.
```

```python
def hosting_screen():
    u = api.hosts.usage()
    if not u["maxHosts"]:
        return show_plan_limit()
    if u["hosts"] >= u["maxHosts"]:
        return show_at_limit()
    return show_create_button()
```
