Routing (Template)
9 operations. Call any of them with omada_call_operation (or, in full tool mode, as a tool named by its operationId).
| Operation | Method | Summary |
|---|---|---|
| getTemplateGridPolicyRouting | GET | Get site template's policy routing list |
| createTemplatePolicyRouting | POST | Create site template's policy routing |
| deleteTemplatePolicyRouting | DELETE | Delete site template's policy routing |
| modifyTemplatePolicyRouting | PUT | Modify site template's policy routing |
| modifyTemplatePolicyRoutingIndex | POST | Modify site template's policy routing Index |
| getTemplateGridStaticRouting | GET | Get site template's static routing list |
| createTemplateStaticRouting | POST | Create site template's static routing |
| deleteTemplateStaticRouting | DELETE | Delete site template's static routing |
| modifyTemplateStaticRouting | PUT | Modify site template's static routing |
getTemplateGridPolicyRouting
GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/routing/policy-routings
Get site template's policy routing list
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
// omada_call_operation
{
"operationId": "getTemplateGridPolicyRouting",
"params": {
"siteTemplateId": "<siteTemplateId>"
}
}Details, permissions and error codes
Get site template's policy routing list.
The interface requires one of the permissions:
Global Site Template Manager View Only
createTemplatePolicyRouting
POST /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/routing/policy-routings
Create site template's policy routing
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template 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": "createTemplatePolicyRouting",
"params": {
"siteTemplateId": "<siteTemplateId>"
},
"body": "{...}"
}Details, permissions and error codes
Create site template's policy routing.
The interface requires one of the permissions:
Global Site Template 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.
-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.
deleteTemplatePolicyRouting
DELETE /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/routing/policy-routings/{policyRoutingId}
Delete site template's policy routing
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
policyRoutingId | path | string | yes | Policy routing ID |
// omada_call_operation
{
"operationId": "deleteTemplatePolicyRouting",
"params": {
"siteTemplateId": "<siteTemplateId>",
"policyRoutingId": "<policyRoutingId>"
}
}Details, permissions and error codes
Delete site template's policy routing.
The interface requires one of the permissions:
Global Site Template Manager Modify
modifyTemplatePolicyRouting
PUT /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/routing/policy-routings/{policyRoutingId}
Modify site template's policy routing
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
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": "modifyTemplatePolicyRouting",
"params": {
"siteTemplateId": "<siteTemplateId>",
"policyRoutingId": "<policyRoutingId>"
},
"body": "{...}"
}Details, permissions and error codes
Modify site template's policy routing.
The interface requires one of the permissions:
Global Site Template 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.
-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.
modifyTemplatePolicyRoutingIndex
POST /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/routing/policy-routings/modifyIndex
Modify site template's policy routing Index
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
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": "modifyTemplatePolicyRoutingIndex",
"params": {
"siteTemplateId": "<siteTemplateId>"
},
"body": "{...}"
}Details, permissions and error codes
Modify site template's policy routing Index.
The interface requires one of the permissions:
Global Site Template Manager Modify
getTemplateGridStaticRouting
GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/routing/static-routings
Get site template's static routing list
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
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": "getTemplateGridStaticRouting",
"params": {
"siteTemplateId": "<siteTemplateId>"
}
}Details, permissions and error codes
Get site template static routing list.
The interface requires one of the permissions:
Global Site Template Manager View Only
createTemplateStaticRouting
POST /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/routing/static-routings
Create site template's static routing
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
Request body — application/json (required) — schema StaticRoutingConfigTemplate
| 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 template' interface, and LAN Network ID can be obtained from 'Get LAN network list template' interface. |
metric | integer | yes | Metric should be within the range of 0–15. |
// omada_call_operation
{
"operationId": "createTemplateStaticRouting",
"params": {
"siteTemplateId": "<siteTemplateId>"
},
"body": "{...}"
}Details, permissions and error codes
Create site template static routing.
The interface requires one of the permissions:
Global Site Template 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.
-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.
deleteTemplateStaticRouting
DELETE /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/routing/static-routings/{staticRoutingId}
Delete site template's static routing
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
staticRoutingId | path | string | yes | Static routing ID |
// omada_call_operation
{
"operationId": "deleteTemplateStaticRouting",
"params": {
"siteTemplateId": "<siteTemplateId>",
"staticRoutingId": "<staticRoutingId>"
}
}Details, permissions and error codes
Delete site template's static routing.
The interface requires one of the permissions:
Global Site Template Manager Modify
modifyTemplateStaticRouting
PUT /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/routing/static-routings/{staticRoutingId}
Modify site template's static routing
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
staticRoutingId | path | string | yes | Static routing ID |
Request body — application/json (required) — schema StaticRoutingConfigTemplate
| 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 template' interface, and LAN Network ID can be obtained from 'Get LAN network list template' interface. |
metric | integer | yes | Metric should be within the range of 0–15. |
// omada_call_operation
{
"operationId": "modifyTemplateStaticRouting",
"params": {
"siteTemplateId": "<siteTemplateId>",
"staticRoutingId": "<staticRoutingId>"
},
"body": "{...}"
}Details, permissions and error codes
Modify site template's static routing.
The interface requires one of the permissions:
Global Site Template 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.
-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.