Technitium DNS Server provides a HTTP API which is used by the web console to perform all actions. Thus any action that the web console does can be performed using this API from your own applications.
The URL in the documentation uses localhost
and port 5380
. You should use the hostname/IP address and port that is specific to your DNS server instance.
Unless it is explicitly specified, all HTTP API requests can use both GET
or POST
methods. When using POST
method to pass the API parameters as form data, the Content-Type
header must be set to application/x-www-form-urlencoded
. When the HTTP API call is used to upload files, the call must use POST
method and the Content-Type
header must be set to multipart/form-data
.
Note! The "set" type of API requests will overwrite any existing value managed by that call. The "add" type of API requests will append to existing value managed by the call.
The HTTP API returns a JSON formatted response for all requests. The JSON object returned contains status
property which indicate if the request was successful.
The status
property can have following values:
ok
: This indicates that the call was successful.error
: This response tells the call failed and provides additional properties that provide details about the error.invalid-token
: When a session has expired or an invalid token was provided this response is received.
A successful response will look as shown below. Note that there will be other properties in the response which are specific to the request that was made.
{
"status": "ok"
}
In case of errors, the response will look as shown below. The errorMessage
property can be shown in the UI to the user while the other two properties are useful for debugging.
{
"status": "error",
"errorMessage": "error message",
"stackTrace": "application stack trace",
"innerErrorMessage": "inner exception message"
}
The DNS server uses a specific text format to define the name server address to allow specifying multiple parameters like the domain name, IP address, port or URL. This format is used in the web console as well as in this API. It is used to specify forwarder address in DNS settings, conditional forwarder zone's FWD record, or the server address in DNS Client resolve query API calls.
- A name server address with just an IP address is specified just as its string literal with optional port number is as shown:
1.1.1.1
or8.8.8.8:53
. When port is not specified, the default port number for the selected DNS transport protocol is used. - A name server address with just a domain name is specified similarly as its string literal with optional port number is as shown:
dns.quad9.net:853
orcloudflare-dns.com
. When port is not specified, the default port number for the selected DNS transport protocol is used. - A combination of domain name and IP address together with optional port number is as shown:
cloudflare-dns.com (1.1.1.1)
,dns.quad9.net (9.9.9.9:853)
ordns.quad9.net:853 (9.9.9.9)
. Here, the domain name (with optional port number) is specified and the IP address (with optional port number) is specified in a round bracket. When port is not specified, the default port number for the selected DNS transport protocol is used. This allows the DNS server to use the specified IP address instead of trying to resolve it separately. - A name server address that specifies a DNS-over-HTTPS URL is specified just as its string literal is as shown:
https://cloudflare-dns.com/dns-query
- A combination of DNS-over-HTTPS URL and IP address together is as shown:
https://cloudflare-dns.com/dns-query (1.1.1.1)
. Here, the IP address of the domain name in the URL is specified in the round brackets. This allows the DNS server to use the specified IP address instead of trying to resolve it separately. - IPv6 addresses must always be enclosed in square brackets when port is specified as shown:
cloudflare-dns.com ([2606:4700:4700::1111]:853)
or[2606:4700:4700::1111]:853
These API calls allow to a user to login, logout, perform account management, etc. Once logged in, a session token is returned which MUST be used with all other API calls.
This call authenticates with the server and generates a session token to be used for subsequent API calls. The session token expires as per the user's session expiry timeout value (default 30 minutes) from the last API call.
URL:
http://localhost:5380/api/user/login?user=admin&pass=admin&includeInfo=true
OBSOLETE PATH:
/api/login
PERMISSIONS:
None
WHERE:
user
: The username for the user account. The built-in administrator username on the DNS server isadmin
.pass
: The password for the user account. The default password foradmin
user isadmin
.includeInfo
(optional): Includes basic info relevant for the user in response.
WARNING: It is highly recommended to change the password on first use to avoid security related issues.
RESPONSE:
{
"displayName": "Administrator",
"username": "admin",
"token": "932b2a3495852c15af01598f62563ae534460388b6a370bfbbb8bb6094b698e9",
"info": {
"version": "9.0",
"dnsServerDomain": "server1",
"defaultRecordTtl": 3600,
"permissions": {
"Dashboard": {
"canView": true,
"canModify": true,
"canDelete": true
},
"Zones": {
"canView": true,
"canModify": true,
"canDelete": true
},
"Cache": {
"canView": true,
"canModify": true,
"canDelete": true
},
"Allowed": {
"canView": true,
"canModify": true,
"canDelete": true
},
"Blocked": {
"canView": true,
"canModify": true,
"canDelete": true
},
"Apps": {
"canView": true,
"canModify": true,
"canDelete": true
},
"DnsClient": {
"canView": true,
"canModify": true,
"canDelete": true
},
"Settings": {
"canView": true,
"canModify": true,
"canDelete": true
},
"DhcpServer": {
"canView": true,
"canModify": true,
"canDelete": true
},
"Administration": {
"canView": true,
"canModify": true,
"canDelete": true
},
"Logs": {
"canView": true,
"canModify": true,
"canDelete": true
}
}
},
"status": "ok"
}
WHERE:
token
: Is the session token generated that MUST be used with all subsequent API calls.
Allows creating a non-expiring API token that can be used with automation scripts to make API calls. The token allows access to API calls with the same privileges as that of the user account. Thus its recommended to create a separate user account with limited permissions as required by the specific task that the token will be used for. The token cannot be used to change the user's password, or update the user profile details.
URL:
http://localhost:5380/api/user/createToken?user=admin&pass=admin&tokenName=MyToken1
PERMISSIONS:
None
WHERE:
user
: The username for the user account for which to generate the API token.pass
: The password for the user account.tokenName
: The name of the created token to identify its session.
RESPONSE:
{
"username": "admin",
"tokenName": "MyToken1",
"token": "932b2a3495852c15af01598f62563ae534460388b6a370bfbbb8bb6094b698e9",
"status": "ok"
}
WHERE:
token
: Is the session token generated that MUST be used with all subsequent API calls.
This call ends the session generated by the login
or the createToken
call. The token
would no longer be valid after calling the logout
API.
URL:
http://localhost:5380/api/user/logout?token=932b2a3495852c15af01598f62563ae534460388b6a370bfbbb8bb6094b698e9
OBSOLETE PATH:
/api/logout
PERMISSIONS:
None
WHERE:
token
: The session token generated by thelogin
or thecreateToken
call.
RESPONSE:
{
"status": "ok"
}
Returns the same info as that of the login
or the createToken
calls for the session specified by the token.
URL:
http://localhost:5380/api/user/session/get?token=932b2a3495852c15af01598f62563ae534460388b6a370bfbbb8bb6094b698e9
PERMISSIONS:
None
WHERE:
token
: The session token generated by thelogin
or thecreateToken
call.
RESPONSE:
{
"displayName": "Administrator",
"username": "admin",
"token": "932b2a3495852c15af01598f62563ae534460388b6a370bfbbb8bb6094b698e9",
"info": {
"version": "11.5",
"uptimestamp": "2023-07-29T08:01:31.1117463Z",
"dnsServerDomain": "server1",
"defaultRecordTtl": 3600,
"useSoaSerialDateScheme": false,
"dnssecValidation": true,
"permissions": {
"Dashboard": {
"canView": true,
"canModify": true,
"canDelete": true
},
"Zones": {
"canView": true,
"canModify": true,
"canDelete": true
},
"Cache": {
"canView": true,
"canModify": true,
"canDelete": true
},
"Allowed": {
"canView": true,
"canModify": true,
"canDelete": true
},
"Blocked": {
"canView": true,
"canModify": true,
"canDelete": true
},
"Apps": {
"canView": true,
"canModify": true,
"canDelete": true
},
"DnsClient": {
"canView": true,
"canModify": true,
"canDelete": true
},
"Settings": {
"canView": true,
"canModify": true,
"canDelete": true
},
"DhcpServer": {
"canView": true,
"canModify": true,
"canDelete": true
},
"Administration": {
"canView": true,
"canModify": true,
"canDelete": true
},
"Logs": {
"canView": true,
"canModify": true,
"canDelete": true
}
}
},
"status": "ok"
}
Allows deleting a session for the current user.
URL:
http://localhost:5380/api/user/session/delete?token=x&partialToken=620c3bfcd09d0a07
PERMISSIONS:
None
WHERE:
token
: The session token generated by thelogin
or thecreateToken
call.partialToken
: The partial token as returned by the user profile details API call.
RESPONSE:
{
"response": {},
"status": "ok"
}
Allows changing the password for the current logged in user account.
NOTE: It is highly recommended to change the admin
user password on first use to avoid security related issues.
URL:
http://localhost:5380/api/user/changePassword?token=x&pass=password
OBSOLETE PATH:
/api/changePassword
PERMISSIONS:
None
WHERE:
token
: The session token generated only by thelogin
call.pass
: The new password for the currently logged in user.
RESPONSE:
{
"status": "ok"
}
Gets the user account profile details.
URL:
http://localhost:5380/api/user/profile/get?token=x
PERMISSIONS:
None
WHERE:
token
: The session token generated by thelogin
or thecreateToken
call.
RESPONSE:
{
"response": {
"displayName": "Administrator",
"username": "admin",
"disabled": false,
"previousSessionLoggedOn": "2022-09-15T12:59:05.944Z",
"previousSessionRemoteAddress": "127.0.0.1",
"recentSessionLoggedOn": "2022-09-15T13:57:50.1843973Z",
"recentSessionRemoteAddress": "127.0.0.1",
"sessionTimeoutSeconds": 1800,
"memberOfGroups": [
"Administrators"
],
"sessions": [
{
"username": "admin",
"isCurrentSession": true,
"partialToken": "620c3bfcd09d0a07",
"type": "Standard",
"tokenName": null,
"lastSeen": "2022-09-15T13:58:02.4728Z",
"lastSeenRemoteAddress": "127.0.0.1",
"lastSeenUserAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0"
}
]
},
"status": "ok"
}
Allows changing user account profile values.
URL:
http://localhost:5380/api/user/profile/set?token=x&displayName=Administrator&sessionTimeoutSeconds=1800
PERMISSIONS:
None
WHERE:
token
: The session token generated only by thelogin
call.displayName
(optional): The display name to set for the user account.sessionTimeoutSeconds
(optional): The session timeout value to set in seconds for the user account.
RESPONSE:
{
"response": {
"displayName": "Administrator",
"username": "admin",
"disabled": false,
"previousSessionLoggedOn": "2022-09-15T12:59:05.944Z",
"previousSessionRemoteAddress": "127.0.0.1",
"recentSessionLoggedOn": "2022-09-15T13:57:50.1843973Z",
"recentSessionRemoteAddress": "127.0.0.1",
"sessionTimeoutSeconds": 1800,
"memberOfGroups": [
"Administrators"
],
"sessions": [
{
"username": "admin",
"isCurrentSession": true,
"partialToken": "620c3bfcd09d0a07",
"type": "Standard",
"tokenName": null,
"lastSeen": "2022-09-15T14:00:50.288738Z",
"lastSeenRemoteAddress": "127.0.0.1",
"lastSeenUserAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0"
}
]
},
"status": "ok"
}
This call requests the server to check for software update.
URL:
http://localhost:5380/api/user/checkForUpdate?token=x
OBSOLETE PATH:
/api/checkForUpdate
PERMISSIONS:
None
WHERE:
token
: The session token generated by thelogin
or thecreateToken
call.
RESPONSE:
{
"response": {
"updateAvailable": true,
"updateVersion": "9.0",
"currentVersion": "8.1.4",
"updateTitle": "New Update Available!",
"updateMessage": "Follow the instructions from the link below to update the DNS server to the latest version. Read the change logs before installing the update to know if there are any breaking changes.",
"downloadLink": "https://download.technitium.com/dns/DnsServerSetup.zip",
"instructionsLink": "https://blog.technitium.com/2017/11/running-dns-server-on-ubuntu-linux.html",
"changeLogLink": "https://github.com/TechnitiumSoftware/DnsServer/blob/master/CHANGELOG.md"
},
"status": "ok"
}
These API calls provide access to dashboard stats and allow deleting stat files.
Returns the DNS stats that are displayed on the web console dashboard.
URL:
http://localhost:5380/api/dashboard/stats/get?token=x&type=LastHour&utc=true
OBSOLETE PATH:
api/getStats
PERMISSIONS:
Dashboard: View
WHERE:
token
: The session token generated by thelogin
or thecreateToken
call.type
(optional): The duration type for which valid values are: [LastHour
,LastDay
,LastWeek
,LastMonth
,LastYear
,Custom
]. Default value isLastHour
.utc
(optional): Set totrue
to return the main chart data with labels in UTC date time format using which the labels can be converted into local time for display using the receivedlabelFormat
.start
(optional): The start date in ISO 8601 format. Applies only tocustom
type.end
(optional): The end date in ISO 8601 format. Applies only tocustom
type.
RESPONSE:
{
"response": {
"stats": {
"totalQueries": 925,
"totalNoError": 834,
"totalServerFailure": 1,
"totalNxDomain": 90,
"totalRefused": 0,
"totalAuthoritative": 47,
"totalRecursive": 348,
"totalCached": 481,
"totalBlocked": 49,
"totalDropped": 0,
"totalClients": 6,
"zones": 19,
"cachedEntries": 6330,
"allowedZones": 10,
"blockedZones": 1,
"allowListZones": 0,
"blockListZones": 307447
},
"mainChartData": {
"labelFormat": "HH:mm",
"labels": [
"2024-02-04T10:38:00.0000000Z",
"2024-02-04T10:39:00.0000000Z",
"2024-02-04T10:40:00.0000000Z",
"2024-02-04T10:41:00.0000000Z",
"2024-02-04T10:42:00.0000000Z",
"2024-02-04T10:43:00.0000000Z",
"2024-02-04T10:44:00.0000000Z",
"2024-02-04T10:45:00.0000000Z",
"2024-02-04T10:46:00.0000000Z",
"2024-02-04T10:47:00.0000000Z",
"2024-02-04T10:48:00.0000000Z",
"2024-02-04T10:49:00.0000000Z",
"2024-02-04T10:50:00.0000000Z",
"2024-02-04T10:51:00.0000000Z",
"2024-02-04T10:52:00.0000000Z",
"2024-02-04T10:53:00.0000000Z",
"2024-02-04T10:54:00.0000000Z",
"2024-02-04T10:55:00.0000000Z",
"2024-02-04T10:56:00.0000000Z",
"2024-02-04T10:57:00.0000000Z",
"2024-02-04T10:58:00.0000000Z",
"2024-02-04T10:59:00.0000000Z",
"2024-02-04T11:00:00.0000000Z",
"2024-02-04T11:01:00.0000000Z",
"2024-02-04T11:02:00.0000000Z",
"2024-02-04T11:03:00.0000000Z",
"2024-02-04T11:04:00.0000000Z",
"2024-02-04T11:05:00.0000000Z",
"2024-02-04T11:06:00.0000000Z",
"2024-02-04T11:07:00.0000000Z",
"2024-02-04T11:08:00.0000000Z",
"2024-02-04T11:09:00.0000000Z",
"2024-02-04T11:10:00.0000000Z",
"2024-02-04T11:11:00.0000000Z",
"2024-02-04T11:12:00.0000000Z",
"2024-02-04T11:13:00.0000000Z",
"2024-02-04T11:14:00.0000000Z",
"2024-02-04T11:15:00.0000000Z",
"2024-02-04T11:16:00.0000000Z",
"2024-02-04T11:17:00.0000000Z",
"2024-02-04T11:18:00.0000000Z",
"2024-02-04T11:19:00.0000000Z",
"2024-02-04T11:20:00.0000000Z",
"2024-02-04T11:21:00.0000000Z",
"2024-02-04T11:22:00.0000000Z",
"2024-02-04T11:23:00.0000000Z",
"2024-02-04T11:24:00.0000000Z",
"2024-02-04T11:25:00.0000000Z",
"2024-02-04T11:26:00.0000000Z",
"2024-02-04T11:27:00.0000000Z",
"2024-02-04T11:28:00.0000000Z",
"2024-02-04T11:29:00.0000000Z",
"2024-02-04T11:30:00.0000000Z",
"2024-02-04T11:31:00.0000000Z",
"2024-02-04T11:32:00.0000000Z",
"2024-02-04T11:33:00.0000000Z",
"2024-02-04T11:34:00.0000000Z",
"2024-02-04T11:35:00.0000000Z",
"2024-02-04T11:36:00.0000000Z",
"2024-02-04T11:37:00.0000000Z"
],
"datasets": [
{
"label": "Total",
"backgroundColor": "rgba(102, 153, 255, 0.1)",
"borderColor": "rgb(102, 153, 255)",
"borderWidth": 2,
"fill": true,
"data": [
4,
6,
13,
9,
27,
9,
11,
15,
9,
10,
5,
9,
5,
17,
6,
9,
61,
23,
9,
21,
8,
20,
5,
7,
35,
26,
33,
20,
7,
12,
4,
14,
3,
19,
37,
10,
18,
12,
7,
30,
47,
16,
10,
3,
12,
11,
37,
3,
18,
22,
16,
6,
15,
5,
41,
13,
7,
9,
17,
12
]
},
{
"label": "No Error",
"backgroundColor": "rgba(92, 184, 92, 0.1)",
"borderColor": "rgb(92, 184, 92)",
"borderWidth": 2,
"fill": true,
"data": [
4,
6,
11,
9,
22,
6,
11,
13,
9,
7,
5,
7,
4,
13,
5,
7,
59,
22,
8,
21,
8,
19,
5,
7,
31,
25,
24,
16,
6,
12,
4,
12,
3,
19,
36,
8,
18,
12,
7,
28,
46,
16,
10,
3,
11,
10,
34,
2,
10,
13,
11,
6,
15,
5,
40,
12,
6,
9,
14,
12
]
},
{
"label": "Server Failure",
"backgroundColor": "rgba(217, 83, 79, 0.1)",
"borderColor": "rgb(217, 83, 79)",
"borderWidth": 2,
"fill": true,
"data": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
},
{
"label": "NX Domain",
"backgroundColor": "rgba(120, 120, 120, 0.1)",
"borderColor": "rgb(120, 120, 120)",
"borderWidth": 2,
"fill": true,
"data": [
0,
0,
2,
0,
5,
3,
0,
2,
0,
3,
0,
2,
1,
4,
1,
2,
2,
1,
1,
0,
0,
1,
0,
0,
4,
1,
9,
4,
1,
0,
0,
2,
0,
0,
1,
2,
0,
0,
0,
2,
0,
0,
0,
0,
1,
1,
3,
1,
8,
9,
5,
0,
0,
0,
1,
1,
1,
0,
3,
0
]
},
{
"label": "Refused",
"backgroundColor": "rgba(91, 192, 222, 0.1)",
"borderColor": "rgb(91, 192, 222)",
"borderWidth": 2,
"fill": true,
"data": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
},
{
"label": "Authoritative",
"backgroundColor": "rgba(150, 150, 0, 0.1)",
"borderColor": "rgb(150, 150, 0)",
"borderWidth": 2,
"fill": true,
"data": [
0,
0,
1,
0,
3,
1,
0,
2,
1,
1,
0,
1,
0,
2,
1,
1,
1,
1,
2,
0,
0,
1,
0,
0,
2,
1,
3,
2,
0,
0,
0,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
4,
4,
2,
0,
2,
0,
1,
1,
0,
0,
0,
0
]
},
{
"label": "Recursive",
"backgroundColor": "rgba(23, 162, 184, 0.1)",
"borderColor": "rgb(23, 162, 184)",
"borderWidth": 2,
"fill": true,
"data": [
1,
3,
0,
1,
14,
2,
8,
4,
1,
3,
2,
3,
1,
3,
3,
3,
36,
8,
2,
14,
4,
6,
1,
1,
26,
17,
11,
10,
2,
4,
0,
8,
1,
7,
18,
0,
3,
0,
2,
10,
6,
1,
3,
1,
5,
4,
20,
0,
5,
7,
0,
3,
7,
0,
21,
7,
1,
3,
6,
5
]
},
{
"label": "Cached",
"backgroundColor": "rgba(111, 84, 153, 0.1)",
"borderColor": "rgb(111, 84, 153)",
"borderWidth": 2,
"fill": true,
"data": [
3,
3,
11,
8,
8,
4,
3,
8,
7,
4,
3,
4,
3,
10,
2,
4,
23,
14,
5,
7,
4,
13,
4,
6,
5,
8,
13,
6,
4,
8,
4,
4,
2,
12,
18,
8,
15,
12,
5,
18,
41,
15,
7,
2,
6,
6,
14,
2,
5,
6,
10,
3,
6,
5,
19,
5,
5,
6,
8,
7
]
},
{
"label": "Blocked",
"backgroundColor": "rgba(255, 165, 0, 0.1)",
"borderColor": "rgb(255, 165, 0)",
"borderWidth": 2,
"fill": true,
"data": [
0,
0,
1,
0,
2,
2,
0,
1,
0,
2,
0,
1,
1,
2,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
2,
0,
6,
2,
1,
0,
0,
1,
0,
0,
0,
1,
0,
0,
0,
2,
0,
0,
0,
0,
0,
0,
2,
1,
4,
5,
4,
0,
0,
0,
0,
0,
1,
0,
3,
0
]
},
{
"label": "Dropped",
"backgroundColor": "rgba(30, 30, 30, 0.1)",
"borderColor": "rgb(30, 30, 30)",
"borderWidth": 2,
"fill": true,
"data": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
},
{
"label": "Clients",
"backgroundColor": "rgba(51, 122, 183, 0.1)",
"borderColor": "rgb(51, 122, 183)",
"borderWidth": 2,
"fill": true,
"data": [
3,
4,
3,
2,
3,
4,
2,
3,
3,
2,
2,
3,
3,
3,
2,
4,
3,
2,
2,
2,
2,
2,
2,
2,
3,
2,
3,
3,
2,
2,
2,
3,
2,
2,
3,
3,
1,
3,
3,
3,
3,
3,
3,
2,
3,
3,
4,
2,
3,
4,
4,
2,
4,
3,
3,
3,
3,
2,
2,
3
]
}
]
},
"queryResponseChartData": {
"labels": [
"Authoritative",
"Recursive",
"Cached",
"Blocked",
"Dropped"
],
"datasets": [
{
"data": [
47,
348,
481,
49,
0
],
"backgroundColor": [
"rgba(150, 150, 0, 0.5)",
"rgba(23, 162, 184, 0.5)",
"rgba(111, 84, 153, 0.5)",
"rgba(255, 165, 0, 0.5)",
"rgba(7, 7, 7, 0.5)"
]
}
]
},
"queryTypeChartData": {
"labels": [
"A",
"HTTPS",
"AAAA",
"SOA",
"SRV"
],
"datasets": [
{
"data": [
683,
196,
42,
2,
2
],
"backgroundColor": [
"rgba(102, 153, 255, 0.5)",
"rgba(92, 184, 92, 0.5)",
"rgba(7, 7, 7, 0.5)",
"rgba(91, 192, 222, 0.5)",
"rgba(150, 150, 0, 0.5)",
"rgba(23, 162, 184, 0.5)",
"rgba(111, 84, 153, 0.5)",
"rgba(255, 165, 0, 0.5)",
"rgba(51, 122, 183, 0.5)",
"rgba(150, 150, 150, 0.5)"
]
}
]
},
"protocolTypeChartData": {
"labels": [
"Udp"
],
"datasets": [
{
"data": [
925
],
"backgroundColor": [
"rgba(111, 84, 153, 0.5)",
"rgba(150, 150, 0, 0.5)",
"rgba(23, 162, 184, 0.5)",
"rgba(255, 165, 0, 0.5)",
"rgba(91, 192, 222, 0.5)"
]
}
]
},
"topClients": [
{
"name": "192.168.10.5",
"domain": "server1.home",
"hits": 463,
"rateLimited": false
},
{
"name": "192.168.10.12",
"domain": "vostro1.home",
"hits": 236,
"rateLimited": false
},
{
"name": "192.168.10.13",
"hits": 165,
"rateLimited": false
},
{
"name": "192.168.10.11",
"domain": "shreyas-zare.home",
"hits": 53,
"rateLimited": false
},
{
"name": "192.168.10.15",
"domain": "android-9c3d70b130d99b94.home",
"hits": 6,
"rateLimited": false
},
{
"name": "192.168.10.2",
"domain": "pi1.home",
"hits": 2,
"rateLimited": false
}
],
"topDomains": [
{
"name": "hses7-vod-cf-ace.cdn.hotstar.com",
"hits": 114
},
{
"name": "bifrost-api.hotstar.com",
"hits": 61
},
{
"name": "edge.microsoft.com",
"hits": 52
},
{
"name": "www.google.com",
"hits": 34
},
{
"name": "www.hotstar.com",
"hits": 24
},
{
"name": "safebrowsing.googleapis.com",
"hits": 15
},
{
"name": "www.bing.com",
"hits": 14
},
{
"name": "go.microsoft.com",
"hits": 14
},
{
"name": "graph.facebook.com",
"hits": 13
},
{
"name": "substrate.office.com",
"hits": 11
}
],
"topBlockedDomains": [
{
"name": "mobile.pipe.aria.microsoft.com",
"hits": 10
},
{
"name": "in.api.glance.inmobi.com",
"hits": 9
},
{
"name": "in.analytics.glance.inmobi.com",
"hits": 6
},
{
"name": "app-measurement.com",
"hits": 4
},
{
"name": "googleads.g.doubleclick.net",
"hits": 4
},
{
"name": "analytics.swiggy.com",
"hits": 2
},
{
"name": "firebase-settings.crashlytics.com",
"hits": 2
},
{
"name": "cdn.cookielaw.org",
"hits": 2
},
{
"name": "m.urbancompany.com",
"hits": 1
},
{
"name": "beacons.gvt2.com",
"hits": 1
}
]
},
"status": "ok"
}
Returns the top stats data for specified stats type.
URL:
http://localhost:5380/api/dashboard/stats/getTop?token=x&type=LastHour&statsType=TopClients&limit=1000
OBSOLETE PATH:
/api/getTopStats
PERMISSIONS:
Dashboard: View
WHERE:
token
: The session token generated by thelogin
or thecreateToken
call.type
(optional): The duration type for which valid values are: [LastHour
,LastDay
,LastWeek
,LastMonth
,LastYear
]. Default value isLastHour
.statsType
: The stats type for which valid values are : [TopClients
,TopDomains
,TopBlockedDomains
]limit
(optional): The limit of records to return. Default value is1000
.noReverseLookup
(optional): Set totrue
to disable reverse lookup for Top Clients list. This option is only applicable withTopClients
stats type.onlyRateLimitedClients
(optional): Set totrue
to list only clients which are being rate limited in the Top Clients list. This option is only applicable withTopClients
stats type.
RESPONSE:
The response json will include the object with definition same in the getStats
response depending on the statsType
. For example below is the response for TopClients
:
{
"response": {
"topClients": [
{
"name": "192.168.10.5",
"domain": "server1.local",
"hits": 236,
"rateLimited": false
},
{
"name": "192.168.10.4",
"domain": "nas1.local",
"hits": 16,
"rateLimited": false
},
{
"name": "192.168.10.6",
"domain": "server2.local",
"hits": 14,
"rateLimited": false
},
{
"name": "192.168.10.3",
"domain": "nas2.local",
"hits": 12,
"rateLimited": false
},
{
"name": "217.31.193.175",
"domain": "condor175.knot-resolver.cz",
"hits": 10,
"rateLimited": false
},
{
"name": "162.158.180.45",
"hits": 9,
"rateLimited": false
},
{
"name": "217.31.193.163",
"domain": "gondor-resolver.labs.nic.cz",
"hits": 9,
"rateLimited": false
},
{
"name": "210.245.24.68",
"hits": 8,
"rateLimited": false
},
{
"name": "101.91.16.140",
"hits": 8,
"rateLimited": false
}
],
},
"status": "ok"
}
Permanently delete all hourly and daily stats files from the disk and clears all stats stored in memory. This call will clear all stats from the Dashboard.
URL:
http://localhost:5380/api/dashboard/stats/deleteAll?token=x
OBSOLETE PATH:
/api/deleteAllStats
PERMISSIONS:
Dashboard: Delete
WHERE:
token
: The session token generated by thelogin
or thecreateToken
call.
RESPONSE:
{
"response": {},
"status": "ok"
}
These API calls allow managing all hosted zones on the DNS server.
List all authoritative zones hosted on this DNS server. The list contains only the zones that the user has View permissions for. These API calls requires permission for both the Zones section as well as the individual permission for each zone.
URL:
http://localhost:5380/api/zones/list?token=x&pageNumber=1&zonesPerPage=10
OBSOLETE PATH:
/api/zone/list
/api/listZones
PERMISSIONS:
Zones: View
Zone: View
WHERE:
token
: The session token generated by thelogin
or thecreateToken
call.pageNumber
(optional): When this parameter is specified, the API will return paginated results based on the page number and zones per pages options. When not specified, the API will return a list of all zones.zonesPerPage
(optional): The number of zones per page to be returned. This option is only used whenpageNumber
options is specified. The default value is10
when not specified.
RESPONSE:
{
"response": {
"pageNumber": 1,
"totalPages": 2,
"totalZones": 12,
"zones": [
{
"name": "",
"type": "Secondary",
"dnssecStatus": "SignedWithNSEC",
"soaSerial": 1,
"expiry": "2022-02-26T07:57:08.1842183Z",
"isExpired": false,
"syncFailed": false,
"lastModified": "2022-02-26T07:57:08.1842183Z",
"disabled": false
},
{
"name": "0.in-addr.arpa",
"type": "Primary",
"internal": true,
"dnssecStatus": "Unsigned",
"soaSerial": 1,
"lastModified": "2022-02-26T07:57:08.1842183Z",
"disabled": false
},
{
"name": "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa",
"type": "Primary",
"internal": true,
"dnssecStatus": "Unsigned",
"soaSerial": 1,
"lastModified": "2022-02-26T07:57:08.1842183Z",
"disabled": false
},
{
"name": "127.in-addr.arpa",
"type": "Primary",
"internal": true,
"dnssecStatus": "Unsigned",
"soaSerial": 1,
"lastModified": "2022-02-26T07:57:08.1842183Z",
"disabled": false
},
{
"name": "255.in-addr.arpa",
"type": "Primary",
"internal": true,
"dnssecStatus": "Unsigned",
"soaSerial": 1,
"lastModified": "2022-02-26T07:57:08.1842183Z",
"disabled": false
},
{
"name": "example.com",
"type": "Primary",
"internal": false,
"dnssecStatus": "SignedWithNSEC",
"soaSerial": 1,
"notifyFailed": false,
"notifyFailedFor": [],
"lastModified": "2022-02-26T07:57:08.1842183Z",
"disabled": false
},
{
"name": "localhost",
"type": "Primary",
"internal": true,
"dnssecStatus": "Unsigned",
"soaSerial": 1,
"lastModified": "2022-02-26T07:57:08.1842183Z",
"disabled": false
},
{
"name": "test0.com",
"type": "Primary",
"internal": false,
"dnssecStatus": "Unsigned",
"soaSerial": 1,
"notifyFailed": false,
"notifyFailedFor": [],
"lastModified": "2022-02-26T07:57:08.1842183Z",
"disabled": false
},
{
"name": "test1.com",
"type": "Primary",
"internal": false,
"dnssecStatus": "Unsigned",
"soaSerial": 1,
"notifyFailed": false,
"notifyFailedFor": [],
"lastModified": "2022-02-26T07:57:08.1842183Z",
"disabled": false
},
{
"name": "test2.com",
"type": "Primary",
"internal": false,
"dnssecStatus": "Unsigned",
"soaSerial": 1,
"notifyFailed": false,
"notifyFailedFor": [],
"lastModified": "2022-02-26T07:57:08.1842183Z",
"disabled": false
}
]
},
"status": "ok"
}
Returns a list of Catalog zone names.
URL:
http://localhost:5380/api/zones/catalogs/list?token=x
PERMISSIONS:
Zones: View
Zone: View
WHERE:
token
: The session token generated by thelogin
or thecreateToken
call.
RESPONSE:
{
"response": {
"catalogZoneNames": [
"catalog1"
]
},
"status": "ok"
}
Creates a new authoritative zone.
URL:
http://localhost:5380/api/zones/create?token=x&zone=example.com&type=Primary
OBSOLETE PATH:
/api/zone/create
/api/createZone
PERMISSIONS:
Zones: Modify
WHERE:
token
: The session token generated by thelogin
or thecreateToken
call.zone
: The domain name for creating the new zone. The value can be valid domain name, an IP address, or an network address in CIDR format. When value is IP address or network address, a reverse zone is created.type
: The type of zone to be created. Valid values are [Primary
,Secondary
,Stub
,Forwarder
,SecondaryForwarder
,Catalog
,SecondaryCatalog
].catalog
(optional): The name of the catalog zone to become its member zone. This option is valid only forPrimary
,Stub
, andForwarder
zones.useSoaSerialDateScheme
(optional): Set value totrue
to enable using date scheme for SOA serial. This optional parameter is used only withPrimary
,Forwarder
, andCatalog
zones. Default value isfalse
.primaryNameServerAddresses
(optional): List of comma separated IP addresses or domain names of the primary name server. This optional parameter is used only withSecondary
,SecondaryForwarder
,SecondaryCatalog
, andStub
zones. If this parameter is not used, the DNS server will try to recursively resolve the primary name server addresses automatically forSecondary
andStub
zones. This option is required forSecondaryForwarder
andSecondaryCatalog
zones.zoneTransferProtocol
(optional): The zone transfer protocol to be used bySecondary
,SecondaryForwarder
, andSecondaryCatalog
zones. Valid values are [Tcp
,Tls
,Quic
].tsigKeyName
(optional): The TSIG key name to be used bySecondary
,SecondaryForwarder
, andSecondaryCatalog
zones.validateZone
(optional): Set value astrue
to enable ZONEMD validation. When enabled, theSecondary
zone will be validated using the ZONEMD record after every zone transfer. The zone will get disabled if the validation fails. The zone must be DNSSEC signed for the validation to work. This option is only valid forSecondary
zones.protocol
(optional): The DNS transport protocol to be used by the conditional forwarder zone. This optional parameter is used with Conditional Forwarder zones. Valid values are [Udp
,Tcp
,Tls
,Https
,Quic
]. DefaultUdp
protocol is used when this parameter is missing.forwarder
(optional): The address of the DNS server to be used as a forwarder. This optional parameter is required to be used with Conditional Forwarder zones. A special valuethis-server
can be used as a forwarder which when used will forward all the requests internally to this DNS server such that you can override the zone with records and rest of the zone gets resolved via This Server.dnssecValidation
(optional): Set this boolean value to indicate if DNSSEC validation must be done. This optional parameter is required to be used with Conditional Forwarder zones.proxyType
(optional): The type of proxy that must be used for conditional forwarding. This optional parameter is required to be used with Conditional Forwarder zones. Valid values are [NoProxy
,DefaultProxy
,Http
,Socks5
]. Default valueDefaultProxy
is used when this parameter is missing.proxyAddress
(optional): The proxy server address to use whenproxyType
is configured. This optional parameter is required to be used with Conditional Forwarder zones.proxyPort
(optional): The proxy server port to use whenproxyType
is configured. This optional parameter is required to be used with Conditional Forwarder zones.proxyUsername
(optional): The proxy server username to use whenproxyType
is configured. This optional parameter is required to be used with Conditional Forwarder zones.proxyPassword
(optional): The proxy server password to use whenproxyType
is configured. This optional parameter is required to be used with Conditional Forwarder zones.
RESPONSE:
{
"response": {
"domain": "example.com"
},
"status": "ok"
}
WHERE:
domain
: Will contain the zone that was created. This is specifically useful to know the reverse zone that was created.
Allows importing a complete zone file or a set of DNS resource records in standard RFC 1035 zone file format.
URL:
http://localhost:5380/api/zones/import?token=x&zone=example.com&overwrite=true&overwriteSoaSerial=false
PERMISSIONS:
Zones: Modify
Zone: Modify
WHERE:
token
: The session token generated by thelogin
or thecreateToken
call.zone
: The domain name of the zone to import.overwrite
(optional): Set totrue
to allow overwriting existing resource record set for the records being imported.overwriteSoaSerial
(optional): Set it totrue
to overwrite existing SOA record serial with the imported SOA record serial. Warning! Overwrite SOA serial option when used to set a lower SOA serial value than the current SOA serial will cause secondary zones to fail to sync.
REQUEST: This is a POST request call where the request must use text/plain
content type and request body must contain the zone file in text format.
RESPONSE:
{
"status": "ok"
}
Exports the complete zone in standard RFC 1035 zone file format.
URL:
http://localhost:5380/api/zones/export?token=x&zone=example.com
PERMISSIONS:
Zones: View
Zone: View
WHERE:
token
: The session token generated by thelogin
or thecreateToken
call.zone
: The domain name of the zone to export.
RESPONSE: Response is a downloadable text file with Content-Type: text/plain
and Content-Disposition: attachment
.