host
/hosts/{hostname} [PATCH]
API Support | Available since | Last updated | Output |
---|---|---|---|
5.8900 | 6.0000 | json, xml |
Description
Edits a host – only changes specified parameters.
Parameters
Name | Description | Required | Type | Default value |
---|---|---|---|---|
external | Whether the host is external | no | boolean | |
name | The new name of the host | no | string | |
virtual | Whether the host is virtual. PageSeeder v5.99 or higher. | no | boolean |
name
The name of the host to create must be at least two characters long, at most 255 characters long, a valid host according to RFC 3986 - section 3.2.2 host , and match the following regular expression:
([a-z0-9]([a-z0-9-]*[a-z0-9])?\.?)+[a-z0-9]([a-z0-9-]*[a-z0-9])?
PageSeeder supports IPv4 addresses and regular names.
The hostname is not case-sensitive and it is not case-preserving: it is always converted to lower case before being stored in the database.
Permission
This service requires administrator.
Response
The updated host is returned as a <host>
element and includes any existing <alias>
<host-modification> <host id="1" name="mycompany.com" external="false" virtual="true"> <aliases> <alias id="3" name="www.mycompany.com"/> </aliases> </host> </host-modification>
Error Handling
No specific errors expected for this service.