Skip to content

DNS ​

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

OperationMethodSummary
getDnsCacheListGETGet DNS cache list
clearDnsCacheListPOSTClear DNS cache list
getDdnsGridGETGet Dynamic DNS list
createDdnsPOSTCreate a new Dynamic DNS entry
deleteDdnsDELETEDelete an exist Dynamic DNS entry
modifyDdnsPATCHModify an exist Dynamic DNS entry
getDnsCacheSettingGETGet DNS cache
modifyDnsCacheSettingPUTModify DNS cache setting
getDnsProxyGETGet DNS proxy setting
modifyDnsProxyPATCHModify DNS proxy setting

getDnsCacheList ​

GET /openapi/v1/{omadacId}/sites/{siteId}/setting/dns-cache-data

Get DNS cache list

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
dnsCacheQueryVOqueryDnsCacheQueryOpenApiV2VOnoObject: its fields (currentPage, currentPageSize, type) are sent as separate query parameters.
json
// omada_call_operation
{
  "operationId": "getDnsCacheList",
  "params": {
    "siteId": "<siteId>"
  }
}
Details, permissions and error codes

Get DNS cache list of the site with the given omadacId and siteId.
The interface requires one of the permissions:
Site Settings Manager View Only
Device Config Page View Only
Site Device 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.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.

clearDnsCacheList ​

POST /openapi/v1/{omadacId}/sites/{siteId}/setting/dns-cache-data/clear

Clear DNS cache list

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

Clear DNS cache list with the given params.
The interface requires one of the permissions:
Site Settings Manager Modify
Device Config Page Modify
Site Device 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.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.

getDdnsGrid ​

GET /openapi/v1/{omadacId}/sites/{siteId}/setting/service/ddns

Get Dynamic DNS list

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
pagequeryintegernoStart page number. Start from 1. (default 1)
pageSizequeryintegernoNumber of entries per page. It should be within the range of 1–1000. (default 100)
sorts.servicequerystringnoSort 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.updateIntervalquerystringnoSort 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.statusquerystringnoSort 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
json
// omada_call_operation
{
  "operationId": "getDdnsGrid",
  "params": {
    "siteId": "<siteId>"
  }
}
Details, permissions and error codes

Get Dynamic DNS list of the site with the given omadacId and siteId.
The interface requires one of the permissions:
Site Settings Manager View Only
Device Config Page View Only
Site Device 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.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.

createDdns ​

POST /openapi/v1/{omadacId}/sites/{siteId}/setting/service/ddns

Create a new Dynamic DNS entry

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

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

