mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2026-01-06 16:53:59 +00:00
updated api docs.
This commit is contained in:
159
APIDOCS.md
159
APIDOCS.md
@@ -2064,35 +2064,27 @@ RESPONSE:
|
||||
"response": {
|
||||
"apps": [
|
||||
{
|
||||
"name": "Default",
|
||||
"name": "Split Horizon",
|
||||
"version": "1.1",
|
||||
"details": [
|
||||
{
|
||||
"classPath": "DefaultDnsApplication.GeoContinentAddress",
|
||||
"description": "Returns A or AAAA records based on the continent the client queries from using MaxMind GeoIP2 Country database.",
|
||||
"recordDataTemplate": "{\r\n \"EU\": [\r\n \"1.1.1.1\", \r\n \"2.2.2.2\"\r\n ],\r\n \"default\": [\r\n \"3.3.3.3\"\r\n ]\r\n}"
|
||||
},
|
||||
{
|
||||
"classPath": "DefaultDnsApplication.GeoContinentCNAME",
|
||||
"description": "Returns CNAME record based on the continent the client queries from using MaxMind GeoIP2 Country database. Note that the app will return ANAME record for an APP record at zone apex.",
|
||||
"recordDataTemplate": "{\r\n \"EU\": \"eu.example.com\",\r\n \"default\": \"example.com\"\r\n}"
|
||||
},
|
||||
{
|
||||
"classPath": "DefaultDnsApplication.GeoDistanceAddress",
|
||||
"description": "Returns A or AAAA records of the server located geographically closest to the client using MaxMind GeoIP2 City database.",
|
||||
"recordDataTemplate": "[\r\n {\r\n \"name\": \"server1-mumbai\",\r\n \"lat\": \"19.07283\",\r\n \"long\": \"72.88261\",\r\n \"addresses\": [\r\n \"1.1.1.1\"\r\n ]\r\n },\r\n {\r\n \"name\": \"server2-london\",\r\n \"lat\": \"51.50853\",\r\n \"long\": \"-0.12574\",\r\n \"addresses\": [\r\n \"2.2.2.2\"\r\n ]\r\n }\r\n]"
|
||||
},
|
||||
{
|
||||
"classPath": "DefaultDnsApplication.GeoDistanceCNAME",
|
||||
"description": "Returns CNAME record of the server located geographically closest to the client using MaxMind GeoIP2 City database. Note that the app will return ANAME record for an APP record at zone apex.",
|
||||
"recordDataTemplate": "[\r\n {\r\n \"name\": \"server1-mumbai\",\r\n \"lat\": \"19.07283\",\r\n \"long\": \"72.88261\",\r\n \"cname\": \"mumbai.example.com\"\r\n },\r\n {\r\n \"name\": \"server2-london\",\r\n \"lat\": \"51.50853\",\r\n \"long\": \"-0.12574\",\r\n \"cname\": \"london.example.com\"\r\n }\r\n]"
|
||||
},
|
||||
{
|
||||
"classPath": "DefaultDnsApplication.SimpleSplitHorizon",
|
||||
"classPath": "SplitHorizon.SimpleAddress",
|
||||
"description": "Returns A or AAAA records with different set of IP addresses for clients querying over public and private networks.",
|
||||
"recordDataTemplate": "{\r\n \"public\": [\r\n \"1.1.1.1\", \r\n \"2.2.2.2\"\r\n ],\r\n \"private\": [\r\n \"192.168.1.1\", \r\n \"::1\"\r\n ]\r\n}"
|
||||
},
|
||||
{
|
||||
"classPath": "DefaultDnsApplication.WhatIsMyDns",
|
||||
"classPath": "SplitHorizon.SimpleCNAME",
|
||||
"description": "Returns different CNAME record for clients querying over public and private networks. Note that the app will return ANAME record for an APP record at zone apex.",
|
||||
"recordDataTemplate": "{\r\n \"public\": \"api.example.com\",\r\n \"private\": \"api.example.corp\"\r\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "What Is My Dns",
|
||||
"version": "1.1",
|
||||
"details": [
|
||||
{
|
||||
"classPath": "WhatIsMyDns.App",
|
||||
"description": "Returns the IP address of the user's DNS Server for A, AAAA, and TXT queries.",
|
||||
"recordDataTemplate": null
|
||||
}
|
||||
@@ -2104,6 +2096,106 @@ RESPONSE:
|
||||
}
|
||||
```
|
||||
|
||||
### List Store Apps
|
||||
|
||||
Lists all available apps on the DNS App Store.
|
||||
|
||||
URL:
|
||||
`http://localhost:5380/api/apps/listStoreApps?token=x`
|
||||
|
||||
WHERE:
|
||||
- `token`: The session token generated by the `login` call.
|
||||
|
||||
RESPONSE:
|
||||
```
|
||||
{
|
||||
"response": {
|
||||
"storeApps": [
|
||||
{
|
||||
"name": "Geo Continent",
|
||||
"version": "1.1",
|
||||
"description": "Returns A or AAAA records, or CNAME record based on the continent the client queries from using MaxMind GeoIP2 Country database. This app requires MaxMind GeoIP2 database and includes the GeoLite2 version for trial. To update the MaxMind GeoIP2 database for your app, download the GeoIP2-Country.mmdb file from MaxMind and zip it. Use the zip file with the manual Update option.",
|
||||
"url": "https://download.technitium.com/dns/apps/GeoContinentApp.zip",
|
||||
"installed": false
|
||||
},
|
||||
{
|
||||
"name": "Geo Country",
|
||||
"version": "1.1",
|
||||
"description": "Returns A or AAAA records, or CNAME record based on the country the client queries from using MaxMind GeoIP2 Country database. This app requires MaxMind GeoIP2 database and includes the GeoLite2 version for trial. To update the MaxMind GeoIP2 database for your app, download the GeoIP2-Country.mmdb file from MaxMind and zip it. Use the zip file with the manual Update option.",
|
||||
"url": "https://download.technitium.com/dns/apps/GeoCountryApp.zip",
|
||||
"installed": false
|
||||
},
|
||||
{
|
||||
"name": "Geo Distance",
|
||||
"version": "1.1",
|
||||
"description": "Returns A or AAAA records, or CNAME record of the server located geographically closest to the client using MaxMind GeoIP2 City database. This app requires MaxMind GeoIP2 database and includes the GeoLite2 version for trial. To update the MaxMind GeoIP2 database for your app, download the GeoIP2-City.mmdb file from MaxMind and zip it. Use the zip file with the manual Update option.",
|
||||
"url": "https://download.technitium.com/dns/apps/GeoDistanceApp.zip",
|
||||
"installed": false
|
||||
},
|
||||
{
|
||||
"name": "Split Horizon",
|
||||
"version": "1.1",
|
||||
"description": "Returns different set of A or AAAA records, or CNAME record for clients querying over public and private networks.",
|
||||
"url": "https://download.technitium.com/dns/apps/SplitHorizonApp.zip",
|
||||
"installed": true,
|
||||
"installedVersion": "1.1",
|
||||
"updateAvailable": false
|
||||
},
|
||||
{
|
||||
"name": "What Is My Dns",
|
||||
"version": "1.1",
|
||||
"description": "Returns the IP address of the user's DNS Server for A, AAAA, and TXT queries.",
|
||||
"url": "https://download.technitium.com/dns/apps/WhatIsMyDnsApp.zip",
|
||||
"installed": true,
|
||||
"installedVersion": "1.1",
|
||||
"updateAvailable": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": "ok"
|
||||
}
|
||||
```
|
||||
|
||||
### Download And Install App
|
||||
|
||||
Download an app zip file from given URL and installs it on the DNS Server.
|
||||
|
||||
URL:
|
||||
`http://localhost:5380/api/apps/downloadAndInstall?token=x&name=app-name&url=https://example.com/app.zip`
|
||||
|
||||
WHERE:
|
||||
- `token`: The session token generated by the `login` call.
|
||||
- `name`: The name of the app to install.
|
||||
- `url`: The URL of the app zip file. URL must start with `https://`.
|
||||
|
||||
RESPONSE:
|
||||
```
|
||||
{
|
||||
"response": {},
|
||||
"status": "ok"
|
||||
}
|
||||
```
|
||||
|
||||
### Download And Update App
|
||||
|
||||
Download an app zip file from given URL and updates an existing app installed on the DNS Server.
|
||||
|
||||
URL:
|
||||
`http://localhost:5380/api/apps/downloadAndUpdate?token=x&name=app-name&url=https://example.com/app.zip`
|
||||
|
||||
WHERE:
|
||||
- `token`: The session token generated by the `login` call.
|
||||
- `name`: The name of the app to install.
|
||||
- `url`: The URL of the app zip file. URL must start with `https://`.
|
||||
|
||||
RESPONSE:
|
||||
```
|
||||
{
|
||||
"response": {},
|
||||
"status": "ok"
|
||||
}
|
||||
```
|
||||
|
||||
### Install App
|
||||
|
||||
Installs a DNS application on the DNS server.
|
||||
@@ -2125,6 +2217,27 @@ RESPONSE:
|
||||
}
|
||||
```
|
||||
|
||||
### Update App
|
||||
|
||||
Allows to manually update an installed app using a provided app zip file.
|
||||
|
||||
URL:
|
||||
`http://localhost:5380/api/apps/update?token=x&name=app-name`
|
||||
|
||||
WHERE:
|
||||
- `token`: The session token generated by the `login` call.
|
||||
- `name`: The name of the app to update.
|
||||
|
||||
REQUEST: This is a POST request call where the request must be multi-part form data with the DNS application zip file data in binary format.
|
||||
|
||||
RESPONSE:
|
||||
```
|
||||
{
|
||||
"response": {},
|
||||
"status": "ok"
|
||||
}
|
||||
```
|
||||
|
||||
### Uninstall App
|
||||
|
||||
Uninstall an app from the DNS server. This does not remove any APP records that were using this DNS application.
|
||||
|
||||
Reference in New Issue
Block a user