all: sync with master; upd chlog
This commit is contained in:
2
openapi/.gitignore
vendored
2
openapi/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
@@ -4,6 +4,171 @@
|
||||
|
||||
## v0.108.0: API changes
|
||||
|
||||
## v0.107.27: API changes
|
||||
|
||||
### The new optional fields `"edns_cs_use_custom"` and `"edns_cs_custom_ip"` in `DNSConfig`
|
||||
|
||||
* The new optional fields `"edns_cs_use_custom"` and `"edns_cs_custom_ip"` in
|
||||
`POST /control/dns_config` method makes AdGuard Home use or not use the
|
||||
custom IP for EDNS Client Subnet.
|
||||
|
||||
* The new optional fields `"edns_cs_use_custom"` and `"edns_cs_custom_ip"` in
|
||||
`GET /control/dns_info` method are set if AdGuard Home uses custom IP for
|
||||
EDNS Client Subnet.
|
||||
|
||||
### Deprecated statistics APIs
|
||||
|
||||
* The `GET /control/stats_info` HTTP API; use the new `GET
|
||||
/control/stats/config` API instead.
|
||||
|
||||
**NOTE:** If `interval` was configured by editing configuration file or new
|
||||
HTTP API call `PUT /control/stats/config/update` and it's not equal to
|
||||
previous allowed enum values then it will be equal to `90` days for
|
||||
compatibility reasons.
|
||||
|
||||
* The `POST /control/stats_config` HTTP API; use the new `PUT
|
||||
/control/stats/config/update` API instead.
|
||||
|
||||
### New statistics APIs
|
||||
|
||||
* The new `GET /control/stats/config` HTTP API.
|
||||
|
||||
* The new `PUT /control/stats/config/update` HTTP API allows config updates.
|
||||
|
||||
These `control/stats/config/update` and `control/stats/config` APIs accept and
|
||||
return a JSON object with the following format:
|
||||
|
||||
```json
|
||||
{
|
||||
"enabled": true,
|
||||
"interval": 3600,
|
||||
"ignored": ["example.com"],
|
||||
}
|
||||
```
|
||||
|
||||
### Deprecated query log APIs
|
||||
|
||||
* The `GET /control/querylog_info` HTTP API; use the new `GET
|
||||
/control/querylog/config` API instead.
|
||||
|
||||
**NOTE:** If `interval` was configured by editing configuration file or new
|
||||
HTTP API call `PUT /control/querylog/config/update` and it's not equal to
|
||||
previous allowed enum values then it will be equal to `90` days for
|
||||
compatibility reasons.
|
||||
|
||||
* The `POST /control/querylog_config` HTTP API; use the new `PUT
|
||||
/control/querylog/config/update` API instead.
|
||||
|
||||
### New query log APIs
|
||||
|
||||
* The new `GET /control/querylog/config` HTTP API.
|
||||
|
||||
* The new `PUT /control/querylog/config/update` HTTP API allows config updates.
|
||||
|
||||
These `control/querylog/config/update` and `control/querylog/config` APIs
|
||||
accept and return a JSON object with the following format:
|
||||
|
||||
```json
|
||||
{
|
||||
"enabled": true,
|
||||
"anonymize_client_ip": false,
|
||||
"interval": 3600,
|
||||
"ignored": ["example.com"],
|
||||
}
|
||||
```
|
||||
|
||||
### New `"protection_disabled_until"` field in `GET /control/dns_info` response
|
||||
|
||||
* The new field `"protection_disabled_until"` in `GET /control/dns_info` is the
|
||||
timestamp until when the protection is disabled.
|
||||
|
||||
### New `"protection_disabled_duration"` field in `GET /control/status` response
|
||||
|
||||
* The new field `"protection_disabled_duration"` is the duration of protection
|
||||
pause in milliseconds.
|
||||
|
||||
### `POST /control/protection`
|
||||
|
||||
* The new `POST /control/protection` HTTP API allows to pause protection for
|
||||
specified duration in milliseconds.
|
||||
|
||||
This API accepts a JSON object with the following format:
|
||||
|
||||
```json
|
||||
{
|
||||
"enabled": false,
|
||||
"duration": 10000
|
||||
}
|
||||
```
|
||||
|
||||
### Deprecated HTTP APIs
|
||||
|
||||
The following HTTP APIs are deprecated:
|
||||
|
||||
* `POST /control/safesearch/enable` is deprecated. Use the new
|
||||
`PUT /control/safesearch/settings`.
|
||||
|
||||
* `POST /control/safesearch/disable` is deprecated. Use the new
|
||||
`PUT /control/safesearch/settings`.
|
||||
|
||||
### New HTTP API `PUT /control/safesearch/settings`
|
||||
|
||||
* The new `PUT /control/safesearch/settings` HTTP API allows safesearch
|
||||
settings updates. It accepts a JSON object with the following format:
|
||||
|
||||
```json
|
||||
{
|
||||
"enabled": true,
|
||||
"bing": false,
|
||||
"duckduckgo": true,
|
||||
"google": false,
|
||||
"pixabay": false,
|
||||
"yandex": true,
|
||||
"youtube": false
|
||||
}
|
||||
```
|
||||
|
||||
### `GET /control/safesearch/status`
|
||||
|
||||
* The `control/safesearch/status` HTTP API has been changed. It now returns a
|
||||
JSON object with the following format:
|
||||
|
||||
```json
|
||||
{
|
||||
"enabled": true,
|
||||
"bing": false,
|
||||
"duckduckgo": true,
|
||||
"google": false,
|
||||
"pixabay": false,
|
||||
"yandex": true,
|
||||
"youtube": false
|
||||
}
|
||||
```
|
||||
|
||||
### `/control/clients` HTTP APIs
|
||||
|
||||
The following HTTP APIs have been changed:
|
||||
|
||||
* `GET /control/clients`;
|
||||
* `GET /control/clients/find?ip0=...&ip1=...&ip2=...`;
|
||||
* `POST /control/clients/add`;
|
||||
* `POST /control/clients/update`;
|
||||
|
||||
The `safesearch_enabled` field is deprecated. The new field `safe_search` has
|
||||
been added to JSON objects. It has the following format:
|
||||
|
||||
```json
|
||||
{
|
||||
"enabled": true,
|
||||
"bing": false,
|
||||
"duckduckgo": true,
|
||||
"google": false,
|
||||
"pixabay": false,
|
||||
"yandex": true,
|
||||
"youtube": false
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
## v0.107.23: API changes
|
||||
|
||||
@@ -21,4 +21,4 @@
|
||||
<redoc spec-url='https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/openapi/openapi.yaml'></redoc>
|
||||
<script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -94,6 +94,20 @@
|
||||
'responses':
|
||||
'200':
|
||||
'description': 'OK'
|
||||
'/protection':
|
||||
'post':
|
||||
'tags':
|
||||
- 'global'
|
||||
'operationId': 'setProtection'
|
||||
'summary': 'Set protection state and duration'
|
||||
'requestBody':
|
||||
'content':
|
||||
'application/json':
|
||||
'schema':
|
||||
'$ref': '#/components/schemas/SetProtectionRequest'
|
||||
'responses':
|
||||
'200':
|
||||
'description': 'OK'
|
||||
'/cache_clear':
|
||||
'post':
|
||||
'tags':
|
||||
@@ -226,6 +240,14 @@
|
||||
'$ref': '#/components/schemas/QueryLog'
|
||||
'/querylog_info':
|
||||
'get':
|
||||
'deprecated': true
|
||||
'description': |
|
||||
Deprecated: Use `GET /querylog/config` instead.
|
||||
|
||||
NOTE: If `interval` was configured by editing configuration file or new
|
||||
HTTP API call `PUT /querylog/config/update` and it's not equal to
|
||||
previous allowed enum values then it will be equal to `90` days for
|
||||
compatibility reasons.
|
||||
'tags':
|
||||
- 'log'
|
||||
'operationId': 'queryLogInfo'
|
||||
@@ -239,6 +261,9 @@
|
||||
'$ref': '#/components/schemas/QueryLogConfig'
|
||||
'/querylog_config':
|
||||
'post':
|
||||
'deprecated': true
|
||||
'description': >
|
||||
Deprecated: Use `PUT /querylog/config/update` instead.
|
||||
'tags':
|
||||
- 'log'
|
||||
'operationId': 'queryLogConfig'
|
||||
@@ -260,6 +285,34 @@
|
||||
'responses':
|
||||
'200':
|
||||
'description': 'OK.'
|
||||
'/querylog/config':
|
||||
'get':
|
||||
'tags':
|
||||
- 'log'
|
||||
'operationId': 'getQueryLogConfig'
|
||||
'summary': 'Get query log parameters'
|
||||
'responses':
|
||||
'200':
|
||||
'description': 'OK.'
|
||||
'content':
|
||||
'application/json':
|
||||
'schema':
|
||||
'$ref': '#/components/schemas/GetQueryLogConfigResponse'
|
||||
'/querylog/config/update':
|
||||
'put':
|
||||
'tags':
|
||||
- 'log'
|
||||
'operationId': 'putQueryLogConfig'
|
||||
'summary': 'Set query log parameters'
|
||||
'requestBody':
|
||||
'content':
|
||||
'application/json':
|
||||
'schema':
|
||||
'$ref': '#/components/schemas/PutQueryLogConfigUpdateRequest'
|
||||
'required': true
|
||||
'responses':
|
||||
'200':
|
||||
'description': 'OK.'
|
||||
'/stats':
|
||||
'get':
|
||||
'tags':
|
||||
@@ -284,6 +337,14 @@
|
||||
'description': 'OK.'
|
||||
'/stats_info':
|
||||
'get':
|
||||
'deprecated': true
|
||||
'description': |
|
||||
Deprecated: Use `GET /stats/config` instead.
|
||||
|
||||
NOTE: If `interval` was configured by editing configuration file or new
|
||||
HTTP API call `PUT /stats/config/update` and it's not equal to
|
||||
previous allowed enum values then it will be equal to `90` days for
|
||||
compatibility reasons.
|
||||
'tags':
|
||||
- 'stats'
|
||||
'operationId': 'statsInfo'
|
||||
@@ -297,6 +358,9 @@
|
||||
'$ref': '#/components/schemas/StatsConfig'
|
||||
'/stats_config':
|
||||
'post':
|
||||
'deprecated': true
|
||||
'description': >
|
||||
Deprecated: Use `PUT /stats/config/update` instead.
|
||||
'tags':
|
||||
- 'stats'
|
||||
'operationId': 'statsConfig'
|
||||
@@ -309,6 +373,34 @@
|
||||
'responses':
|
||||
'200':
|
||||
'description': 'OK.'
|
||||
'/stats/config':
|
||||
'get':
|
||||
'tags':
|
||||
- 'stats'
|
||||
'operationId': 'getStatsConfig'
|
||||
'summary': 'Get statistics parameters'
|
||||
'responses':
|
||||
'200':
|
||||
'description': 'OK.'
|
||||
'content':
|
||||
'application/json':
|
||||
'schema':
|
||||
'$ref': '#/components/schemas/GetStatsConfigResponse'
|
||||
'/stats/config/update':
|
||||
'put':
|
||||
'tags':
|
||||
- 'stats'
|
||||
'operationId': 'putStatsConfig'
|
||||
'summary': 'Set statistics parameters'
|
||||
'requestBody':
|
||||
'content':
|
||||
'application/json':
|
||||
'schema':
|
||||
'$ref': '#/components/schemas/PutStatsConfigUpdateRequest'
|
||||
'required': true
|
||||
'responses':
|
||||
'200':
|
||||
'description': 'OK.'
|
||||
'/tls/status':
|
||||
'get':
|
||||
'tags':
|
||||
@@ -717,6 +809,7 @@
|
||||
'sensitivity': 13
|
||||
'/safesearch/enable':
|
||||
'post':
|
||||
'deprecated': true
|
||||
'tags':
|
||||
- 'safesearch'
|
||||
'operationId': 'safesearchEnable'
|
||||
@@ -726,6 +819,7 @@
|
||||
'description': 'OK.'
|
||||
'/safesearch/disable':
|
||||
'post':
|
||||
'deprecated': true
|
||||
'tags':
|
||||
- 'safesearch'
|
||||
'operationId': 'safesearchDisable'
|
||||
@@ -733,6 +827,20 @@
|
||||
'responses':
|
||||
'200':
|
||||
'description': 'OK.'
|
||||
'/safesearch/settings':
|
||||
'put':
|
||||
'tags':
|
||||
- 'safesearch'
|
||||
'operationId': 'safesearchSettings'
|
||||
'summary': 'Update safesearch settings'
|
||||
'requestBody':
|
||||
'content':
|
||||
'application/json':
|
||||
'schema':
|
||||
'$ref': '#/components/schemas/SafeSearchConfig'
|
||||
'responses':
|
||||
'200':
|
||||
'description': 'OK.'
|
||||
'/safesearch/status':
|
||||
'get':
|
||||
'tags':
|
||||
@@ -745,14 +853,7 @@
|
||||
'content':
|
||||
'application/json':
|
||||
'schema':
|
||||
'type': 'object'
|
||||
'properties':
|
||||
'enabled':
|
||||
'type': 'boolean'
|
||||
'examples':
|
||||
'response':
|
||||
'value':
|
||||
'enabled': false
|
||||
'$ref': '#/components/schemas/SafeSearchConfig'
|
||||
'/clients':
|
||||
'get':
|
||||
'tags':
|
||||
@@ -1219,6 +1320,7 @@
|
||||
- 'dns_port'
|
||||
- 'http_port'
|
||||
- 'protection_enabled'
|
||||
- 'protection_disabled_until'
|
||||
- 'running'
|
||||
- 'version'
|
||||
- 'language'
|
||||
@@ -1242,6 +1344,9 @@
|
||||
'maximum': 65535
|
||||
'protection_enabled':
|
||||
'type': 'boolean'
|
||||
'protection_disabled_duration':
|
||||
'type': 'integer'
|
||||
'format': 'int64'
|
||||
'dhcp_available':
|
||||
'type': 'boolean'
|
||||
'running':
|
||||
@@ -1254,7 +1359,7 @@
|
||||
'example': 'en'
|
||||
'DNSConfig':
|
||||
'type': 'object'
|
||||
'description': 'Query log configuration'
|
||||
'description': 'DNS server configuration'
|
||||
'properties':
|
||||
'bootstrap_dns':
|
||||
'type': 'array'
|
||||
@@ -1280,8 +1385,6 @@
|
||||
'type': 'string'
|
||||
'protection_enabled':
|
||||
'type': 'boolean'
|
||||
'dhcp_available':
|
||||
'type': 'boolean'
|
||||
'ratelimit':
|
||||
'type': 'integer'
|
||||
'blocking_mode':
|
||||
@@ -1296,8 +1399,16 @@
|
||||
'type': 'string'
|
||||
'blocking_ipv6':
|
||||
'type': 'string'
|
||||
'protection_disabled_until':
|
||||
'type': 'string'
|
||||
'description': 'Protection is pause until this time. Nullable.'
|
||||
'example': '2018-11-26T00:02:41+03:00'
|
||||
'edns_cs_enabled':
|
||||
'type': 'boolean'
|
||||
'edns_cs_use_custom':
|
||||
'type': 'boolean'
|
||||
'edns_cs_custom_ip':
|
||||
'type': 'string'
|
||||
'disable_ipv6':
|
||||
'type': 'boolean'
|
||||
'dnssec_enabled':
|
||||
@@ -1654,6 +1765,27 @@
|
||||
- 30
|
||||
- 90
|
||||
'type': 'integer'
|
||||
'GetStatsConfigResponse':
|
||||
'type': 'object'
|
||||
'description': 'Statistics configuration'
|
||||
'required':
|
||||
- 'enabled'
|
||||
- 'interval'
|
||||
- 'ignored'
|
||||
'properties':
|
||||
'enabled':
|
||||
'description': 'Are statistics enabled'
|
||||
'type': 'boolean'
|
||||
'interval':
|
||||
'description': 'Statistics rotation interval in milliseconds'
|
||||
'type': 'number'
|
||||
'ignored':
|
||||
'description': 'List of host names, which should not be counted'
|
||||
'type': 'array'
|
||||
'items':
|
||||
'type': 'string'
|
||||
'PutStatsConfigUpdateRequest':
|
||||
'$ref': '#/components/schemas/GetStatsConfigResponse'
|
||||
'DhcpConfig':
|
||||
'type': 'object'
|
||||
'properties':
|
||||
@@ -1717,7 +1849,6 @@
|
||||
- 'mac'
|
||||
- 'ip'
|
||||
- 'hostname'
|
||||
- 'expires'
|
||||
'properties':
|
||||
'mac':
|
||||
'type': 'string'
|
||||
@@ -2057,6 +2188,32 @@
|
||||
'anonymize_client_ip':
|
||||
'type': 'boolean'
|
||||
'description': "Anonymize clients' IP addresses"
|
||||
'GetQueryLogConfigResponse':
|
||||
'type': 'object'
|
||||
'description': 'Query log configuration'
|
||||
'required':
|
||||
- 'enabled'
|
||||
- 'interval'
|
||||
- 'anonymize_client_ip'
|
||||
- 'ignored'
|
||||
'properties':
|
||||
'enabled':
|
||||
'type': 'boolean'
|
||||
'description': 'Is query log enabled'
|
||||
'interval':
|
||||
'description': >
|
||||
Time period for query log rotation in milliseconds.
|
||||
'type': 'number'
|
||||
'anonymize_client_ip':
|
||||
'type': 'boolean'
|
||||
'description': "Anonymize clients' IP addresses"
|
||||
'ignored':
|
||||
'description': 'List of host names, which should not be written to log'
|
||||
'type': 'array'
|
||||
'items':
|
||||
'type': 'string'
|
||||
'PutQueryLogConfigUpdateRequest':
|
||||
'$ref': '#/components/schemas/GetQueryLogConfigResponse'
|
||||
'ResultRule':
|
||||
'description': 'Applied rule.'
|
||||
'properties':
|
||||
@@ -2248,6 +2405,18 @@
|
||||
'type': 'integer'
|
||||
'format': 'uint16'
|
||||
'example': 80
|
||||
'SetProtectionRequest':
|
||||
'type': 'object'
|
||||
'description': 'Protection state configuration'
|
||||
'properties':
|
||||
'enabled':
|
||||
'type': 'boolean'
|
||||
'duration':
|
||||
'type': 'integer'
|
||||
'format': 'uint64'
|
||||
'description': 'Duration of a pause, in milliseconds. Enabled should be false.'
|
||||
'required':
|
||||
- 'enabled'
|
||||
'ProfileInfo':
|
||||
'type': 'object'
|
||||
'description': 'Information about the current user'
|
||||
@@ -2267,6 +2436,24 @@
|
||||
- 'name'
|
||||
- 'language'
|
||||
- 'theme'
|
||||
'SafeSearchConfig':
|
||||
'type': 'object'
|
||||
'description': 'Safe search settings.'
|
||||
'properties':
|
||||
'enabled':
|
||||
'type': 'boolean'
|
||||
'bing':
|
||||
'type': 'boolean'
|
||||
'duckduckgo':
|
||||
'type': 'boolean'
|
||||
'google':
|
||||
'type': 'boolean'
|
||||
'pixabay':
|
||||
'type': 'boolean'
|
||||
'yandex':
|
||||
'type': 'boolean'
|
||||
'youtube':
|
||||
'type': 'boolean'
|
||||
'Client':
|
||||
'type': 'object'
|
||||
'description': 'Client information.'
|
||||
@@ -2289,7 +2476,10 @@
|
||||
'safebrowsing_enabled':
|
||||
'type': 'boolean'
|
||||
'safesearch_enabled':
|
||||
'deprecated': true
|
||||
'type': 'boolean'
|
||||
'safe_search':
|
||||
'$ref': '#/components/schemas/SafeSearchConfig'
|
||||
'use_global_blocked_services':
|
||||
'type': 'boolean'
|
||||
'blocked_services':
|
||||
@@ -2350,6 +2540,7 @@
|
||||
'parental_enabled': true
|
||||
'safebrowsing_enabled': true
|
||||
'safesearch_enabled': true
|
||||
'safe_search': {}
|
||||
'use_global_blocked_services': true
|
||||
'blocked_services': null
|
||||
'upstreams': null
|
||||
@@ -2364,6 +2555,7 @@
|
||||
'parental_enabled': true
|
||||
'safebrowsing_enabled': true
|
||||
'safesearch_enabled': true
|
||||
'safe_search': {}
|
||||
'use_global_blocked_services': true
|
||||
'blocked_services': null
|
||||
'upstreams': null
|
||||
@@ -2424,7 +2616,10 @@
|
||||
'safebrowsing_enabled':
|
||||
'type': 'boolean'
|
||||
'safesearch_enabled':
|
||||
'deprecated': true
|
||||
'type': 'boolean'
|
||||
'safe_search':
|
||||
'$ref': '#/components/schemas/SafeSearchConfig'
|
||||
'use_global_blocked_services':
|
||||
'type': 'boolean'
|
||||
'blocked_services':
|
||||
|
||||
Reference in New Issue
Block a user