Skip to content

Access Control ​

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

OperationMethodSummary
getAccessControlGETGet access control setting
modifyAccessControlPATCHModify access control setting
getAutoFreeAuthPolicyGETGet automatically generated free auth policy items

getAccessControl ​

GET /openapi/v1/{omadacId}/sites/{siteId}/setting/access-control

Get access control setting

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

Get access control setting of the site with the given omadacId and siteId.
The interface requires one of the permissions:
Site Settings Manager View Only
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.

modifyAccessControl ​

PATCH /openapi/v1/{omadacId}/sites/{siteId}/setting/access-control

Modify access control setting

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

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

FieldTypeRequiredDescription
preAuthAccessEnablebooleanyesWhether to enable Pre-Authentication Access. If parameter [preAuthAccessEnable] is true, parameter [preAuthAccessPolicies] is needed
preAuthAccessPoliciesarray<PreAuthAccessPolicyOpenApiVO>noList of Pre-Authentication Access Policy
freeAuthClientEnablebooleanyesWhether to enable Free-Authentication Client. If parameter [freeAuthClientEnable] is true, parameter [freeAuthClientPolicies] is needed
freeAuthClientPoliciesarray<FreeAuthClientPolicyOpenApiVO>noList of Free-Authentication Client Policy
json
// omada_call_operation
{
  "operationId": "modifyAccessControl",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify access control setting of the site. When modifying, the full configuration parameters should be passed in
The interface requires one of the permissions:
Site Settings Manager Modify
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.

getAutoFreeAuthPolicy ​

GET /openapi/v1/{omadacId}/sites/{siteId}/setting/auto-free-auth-policy

Get automatically generated free auth policy items

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

Get automatically generated free auth policy items of the site with the given omadacId and siteId.
The interface requires one of the permissions:
Site Settings Manager View Only
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.

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