updated API docs.

This commit is contained in:
Shreyas Zare
2021-02-06 18:22:50 +05:30
parent 760eb3dd10
commit 1ec356a50d

View File

@@ -173,6 +173,7 @@ RESPONSE:
"useLocalTime": false,
"logFolder": "logs",
"maxLogFileDays": 365,
"maxStatFileDays": 365,
"allowRecursion": true,
"allowRecursionOnlyForPrivateNetworks": true,
"randomizeName": true,
@@ -241,14 +242,15 @@ WHERE:
- `logQueries` (optional): Enable this option to log every query received by this DNS Server and the corresponding response answers into the log file. Default value is `false`.
- `useLocalTime` (optional): Enable this option to use local time instead of UTC for logging. Default value is `false`.
- `logFolder` (optional): The folder path on the server where the log files should be saved. The path can be relative to the DNS server config folder. Default value is `logs`.
- `maxLogFileDays` (optional): Max number of days to keep the log files. Log files older than the specified number of days will be deleted automatically. Default value is `365`.
- `maxLogFileDays` (optional): Max number of days to keep the log files. Log files older than the specified number of days will be deleted automatically. Recommended value is `365`. Set `0` to disable auto delete.
- `maxStatFileDays` (optional): Max number of days to keep the dashboard stats. Stat files older than the specified number of days will be deleted automatically. Recommended value is `365`. Set `0` to disable auto delete.
- `allowRecursion` (optional): Enable recursion to allow this DNS Server to resolve any domain name. Default value is `true`.
- `allowRecursionOnlyForPrivateNetworks` (optional): Enable this option if you want to support recursion only on private networks. Any recursive request from public network will be refused. Default value is `true`.
- `randomizeName` (optional): Enables QNAME randomization [draft-vixie-dnsext-dns0x20-00](https://tools.ietf.org/html/draft-vixie-dnsext-dns0x20-00) when using UDP as the transport protocol. Default value is `true`.
- `serveStale` (optional): Enable the serve stale feature to improve resiliency by using expired or stale records in cache when the DNS server is unable to reach the upstream or authoritative name servers. Default value is `true`.
- `serveStaleTtl` (optional): The TTL value in seconds which should be used for cached records that are expired. When the serve stale TTL too expires for a stale record, it gets removed from the cache. Recommended value is between 1-3 days and maximum supported value is 7 days. Default value is `259200`.
- `cachePrefetchEligibility` (optional): The minimum initial TTL value of a record needed to be eligible for prefetching.
- `cachePrefetchTrigger` (optional): A record with TTL value less than trigger value will initiate prefetch operation immediately for itself.
- `cachePrefetchTrigger` (optional): A record with TTL value less than trigger value will initiate prefetch operation immediately for itself. Set `0` to disable prefetching & auto prefetching.
- `cachePrefetchSampleIntervalInMinutes` (optional): The interval to sample eligible domain names from last hour stats for auto prefetch.
- `cachePrefetchSampleEligibilityHitsPerHour` (optional): Minimum required hits per hour for a domain name to be eligible for auto prefetch.
- `proxyType` (optional): The type of proxy protocol to be used. Valid values are [`None`, `Http`, `Socks5`].
@@ -309,7 +311,7 @@ A zip file with content type `application/zip` and content disposition set to `a
This call restores selected items from a given backup zip file.
URL:
`http://localhost:5380/api/restoreSettings?token=x&blockLists=true&logs=true&scopes=true&stats=true&zones=true&allowedZones=true&blockedZones=true&dnsSettings=true&logSettings=true`
`http://localhost:5380/api/restoreSettings?token=x&blockLists=true&logs=true&scopes=true&stats=true&zones=true&allowedZones=true&blockedZones=true&dnsSettings=true&logSettings=true&deleteExistingFiles=true`
WHERE:
- `token`: The session token generated by the `login` call.
@@ -322,6 +324,7 @@ WHERE:
- `blockedZones` (optional): Set to `true` to restore blocked zones file. Default value is `false`.
- `dnsSettings` (optional): Set to `true` to restore DNS settings file. Default value is `false`.
- `logSettings` (optional): Set to `true` to restore log settings file. Default value is `false`.
- `deleteExistingFiles` (optional). Set to `true` to delete existing files for selected items. Default value is `false`.
REQUEST:
This is a `POST` request call where the request must be multi-part form data with the backup zip file data in binary format.
@@ -2398,7 +2401,7 @@ WHERE:
- `staticRoutes` (optional): A `|` separated list of static routes in format `{destination network address}|{subnet mask}|{router/gateway address}` to be used by the clients for accessing specified destination networks.
- `vendorInfo` (optional): A `|` separated list of vendor information in format `{vendor class identifier}|{vendor specific information}` where `{vendor specific information}` is a colon separated hex string.
- `exclusions` (optional): A `|` separated list of IP address range in format `{starting address}|{ending address}` that must be excluded or not assigned dynamically to any client by the DHCP server.
- `reservedLeases` (optional): A `|` separated list of reserved IP addresses in format `{MAC address}|{reserved IP address}|{comments}` to be assigned to specific clients based on their MAC address.
- `reservedLeases` (optional): A `|` separated list of reserved IP addresses in format `{host name}|{MAC address}|{reserved IP address}|{comments}` to be assigned to specific clients based on their MAC address.
- `allowOnlyReservedLeases` (optional): Set this parameter to `true` to stop dynamic IP address allocation and allocate only reserved IP addresses.
RESPONSE:
@@ -2465,3 +2468,43 @@ RESPONSE:
"status": "ok"
}
```
### Convert To Reserved Lease
Converts a dynamic lease to reserved lease.
URL:
`http://localhost:5380/api/convertToReservedLease?token=x&name=Default&hardwareAddress=00:00:00:00:00:00`
WHERE:
- `token`: The session token generated by the `login` call.
- `name`: The name of the DHCP scope.
- `hardwareAddress`: The MAC address of the device bearing the dynamic lease.
RESPONSE:
```
{
"response": {},
"status": "ok"
}
```
### Convert To Dynamic Lease
Converts a reserved lease to dynamic lease.
URL:
`http://localhost:5380/api/convertToDynamicLease?token=x&name=Default&hardwareAddress=00:00:00:00:00:00`
WHERE:
- `token`: The session token generated by the `login` call.
- `name`: The name of the DHCP scope.
- `hardwareAddress`: The MAC address of the device bearing the reserved lease.
RESPONSE:
```
{
"response": {},
"status": "ok"
}
```