FieldTypeRequiredDescription
serviceintegeryesDynamic 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
statusbooleanyesDynamic DNS enable status
interfacePortIdstringyesThis field represents interface Port ID
usernamestringyesDynamic DNS username. Username should contain 1 to 128 characters
passwordstringyesDynamic DNS password. Password should contain 1 to 128 characters
domainNamestringnoDynamic DNS domainName, valid when parameter [service] is 0, 1 or 4
intervalDdnsIntervalOpenApiVOno(DdnsIntervalOpenApiVO not expanded; call omada_get_schema "DdnsIntervalOpenApiVO")
updateUrlstringnoDynamic 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
json
// omada_call_operation
{
  "operationId": "createDdns",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Create a new Dynamic DNS entry with the given params.
The interface requires one of the permissions:
Site Settings Manager Modify
Device Config Page Modify
Site Device 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.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-33474 - This feature is not supported for the DS-Lite or Map-E WAN connection types.
-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.
-34563 - Only one TP-Link Dynamic DNS is allowed for one site.
-34564 - The TP-Link Dynamic DNS domain name cannot contain sensitive fields such as email, tp-link, tplink, and www.
-34565 - The TP-Link Dynamic DNS domain name should end with ".tplinkdns.com".
-34566 - The TP-Link Dynamic DNS domain name is invalid.

deleteDdns ​

DELETE /openapi/v1/{omadacId}/sites/{siteId}/setting/service/ddns/{ddnsId}

Delete an exist Dynamic DNS entry

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

Delete an exist Dynamic DNS entry with the given params.
The interface requires one of the permissions:
Site Settings Manager Modify
Device Config Page Modify
Site Device 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.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.

modifyDdns ​

PATCH /openapi/v1/{omadacId}/sites/{siteId}/setting/service/ddns/{ddnsId}

Modify an exist Dynamic DNS entry

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

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

FieldTypeRequiredDescription
serviceintegeryesDynamic 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
statusbooleanyesDynamic DNS enable status
interfacePortIdstringyesThis field represents interface Port ID
usernamestringyesDynamic DNS username. Username should contain 1 to 128 characters
passwordstringyesDynamic DNS password. Password should contain 1 to 128 characters
domainNamestringnoDynamic DNS domainName, valid when parameter [service] is 0, 1 or 4
intervalDdnsIntervalOpenApiVOno(DdnsIntervalOpenApiVO not expanded; call omada_get_schema "DdnsIntervalOpenApiVO")
updateUrlstringnoDynamic 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
json
// omada_call_operation
{
  "operationId": "modifyDdns",
  "params": {
    "siteId": "<siteId>",
    "ddnsId": "<ddnsId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify an exist Dynamic DNS entry with the given params.
The interface requires one of the permissions:
Site Settings Manager Modify
Device Config Page Modify
Site Device 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.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-33474 - This feature is not supported for the DS-Lite or Map-E WAN connection types.
-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.
-34564 - The TP-Link Dynamic DNS domain name cannot contain sensitive fields such as email, tp-link, tplink, and www.
-34565 - The TP-Link Dynamic DNS domain name should end with ".tplinkdns.com".
-34566 - The TP-Link Dynamic DNS domain name is invalid.

getDnsCacheSetting ​

GET /openapi/v1/{omadacId}/sites/{siteId}/setting/service/dns-cache

Get DNS cache

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

Get DNS cache setting of the site with the given omadacId and siteId.
The interface requires one of the permissions:
Site Settings Manager View Only
Device Config Page View Only
Site Device 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):
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.

modifyDnsCacheSetting ​

PUT /openapi/v1/{omadacId}/sites/{siteId}/setting/service/dns-cache

Modify DNS cache setting

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

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

FieldTypeRequiredDescription
enablebooleannoWhether to enable DNS Cache. Options: 'true' or 'false'.
ttlintegernoTTL should be within the range of 1 or 86400.
json
// omada_call_operation
{
  "operationId": "modifyDnsCacheSetting",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify DNS cache setting
The interface requires one of the permissions:
Site Settings Manager Modify
Device Config Page Modify
Site Device Manager 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.

getDnsProxy ​

GET /openapi/v1/{omadacId}/sites/{siteId}/setting/service/dns-proxy

Get DNS proxy setting

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

Get DNS proxy setting of the site with the given omadacId and siteId.
The interface requires one of the permissions:
Site Settings Manager View Only
Device Config Page View Only
Site Device 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.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.

modifyDnsProxy ​

PATCH /openapi/v1/{omadacId}/sites/{siteId}/setting/service/dns-proxy

Modify DNS proxy setting

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

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

FieldTypeRequiredDescription
enablebooleanyesDNS proxy setting enable status
typeintegernoDNS proxy setting type. Type should be a value as follows: 0: DNSSEC, 1: DoH, 2: DoT, 3: DNS Override
dnsSecSettingDnsSecSettingOpenApiVOno(DnsSecSettingOpenApiVO not expanded; call omada_get_schema "DnsSecSettingOpenApiVO")
dohSettingDohSettingOpenApiVOno(DohSettingOpenApiVO not expanded; call omada_get_schema "DohSettingOpenApiVO")
dotSettingDotSettingOpenApiVOno(DotSettingOpenApiVO not expanded; call omada_get_schema "DotSettingOpenApiVO")
dnsOverrideSettingDnsOverrideSettingOpenApiVOno(DnsOverrideSettingOpenApiVO not expanded; call omada_get_schema "DnsOverrideSettingOpenApiVO")
json
// omada_call_operation
{
  "operationId": "modifyDnsProxy",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify DNS proxy setting info of the site with the given params.
The interface requires one of the permissions:
Site Settings Manager Modify
Device Config Page Modify
Site Device 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.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. 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.

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