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","vlanPolicy":{"mode":"example","taggedVlans":[1],"untaggedVlan":1},"zfsSource":{"dataset":"example","guid":"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/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", "vlanPolicy": { "mode": "example", "taggedVlans": [ 1 ], "untaggedVlan": 1 }, "zfsSource": { "dataset": "example", "guid": "example" } }'Create a new jail with the provided configuration. A network attached to a filtered switch requires an explicit access or trunk VLAN policy.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”async
boolean
Queue creation as a durable lifecycle task
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
vlanPolicy
object
mode
string
taggedVlans
Array<integer>
untaggedVlan
integer
zfsSource
object
dataset
string
guid
string
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}
Creation queued
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}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"}