Skip to content

Commit

Permalink
Merge pull request #154 from AdguardTeam/upd-api-docs
Browse files Browse the repository at this point in the history
update API documentation
  • Loading branch information
vbagirov authored Nov 3, 2023
2 parents 2f4f435 + 31fdf2f commit 097ad51
Showing 1 changed file with 88 additions and 4 deletions.
92 changes: 88 additions & 4 deletions docs/private-dns/api/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,99 @@ toc_max_heading_level: 4
https://api.adguard-dns.io/static/swagger/openapi.json to markdown using
https://swagger-markdown-ui.netlify.app/.
Changelog is from here:
https://api.adguard-dns.io/static/api/CHANGELOG.md
If you want to change it, ask the developers to change the OpenAPI spec.
-->

## AdGuard DNS API

DNS API documentation

## Version: 1.4
## AdGuard DNS API Change Log

### v1.0

- Added authentication.
- CRUD operations with devices and DNS servers.
- Query log.
- Downloading DOT and DOT .mobileconfig.
- Filter Lists and Web-Services.

### v1.1

- Added methods to retrieve statistics by time, domains, companies and devices.

- Added method for updating device settings.
- Fixed required fields definition.

### v1.2

- Added new protocol types DNS and DNSCRYPT. Deprecating the PLAIN_TCP, PLAIN_UDP, DNSCRYPT_TCP and DNSCRYPT_UDP that will be removed later.

### v1.3

- Added method to get account limits.

### v1.4

- Added configurable option for blocking response: default (0.0.0.0), REFUSED, NXDOMAIN or custom IP-address.

### v1.5

- Added new setting `block_nrd` and group all security-related settings
to one place.

#### Model for safebrowsing settings changed from

``` json
{
"enabled": true
}
```

to:

``` json
{
"enabled": true,
"block_dangerous_domains": true,
"block_nrd": false
}
```

where `enabled` is now control all settings in group, `block_dangerous_domains` is previous model field "enabled" and `block_nrd` is settings for
filtering newly registered domains.

#### Model for saving server settings changed from

```json
{
"protection_enabled" : true,
"safebrowsing_enabled" : true,
...
}
```

to:

```json
{
"protection_enabled" : true,
"safebrowsing_settings" : {
"enabled": true,
"block_dangerous_domains": true,
"block_nrd": false
}
...
}
```

here new field `safebrowsing_settings` is used instead of deprecated `safebrowsing_enabled`, whose value
stored in `block_dangerous_domains`.

## Version: 1.5

### /oapi/v1/account/limits

Expand Down Expand Up @@ -199,8 +284,7 @@ Lists DNS servers that belong to the user.

##### Description

Lists DNS servers that belong to the user. By default there is at least one
default server.
Lists DNS servers that belong to the user. By default there is at least one default server.

##### Responses

Expand Down Expand Up @@ -236,7 +320,7 @@ Removes a DNS server

##### Description

Removes a DNS server. All devices attached to this DNS server will be moved to the default DNS server. Deleting a default DNS server is forbidden.
Removes a DNS server. All devices attached to this DNS server will be moved to the default DNS server. Deleting the default DNS server is forbidden.

##### Parameters

Expand Down

0 comments on commit 097ad51

Please sign in to comment.