Skip to content
This repository has been archived by the owner on Aug 4, 2019. It is now read-only.

apiv1 network put

Travis CI edited this page Jan 17, 2018 · 17 revisions
Parameter Value
Author TestEngine
Version 0.2.0-dev.0
Status Implemented

network

PUT /apiv1/network/interfaces

Role: Admin

Request: Form

Parameter Optional Type Default Example
address True str 192.168.1.15
netmask True str 192.168.1.255
gateway True str 192.168.1.1
broadcast True str 192.168.1.255
nameServers True str 8.8.8.8,9.9.9.9,1.1.1.1
networkId True str 1.9.9.9

Status:

200 OK

Response Headers:

X-Identity: 1
Content-Type: application/json; charset=utf-8
Content-Length: 197

Response Body:

{
    "gateway":"192.168.1.1",
    "netmask":"192.168.1.255",
    "address":"192.168.1.15",
    "broadcast":"192.168.1.255",
    "nameServers":"8.8.8.8 9.9.9.9 1.1.1.1",
    "networkId":"1.9.9.9"
}

PUT /apiv1/network/interfaces

Role: Visitor

Status:

401 Unauthorized

Response Headers:

Content-Type: application/json; charset=utf-8
Content-Length: 85

Response Body:

{"message":"Unauthorized","description":"No permission -- see authorization schemes"}

PUT /apiv1/network/interfaces

Role: Admin

Status:

400 Bad Request

Response Headers:

X-Identity: 1
Content-Type: application/json; charset=utf-8
X-Reason: invalid-gateway;invalid-netmask;invalid-broadcast;invalid-nameServers;invalid-networkId;invalid-address
Content-Length: 138

Response Body:

{"message":"Bad Request","description":"Exactly these fields are allowed: [gateway, netmask, address, broadcast, nameServers, networkId]"}

PUT /apiv1/network/interfaces

Role: Admin

Request: Form

Parameter Optional Type Default Example
address True str 192.168.1.15
netmask True str 192.168.1.255

Status:

400 Bad Request

Response Headers:

X-Identity: 1
Content-Type: application/json; charset=utf-8
X-Reason: invalid-gateway;invalid-broadcast;invalid-nameServers;invalid-networkId
Content-Length: 138

Response Body:

{"message":"Bad Request","description":"Exactly these fields are allowed: [gateway, netmask, address, broadcast, nameServers, networkId]"}

PUT /apiv1/network/interfaces

Role: Admin

Request: Form

Parameter Optional Type Default Example
address True str 192.168.1.15
netmask True str 192.168.1.255
gateway True str 192.168.1.1
broadcast True str 192.168.1.255
nameServers True str
networkId True str 1.9.9.9

Status:

200 OK

Response Headers:

X-Identity: 1
Content-Type: application/json; charset=utf-8
Content-Length: 174

Response Body:

{
    "gateway":"192.168.1.1",
    "netmask":"192.168.1.255",
    "address":"192.168.1.15",
    "broadcast":"192.168.1.255",
    "nameServers":"",
    "networkId":"1.9.9.9"
}

PUT /apiv1/network/interfaces

Role: Admin

Request: Form

Parameter Optional Type Default Example
address True str
netmask True str 192.168.1.255
gateway True str 192.168.1.1
broadcast True str 192.168.1.255
nameServers True str
networkId True str 1.9.9.9

Status:

400 Bad Request

Response Headers:

X-Identity: 1
Content-Type: application/json; charset=utf-8
Content-Length: 82

Response Body:

{"message":"Bad Request","description":"Bad request syntax or unsupported method"}

PUT /apiv1/network/interfaces

Role: Admin

Request: Form

Parameter Optional Type Default Example
address True str 192.168.1.15
netmask True str 192.168.1.255
gateway True str
broadcast True str
nameServers True str
networkId True str

Status:

200 OK

Response Headers:

X-Identity: 1
Content-Type: application/json; charset=utf-8
Content-Length: 143

Response Body:

{
    "gateway":"",
    "netmask":"192.168.1.255",
    "address":"192.168.1.15",
    "broadcast":"",
    "nameServers":"",
    "networkId":""
}