Skip to content

Session Limit ​

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

OperationMethodSummary
getSessionLimitGETGet session limit
modifySessionLimitPATCHModify session limit
getGridSessionLimitRuleGETGet session limit rule list
modifySessionLimitRuleIndexPATCHModify session limit rule index
createSessionLimitRulePOSTCreate session limit rule
deleteSessionLimitRuleDELETEDelete session limit rule
modifySessionLimitRulePATCHModify session limit rule

getSessionLimit ​

GET /openapi/v1/{omadacId}/sites/{siteId}/session-limit

Get session limit

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

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

modifySessionLimit ​

PATCH /openapi/v1/{omadacId}/sites/{siteId}/session-limit

Modify session limit

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

Request body — application/json (required) — schema Session limit entity

FieldTypeRequiredDescription
enablebooleanyesEnable the session limit.
json
// omada_call_operation
{
  "operationId": "modifySessionLimit",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify session limit.
The interface requires one of the permissions:
Site Settings Manager Modify
Network Config Page Modify
Site Device Manager Modify

getGridSessionLimitRule ​

GET /openapi/v1/{omadacId}/sites/{siteId}/session-limit/rules

Get session limit rule 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": "getGridSessionLimitRule",
  "params": {
    "siteId": "<siteId>"
  }
}
Details, permissions and error codes

Get session limit rule list.
The interface requires one of the permissions:
Site Settings Manager View Only
Network Config Page View Only
Site Device Manager View Only

modifySessionLimitRuleIndex ​

PATCH /openapi/v1/{omadacId}/sites/{siteId}/session-limit/rules

Modify session limit rule index

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

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

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

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

createSessionLimitRule ​

POST /openapi/v1/{omadacId}/sites/{siteId}/session-limit/rules

Create session limit rule

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

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

FieldTypeRequiredDescription
namestringyesName should contain 1 to 64 characters.
statusbooleanyesStatus of the session limit rule.
sourceTypeintegeryesSource type should be a value as follows: 0: network; 1: IP group; 2: IP.
sourceIdsarray<string>noSource IDs of the session limit rule, only for network and IP group type.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.
ipstringnoIP of the session limit rule.
maxSessionintegeryesMax sessions should be within the range of 1–999999.
json
// omada_call_operation
{
  "operationId": "createSessionLimitRule",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Create session limit 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):
-33006 - This name already exists in this site.
-33600 - Invalid Source Type.
-34206 - The number of Session Limit rules has reached the limit.
-34263 - The gateway does not support the IP Address rule.

deleteSessionLimitRule ​

DELETE /openapi/v1/{omadacId}/sites/{siteId}/session-limit/rules/{ruleId}

Delete session limit rule

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

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

modifySessionLimitRule ​

PATCH /openapi/v1/{omadacId}/sites/{siteId}/session-limit/rules/{ruleId}

Modify session limit rule

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

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

FieldTypeRequiredDescription
namestringyesName should contain 1 to 64 characters.
statusbooleanyesStatus of the session limit rule.
sourceTypeintegeryesSource type should be a value as follows: 0: network; 1: IP group; 2: IP.
sourceIdsarray<string>noSource IDs of the session limit rule, only for network and IP group type.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.
ipstringnoIP of the session limit rule.
maxSessionintegeryesMax sessions should be within the range of 1–999999.
json
// omada_call_operation
{
  "operationId": "modifySessionLimitRule",
  "params": {
    "siteId": "<siteId>",
    "ruleId": "<ruleId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify session limit 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):
-33006 - This name already exists in this site.
-33600 - Invalid Source Type.
-34218 - Unable to change the IP type rules to other types.
-34263 - The gateway does not support the IP Address rule.

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