Skip to content

Session Limit (Template) ​

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

OperationMethodSummary
getTemplateSessionLimitGETGet site template's session limit
modifyTemplateSessionLimitPATCHModify site template's session limit
getTemplateGridSessionLimitRuleGETGet site template's session limit rule list
modifyTemplateSessionLimitRuleIndexPATCHModify site template's session limit rule index
createTemplateSessionLimitRulePOSTCreate site template's session limit rule
deleteTemplateSessionLimitRuleDELETEDelete site template's session limit rule
modifyTemplateSessionLimitRulePATCHModify site template's session limit rule

getTemplateSessionLimit ​

GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/session-limit

Get site template's session limit

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

Get site template's session limit.
The interface requires one of the permissions:
Global Site Template Manager View Only

modifyTemplateSessionLimit ​

PATCH /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/session-limit

Modify site template's session limit

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite Template ID

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

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

Modify site template's session limit.
The interface requires one of the permissions:
Global Site Template Manager Modify

getTemplateGridSessionLimitRule ​

GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/session-limit/rules

Get site template's session limit rule 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)
json
// omada_call_operation
{
  "operationId": "getTemplateGridSessionLimitRule",
  "params": {
    "siteTemplateId": "<siteTemplateId>"
  }
}
Details, permissions and error codes

Get site template's session limit rule list.
The interface requires one of the permissions:
Global Site Template Manager View Only

modifyTemplateSessionLimitRuleIndex ​

PATCH /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/session-limit/rules

Modify site template's session limit rule index

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite Template ID

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

Modify site template's session limit rule index.
The interface requires one of the permissions:
Global Site Template Manager Modify

createTemplateSessionLimitRule ​

POST /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/session-limit/rules

Create site template's session limit rule

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite Template ID

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

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 template' interface, and network ID can be obtained from 'Get LAN network template list' interface. IP group can be created using 'Create a new group profile template' interface, and IP group ID can be obtained from 'Get group profile template list' interface.
ipstringnoIP of the session limit rule.
maxSessionintegeryesMax sessions should be within the range of 1–999999.
json
// omada_call_operation
{
  "operationId": "createTemplateSessionLimitRule",
  "params": {
    "siteTemplateId": "<siteTemplateId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Create site template's session limit rule.
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):
-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.

deleteTemplateSessionLimitRule ​

DELETE /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/session-limit/rules/{ruleId}

Delete site template's session limit rule

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

Delete site template's session limit rule.
The interface requires one of the permissions:
Global Site Template Manager Modify

modifyTemplateSessionLimitRule ​

PATCH /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/session-limit/rules/{ruleId}

Modify site template's session limit rule

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite Template ID
ruleIdpathstringyesSession limit rule ID

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

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 template' interface, and network ID can be obtained from 'Get LAN network template list' interface. IP group can be created using 'Create a new group profile template' interface, and IP group ID can be obtained from 'Get group profile template list' interface.
ipstringnoIP of the session limit rule.
maxSessionintegeryesMax sessions should be within the range of 1–999999.
json
// omada_call_operation
{
  "operationId": "modifyTemplateSessionLimitRule",
  "params": {
    "siteTemplateId": "<siteTemplateId>",
    "ruleId": "<ruleId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify site template's session limit rule.
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):
-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.