Create a network
post
Authorizations
defguard_sessionstringRequired
Body
acl_default_allowbooleanRequired
acl_enabledbooleanRequired
addressstringRequired
allow_all_groupsbooleanRequired
allowed_groupsstring[]Required
allowed_ipsstring · nullableOptional
allowed_ips_from_aclbooleanOptional
dnsstring · nullableOptional
endpointstringRequired
fwmarkinteger · int64Required
keepalive_intervalinteger · int32Required
location_mfa_modestring · enumRequiredPossible values:
mtuinteger · int32Required
namestringRequired
peer_disconnect_thresholdinteger · int32Required
portinteger · int32Required
posture_checksinteger · int64[] · nullableOptional
service_location_modestring · enumRequiredPossible values:
Responses
201
Network created.
application/json
Stores the configuration required to set up a WireGuard network.
acl_default_allowbooleanRequired
acl_enabledbooleanRequired
addressstring[]Required
allow_all_groupsbooleanRequired
allowed_ipsstring[]Required
allowed_ips_from_aclbooleanRequired
connected_atstring · nullableOptional
dnsstring · nullableOptional
endpointstringRequired
fwmarkinteger · int64Required
idinteger · int64Required
keepalive_intervalinteger · int32Required
location_mfa_modestring · enumRequiredPossible values:
mtuinteger · int32Required
namestringRequired
peer_disconnect_thresholdinteger · int32Required
portinteger · int32Required
pubkeystringRequired
service_location_modestring · enumRequiredPossible values:
400
Invalid location settings.
application/json
401
Session is missing or invalid.
application/json
403
Requires admin privileges.
application/json
500
Unable to create network.
application/json
post/api/v1/network
POST /api/v1/network HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 388
{
"acl_default_allow": false,
"acl_enabled": false,
"address": "10.0.0.1/24",
"allow_all_groups": true,
"allowed_groups": [],
"allowed_ips": "0.0.0.0/0",
"allowed_ips_from_acl": false,
"dns": "1.1.1.1",
"endpoint": "vpn.example.com",
"fwmark": 0,
"keepalive_interval": 25,
"location_mfa_mode": "disabled",
"mtu": 1420,
"name": "office",
"peer_disconnect_threshold": 180,
"port": 50051,
"service_location_mode": "disabled"
}{
"acl_default_allow": true,
"acl_enabled": true,
"address": [
"text"
],
"allow_all_groups": true,
"allowed_ips": [
"text"
],
"allowed_ips_from_acl": true,
"connected_at": null,
"dns": null,
"endpoint": "text",
"fwmark": 1,
"id": 1,
"keepalive_interval": 1,
"location_mfa_mode": "disabled",
"mtu": 1,
"name": "text",
"peer_disconnect_threshold": 1,
"port": 1,
"pubkey": "text",
"service_location_mode": "disabled"
}Last updated
Was this helpful?