Create a new Jail
POST
/jail
const url = 'https://sylve.lan:8181/api/jail';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"additionalOptions":"example","allowedOptions":["example"],"base":"example","bootstrapName":"example","cleanEnvironment":true,"cores":1,"ctId":1,"description":"example","devfsRuleset":"example","dhcp":true,"fstab":"example","hooks":{"poststart":{"enabled":true,"script":"example"},"poststop":{"enabled":true,"script":"example"},"prestart":{"enabled":true,"script":"example"},"prestop":{"enabled":true,"script":"example"},"start":{"enabled":true,"script":"example"},"stop":{"enabled":true,"script":"example"}},"hostname":"example","inheritIPv4":true,"inheritIPv6":true,"ipv4":1,"ipv4Gw":1,"ipv4GwRaw":"example","ipv4Raw":"example","ipv6":1,"ipv6Gw":1,"ipv6GwRaw":"example","ipv6Raw":"example","mac":1,"macRaw":"example","memory":1,"metadataEnv":"example","metadataMeta":"example","name":"example","pool":"example","resolvConf":"example","resourceLimits":true,"slaac":true,"startAtBoot":true,"startOrder":1,"switchName":"example","type":"freebsd","vlan":1}'};
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/jail \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "additionalOptions": "example", "allowedOptions": [ "example" ], "base": "example", "bootstrapName": "example", "cleanEnvironment": true, "cores": 1, "ctId": 1, "description": "example", "devfsRuleset": "example", "dhcp": true, "fstab": "example", "hooks": { "poststart": { "enabled": true, "script": "example" }, "poststop": { "enabled": true, "script": "example" }, "prestart": { "enabled": true, "script": "example" }, "prestop": { "enabled": true, "script": "example" }, "start": { "enabled": true, "script": "example" }, "stop": { "enabled": true, "script": "example" } }, "hostname": "example", "inheritIPv4": true, "inheritIPv6": true, "ipv4": 1, "ipv4Gw": 1, "ipv4GwRaw": "example", "ipv4Raw": "example", "ipv6": 1, "ipv6Gw": 1, "ipv6GwRaw": "example", "ipv6Raw": "example", "mac": 1, "macRaw": "example", "memory": 1, "metadataEnv": "example", "metadataMeta": "example", "name": "example", "pool": "example", "resolvConf": "example", "resourceLimits": true, "slaac": true, "startAtBoot": true, "startOrder": 1, "switchName": "example", "type": "freebsd", "vlan": 1 }'Create a new jail with the provided configuration
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Create Jail Request
Media typeapplication/json
object
additionalOptions
string
allowedOptions
Array<string>
base
string
bootstrapName
string
cleanEnvironment
boolean
cores
integer
ctId
required
integer
description
string
devfsRuleset
string
dhcp
boolean
fstab
string
hooks
object
poststart
object
enabled
boolean
script
string
poststop
object
enabled
boolean
script
string
prestart
object
enabled
boolean
script
string
prestop
object
enabled
boolean
script
string
start
object
enabled
boolean
script
string
stop
object
enabled
boolean
script
string
hostname
string
inheritIPv4
boolean
inheritIPv6
boolean
ipv4
integer
ipv4Gw
integer
ipv4GwRaw
string
ipv4Raw
string
ipv6
integer
ipv6Gw
integer
ipv6GwRaw
string
ipv6Raw
string
mac
integer
macRaw
string
memory
integer
metadataEnv
string
metadataMeta
string
name
required
string
pool
required
string
resolvConf
string
resourceLimits
boolean
slaac
boolean
startAtBoot
boolean
startOrder
integer
switchName
string
type
required
string
vlan
integer
Responses
Section titled “Responses”Created
Media typeapplication/json
object
data
object
ctId
integer
name
string
error
string
message
string
status
string
Examplegenerated
{ "data": { "ctId": 1, "name": "example" }, "error": "example", "message": "example", "status": "example"}Headers
Section titled “Headers”Location
string
/api/jail/{ctid}
Bad Request
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Unauthorized
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Forbidden
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Conflict
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Request Entity Too Large
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Internal Server Error
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Service Unavailable
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}