Skip to content

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).

OperationMethodSummary
modifyUrlFilteringRuleIndexTemplatePATCHModify URL filtering template rule index
createUrlFilteringRuleTemplatePOSTCreate URL filtering template rule
deleteUrlFilteringRuleTemplateDELETEDelete URL filtering template rule
modifyUrlFilteringRuleTemplatePATCHModify URL filtering template rule
getGridEapRuleTemplateGETGet URL filtering template rule list for eap
getGridGatewayRuleTemplateGETGet URL filtering template rule list for gateway

modifyUrlFilteringRuleIndexTemplate ​

PATCH /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/url-filters

Modify URL filtering template rule index

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite ID

Request body — application/json (required) — schema UrlDragSortIndexOpenapiVO

FieldTypeRequiredDescription
typestringyesType must be gateway or ap
indexesobjectyesThe 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.
json
// 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

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite ID

Request body — application/json (required) — schema UrlFilteringOpenApiVO

FieldTypeRequiredDescription
typestringyesType should be a value as follows: "gateway"; "ap".
namestringyesName should contain 1 to 64 characters.
statusbooleanyesStatus of the URL filtering.
policyintegeryesPolicy should be a value as follows: 0: drop; 1: allow.
sourceTypeintegeryesSource type should be a value as follows: 0: network; 1: IP group; 2: SSID.
sourceIdsarray<string>yesSource 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.
modeintegeryesMode should be a value as follows: 0: URL Path; 1: keywords(Only for gateway).
urlsarray<string>noURLs of the URL filtering, eg: www.google.com.
keywordsarray<string>noKeywords of the URL filtering.
filterModeintegeryesfilterMode should be a value as follows: 0: URL; 1: category.
scenarioModeintegernoscenarioMode should be a value as follows:0: Custom 1: Family 2:Work 3:Education 4:Guest.
categoriesobjectnocategories of the URL filtering, TreeMap<String, List<String>> categories
timeRangestringnotimeRange of the URL filtering, TimeSchedule
json
// 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

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite ID
ruleIdpathstringyesURL filtering rule ID
json
// 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

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite ID
ruleIdpathstringyesURL filtering rule ID

Request body — application/json (required) — schema UrlFilteringOpenApiVO

FieldTypeRequiredDescription
typestringyesType should be a value as follows: "gateway"; "ap".
namestringyesName should contain 1 to 64 characters.
statusbooleanyesStatus of the URL filtering.
policyintegeryesPolicy should be a value as follows: 0: drop; 1: allow.
sourceTypeintegeryesSource type should be a value as follows: 0: network; 1: IP group; 2: SSID.
sourceIdsarray<string>yesSource 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.
modeintegeryesMode should be a value as follows: 0: URL Path; 1: keywords(Only for gateway).
urlsarray<string>noURLs of the URL filtering, eg: www.google.com.
keywordsarray<string>noKeywords of the URL filtering.
filterModeintegeryesfilterMode should be a value as follows: 0: URL; 1: category.
scenarioModeintegernoscenarioMode should be a value as follows:0: Custom 1: Family 2:Work 3:Education 4:Guest.
categoriesobjectnocategories of the URL filtering, TreeMap<String, List<String>> categories
timeRangestringnotimeRange of the URL filtering, TimeSchedule
json
// 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

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite ID
pagequeryintegernoStart page number. Start from 1. (default 1)
pageSizequeryintegernoNumber of entries per page. It should be within the range of 1–1000. (default 100)
json
// 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

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite ID
pagequeryintegernoStart page number. Start from 1. (default 1)
pageSizequeryintegernoNumber of entries per page. It should be within the range of 1–1000. (default 100)
json
// 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

Released under the MIT License. Not affiliated with or endorsed by TP-Link.