Skip to content

IDS/IPS (Template) ​

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

OperationMethodSummary
getTemplateGridAllowListGETGet site template grid ips allow list
getIpsTemplateConfigGETGet site template IDS/IPS config
modifyIpsTemplateConfigPATCHModify site template IDS/IPS config
editTemplateAllowListPATCHEdit site template's allow list
createTemplateAllowListPOSTCreate site template's allow list
deleteTemplateAllowListDELETEDelete template allow list

getTemplateGridAllowList ​

GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/grid/allow-list

Get site template grid ips allow list

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite Template 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)
searchKeyquerystringnoFuzzy query parameters, support field IP / Subnet
json
// omada_call_operation
{
  "operationId": "getTemplateGridAllowList",
  "params": {
    "siteTemplateId": "<siteTemplateId>"
  }
}
Details, permissions and error codes

Obtain site template grid allow list.
The interface requires one of the permissions:
Global Site Template Manager View Only

getIpsTemplateConfig ​

GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/network-security/ips

Get site template IDS/IPS config

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite Template ID
json
// omada_call_operation
{
  "operationId": "getIpsTemplateConfig",
  "params": {
    "siteTemplateId": "<siteTemplateId>"
  }
}
Details, permissions and error codes

Get site template IDS/IPS config
The interface requires one of the permissions:
Global Site Template Manager View Only

modifyIpsTemplateConfig ​

PATCH /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/network-security/ips

Modify site template IDS/IPS config

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite Template ID

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

FieldTypeRequiredDescription
enablebooleanyesWhether to enable IDS/IPS config. If parameter[enable] is true, parameter[ipsMode] and parameter[dplevel] are needed
ipsModeintegernoIpsMode should be a value as follows: 0: detect only; 1: detect and block
geoEnablebooleannoWhether to enable identifying the source country and destination country of attack ip addresses.
dpLevelintegernoDpLevel should be a value as follows: 0: Low; 1: Medium; 2: High; 3: Custom
customCategoriesarray<integer>noCustom IDS/IPS categories list, if parameter[Dplevel] is 3, customCategories is needed.CustomCategories should be a list as follow: 1: Botcc, 2: Worm, 3: Malware, 4: Mobile_Malware, 6: P2P, 7: Tor, 8: Exploit, 9: Shellcode, 14: Activex, 15: DNS, 18: User Agents, 24: DShield
timeRangeIdstringnoThis field represents Time Range ID. Time Range can be created using 'Create time range profile' interface, and Time Range ID can be obtained from 'Get time range profile list' interface. If parameter[timeRangeId] is null, IDS/IPS will be effective in all time ranges.
json
// omada_call_operation
{
  "operationId": "modifyIpsTemplateConfig",
  "params": {
    "siteTemplateId": "<siteTemplateId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify site template IDS/IPS config
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):
-35205 - The adopted gateway does not support IDS/IPS configurations.

editTemplateAllowList ​

PATCH /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/network-security/ips/allow-list

Edit site template's allow list

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite Template ID

Request body — application/json (required) — schema Modify IPS allow list entry

FieldTypeRequiredDescription
idstringyesAllow list entry ID.
directionintegernoThe location of the target that can trigger the threat, direction should be a value as follows:0: both 1: source, 2: destination.
trafficTypeintegernoExempt the category of objects (targets) that can trigger the threat, trafficType should be a value as follows: 0: IP Address, 1: Network, 2: Subnet.
ipAddressstringnoThe value of the trafficType is 0, indicating IP address.
networkstringnoThe value of the trafficType is 1, indicating LAN network ID.
subnetstringnoThe value of the trafficType is 2, indicating subnet.
json
// omada_call_operation
{
  "operationId": "editTemplateAllowList",
  "params": {
    "siteTemplateId": "<siteTemplateId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify site template's allow list entry.
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):
-35205 - The adopted gateway does not support IDS/IPS configurations.

createTemplateAllowList ​

POST /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/network-security/ips/allow-list

Create site template's allow list

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite Template ID

Request body — application/json (required) — schema New IPS allow list entry

FieldTypeRequiredDescription
directionintegernoThe location of the target that can trigger the threat, direction should be a value as follows:0: both 1: source, 2: destination.
trafficTypeintegernoExempt the category of objects (targets) that can trigger the threat, trafficType should be a value as follows: 0: IP Address, 1: Network, 2: Subnet.
ipAddressstringnoThe value of the trafficType is 0, indicating IP address.
networkstringnoThe value of the trafficType is 1, indicating LAN network ID.
subnetstringnoThe value of the trafficType is 2, indicating subnet.
json
// omada_call_operation
{
  "operationId": "createTemplateAllowList",
  "params": {
    "siteTemplateId": "<siteTemplateId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Create site template's allow list.
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):
-35202 - The number of allow list entries has reached the limit.
-35205 - The adopted gateway does not support IDS/IPS configurations.

deleteTemplateAllowList ​

DELETE /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/network-security/ips/allow-list/{entryId}

Delete template allow list

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite Template ID
entryIdpathstringyesAllow entry ID
json
// omada_call_operation
{
  "operationId": "deleteTemplateAllowList",
  "params": {
    "siteTemplateId": "<siteTemplateId>",
    "entryId": "<entryId>"
  }
}
Details, permissions and error codes

Delete template allow List by entry id.
The interface requires one of the permissions:
Global Site Template Manager Modify

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