Skip to content

MAC Filtering ​

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

OperationMethodSummary
getMacFilteringGeneralSettingGETGet MAC filtering general setting
modifyMacFilteringGeneralSettingPATCHModify MAC filtering general setting
createMacFilteringPOSTCreate MAC filtering
deleteMacFilteringDELETEDelete MAC filtering
modifyMacFilteringPATCHModify MAC filtering
getGridAllowMacFilteringGETGet allow MAC filtering list
getGridDenyMacFilteringGETGet deny MAC filtering list

getMacFilteringGeneralSetting ​

GET /openapi/v1/{omadacId}/sites/{siteId}/mac-filter

Get MAC filtering general setting

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

Get MAC filtering general setting.
The interface requires one of the permissions:
Site Settings Manager View Only
Device Config Page View Only
Site Device Manager View Only

modifyMacFilteringGeneralSetting ​

PATCH /openapi/v1/{omadacId}/sites/{siteId}/mac-filter

Modify MAC filtering general setting

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

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

FieldTypeRequiredDescription
enablebooleanyesEnable of the MAC filtering general setting.
filterModeintegernoFilter mode should be a value as follows: 0: allow; 1: deny.
directionGateway direction entityno(Gateway direction entity not expanded; call omada_get_schema "Gateway direction entity")
json
// omada_call_operation
{
  "operationId": "modifyMacFilteringGeneralSetting",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify MAC filtering general setting.
The interface requires one of the permissions:
Site Settings Manager Modify
Device 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):
-33628 - The current gateway does not support mac filter configuration, please upgrade the gateway to the latest firmware version.

createMacFiltering ​

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

Create MAC filtering

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

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

FieldTypeRequiredDescription
idstringnoID of the MAC filtering entity.
namestringyesName of the MAC filtering entity.
filterModeintegeryesFilter mode should be a value as follows: 0: allow; 1: deny.
typeintegeryesType should be a value as follows: 0: macAddresses; 1: macGroupIds.
macAddressesarray<OsgMacFilterAddressOpenApiVO>noMAC addresses of the MAC filtering entity.
macGroupIdsarray<string>noMAC groups of the MAC filtering entity. MAC group can be created using 'Create a new group profile' interface, and MAC group ID can be obtained from 'Get group profile list' interface.
json
// omada_call_operation
{
  "operationId": "createMacFiltering",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Create MAC filtering.
The interface requires one of the permissions:
Site Settings Manager Modify
Device 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):
-33628 - The current gateway does not support mac filter configuration, please upgrade the gateway to the latest firmware version.
-33629 - The number of Mac has reached the limit (%macSize%).
-33777 - This MAC Filtering name already exists.

deleteMacFiltering ​

DELETE /openapi/v1/{omadacId}/sites/{siteId}/mac-filters/{filterId}

Delete MAC filtering

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

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

modifyMacFiltering ​

PATCH /openapi/v1/{omadacId}/sites/{siteId}/mac-filters/{filterId}

Modify MAC filtering

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

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

FieldTypeRequiredDescription
idstringnoID of the MAC filtering entity.
namestringyesName of the MAC filtering entity.
filterModeintegeryesFilter mode should be a value as follows: 0: allow; 1: deny.
typeintegeryesType should be a value as follows: 0: macAddresses; 1: macGroupIds.
macAddressesarray<OsgMacFilterAddressOpenApiVO>noMAC addresses of the MAC filtering entity.
macGroupIdsarray<string>noMAC groups of the MAC filtering entity. MAC group can be created using 'Create a new group profile' interface, and MAC group ID can be obtained from 'Get group profile list' interface.
json
// omada_call_operation
{
  "operationId": "modifyMacFiltering",
  "params": {
    "siteId": "<siteId>",
    "filterId": "<filterId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify MAC filtering.
The interface requires one of the permissions:
Site Settings Manager Modify
Device 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):
-33628 - The current gateway does not support mac filter configuration, please upgrade the gateway to the latest firmware version.
-33777 - This MAC Filtering name already exists.

getGridAllowMacFiltering ​

GET /openapi/v1/{omadacId}/sites/{siteId}/mac-filters/allow

Get allow MAC filtering list

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

Get allow MAC filtering list.
The interface requires one of the permissions:
Site Settings Manager View Only
Device Config Page View Only
Site Device Manager View Only

getGridDenyMacFiltering ​

GET /openapi/v1/{omadacId}/sites/{siteId}/mac-filters/deny

Get deny MAC filtering list

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

Get deny MAC filtering list.
The interface requires one of the permissions:
Site Settings Manager View Only
Device Config Page View Only
Site Device Manager View Only

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