URL Filtering (Template)
6 operations. Call any of them with omada_call_operation (or, in full tool mode, as a tool named by its operationId).
| Operation | Method | Summary |
|---|---|---|
| modifyUrlFilteringRuleIndexTemplate | PATCH | Modify URL filtering template rule index |
| createUrlFilteringRuleTemplate | POST | Create URL filtering template rule |
| deleteUrlFilteringRuleTemplate | DELETE | Delete URL filtering template rule |
| modifyUrlFilteringRuleTemplate | PATCH | Modify URL filtering template rule |
| getGridEapRuleTemplate | GET | Get URL filtering template rule list for eap |
| getGridGatewayRuleTemplate | GET | Get URL filtering template rule list for gateway |
modifyUrlFilteringRuleIndexTemplate
PATCH /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/url-filters
Modify URL filtering template rule index
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site ID |
Request body — application/json (required) — schema UrlDragSortIndexOpenapiVO
| Field | Type | Required | Description |
|---|---|---|---|
type | string | yes | Type must be gateway or ap |
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": "modifyUrlFilteringRuleIndexTemplate",
"params": {
"siteTemplateId": "<siteTemplateId>"
},
"body": "{...}"
}Details, permissions and error codes
Modify URL filtering template rule index.
The interface requires one of the permissions:
Global Site Template Manager Modify
createUrlFilteringRuleTemplate
POST /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/url-filters
Create URL filtering template rule
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site ID |
Request body — application/json (required) — schema UrlFilteringOpenApiVO
| Field | Type | Required | Description |
|---|---|---|---|
type | string | yes | Type should be a value as follows: "gateway"; "ap". |
name | string | yes | Name should contain 1 to 64 characters. |
status | boolean | yes | Status of the URL filtering. |
policy | integer | yes | Policy should be a value as follows: 0: drop; 1: allow. |
sourceType | integer | yes | Source type should be a value as follows: 0: network; 1: IP group; 2: SSID. |
sourceIds | array<string> | yes | Source IDs of the URL filtering. Network can be created using 'Create LAN network' interface, and network ID can be obtained from 'Get LAN network list' interface. IP group can be created using 'Create a new group profile' interface, and IP group ID can be obtained from 'Get group profile list' interface. SSID can be created using 'Create new SSID' interface, and SSID ID can be obtained from 'Get SSID list' interface. |
mode | integer | yes | Mode should be a value as follows: 0: URL Path; 1: keywords(Only for gateway). |
urls | array<string> | no | URLs of the URL filtering, eg: www.google.com. |
keywords | array<string> | no | Keywords of the URL filtering. |
filterMode | integer | yes | filterMode should be a value as follows: 0: URL; 1: category. |
scenarioMode | integer | no | scenarioMode should be a value as follows:0: Custom 1: Family 2:Work 3:Education 4:Guest. |
categories | object | no | categories of the URL filtering, TreeMap<String, List<String>> categories |
timeRange | string | no | timeRange of the URL filtering, TimeSchedule |
// omada_call_operation
{
"operationId": "createUrlFilteringRuleTemplate",
"params": {
"siteTemplateId": "<siteTemplateId>"
},
"body": "{...}"
}Details, permissions and error codes
Create URL filtering template rule.
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):
-33664 - The gateway does not support configuring Keywords as URL mode.
-33665 - The gateway does not support URL Category mode.
-33671 - The gateway does not support configuring time schedule in URL Filter.
deleteUrlFilteringRuleTemplate
DELETE /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/url-filters/{ruleId}
Delete URL filtering template rule
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site ID |
ruleId | path | string | yes | URL filtering rule ID |
// omada_call_operation
{
"operationId": "deleteUrlFilteringRuleTemplate",
"params": {
"siteTemplateId": "<siteTemplateId>",
"ruleId": "<ruleId>"
}
}Details, permissions and error codes
Delete URL filtering template rule.
The interface requires one of the permissions:
Global Site Template Manager Modify
modifyUrlFilteringRuleTemplate
PATCH /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/url-filters/{ruleId}
Modify URL filtering template rule
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site ID |
ruleId | path | string | yes | URL filtering rule ID |
Request body — application/json (required) — schema UrlFilteringOpenApiVO
| Field | Type | Required | Description |
|---|---|---|---|
type | string | yes | Type should be a value as follows: "gateway"; "ap". |
name | string | yes | Name should contain 1 to 64 characters. |
status | boolean | yes | Status of the URL filtering. |
policy | integer | yes | Policy should be a value as follows: 0: drop; 1: allow. |
sourceType | integer | yes | Source type should be a value as follows: 0: network; 1: IP group; 2: SSID. |
sourceIds | array<string> | yes | Source IDs of the URL filtering. Network can be created using 'Create LAN network' interface, and network ID can be obtained from 'Get LAN network list' interface. IP group can be created using 'Create a new group profile' interface, and IP group ID can be obtained from 'Get group profile list' interface. SSID can be created using 'Create new SSID' interface, and SSID ID can be obtained from 'Get SSID list' interface. |
mode | integer | yes | Mode should be a value as follows: 0: URL Path; 1: keywords(Only for gateway). |
urls | array<string> | no | URLs of the URL filtering, eg: www.google.com. |
keywords | array<string> | no | Keywords of the URL filtering. |
filterMode | integer | yes | filterMode should be a value as follows: 0: URL; 1: category. |
scenarioMode | integer | no | scenarioMode should be a value as follows:0: Custom 1: Family 2:Work 3:Education 4:Guest. |
categories | object | no | categories of the URL filtering, TreeMap<String, List<String>> categories |
timeRange | string | no | timeRange of the URL filtering, TimeSchedule |
// omada_call_operation
{
"operationId": "modifyUrlFilteringRuleTemplate",
"params": {
"siteTemplateId": "<siteTemplateId>",
"ruleId": "<ruleId>"
},
"body": "{...}"
}Details, permissions and error codes
Modify URL filtering template rule.
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):
-33664 - The gateway does not support configuring Keywords as URL mode.
-33665 - The gateway does not support URL Category mode.
-33671 - The gateway does not support configuring time schedule in URL Filter.
getGridEapRuleTemplate
GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/url-filters/eap
Get URL filtering template rule list for eap
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site 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": "getGridEapRuleTemplate",
"params": {
"siteTemplateId": "<siteTemplateId>"
}
}Details, permissions and error codes
Get URL filtering template rule list for eap.
The interface requires one of the permissions:
Global Site Template Manager View Only
getGridGatewayRuleTemplate
GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/url-filters/gateway
Get URL filtering template rule list for gateway
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site 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": "getGridGatewayRuleTemplate",
"params": {
"siteTemplateId": "<siteTemplateId>"
}
}Details, permissions and error codes
Get URL filtering template rule list for gateway.
The interface requires one of the permissions:
Global Site Template Manager View Only