Skip to content

Switch QoS ​

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

OperationMethodSummary
modifyRuleIndexPUTDrag and sort the QoS rules.
getOswQosModeGETGet switch QoS mode.
modifyOswQosModePUTModify switch QoS mode.
getQosRulesGETGet switch QoS rules.
createQosRulePOSTCreate switch QoS rule.
deleteQosRuleDELETEDelete switch QoS rule.
modifyQosRulePUTModify switch QoS rule.
getSelectedDeviceBriefInfoPOSTGet switch QoS selected device brief info.
getDscpMappingGETGet switch QoS dscp mapping.
modifyDscpMappingPUTModify switch QoS dscp mapping.
getSchedulerMappingGETGet switch QoS queue scheduling.
modifySchedulerMappingPUTModify switch QoS queue scheduling.
getSelectableDevicesGETGet switch QoS selectable devices.
getAllSelectableDevicesGETGet switch QoS all selectable device's mac.
modifyQosRuleStatusPUTModify switch QoS rule's status.
getUpgradableDevicesGETGet switch QoS upgradable devices.
getDscpMappingTemplateGETGet switch QoS dscp mapping in site template.

modifyRuleIndex ​

PUT /openapi/v1/{omadacId}/sites/{siteId}/switch-qos/modify-index

Drag and sort the QoS rules.

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

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

