Create a container network
POST
/container/networks
const url = 'https://sylve.lan:8181/api/container/networks';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"gateway":"example","name":"example","rangeEnd":"example","rangeStart":"example","subnet":"example","switch":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://sylve.lan:8181/api/container/networks \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "gateway": "example", "name": "example", "rangeEnd": "example", "rangeStart": "example", "subnet": "example", "switch": "example" }'Create a NAT bridge network, or with a switch, a network attached to that switch
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Network
Media typeapplication/json
object
gateway
string
name
required
string
rangeEnd
string
rangeStart
string
subnet
string
switch
string
Examplegenerated
{ "gateway": "example", "name": "example", "rangeEnd": "example", "rangeStart": "example", "subnet": "example", "switch": "example"}Responses
Section titled “Responses”Success
Media typeapplication/json
object
data
object
bridge
string
createdAt
string
gateway
string
id
integer
name
string
rangeEnd
string
rangeStart
string
subnet
string
switchId
integer
switchType
string
updatedAt
string
error
string
message
string
status
string
Examplegenerated
{ "data": { "bridge": "example", "createdAt": "example", "gateway": "example", "id": 1, "name": "example", "rangeEnd": "example", "rangeStart": "example", "subnet": "example", "switchId": 1, "switchType": "example", "updatedAt": "example" }, "error": "example", "message": "example", "status": "example"}