Wireguard VPN
10 operations. Call any of them with omada_call_operation (or, in full tool mode, as a tool named by its operationId).
| Operation | Method | Summary |
|---|---|---|
| getWireguardKey | GET | Get new private key and public key |
| listPeer | GET | Get wireguard peer list (deprecated) |
| createPeer | POST | Create new wireguard peer (deprecated) |
| deletePeer | DELETE | Delete an existing wireguard peer (deprecated) |
| modifyPeer | PUT | Modify an existing wireguard peer (deprecated) |
| getWireguardSummary | GET | Get all wireguard's id and name info (deprecated) |
| listWireguard | GET | Get wireguard list (deprecated) |
| createWireguard | POST | Create new wireguard (deprecated) |
| deleteWireguard | DELETE | Delete an existing wireguard (deprecated) |
| modifyWireguard | PUT | Modify an existing wireguard (deprecated) |
getWireguardKey
GET /openapi/v1/{omadacId}/sites/{siteId}/vpn/wireguard-key
Get new private key and public key
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
// omada_call_operation
{
"operationId": "getWireguardKey",
"params": {
"siteId": "<siteId>"
}
}Details, permissions and error codes
Get new private key and public key.
The interface requires one of the permissions:
Site Settings Manager View Only
Network Config Page View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-1001 - Invalid request parameters.
listPeer
GET /openapi/v1/{omadacId}/sites/{siteId}/vpn/wireguard-peers
Deprecated
This operation is deprecated.
Get wireguard peer list
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
page | query | integer | no | Start page number. Start from 1. (default 1) |
pageSize | query | integer | no | Number of entries per page. It should be within the range of 1–1000. (default 100) |
searchKey | query | string | no | searchKey |
// omada_call_operation
{
"operationId": "listPeer",
"params": {
"siteId": "<siteId>"
}
}Details, permissions and error codes
Get wireguard peer list. This interface has been deprecated. Please use the following interfaces instead: Get site-to-site VPN detail info.
The interface requires one of the permissions:
Site Settings Manager View Only
Network Config Page View Only
createPeer
POST /openapi/v1/{omadacId}/sites/{siteId}/vpn/wireguard-peers
Deprecated
This operation is deprecated.
Create new wireguard peer
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
Request body — application/json (required) — schema WireguardPeerOpenApiVO
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | The name of WireGuard peer should contain 1 to 64 characters. |
status | boolean | yes | The status of WireGuard peer. Valid value is true or false. |
interfaceId | string | yes | The ID of WireGuard VPN to which this WireGuard peer binds. The ID can be obtained from 'Get all wireguard's id and name info' interface. |
publicKey | string | yes | The public key of WireGuard peer must have 44 character of base64 and end with '='. |
endPoint | string | no | The end point IP of WireGuard peer. Get whether supports domain from interface 'Get wireguard peer list'. |
endPointPort | integer | no | The end point port of WireGuard peer should be within the range of 1-65535. |
allowAddress | array<string> | yes | IP/MASK address list of WireGuard peer allowed. |
presharedKey | string | no | The presharedKey of WireGuard peer must have 44 character of base64 and end with '='. |
keepAlive | integer | yes | The keepalive second of WireGuard peer should be within the range of 0-65535. |
comment | string | no | The comment of WireGuard peer should contain 0 to 128 characters. |
// omada_call_operation
{
"operationId": "createPeer",
"params": {
"siteId": "<siteId>"
},
"body": "{...}"
}Details, permissions and error codes
Create new wireguard peer. This interface has been deprecated. Please use the following interfaces instead: Create site-to-site VPN by manual or Modify site-to-site VPN by manual.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33006 - This name already exists in this site.
-43202 - The number of WireGuard peers has reached the limit.
-43205 - The public key of the WireGuard peer for the same interface already exists.
-43206 - The device does not support configuring domain for WireGuard peer.
-43207 - Endpoint and Endpoint Port need to be filled in at the same time or both left blank.
-43208 - The device does not support WireGuard VPN.
deletePeer
DELETE /openapi/v1/{omadacId}/sites/{siteId}/vpn/wireguard-peers/{id}
Deprecated
This operation is deprecated.
Delete an existing wireguard peer
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
id | path | string | yes | Peer ID |
// omada_call_operation
{
"operationId": "deletePeer",
"params": {
"siteId": "<siteId>",
"id": "<id>"
}
}Details, permissions and error codes
Delete an existing wireguard peer. This interface has been deprecated. Please use the following interfaces instead: Modify site-to-site VPN by manual.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
modifyPeer
PUT /openapi/v1/{omadacId}/sites/{siteId}/vpn/wireguard-peers/{id}
Deprecated
This operation is deprecated.
Modify an existing wireguard peer
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
id | path | string | yes | Peer ID |
Request body — application/json (required) — schema WireguardPeerOpenApiVO
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | The name of WireGuard peer should contain 1 to 64 characters. |
status | boolean | yes | The status of WireGuard peer. Valid value is true or false. |
interfaceId | string | yes | The ID of WireGuard VPN to which this WireGuard peer binds. The ID can be obtained from 'Get all wireguard's id and name info' interface. |
publicKey | string | yes | The public key of WireGuard peer must have 44 character of base64 and end with '='. |
endPoint | string | no | The end point IP of WireGuard peer. Get whether supports domain from interface 'Get wireguard peer list'. |
endPointPort | integer | no | The end point port of WireGuard peer should be within the range of 1-65535. |
allowAddress | array<string> | yes | IP/MASK address list of WireGuard peer allowed. |
presharedKey | string | no | The presharedKey of WireGuard peer must have 44 character of base64 and end with '='. |
keepAlive | integer | yes | The keepalive second of WireGuard peer should be within the range of 0-65535. |
comment | string | no | The comment of WireGuard peer should contain 0 to 128 characters. |
// omada_call_operation
{
"operationId": "modifyPeer",
"params": {
"siteId": "<siteId>",
"id": "<id>"
},
"body": "{...}"
}Details, permissions and error codes
Modify an existing wireguard peer. This interface has been deprecated. Please use the following interfaces instead: Modify site-to-site VPN by manual.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33006 - This name already exists in this site.
-43202 - The number of WireGuard peers has reached the limit.
-43203 - The WireGuard peer does not exist.
-43205 - The public key of the WireGuard peer for the same interface already exists.
-43206 - The device does not support configuring domain for WireGuard peer.
-43207 - Endpoint and Endpoint Port need to be filled in at the same time or both left blank.
-43208 - The device does not support WireGuard VPN.
getWireguardSummary
GET /openapi/v1/{omadacId}/sites/{siteId}/vpn/wireguard-summarys
Deprecated
This operation is deprecated.
Get all wireguard's id and name info
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
// omada_call_operation
{
"operationId": "getWireguardSummary",
"params": {
"siteId": "<siteId>"
}
}Details, permissions and error codes
Get all wireguard's id and name info.
The interface requires one of the permissions:
Site Settings Manager View Only
Network Config Page View Only
listWireguard
GET /openapi/v1/{omadacId}/sites/{siteId}/vpn/wireguards
Deprecated
This operation is deprecated.
Get wireguard list
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
page | query | integer | no | Start page number. Start from 1. (default 1) |
pageSize | query | integer | no | Number of entries per page. It should be within the range of 1–1000. (default 100) |
searchKey | query | string | no | searchKey |
// omada_call_operation
{
"operationId": "listWireguard",
"params": {
"siteId": "<siteId>"
}
}Details, permissions and error codes
Get wireguard list. This interface has been deprecated. Please use the following interfaces instead: Get VPN Site to Site summary list and Get site-to-site VPN detail info.
The interface requires one of the permissions:
Site Settings Manager View Only
Network Config Page View Only
createWireguard
POST /openapi/v1/{omadacId}/sites/{siteId}/vpn/wireguards
Deprecated
This operation is deprecated.
Create new wireguard
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
Request body — application/json (required) — schema WireguardOpenApiVO
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | The name of WireGuard VPN should contain 1 to 64 characters. |
status | boolean | yes | The status of WireGuard VPN. Valid value is true or false. |
mtu | integer | yes | The MTU of WireGuard VPN should be within the range of 576-1440. |
listenPort | integer | yes | The listening port for WireGuard VPN should be within the range of 1-65535. |
privateKey | string | yes | The private key of WireGuard VPN must have 44 character of base64 and end with '='. |
localIp | string | yes | The local IP address of WireGuard VPN. |
// omada_call_operation
{
"operationId": "createWireguard",
"params": {
"siteId": "<siteId>"
},
"body": "{...}"
}Details, permissions and error codes
Create new wireguard. This interface has been deprecated. Please use the following interfaces instead: Create site-to-site VPN by manual.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33006 - This name already exists in this site.
-43200 - The number of WireGuard entries has reached the limit.
-43204 - The port has been used.
-43208 - The device does not support WireGuard VPN.
deleteWireguard
DELETE /openapi/v1/{omadacId}/sites/{siteId}/vpn/wireguards/{id}
Deprecated
This operation is deprecated.
Delete an existing wireguard
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
id | path | string | yes | WireGuard VPN ID |
// omada_call_operation
{
"operationId": "deleteWireguard",
"params": {
"siteId": "<siteId>",
"id": "<id>"
}
}Details, permissions and error codes
Delete an existing wireguard. This interface has been deprecated. Please use the following interfaces instead: Delete VPN V2.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
modifyWireguard
PUT /openapi/v1/{omadacId}/sites/{siteId}/vpn/wireguards/{id}
Deprecated
This operation is deprecated.
Modify an existing wireguard
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteId | path | string | yes | Site ID (site ID or site name) |
id | path | string | yes | Wireguard ID |
Request body — application/json (required) — schema WireguardOpenApiVO
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | The name of WireGuard VPN should contain 1 to 64 characters. |
status | boolean | yes | The status of WireGuard VPN. Valid value is true or false. |
mtu | integer | yes | The MTU of WireGuard VPN should be within the range of 576-1440. |
listenPort | integer | yes | The listening port for WireGuard VPN should be within the range of 1-65535. |
privateKey | string | yes | The private key of WireGuard VPN must have 44 character of base64 and end with '='. |
localIp | string | yes | The local IP address of WireGuard VPN. |
// omada_call_operation
{
"operationId": "modifyWireguard",
"params": {
"siteId": "<siteId>",
"id": "<id>"
},
"body": "{...}"
}Details, permissions and error codes
Modify an existing wireguard. This interface has been deprecated. Please use the following interfaces instead: Modify site-to-site VPN by manual.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33006 - This name already exists in this site.
-43201 - The WireGuard entry does not exist.
-43204 - The port has been used.
-43208 - The device does not support WireGuard VPN.