Skip to content

URL Filtering ​

9 operations. Call any of them with omada_call_operation (or, in full tool mode, as a tool named by its operationId).

OperationMethodSummary
modifyUrlFilteringRuleIndexPATCHModify URL filtering rule index
createUrlFilteringRulePOSTCreate URL filtering rule
deleteUrlFilteringRuleDELETEDelete URL filtering rule
modifyUrlFilteringRulePATCHModify URL filtering rule
getCategoryGETGet Category
getGridEapRuleGETGet URL filtering rule list for eap
getGridGatewayRuleGETGet URL filtering rule list for gateway
getUrlFilterGeneralGETGet Content Filter Global
modifyUrlFilterGeneralPATCHEdit Content Filter Global

modifyUrlFilteringRuleIndex ​

PATCH /openapi/v1/{omadacId}/sites/{siteId}/url-filters

Modify URL filtering rule index

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)

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": "modifyUrlFilteringRuleIndex",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify URL filtering rule index.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
Site Device Manager Modify

createUrlFilteringRule ​

POST /openapi/v1/{omadacId}/sites/{siteId}/url-filters

Create URL filtering rule

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)

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": "createUrlFilteringRule",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Create URL filtering rule.
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):
-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.

deleteUrlFilteringRule ​

DELETE /openapi/v1/{omadacId}/sites/{siteId}/url-filters/{ruleId}

Delete URL filtering rule

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
ruleIdpathstringyesURL filtering rule ID
json
// omada_call_operation
{
  "operationId": "deleteUrlFilteringRule",
  "params": {
    "siteId": "<siteId>",
    "ruleId": "<ruleId>"
  }
}
Details, permissions and error codes

Delete URL filtering rule.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
Site Device Manager Modify

modifyUrlFilteringRule ​

PATCH /openapi/v1/{omadacId}/sites/{siteId}/url-filters/{ruleId}

Modify URL filtering rule

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
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": "modifyUrlFilteringRule",
  "params": {
    "siteId": "<siteId>",
    "ruleId": "<ruleId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify URL filtering rule.
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):
-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.

getCategory ​

GET /openapi/v1/{omadacId}/sites/{siteId}/url-filters/category

Get Category

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
json
// omada_call_operation
{
  "operationId": "getCategory",
  "params": {
    "siteId": "<siteId>"
  }
}
Details, permissions and error codes

Get Category.
The interface requires one of the permissions:
Site Settings Manager View Only
Network Config Page View Only
Site Device Manager View Only

getGridEapRule ​

GET /openapi/v1/{omadacId}/sites/{siteId}/url-filters/eap

Get URL filtering rule list for eap

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
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": "getGridEapRule",
  "params": {
    "siteId": "<siteId>"
  }
}
Details, permissions and error codes

Get URL filtering rule list for eap.
The interface requires one of the permissions:
Site Settings Manager View Only
Network Config Page View Only

getGridGatewayRule ​

GET /openapi/v1/{omadacId}/sites/{siteId}/url-filters/gateway

Get URL filtering rule list for gateway

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
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": "getGridGatewayRule",
  "params": {
    "siteId": "<siteId>"
  }
}
Details, permissions and error codes

Get URL filtering rule list for gateway.
The interface requires one of the permissions:
Site Settings Manager View Only
Network Config Page View Only
Site Device Manager View Only

getUrlFilterGeneral ​

GET /openapi/v1/{omadacId}/sites/{siteId}/url-filters/globalUrlFilter

Get Content Filter Global

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
json
// omada_call_operation
{
  "operationId": "getUrlFilterGeneral",
  "params": {
    "siteId": "<siteId>"
  }
}
Details, permissions and error codes

Get Content Filter Global.
The interface requires one of the permissions:
Site Settings Manager View Only
Network Config Page View Only
Site Device Manager View Only

modifyUrlFilterGeneral ​

PATCH /openapi/v1/{omadacId}/sites/{siteId}/url-filters/globalUrlFilter

Edit Content Filter Global

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)

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

FieldTypeRequiredDescription
blockPagebooleanyesblockPage should be a value as follows: false: close; true: open.
blockPageMessagestringnoblockPageMessage of blockPage,when blockPage switch is open.
safeSearchbooleanyessafeSearch should be a value as follows: false: close; true: open.
json
// omada_call_operation
{
  "operationId": "modifyUrlFilterGeneral",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Edit Content Filter Global.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
Site Device Manager Modify

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