Get WireGuard server
GET
/network/wireguard/server
const url = 'https://sylve.lan:8181/api/network/wireguard/server';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://sylve.lan:8181/api/network/wireguard/server \ --header 'Authorization: <Authorization>'Retrieve the initialized WireGuard server configuration and runtime status
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Success
Media typeapplication/json
object
data
object
addresses
Array<string>
allowWireGuardPort
boolean
createdAt
string
enabled
boolean
id
integer
lastHandshake
string
masqueradeIPv4Interface
string
masqueradeIPv6Interface
string
metric
integer
mtu
integer
peers
Array<object>
object
clientIPs
Array<string>
createdAt
string
enabled
boolean
id
integer
lastHandshake
string
name
string
persistentKeepalive
boolean
preSharedKey
string
privateKey
string
publicKey
string
routableIPs
Array<string>
routeIPs
boolean
rx
integer
tx
integer
updatedAt
string
wireguardServerId
integer
port
integer
privateKey
string
publicKey
string
restartedAt
string
rx
integer
tx
integer
updatedAt
string
uptime
integer
error
string
message
string
status
string
Examplegenerated
{ "data": { "addresses": [ "example" ], "allowWireGuardPort": true, "createdAt": "example", "enabled": true, "id": 1, "lastHandshake": "example", "masqueradeIPv4Interface": "example", "masqueradeIPv6Interface": "example", "metric": 1, "mtu": 1, "peers": [ { "clientIPs": [ "example" ], "createdAt": "example", "enabled": true, "id": 1, "lastHandshake": "example", "name": "example", "persistentKeepalive": true, "preSharedKey": "example", "privateKey": "example", "publicKey": "example", "routableIPs": [ "example" ], "routeIPs": true, "rx": 1, "tx": 1, "updatedAt": "example", "wireguardServerId": 1 } ], "port": 1, "privateKey": "example", "publicKey": "example", "restartedAt": "example", "rx": 1, "tx": 1, "updatedAt": "example", "uptime": 1 }, "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"}Not Found
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"}