Authentication (Template)
11 operations. Call any of them with omada_call_operation (or, in full tool mode, as a tool named by its operationId).
| Operation | Method | Summary |
|---|---|---|
| getMacAuthSetting | GET | Get site MAC-Based Authentication Template info |
| updateMacAuthSetting | PATCH | Update site MAC-Based Authentication Template info |
| getMacAuthSsids | GET | Get ssids that support MAC auth Template |
| createPortalTemplate | POST | Create portal template |
| deletePortalTemplate | DELETE | Delete portal template |
| getPortalTemplateDetail | GET | Get portal template detail |
| modifyPortalTemplate | PATCH | Modify portal template |
| getPortalTemplateCustomization | GET | Get portal template customization |
| uploadPortalPageTemplate | POST | Import portal page in a site template |
| uploadPortalPicTemplate | POST | Upload portal picture in a site template |
| getPortalListTemplate | GET | Get portal list in a site template |
getMacAuthSetting
GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/mac-auth
Get site MAC-Based Authentication Template info
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
// 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
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
Request body — application/json (required) — schema UpdateMacAuthOpenApiVO
| Field | Type | Required | Description |
|---|---|---|---|
enable | boolean | yes | MAC-Based Authentication enable status |
ssids | array<string> | yes | SSID 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 |
radiusProfileId | string | no | This 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 |
mabEnable | boolean | no | MAB enable status |
macFormat | integer | no | Format 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 |
emptyPwdEnable | boolean | no | Whether to enable empty password |
nasId | string | no | NAS ID issued to AP. NasId should contain 1 to 64 characters |
// 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
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
// 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
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
Request body — application/json (required) — schema PortalSetting
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Portal Name, should contain 1 to 128 characters |
enable | boolean | yes | Portal Enable |
ssidList | array<string> | no | SSID 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 |
networkList | array<string> | no | Lan 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 |
authType | integer | yes | Auth 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 |
authTimeout | AuthTimeoutSetting | yes | (AuthTimeoutSetting not expanded; call omada_get_schema "AuthTimeoutSetting") |
httpsRedirectEnable | boolean | yes | With this option enabled, unauthenticated clients will be redirected to the Portal page when they are trying to browse HTTPS websites. |
landingPage | integer | yes | LandingPage 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. |
landingUrlScheme | string | no | If Parameter [landingPage] is 2(Redirect to Promotional URL),this Parameter is requested, content is http or https. |
landingUrl | string | no | If Parameter [landingPage] is 2(Redirect to Promotional URL),this Parameter is requested. |
noAuth | NoAuthSetting | no | (NoAuthSetting not expanded; call omada_get_schema "NoAuthSetting") |
simplePassword | SimplePasswordSetting | no | (SimplePasswordSetting not expanded; call omada_get_schema "SimplePasswordSetting") |
hotspot | HotspotSetting | no | (HotspotSetting not expanded; call omada_get_schema "HotspotSetting") |
socialLogin | SocialLoginSettingOpenApiVO | no | (SocialLoginSettingOpenApiVO not expanded; call omada_get_schema "SocialLoginSettingOpenApiVO") |
google | GoogleOAuthSettingOpenApiVO | no | (GoogleOAuthSettingOpenApiVO not expanded; call omada_get_schema "GoogleOAuthSettingOpenApiVO") |
sms | SmsSetting | no | (SmsSetting not expanded; call omada_get_schema "SmsSetting") |
portalFormId | string | no | Portal form ID, required when [authType] is 11 and hotspot [enabledTypes] contains 12. |
hotspotRadius | HotspotRadiusSetting | no | (HotspotRadiusSetting not expanded; call omada_get_schema "HotspotRadiusSetting") |
externalPortal | ExternalServerPortalSetting | no | (ExternalServerPortalSetting not expanded; call omada_get_schema "ExternalServerPortalSetting") |
externalRadius | ExternalRadiusSetting | no | (ExternalRadiusSetting not expanded; call omada_get_schema "ExternalRadiusSetting") |
ldap | LdapSetting | no | (LdapSetting not expanded; call omada_get_schema "LdapSetting") |
pageType | integer | no | Page type, should be a value as follows: 1: Use default page, 2: use uploaded page. When [pageType] is null, it defaults to 1 |
importedPortalPage | ImportedPortalPageOpenApiVO | no | (ImportedPortalPageOpenApiVO not expanded; call omada_get_schema "ImportedPortalPageOpenApiVO") |
portalCustomize | PortalCustomizeOpenApiVO | no | (PortalCustomizeOpenApiVO not expanded; call omada_get_schema "PortalCustomizeOpenApiVO") |
// 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
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
portalId | path | string | yes | Portal ID |
// 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
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
portalId | path | string | yes | Portal ID |
// 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
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
portalId | path | string | yes | Portal ID |
Request body — application/json (required) — schema PortalSetting
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Portal Name, should contain 1 to 128 characters |
enable | boolean | yes | Portal Enable |
ssidList | array<string> | no | SSID 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 |
networkList | array<string> | no | Lan 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 |
authType | integer | yes | Auth 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 |
authTimeout | AuthTimeoutSetting | yes | (AuthTimeoutSetting not expanded; call omada_get_schema "AuthTimeoutSetting") |
httpsRedirectEnable | boolean | yes | With this option enabled, unauthenticated clients will be redirected to the Portal page when they are trying to browse HTTPS websites. |
landingPage | integer | yes | LandingPage 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. |
landingUrlScheme | string | no | If Parameter [landingPage] is 2(Redirect to Promotional URL),this Parameter is requested, content is http or https. |
landingUrl | string | no | If Parameter [landingPage] is 2(Redirect to Promotional URL),this Parameter is requested. |
noAuth | NoAuthSetting | no | (NoAuthSetting not expanded; call omada_get_schema "NoAuthSetting") |
simplePassword | SimplePasswordSetting | no | (SimplePasswordSetting not expanded; call omada_get_schema "SimplePasswordSetting") |
hotspot | HotspotSetting | no | (HotspotSetting not expanded; call omada_get_schema "HotspotSetting") |
socialLogin | SocialLoginSettingOpenApiVO | no | (SocialLoginSettingOpenApiVO not expanded; call omada_get_schema "SocialLoginSettingOpenApiVO") |
google | GoogleOAuthSettingOpenApiVO | no | (GoogleOAuthSettingOpenApiVO not expanded; call omada_get_schema "GoogleOAuthSettingOpenApiVO") |
sms | SmsSetting | no | (SmsSetting not expanded; call omada_get_schema "SmsSetting") |
portalFormId | string | no | Portal form ID, required when [authType] is 11 and hotspot [enabledTypes] contains 12. |
hotspotRadius | HotspotRadiusSetting | no | (HotspotRadiusSetting not expanded; call omada_get_schema "HotspotRadiusSetting") |
externalPortal | ExternalServerPortalSetting | no | (ExternalServerPortalSetting not expanded; call omada_get_schema "ExternalServerPortalSetting") |
externalRadius | ExternalRadiusSetting | no | (ExternalRadiusSetting not expanded; call omada_get_schema "ExternalRadiusSetting") |
ldap | LdapSetting | no | (LdapSetting not expanded; call omada_get_schema "LdapSetting") |
pageType | integer | no | Page type, should be a value as follows: 1: Use default page, 2: use uploaded page. When [pageType] is null, it defaults to 1 |
importedPortalPage | ImportedPortalPageOpenApiVO | no | (ImportedPortalPageOpenApiVO not expanded; call omada_get_schema "ImportedPortalPageOpenApiVO") |
portalCustomize | PortalCustomizeOpenApiVO | no | (PortalCustomizeOpenApiVO not expanded; call omada_get_schema "PortalCustomizeOpenApiVO") |
// 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
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
portalId | path | string | yes | Portal ID |
// 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
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
Request body — multipart/form-data (optional). File field(s): file.
// 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 **
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
type | query | string | yes | Portal picture type: background/logo/advertisement. |
Request body — multipart/form-data (optional). File field(s): file.
// 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 **
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
// 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