DNS (Template)
10 operations. Call any of them with omada_call_operation (or, in full tool mode, as a tool named by its operationId).
| Operation | Method | Summary |
|---|---|---|
| getDnsCacheSettingTemplate | GET | Get DNS cache setting template |
| getDdnsGridTemplate | GET | Get Dynamic DNS template list |
| createDdnsTemplate | POST | Create a new Dynamic DNS template entry |
| deleteDdnsTemplate | DELETE | Delete an exist Dynamic DNS template entry |
| modifyDdnsTemplate | PATCH | Modify an exist Dynamic DNS template entry |
| getGlobalDdnsUpdateUrlTemplate | GET | Get DDNS update url |
| modifyDnsCacheSettingTemplate | PUT | Modify DNS cache setting |
| refreshDnsCacheListTemplate | GET | Refresh dns cache list |
| getDnsProxyTemplate | GET | Get DNS proxy template setting |
| modifyDnsProxyTemplate | PATCH | Modify DNS proxy template setting |
getDnsCacheSettingTemplate
GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/dns-cache
Get DNS cache setting 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": "getDnsCacheSettingTemplate",
"params": {
"siteTemplateId": "<siteTemplateId>"
}
}Details, permissions and error codes
Get DNS cache setting template of the site 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):
-33009 - This site template does not exist.
-33011 - Operation failed because other operations are being performed on this site template. Please wait and try again later.
getDdnsGridTemplate
GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/setting/service/ddns
Get Dynamic DNS template list
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site ID |
page | query | integer | no | Start page number. Start from 1. (default 1) |
pageSize | query | integer | no | Number of entries per page. It should be within the range of 1–1000. (default 100) |
sorts.service | query | string | no | Sort parameter may be one of asc or desc. Optional parameter. If it is not carried, it means it is not sorted by this field. When there are more than one, the first one takes effect |
sorts.updateInterval | query | string | no | Sort parameter may be one of asc or desc. Optional parameter. If it is not carried, it means it is not sorted by this field. When there are more than one, the first one takes effect |
sorts.status | query | string | no | Sort parameter may be one of asc or desc. Optional parameter. If it is not carried, it means it is not sorted by this field. When there are more than one, the first one takes effect |
// omada_call_operation
{
"operationId": "getDdnsGridTemplate",
"params": {
"siteTemplateId": "<siteTemplateId>"
}
}Details, permissions and error codes
Get Dynamic DNS template list of the site with the given omadacId and siteId.
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):
-33000 - This site does not exist.
-33011 - Operation failed because other operations are being performed on this site template. Please wait and try again later.
createDdnsTemplate
POST /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/setting/service/ddns
Create a new Dynamic DNS template entry
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site ID |
Request body — application/json (required) — schema CreateDdnsOpenApiVO
| Field | Type | Required | Description |
|---|---|---|---|
service | integer | yes | Dynamic DNS service type. Service should be a value as follows: 0: DynDNS, 1: NO-IP, 2: Peanuthull, 3: Comexe, 4: Custom, 5: TP-Link DDNS |
status | boolean | yes | Dynamic DNS enable status |
interfacePortId | string | yes | This field represents interface Port ID |
username | string | yes | Dynamic DNS username. Username should contain 1 to 128 characters |
password | string | yes | Dynamic DNS password. Password should contain 1 to 128 characters |
domainName | string | no | Dynamic DNS domainName, valid when parameter [service] is 0, 1 or 4 |
interval | DdnsIntervalOpenApiVO | no | (DdnsIntervalOpenApiVO not expanded; call omada_get_schema "DdnsIntervalOpenApiVO") |
updateUrl | string | no | Dynamic DNS updateUrl, valid when parameter [service] is 4. Update URL must contain [USERNAME], [PASSWORD] and [DOMAIN], and Update-URL will be applied to all custom entries |
// omada_call_operation
{
"operationId": "createDdnsTemplate",
"params": {
"siteTemplateId": "<siteTemplateId>"
},
"body": "{...}"
}Details, permissions and error codes
Create a new Dynamic DNS template entry with the given params.
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):
-33000 - This site does not exist.
-33011 - Operation failed because other operations are being performed on this site template. Please wait and try again later.
-34500 - Dynamic DNS Entries can be created with only one service provider for one WAN port.
-34510 - The domain name and service provider of different Dynamic DNS Entries should be different.
-34516 - The username already exists under the selected service provider.
deleteDdnsTemplate
DELETE /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/setting/service/ddns/{ddnsId}
Delete an exist Dynamic DNS template entry
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site ID |
ddnsId | path | string | yes | Dynamic DNS entry ID |
// omada_call_operation
{
"operationId": "deleteDdnsTemplate",
"params": {
"siteTemplateId": "<siteTemplateId>",
"ddnsId": "<ddnsId>"
}
}Details, permissions and error codes
Delete an exist Dynamic DNS template entry with the given params.
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):
-33000 - This site does not exist.
-33011 - Operation failed because other operations are being performed on this site template. Please wait and try again later.
modifyDdnsTemplate
PATCH /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/setting/service/ddns/{ddnsId}
Modify an exist Dynamic DNS template entry
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site ID |
ddnsId | path | string | yes | Dynamic DNS entry ID |
Request body — application/json (required) — schema CreateDdnsOpenApiVO
| Field | Type | Required | Description |
|---|---|---|---|
service | integer | yes | Dynamic DNS service type. Service should be a value as follows: 0: DynDNS, 1: NO-IP, 2: Peanuthull, 3: Comexe, 4: Custom, 5: TP-Link DDNS |
status | boolean | yes | Dynamic DNS enable status |
interfacePortId | string | yes | This field represents interface Port ID |
username | string | yes | Dynamic DNS username. Username should contain 1 to 128 characters |
password | string | yes | Dynamic DNS password. Password should contain 1 to 128 characters |
domainName | string | no | Dynamic DNS domainName, valid when parameter [service] is 0, 1 or 4 |
interval | DdnsIntervalOpenApiVO | no | (DdnsIntervalOpenApiVO not expanded; call omada_get_schema "DdnsIntervalOpenApiVO") |
updateUrl | string | no | Dynamic DNS updateUrl, valid when parameter [service] is 4. Update URL must contain [USERNAME], [PASSWORD] and [DOMAIN], and Update-URL will be applied to all custom entries |
// omada_call_operation
{
"operationId": "modifyDdnsTemplate",
"params": {
"siteTemplateId": "<siteTemplateId>",
"ddnsId": "<ddnsId>"
},
"body": "{...}"
}Details, permissions and error codes
Modify an exist Dynamic DNS template entry with the given params.
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):
-33000 - This site does not exist.
-33011 - Operation failed because other operations are being performed on this site template. Please wait and try again later.
-34500 - Dynamic DNS Entries can be created with only one service provider for one WAN port.
-34510 - The domain name and service provider of different Dynamic DNS Entries should be different.
-34516 - The username already exists under the selected service provider.
getGlobalDdnsUpdateUrlTemplate
GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/setting/service/ddns/update-url
Get DDNS update url
| 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": "getGlobalDdnsUpdateUrlTemplate",
"params": {
"siteTemplateId": "<siteTemplateId>"
}
}Details, permissions and error codes
Get global DDNS update url of the site with the given omadacId and siteId.
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.
modifyDnsCacheSettingTemplate
PUT /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/setting/service/dns-cache
Modify DNS cache setting
| 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 DnsCacheOpenApiVO
| Field | Type | Required | Description |
|---|---|---|---|
enable | boolean | no | Whether to enable DNS Cache. Options: 'true' or 'false'. |
ttl | integer | no | TTL should be within the range of 1 or 86400. |
// omada_call_operation
{
"operationId": "modifyDnsCacheSettingTemplate",
"params": {
"siteTemplateId": "<siteTemplateId>"
},
"body": "{...}"
}Details, permissions and error codes
Modify DNS cache setting
The interface requires one of the permissions:
Global Site Template Manager Modify
refreshDnsCacheListTemplate
GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/setting/service/dns-cache-data/refresh
Refresh dns cache list
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site Template ID |
vo | query | DnsCacheQueryOpenApiVO | no | Object: its fields (page, pageSize, type) are sent as separate query parameters. |
// omada_call_operation
{
"operationId": "refreshDnsCacheListTemplate",
"params": {
"siteTemplateId": "<siteTemplateId>"
}
}Details, permissions and error codes
Send refresh command to devices and refresh dns cache list.
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.
-34548 - No data. Please enable DNS Cache first.
-34549 - No data. Please make sure the gateway is online.
-39501 - This gateway does not exist.
getDnsProxyTemplate
GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/setting/service/dns-proxy
Get DNS proxy template setting
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site ID |
// omada_call_operation
{
"operationId": "getDnsProxyTemplate",
"params": {
"siteTemplateId": "<siteTemplateId>"
}
}Details, permissions and error codes
Get DNS proxy template setting of the site with the given omadacId and siteId.
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):
-33000 - This site does not exist.
-33011 - Operation failed because other operations are being performed on this site template. Please wait and try again later.
modifyDnsProxyTemplate
PATCH /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/setting/service/dns-proxy
Modify DNS proxy template setting
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site ID |
Request body — application/json (required) — schema DnsProxySettingOpenApiVO
| Field | Type | Required | Description |
|---|---|---|---|
enable | boolean | yes | DNS proxy setting enable status |
type | integer | no | DNS proxy setting type. Type should be a value as follows: 0: DNSSEC, 1: DoH, 2: DoT, 3: DNS Override |
dnsSecSetting | DnsSecSettingOpenApiVO | no | (DnsSecSettingOpenApiVO not expanded; call omada_get_schema "DnsSecSettingOpenApiVO") |
dohSetting | DohSettingOpenApiVO | no | (DohSettingOpenApiVO not expanded; call omada_get_schema "DohSettingOpenApiVO") |
dotSetting | DotSettingOpenApiVO | no | (DotSettingOpenApiVO not expanded; call omada_get_schema "DotSettingOpenApiVO") |
dnsOverrideSetting | DnsOverrideSettingOpenApiVO | no | (DnsOverrideSettingOpenApiVO not expanded; call omada_get_schema "DnsOverrideSettingOpenApiVO") |
// omada_call_operation
{
"operationId": "modifyDnsProxyTemplate",
"params": {
"siteTemplateId": "<siteTemplateId>"
},
"body": "{...}"
}Details, permissions and error codes
Modify DNS proxy template setting info of the site with the given params.
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):
-33000 - This site does not exist.
-33011 - Operation failed because other operations are being performed on this site template. Please wait and try again later.
-34536 - Please enable at least one DNS Sec server.
-34538 - The number of custom DNS servers has reached the limit.
-34539 - Please enable at least one DoH server.
-34540 - Please enable at least one DoT server.
-34578 - The Gateway dose not support the type Override
-34579 - The Gateway dose not support DNS proxy
-34588 - Please select a network.
-34589 - The selected network ID does not exist.
-34590 - Invalid IP address in DNS Server.