Update WireGuard server peer
PUT
/network/wireguard/server/peer/{peerId}
const url = 'https://sylve.lan:8181/api/network/wireguard/server/peer/1';const options = { method: 'PUT', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"clientIPs":["example"],"enabled":true,"name":"example","persistentKeepalive":true,"preSharedKey":"example","privateKey":"example","routableIPs":["example"],"routeIPs":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://sylve.lan:8181/api/network/wireguard/server/peer/1 \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "clientIPs": [ "example" ], "enabled": true, "name": "example", "persistentKeepalive": true, "preSharedKey": "example", "privateKey": "example", "routableIPs": [ "example" ], "routeIPs": true }'Replace the configurable settings for a WireGuard server peer and apply the updated runtime configuration
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”peerId
required
integer
WireGuard Server Peer ID
Request Body
Section titled “Request Body”WireGuard Server Peer Request
Media typeapplication/json
object
clientIPs
required
Array<string>
enabled
boolean
name
required
string
persistentKeepalive
boolean
preSharedKey
string
privateKey
string
routableIPs
Array<string>
routeIPs
boolean
Examplegenerated
{ "clientIPs": [ "example" ], "enabled": true, "name": "example", "persistentKeepalive": true, "preSharedKey": "example", "privateKey": "example", "routableIPs": [ "example" ], "routeIPs": true}Responses
Section titled “Responses”Success
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"}Not Found
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"}Payload 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"}