# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.w3lcome.com/host/retrieve-a-list-of-hosts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
