-
Notifications
You must be signed in to change notification settings - Fork 3
put_hosts
Alberto Gonzalez edited this page Jun 19, 2017
·
1 revision
Modifies an existing entry in /etc/hosts. The original IP address must be specified.
PUT /api/hosts/?sid={sid}
Host: <server host name>
Accept: application/json
AuthToken: <authentication token returned from authenticate>
| Name | Description | Type | Required |
|---|---|---|---|
| original_ip | original IP address associated with this host | string | always |
| ip | New IP address associated with this host | string | if changing IP |
| name | name of the host | string | optional |
| long_name | qualified name of the host, e.g., "host.local" | string | optional |
| aliases | array of names of aliases for this host | array | optional |
200 OK
PUT /api/hosts/?sid=1
Host: <server host name>
Accept: application/json
AuthToken: 8a00sjerhterqerjlqkjlk443l4j56869h4f_)(fjdkasHHHHHkdal324
{
"original_ip": "192.168.100.199",
"ip": "192.168.100.198",
"name": "my-hyper-v-win",
"long_name": "my-hyper-v-win.local"
}
HTTP Status: 200 (OK)
Failed host entry changes will return HTTP Status 500 with a result object with an error message and KB link as defined here.