Routing
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 |
|---|---|---|
| getGridPolicyRouting | GET | Get policy routing list |
| createPolicyRouting | POST | Create new policy routing |
| deletePolicyRouting | DELETE | Delete policy routing |
| modifyPolicyRouting | PUT | Modify policy routing |
| modifyPolicyRoutingIndex | POST | Modify policy routing Index |
| getGridStaticRouting_1 | GET | Get static routing list |
| createStaticRouting_1 | POST | Create new static routing |
| deleteStaticRouting_1 | DELETE | Delete static routing |
| modifyStaticRouting_1 | PUT | Modify static routing |
| getStaticRoutingInterfaceList | GET | Get static routing interface list |
getGridPolicyRouting
GET /openapi/v1/{omadacId}/sites/{siteId}/routing/policy-routings
Get policy routing 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) |
// omada_call_operation
{
"operationId": "getGridPolicyRouting",
"params": {
"siteId": "<siteId>"
}
}Details, permissions and error codes
Get policy routing list.
The interface requires one of the permissions:
Site Settings Manager View Only
Network Config Page View Only
Site Device Manager View Only
createPolicyRouting
POST /openapi/v1/{omadacId}/sites/{siteId}/routing/policy-routings
Create new policy routing
| 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 PolicyRoutingConfig
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name, name should contain 1 to 64 characters. |
status | boolean | yes | Status |
protocols | array<integer> | yes | For the values of protocols, refer to section 5.5.2 of the Open API Access Guide. |
interfaceType | integer | no | InterfaceType should be a value as follows: 0: WAN; 2: L2TP; 3: PPTP; 4: multi-select WAN or VPN or virtual WAN. |
interfaceId | string | no | Interface ID |
wanPortIds | array<string> | no | WAN port list. When interfaceType is 4, at least one of the wanPortIds or vpnIds or virtualWanIds is not empty. |
vpnIds | array<string> | no | VPN list. When interfaceType is 4, at least one of the wanPortIds or vpnIds or virtualWanIds is not empty. |
virtualWanIds | array<string> | no | Virtual WAN list. When interfaceType is 4, at least one of the wanPortIds or vpnIds or virtualWanIds is not empty. |
backupInterface | boolean | yes | Use the other WAN port if the current one is down |
sourceType | integer | yes | SourceType should be a value as follows: 0: Network; 1: IP Group; 2: IP port Group |
sourceIds | array<string> | yes | Source IDs, which depends on sourceType, for example: if sourceType is network, sourceIds should be LAN network ID. LAN Network can be created using 'Create LAN network' interface, and LAN Network ID can be obtained from 'Get LAN network list' interface. |
destinationType | integer | yes | DestinationType should be a value as follows: 0: Network; 1: IP Group; 2: IP port Group |
destinationIds | array<string> | yes | Destination IDs, which depends on destinationType, for example: if destinationType is network, destinationIds should be LAN network ID. LAN Network can be created using 'Create LAN network' interface, and LAN Network ID can be obtained from 'Get LAN network list' interface. |
// omada_call_operation
{
"operationId": "createPolicyRouting",
"params": {
"siteId": "<siteId>"
},
"body": "{...}"
}Details, permissions and error codes
Create new policy routing.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
Site Device Manager 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.
-33474 - This feature is not supported for the DS-Lite or Map-E WAN connection types.
-33600 - Invalid Source Type.
-33601 - Invalid Destination Type.
-33603 - Source or Destination entry does not exist.
-33608 - Invalid protocols.
-34204 - The number of Policy Routing entries has reached the limit.
-34267 - Only one WAN interface can be configured for Policy Routing.
-34268 - Unable to select a virtual WAN as the WAN interface for Policy Routing.
-34269 - Unable to select Location Group as the Destination for Policy Routing.
-34270 - Unable to select Domain Group as the Destination for Policy Routing.
-34602 - This VPN policy does not exist.
deletePolicyRouting
DELETE /openapi/v1/{omadacId}/sites/{siteId}/routing/policy-routings/{policyRoutingId}
Delete policy routing
| 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) |
policyRoutingId | path | string | yes | Policy routing ID |
// omada_call_operation
{
"operationId": "deletePolicyRouting",
"params": {
"siteId": "<siteId>",
"policyRoutingId": "<policyRoutingId>"
}
}Details, permissions and error codes
Delete policy routing.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
Site Device Manager Modify
modifyPolicyRouting
PUT /openapi/v1/{omadacId}/sites/{siteId}/routing/policy-routings/{policyRoutingId}
Modify policy routing
| 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) |
policyRoutingId | path | string | yes | Policy routing ID |
Request body — application/json (required) — schema PolicyRoutingConfig
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name, name should contain 1 to 64 characters. |
status | boolean | yes | Status |
protocols | array<integer> | yes | For the values of protocols, refer to section 5.5.2 of the Open API Access Guide. |
interfaceType | integer | no | InterfaceType should be a value as follows: 0: WAN; 2: L2TP; 3: PPTP; 4: multi-select WAN or VPN or virtual WAN. |
interfaceId | string | no | Interface ID |
wanPortIds | array<string> | no | WAN port list. When interfaceType is 4, at least one of the wanPortIds or vpnIds or virtualWanIds is not empty. |
vpnIds | array<string> | no | VPN list. When interfaceType is 4, at least one of the wanPortIds or vpnIds or virtualWanIds is not empty. |
virtualWanIds | array<string> | no | Virtual WAN list. When interfaceType is 4, at least one of the wanPortIds or vpnIds or virtualWanIds is not empty. |
backupInterface | boolean | yes | Use the other WAN port if the current one is down |
sourceType | integer | yes | SourceType should be a value as follows: 0: Network; 1: IP Group; 2: IP port Group |
sourceIds | array<string> | yes | Source IDs, which depends on sourceType, for example: if sourceType is network, sourceIds should be LAN network ID. LAN Network can be created using 'Create LAN network' interface, and LAN Network ID can be obtained from 'Get LAN network list' interface. |
destinationType | integer | yes | DestinationType should be a value as follows: 0: Network; 1: IP Group; 2: IP port Group |
destinationIds | array<string> | yes | Destination IDs, which depends on destinationType, for example: if destinationType is network, destinationIds should be LAN network ID. LAN Network can be created using 'Create LAN network' interface, and LAN Network ID can be obtained from 'Get LAN network list' interface. |
// omada_call_operation
{
"operationId": "modifyPolicyRouting",
"params": {
"siteId": "<siteId>",
"policyRoutingId": "<policyRoutingId>"
},
"body": "{...}"
}Details, permissions and error codes
Modify policy routing.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
Site Device Manager 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.
-33474 - This feature is not supported for the DS-Lite or Map-E WAN connection types.
-33600 - Invalid Source Type.
-33601 - Invalid Destination Type.
-33603 - Source or Destination entry does not exist.
-33608 - Invalid protocols.
-34267 - Only one WAN interface can be configured for Policy Routing.
-34268 - Unable to select a virtual WAN as the WAN interface for Policy Routing.
-34269 - Unable to select Location Group as the Destination for Policy Routing.
-34270 - Unable to select Domain Group as the Destination for Policy Routing.
-34602 - This VPN policy does not exist.
modifyPolicyRoutingIndex
POST /openapi/v1/{omadacId}/sites/{siteId}/routing/policy-routings/modifyIndex
Modify policy routing Index
| 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 PolicyRoutingDragSortIndexOpenApiVO
| Field | Type | Required | Description |
|---|---|---|---|
indexes | object | yes | The order in which items take effect, this object is a Map, the key is item ID and the value is the index you want to set. |
// omada_call_operation
{
"operationId": "modifyPolicyRoutingIndex",
"params": {
"siteId": "<siteId>"
},
"body": "{...}"
}Details, permissions and error codes
Modify policy routing Index.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
Site Device Manager Modify
getGridStaticRouting_1
GET /openapi/v1/{omadacId}/sites/{siteId}/routing/static-routings
Get static routing 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) |
// omada_call_operation
{
"operationId": "getGridStaticRouting_1",
"params": {
"siteId": "<siteId>"
}
}Details, permissions and error codes
Get static routing list.
The interface requires one of the permissions:
Site Settings Manager View Only
Network Config Page View Only
Site Device Manager View Only
createStaticRouting_1
POST /openapi/v1/{omadacId}/sites/{siteId}/routing/static-routings
Create new static routing
| 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 StaticRoutingConfig
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name, name should contain 1 to 64 characters. |
status | boolean | yes | Status |
destinations | array<string> | yes | IP address/SubNet |
routeType | integer | yes | RouteType should be a value as follows: 0: NextHop; 1: Interface |
nextHopIp | string | no | Only for routeType:0 or routeType:1 and selected WAN is Static IP/Dynamic IP mode |
interfaceType | integer | no | Only for routeType:1, interfaceType should be a value as follows: 0: Internet(WAN); 1: Network(LAN); 2: L2TP, 3: PPTP, 5: Virtual WAN. |
interfaceId | string | no | Interface ID, for example: if interfaceType is network, interfaceId should be LAN network ID. LAN Network can be created using 'Create LAN network' interface, and LAN Network ID can be obtained from 'Get LAN network list' interface. |
metric | integer | yes | Metric should be within the range of 0–15. |
// omada_call_operation
{
"operationId": "createStaticRouting_1",
"params": {
"siteId": "<siteId>"
},
"body": "{...}"
}Details, permissions and error codes
Create new static routing.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
Site Device Manager 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.
-33474 - This feature is not supported for the DS-Lite or Map-E WAN connection types.
-33503 - This network does not exist.
-34203 - The number of Static Route entries has reached the limit.
-34256 - The interface or next hop is duplicate and there are duplicate items in the destination.
-34257 - The Gateway does not support select VPN Client in Static Routing
-34258 - The Gateway does not support select Virtual WAN in Static Routing
-34602 - This VPN policy does not exist.
deleteStaticRouting_1
DELETE /openapi/v1/{omadacId}/sites/{siteId}/routing/static-routings/{staticRoutingId}
Delete static routing
| 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) |
staticRoutingId | path | string | yes | Static routing ID |
// omada_call_operation
{
"operationId": "deleteStaticRouting_1",
"params": {
"siteId": "<siteId>",
"staticRoutingId": "<staticRoutingId>"
}
}Details, permissions and error codes
Delete static routing.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
Site Device Manager Modify
modifyStaticRouting_1
PUT /openapi/v1/{omadacId}/sites/{siteId}/routing/static-routings/{staticRoutingId}
Modify static routing
| 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) |
staticRoutingId | path | string | yes | Static routing ID |
Request body — application/json (required) — schema StaticRoutingConfig
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name, name should contain 1 to 64 characters. |
status | boolean | yes | Status |
destinations | array<string> | yes | IP address/SubNet |
routeType | integer | yes | RouteType should be a value as follows: 0: NextHop; 1: Interface |
nextHopIp | string | no | Only for routeType:0 or routeType:1 and selected WAN is Static IP/Dynamic IP mode |
interfaceType | integer | no | Only for routeType:1, interfaceType should be a value as follows: 0: Internet(WAN); 1: Network(LAN); 2: L2TP, 3: PPTP, 5: Virtual WAN. |
interfaceId | string | no | Interface ID, for example: if interfaceType is network, interfaceId should be LAN network ID. LAN Network can be created using 'Create LAN network' interface, and LAN Network ID can be obtained from 'Get LAN network list' interface. |
metric | integer | yes | Metric should be within the range of 0–15. |
// omada_call_operation
{
"operationId": "modifyStaticRouting_1",
"params": {
"siteId": "<siteId>",
"staticRoutingId": "<staticRoutingId>"
},
"body": "{...}"
}Details, permissions and error codes
Modify static routing.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
Site Device Manager 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.
-33474 - This feature is not supported for the DS-Lite or Map-E WAN connection types.
-33503 - This network does not exist.
-34256 - The interface or next hop is duplicate and there are duplicate items in the destination.
-34257 - The Gateway does not support select VPN Client in Static Routing
-34258 - The Gateway does not support select Virtual WAN in Static Routing
-34602 - This VPN policy does not exist.
getStaticRoutingInterfaceList
GET /openapi/v1/{omadacId}/sites/{siteId}/routing/static-routings/interfaces
Get static routing interface 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) |
// omada_call_operation
{
"operationId": "getStaticRoutingInterfaceList",
"params": {
"siteId": "<siteId>"
}
}Details, permissions and error codes
Get static routing interface list.
The interface requires one of the permissions:
Site Settings Manager View Only
Network Config Page View Only
Site Device Manager View Only