> For the complete documentation index, see [llms.txt](https://docs.w3lcome.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.w3lcome.com/host/retrieve-a-list-of-hosts.md).

# Retrieve a List of Hosts

## Get Hosts

<mark style="color:blue;">`GET`</mark> `https://api.w3lcome.com/v1/hosts`

This endpoint allows you to get a list of host

#### Query Parameters

| Name       | Type   | Description                                                                                                                                                                    |
| ---------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| limit      | number | <p>The number of hosts you want to retrieve<br><em><strong>Default: 500 - Min: 1 - Max: 1000</strong></em></p>                                                                 |
| offset     | number | <p>The offset from the first host. Used to paginate.<br><em><strong>Default: 0 - Min: 0 - Max: ∞</strong></em></p>                                                             |
| queryKey   | string | <p>Query by any field in the Host object.<br><em><strong>Default: none</strong></em></p>                                                                                       |
| queryOp    | string | <p>Add the type of the query.<br><em><strong>Default: none</strong></em><br>Accepted values: <code><</code> <code><=</code> <code>==</code> <code>></code> <code>>=</code></p> |
| queryValue | string | <p>Insert the value you want to query.<br><em><strong>Default: none</strong></em></p>                                                                                          |

#### Headers

| Name           | Type   | Description      |
| -------------- | ------ | ---------------- |
| Content-Type   | string | application/JSON |
| Authentication | string | Basic `token`    |

{% tabs %}
{% tab title="200 Success" %}

```javascript
{
    "hosts": [
        {
            "id": "5d13bad4ae9c50948f6edd67a16d6936",
            "email": "alisson@w3lcome.com",
            "name": "Alisson Enz Rossi",
            "isActive": true,
            "pictureUrl": "",
            "position": "CTO",
            "sector": "IT",
            "phone": "(43) 9 9982-0420",
            "countryCode": "+55",
            "isPhoneValid": true,
            "company": "W3lcome",
            "message": "",
            "role": "admin"
        },
        {
            ...
        }
    ],
    "size": 2
}
```

{% endtab %}

{% tab title="404 Error" %}

```javascript
{
    "type": "INVALID_QUERY_OPERATOR"
}
```

{% endtab %}
{% endtabs %}
