Delete Peers
To delete peers individually or in bulk
Request
POST /api/deletePeers/<configName>
Body Parameter
{
"peers": [
"mCP70rKd4iumKptwTgzvAR3g8/D74ZDkwR0EuI10uk4=",
"lKptwTgzvAR3gmCP70rKd4iu8/D74ZDkwR0EuI10uk4=",
"pCP70rKd4iumK0uk4ptwTgzvAR3g8/D74ZDkwR0EuI1="
]
}
Parameter | Type | |
---|---|---|
| list[string] | List of strings contain public key(s) you want to delete |
Response
200 - OK
{
"data": null,
"message": "Deleted 3 peer(s)",
"status": true
}
If configuration name provided in configName
does not exist
{
"data": null,
"message": "Configuration does not exist",
"status": false
}
If length of peers
is 0
{
"data": null,
"message": "Please specify one or more peers",
"status": false
}
If failed to save to WireGuard
{
"data": null,
"message": "Failed to save configuration through WireGuard",
"status": false
}
If failed delete some of the peers
{
"data": null,
"message": "Deleted 3 peer(s) successfully. Failed to delete 1 peer(s)",
"status": false
}
Last modified: 26 September 2024