Skip to content

Authentication (Template) ​

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

OperationMethodSummary
getMacAuthSettingGETGet site MAC-Based Authentication Template info
updateMacAuthSettingPATCHUpdate site MAC-Based Authentication Template info
getMacAuthSsidsGETGet ssids that support MAC auth Template
createPortalTemplatePOSTCreate portal template
deletePortalTemplateDELETEDelete portal template
getPortalTemplateDetailGETGet portal template detail
modifyPortalTemplatePATCHModify portal template
getPortalTemplateCustomizationGETGet portal template customization
uploadPortalPageTemplatePOSTImport portal page in a site template
uploadPortalPicTemplatePOSTUpload portal picture in a site template
getPortalListTemplateGETGet portal list in a site template

getMacAuthSetting ​

GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/mac-auth

Get site MAC-Based Authentication Template info

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

Get MAC-Based Authentication setting info of the siteTemplate with the given omadacId and siteTemplateId.
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.

updateMacAuthSetting ​

PATCH /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/mac-auth

Update site MAC-Based Authentication Template info

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite Template ID

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

FieldTypeRequiredDescription
enablebooleanyesMAC-Based Authentication enable status
ssidsarray<string>yesSSID ID list with MAC-Based authentication configured. SSID can be created using 'Create new SSID' ('Create new SSID template') interface, and SSID ID can be obtained from 'Get SSID list' ('Get SSID template list') interface
radiusProfileIdstringnoThis field represents radius profile ID. Radius profile can be created using 'Create a new RADIUS profile' ('Create a new RADIUS profile template') interface, and radius profile ID can be obtained from 'Get RADIUS profile list' ('Get RADIUS profile template list') interface
mabEnablebooleannoMAB enable status
macFormatintegernoFormat of the MAC address. MacFormat should be a value as follows: 0: aabbccddeeff, 1: aa-bb-cc-dd-ee-ff, 2: aa:bb:cc:dd:ee:ff, 3: AABBCCDDEEFF, 4: AA-BB-CC-DD-EE-FF, 5: AA:BB:CC:DD:EE:FF
emptyPwdEnablebooleannoWhether to enable empty password
nasIdstringnoNAS ID issued to AP. NasId should contain 1 to 64 characters
json
// omada_call_operation
{
  "operationId": "updateMacAuthSetting",
  "params": {
    "siteTemplateId": "<siteTemplateId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Update MAC-Based Authentication setting info of the siteTemplate with the given parameters.
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):
-33011 - Operation failed because other operations are being performed on this site template. Please wait and try again later.

getMacAuthSsids ​

GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/mac-auth/ssids

Get ssids that support MAC auth Template

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

Get ssid list that support MAC-Based Authentication Template with the given omadacId and siteTemplateId.
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.

createPortalTemplate ​

POST /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/portal

Create portal template

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite Template ID

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

FieldTypeRequiredDescription
namestringyesPortal Name, should contain 1 to 128 characters
enablebooleanyesPortal Enable
ssidListarray<string>noSSID ID list bound with this Portal. SSID can be created using 'Create new SSID' ('Create new SSID template') interface, and SSID ID can be obtained from 'Get SSID list' ('Get SSID template list') interface
networkListarray<string>noLan network ID list bound with this Portal. LAN Network can be created using 'Create LAN network' ('Create LAN network template') interface, and LAN Network ID can be obtained from 'Get LAN network list' ('Get LAN network template list') interface
authTypeintegeryesAuth Type, should be a value as follows: <br/>0:No Authentication; 1:Simple Password;<br/>2: External RADIUS Server; 4:External Portal Server;<br/>11:Hotspot; 15: Ldap; 16: Social Login
authTimeoutAuthTimeoutSettingyes(AuthTimeoutSetting not expanded; call omada_get_schema "AuthTimeoutSetting")
httpsRedirectEnablebooleanyesWith this option enabled, unauthenticated clients will be redirected to the Portal page when they are trying to browse HTTPS websites.
landingPageintegeryesLandingPage enum: 1: Redirect to the original URL, 2: Redirect to Promotional URL, 3: Redirect to Logout Page. <br/>With The Original URL selected, clients are directed to the URL they request for after they pass Portal authentication. <br/>With The Promotional URL selected, clients are directed to the specified URL here after they pass Portal authentication. <br/>With The Logout Page selected, clients are directed to the Portal Logout Page after they pass Portal authentication.
landingUrlSchemestringnoIf Parameter [landingPage] is 2(Redirect to Promotional URL),this Parameter is requested, content is http or https.
landingUrlstringnoIf Parameter [landingPage] is 2(Redirect to Promotional URL),this Parameter is requested.
noAuthNoAuthSettingno(NoAuthSetting not expanded; call omada_get_schema "NoAuthSetting")
simplePasswordSimplePasswordSettingno(SimplePasswordSetting not expanded; call omada_get_schema "SimplePasswordSetting")
hotspotHotspotSettingno(HotspotSetting not expanded; call omada_get_schema "HotspotSetting")
socialLoginSocialLoginSettingOpenApiVOno(SocialLoginSettingOpenApiVO not expanded; call omada_get_schema "SocialLoginSettingOpenApiVO")
googleGoogleOAuthSettingOpenApiVOno(GoogleOAuthSettingOpenApiVO not expanded; call omada_get_schema "GoogleOAuthSettingOpenApiVO")
smsSmsSettingno(SmsSetting not expanded; call omada_get_schema "SmsSetting")
portalFormIdstringnoPortal form ID, required when [authType] is 11 and hotspot [enabledTypes] contains 12.
hotspotRadiusHotspotRadiusSettingno(HotspotRadiusSetting not expanded; call omada_get_schema "HotspotRadiusSetting")
externalPortalExternalServerPortalSettingno(ExternalServerPortalSetting not expanded; call omada_get_schema "ExternalServerPortalSetting")
externalRadiusExternalRadiusSettingno(ExternalRadiusSetting not expanded; call omada_get_schema "ExternalRadiusSetting")
ldapLdapSettingno(LdapSetting not expanded; call omada_get_schema "LdapSetting")
pageTypeintegernoPage type, should be a value as follows: 1: Use default page, 2: use uploaded page. When [pageType] is null, it defaults to 1
importedPortalPageImportedPortalPageOpenApiVOno(ImportedPortalPageOpenApiVO not expanded; call omada_get_schema "ImportedPortalPageOpenApiVO")
portalCustomizePortalCustomizeOpenApiVOno(PortalCustomizeOpenApiVO not expanded; call omada_get_schema "PortalCustomizeOpenApiVO")
json
// omada_call_operation
{
  "operationId": "createPortalTemplate",
  "params": {
    "siteTemplateId": "<siteTemplateId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Create new portal template
The interface requires one of the permissions:
Global Site Template Manager Modify

deletePortalTemplate ​

DELETE /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/portal/{portalId}

Delete portal template

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

Delete portal setting with the given portal ID
The interface requires one of the permissions:
Global Site Template Manager Modify

getPortalTemplateDetail ​

GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/portal/{portalId}

Get portal template detail

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

Get portal template detail information with the given omadacId, siteTemplateId and portalId.
The interface requires one of the permissions:
Global Site Template Manager View Only

modifyPortalTemplate ​

PATCH /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/portal/{portalId}

Modify portal template

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite Template ID
portalIdpathstringyesPortal ID

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

FieldTypeRequiredDescription
namestringyesPortal Name, should contain 1 to 128 characters
enablebooleanyesPortal Enable
ssidListarray<string>noSSID ID list bound with this Portal. SSID can be created using 'Create new SSID' ('Create new SSID template') interface, and SSID ID can be obtained from 'Get SSID list' ('Get SSID template list') interface
networkListarray<string>noLan network ID list bound with this Portal. LAN Network can be created using 'Create LAN network' ('Create LAN network template') interface, and LAN Network ID can be obtained from 'Get LAN network list' ('Get LAN network template list') interface
authTypeintegeryesAuth Type, should be a value as follows: <br/>0:No Authentication; 1:Simple Password;<br/>2: External RADIUS Server; 4:External Portal Server;<br/>11:Hotspot; 15: Ldap; 16: Social Login
authTimeoutAuthTimeoutSettingyes(AuthTimeoutSetting not expanded; call omada_get_schema "AuthTimeoutSetting")
httpsRedirectEnablebooleanyesWith this option enabled, unauthenticated clients will be redirected to the Portal page when they are trying to browse HTTPS websites.
landingPageintegeryesLandingPage enum: 1: Redirect to the original URL, 2: Redirect to Promotional URL, 3: Redirect to Logout Page. <br/>With The Original URL selected, clients are directed to the URL they request for after they pass Portal authentication. <br/>With The Promotional URL selected, clients are directed to the specified URL here after they pass Portal authentication. <br/>With The Logout Page selected, clients are directed to the Portal Logout Page after they pass Portal authentication.
landingUrlSchemestringnoIf Parameter [landingPage] is 2(Redirect to Promotional URL),this Parameter is requested, content is http or https.
landingUrlstringnoIf Parameter [landingPage] is 2(Redirect to Promotional URL),this Parameter is requested.
noAuthNoAuthSettingno(NoAuthSetting not expanded; call omada_get_schema "NoAuthSetting")
simplePasswordSimplePasswordSettingno(SimplePasswordSetting not expanded; call omada_get_schema "SimplePasswordSetting")
hotspotHotspotSettingno(HotspotSetting not expanded; call omada_get_schema "HotspotSetting")
socialLoginSocialLoginSettingOpenApiVOno(SocialLoginSettingOpenApiVO not expanded; call omada_get_schema "SocialLoginSettingOpenApiVO")
googleGoogleOAuthSettingOpenApiVOno(GoogleOAuthSettingOpenApiVO not expanded; call omada_get_schema "GoogleOAuthSettingOpenApiVO")
smsSmsSettingno(SmsSetting not expanded; call omada_get_schema "SmsSetting")
portalFormIdstringnoPortal form ID, required when [authType] is 11 and hotspot [enabledTypes] contains 12.
hotspotRadiusHotspotRadiusSettingno(HotspotRadiusSetting not expanded; call omada_get_schema "HotspotRadiusSetting")
externalPortalExternalServerPortalSettingno(ExternalServerPortalSetting not expanded; call omada_get_schema "ExternalServerPortalSetting")
externalRadiusExternalRadiusSettingno(ExternalRadiusSetting not expanded; call omada_get_schema "ExternalRadiusSetting")
ldapLdapSettingno(LdapSetting not expanded; call omada_get_schema "LdapSetting")
pageTypeintegernoPage type, should be a value as follows: 1: Use default page, 2: use uploaded page. When [pageType] is null, it defaults to 1
importedPortalPageImportedPortalPageOpenApiVOno(ImportedPortalPageOpenApiVO not expanded; call omada_get_schema "ImportedPortalPageOpenApiVO")
portalCustomizePortalCustomizeOpenApiVOno(PortalCustomizeOpenApiVO not expanded; call omada_get_schema "PortalCustomizeOpenApiVO")
json
// omada_call_operation
{
  "operationId": "modifyPortalTemplate",
  "params": {
    "siteTemplateId": "<siteTemplateId>",
    "portalId": "<portalId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify the portal with the portal ID
The interface requires one of the permissions:
Global Site Template Manager Modify

getPortalTemplateCustomization ​

GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/portal/{portalId}/customization

Get portal template customization

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

Get portal template customization information with the given omadacId, siteTemplateId and portalId.
The interface requires one of the permissions:
Global Site Template Manager View Only

uploadPortalPageTemplate ​

POST /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/portal/page

Import portal page in a site template

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite Template ID

Request body — multipart/form-data (optional). File field(s): file.

json
// omada_call_operation
{
  "operationId": "uploadPortalPageTemplate",
  "params": {
    "siteTemplateId": "<siteTemplateId>"
  },
  "files": {
    "file": {
      "path": "/path/to/file"
    }
  }
}
Details, permissions and error codes

Import portal page in a site template
The interface requires one of the permissions:
Global Site Template Manager Modify

uploadPortalPicTemplate ​

POST /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/portal/pics

**Upload portal picture in a site template **

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite Template ID
typequerystringyesPortal picture type: background/logo/advertisement.

Request body — multipart/form-data (optional). File field(s): file.

json
// omada_call_operation
{
  "operationId": "uploadPortalPicTemplate",
  "params": {
    "siteTemplateId": "<siteTemplateId>",
    "type": "<type>"
  },
  "files": {
    "file": {
      "path": "/path/to/file"
    }
  }
}
Details, permissions and error codes

Upload portal picture in a site template
The interface requires one of the permissions:
Global Site Template Manager Modify

getPortalListTemplate ​

GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/portals

**Get portal list in a site template **

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

Get portal list with the given omadacId, siteTemplateId.
The interface requires one of the permissions:
Global Site Template Manager View Only

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