hosts
/hosts [GET]
| API Support | Available since | Last updated | Output |
|---|---|---|---|
| 5.3000 | 5.9500 | json, xml |
Description
This service returns the list of hosts and host aliases currently defined on the server.
To create a new host uses the /hosts [POST] service.
New hosts might also be created when posting comments against a URL, if the hostname of that URL has not been previously registered.
Parameters
| Name | Description | Required | Type | Default value |
|---|---|---|---|---|
| external | Whether external hosts should be returned | no | boolean | false |
| page | The page requested | no | integer | 1 |
| pagesize | The maximum number of hosts per page | no | integer | 200 |
This service implements paging; pages are based on the number of hosts (aliases are not included in the count)
Permission
This service requires administrator.
Response
This service returns each host and their aliases as <host> and <alias> elements as in the following example:
<hosts [limitreached="true"]>
<host id="2" name="acme.com" external="false"/>
<host id="1" name="mycompany.com" external="false">
<aliases>
<alias id="3" name="www.mycompany.com"/>
</aliases>
</host>
...
</hosts>
Error Handling
No specific errors expected for this service.