Skip to content
Alberto Gonzalez edited this page Jun 19, 2017 · 1 revision

(PUT)/hosts

Description

Modifies an existing entry in /etc/hosts. The original IP address must be specified.

Request

Syntax

PUT /api/hosts/?sid={sid}
Host: <server host name>
Accept: application/json
AuthToken: <authentication token returned from authenticate>

Parameters

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

Response

200 OK

Examples

Sample Request

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"
}


Sample Response

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.

Clone this wiki locally