FieldTypeRequiredDescription
typestringno
omadacIdstringno
siteIdstringno
indexesobjectyesDragSort indexes. The key corresponds to the rule id and the value corresponds to the new index value.
json
// omada_call_operation
{
  "operationId": "modifyRuleIndex",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Drag and sort the QoS rules.
The interface requires one of the permissions:
Network Config Page Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-1001 - Invalid request parameters.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-40005 - The switch QoS rule does not exist.

getOswQosMode ​

GET /openapi/v1/{omadacId}/sites/{siteId}/switch-qos/qos-mode

Get switch QoS mode.

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

Get switch QoS mode.
The interface requires one of the permissions:
Network Config Page View Only
Device Config Page View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.

modifyOswQosMode ​

PUT /openapi/v1/{omadacId}/sites/{siteId}/switch-qos/qos-mode

Modify switch QoS mode.

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

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

FieldTypeRequiredDescription
qosModeintegernoSwitch QoS Mode, 0:old mode(Based on Qos Profile implementation), 1:new mode(Based on QoS rules implementation.)
completedintegernoIndicates whether the new mode switch has been completed. 0: Not completed, 1: Completed. If it is in the preview state, qosMode is 1 and completed is 0.
json
// omada_call_operation
{
  "operationId": "modifyOswQosMode",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify switch QoS mode.
The interface requires one of the permissions:
Network Config Page Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-1001 - Invalid request parameters.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.

getQosRules ​

GET /openapi/v1/{omadacId}/sites/{siteId}/switch-qos/qos-rule

Get switch QoS rules.

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)
searchKeyquerystringnoFuzzy query parameters, support field
json
// omada_call_operation
{
  "operationId": "getQosRules",
  "params": {
    "siteId": "<siteId>"
  }
}
Details, permissions and error codes

Get switch QoS rules.
The interface requires one of the permissions:
Network Config Page View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.

createQosRule ​

POST /openapi/v1/{omadacId}/sites/{siteId}/switch-qos/qos-rule

Create switch QoS rule.

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

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

FieldTypeRequiredDescription
idstringnoThe Qos rule id. This parameter is not required when creating or modifying Qos rule.
indexintegernoThe index of Qos rule. This parameter is not required when creating or modifying Qos rule.
namestringyesThe name of Qos rule.
statusbooleanyesThe status of Qos rule, true: enable, false:disable
typeintegeryesThe type of Qos rule, 0:Network, 1:Port, 2:Custom
ipVersionarray<integer>yesThe selected ipVersion list of Qos rule, IPv4:[0], IPv6:[1], IPv4&IPv6:[0,1]
lanNetworkEntriesarray<LanNetworkEntryVO>noIt can be issued when the type is either "Network" or "Custom". For the "Network" type, multiple options are available; for the "Custom" type, a single option is required.
protocolintegernoNetwork Protocol(Reference to chapter 5.5.1 ACL Protocol Template at Home page). When the type is "Custom", it can be issued.
dscpintegernoThe dscp value(0-63). When the type is "Custom", it can be issued.
queueintegeryesThe queue of Qos rule(0-7).
dscpReEnablebooleannoWhether to enable DSCP remark
dscpReintegernoThe remarked dscp value(0-63). If it is set to "Auto", the actual issued value is 64.
bindTypeintegernoSwitch port bind type(0: all switch port, 1: custom switch port).
deviceListarray<OswQosRuleDeviceVO>noList of switch devices to which QoS rule are bound, only for bindType 1
sPortintegernoThe source port(0-65535). When the type is "Custom" and the protocol is TCP or UDP, it can be issued.
dPortintegernoThe destination port(0-65535). When the type is "Custom" and the protocol is TCP or UDP, it can be issued.
json
// omada_call_operation
{
  "operationId": "createQosRule",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Create switch QoS rule.
The interface requires one of the permissions:
Network Config Page Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-39700 - Switch does not exist

deleteQosRule ​

DELETE /openapi/v1/{omadacId}/sites/{siteId}/switch-qos/qos-rule/{qosRuleId}

Delete switch QoS rule.

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

Delete switch QoS rule.
The interface requires one of the permissions:
Network Config Page Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-39700 - Switch does not exist

modifyQosRule ​

PUT /openapi/v1/{omadacId}/sites/{siteId}/switch-qos/qos-rule/{qosRuleId}

Modify switch QoS rule.

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

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

FieldTypeRequiredDescription
idstringnoThe Qos rule id. This parameter is not required when creating or modifying Qos rule.
indexintegernoThe index of Qos rule. This parameter is not required when creating or modifying Qos rule.
namestringyesThe name of Qos rule.
statusbooleanyesThe status of Qos rule, true: enable, false:disable
typeintegeryesThe type of Qos rule, 0:Network, 1:Port, 2:Custom
ipVersionarray<integer>yesThe selected ipVersion list of Qos rule, IPv4:[0], IPv6:[1], IPv4&IPv6:[0,1]
lanNetworkEntriesarray<LanNetworkEntryVO>noIt can be issued when the type is either "Network" or "Custom". For the "Network" type, multiple options are available; for the "Custom" type, a single option is required.
protocolintegernoNetwork Protocol(Reference to chapter 5.5.1 ACL Protocol Template at Home page). When the type is "Custom", it can be issued.
dscpintegernoThe dscp value(0-63). When the type is "Custom", it can be issued.
queueintegeryesThe queue of Qos rule(0-7).
dscpReEnablebooleannoWhether to enable DSCP remark
dscpReintegernoThe remarked dscp value(0-63). If it is set to "Auto", the actual issued value is 64.
bindTypeintegernoSwitch port bind type(0: all switch port, 1: custom switch port).
deviceListarray<OswQosRuleDeviceVO>noList of switch devices to which QoS rule are bound, only for bindType 1
sPortintegernoThe source port(0-65535). When the type is "Custom" and the protocol is TCP or UDP, it can be issued.
dPortintegernoThe destination port(0-65535). When the type is "Custom" and the protocol is TCP or UDP, it can be issued.
json
// omada_call_operation
{
  "operationId": "modifyQosRule",
  "params": {
    "siteId": "<siteId>",
    "qosRuleId": "<qosRuleId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify switch QoS rule.
The interface requires one of the permissions:
Network Config Page Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-39700 - Switch does not exist

getSelectedDeviceBriefInfo ​

POST /openapi/v1/{omadacId}/sites/{siteId}/switch-qos/qos-rule/device-info

Get switch QoS selected device brief info.

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

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

FieldTypeRequiredDescription
switchMacListarray<string>yesSwitch Mac List
json
// omada_call_operation
{
  "operationId": "getSelectedDeviceBriefInfo",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Get switch QoS selected device brief info.
The interface requires one of the permissions:
Network Config Page View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-1001 - Invalid request parameters.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.

getDscpMapping ​

GET /openapi/v1/{omadacId}/sites/{siteId}/switch-qos/qos-rule/dscp-mapping

Get switch QoS dscp mapping.

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

Get switch QoS dscp mapping.
The interface requires one of the permissions:
Network Config Page View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-40007 - The dscp mapping does not exist.

modifyDscpMapping ​

PUT /openapi/v1/{omadacId}/sites/{siteId}/switch-qos/qos-rule/dscp-mapping

Modify switch QoS dscp mapping.

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

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

FieldTypeRequiredDescription
mappingobjectyesThe Queue-DSCP mapping map. The key corresponds to the queue and the value corresponds to the DSCP value list
json
// omada_call_operation
{
  "operationId": "modifyDscpMapping",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify switch QoS dscp mapping.
The interface requires one of the permissions:
Network Config Page Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-40007 - The dscp mapping does not exist.

getSchedulerMapping ​

GET /openapi/v1/{omadacId}/sites/{siteId}/switch-qos/qos-rule/scheduler-mapping

Get switch QoS queue scheduling.

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

Get switch QoS queue scheduling.
The interface requires one of the permissions:
Network Config Page View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-40008 - The queue schedule mapping does not exist.

modifySchedulerMapping ​

PUT /openapi/v1/{omadacId}/sites/{siteId}/switch-qos/qos-rule/scheduler-mapping

Modify switch QoS queue scheduling.

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

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

FieldTypeRequiredDescription
idstringno
namestringno
typesintegerno
mappingarray<QueueScheduleConfigVO>no
buildInbooleanno
json
// omada_call_operation
{
  "operationId": "modifySchedulerMapping",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify switch QoS queue scheduling.
The interface requires one of the permissions:
Network Config Page Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-1001 - Invalid request parameters.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-40008 - The queue schedule mapping does not exist.

getSelectableDevices ​

GET /openapi/v1/{omadacId}/sites/{siteId}/switch-qos/qos-rule/selectable-devices

Get switch QoS selectable devices.

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
networkIdquerystringnoNetwork ID
ruleTypequeryintegeryesThe type of Qos rule, 0:Network, 1:Port, 2:Custom
json
// omada_call_operation
{
  "operationId": "getSelectableDevices",
  "params": {
    "siteId": "<siteId>",
    "ruleType": "<ruleType>"
  }
}
Details, permissions and error codes

Get switch QoS selectable devices.
The interface requires one of the permissions:
Network Config Page View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.

getAllSelectableDevices ​

GET /openapi/v1/{omadacId}/sites/{siteId}/switch-qos/qos-rule/selectable-devices/all

Get switch QoS all selectable device's mac.

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
networkIdquerystringnoNetwork ID
ruleTypequeryintegeryesThe type of Qos rule, 0:Network, 1:Port, 2:Custom
json
// omada_call_operation
{
  "operationId": "getAllSelectableDevices",
  "params": {
    "siteId": "<siteId>",
    "ruleType": "<ruleType>"
  }
}
Details, permissions and error codes

Get switch QoS all selectable device's mac.
The interface requires one of the permissions:
Network Config Page View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.

modifyQosRuleStatus ​

PUT /openapi/v1/{omadacId}/sites/{siteId}/switch-qos/qos-rule/status/{qosRuleId}

Modify switch QoS rule's status.

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

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

FieldTypeRequiredDescription
statusbooleanyes
json
// omada_call_operation
{
  "operationId": "modifyQosRuleStatus",
  "params": {
    "siteId": "<siteId>",
    "qosRuleId": "<qosRuleId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify switch QoS rule's status.
The interface requires one of the permissions:
Network Config Page Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-39700 - Switch does not exist

getUpgradableDevices ​

GET /openapi/v1/{omadacId}/sites/{siteId}/switch-qos/upgradable-devices

Get switch QoS upgradable devices.

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

Get switch QoS upgradable devices.
The interface requires one of the permissions:
Network Config Page View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.

getDscpMappingTemplate ​

GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/switch-qos/qos-rule/dscp-mapping

Get switch QoS dscp mapping in site template.

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

Get switch QoS dscp mapping in site template.
The interface requires one of the permissions:
Global Site Template Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33011 - Operation failed because other operations are being performed on this site template. Please wait and try again later.
-40007 - The dscp mapping does not exist.

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