All URIs are relative to /control
Method | HTTP request | Description |
---|---|---|
beginUpdate | POST /update | Begin auto-upgrade procedure |
dnsConfig | POST /dns_config | Set general DNS parameters |
dnsInfo | GET /dns_info | Get general DNS parameters |
getProfile | GET /profile | |
getVersionJson | POST /version.json | Gets information about the latest available version of AdGuard |
login | POST /login | Perform administrator log-in |
logout | GET /logout | Perform administrator log-out |
mobileConfigDoH | GET /apple/doh.mobileconfig | Get DNS over HTTPS .mobileconfig. |
mobileConfigDoT | GET /apple/dot.mobileconfig | Get DNS over TLS .mobileconfig. |
status | GET /status | Get DNS server current status and general settings |
testUpstreamDNS | POST /test_upstream_dns | Test upstream configuration |
beginUpdate()
Begin auto-upgrade procedure
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Swagger\Client\Api\GlobalApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$apiInstance->beginUpdate();
} catch (Exception $e) {
echo 'Exception when calling GlobalApi->beginUpdate: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
dnsConfig($body)
Set general DNS parameters
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Swagger\Client\Api\GlobalApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \Swagger\Client\Model\DNSConfig(); // \Swagger\Client\Model\DNSConfig |
try {
$apiInstance->dnsConfig($body);
} catch (Exception $e) {
echo 'Exception when calling GlobalApi->dnsConfig: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Swagger\Client\Model\DNSConfig | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\InlineResponse200 dnsInfo()
Get general DNS parameters
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Swagger\Client\Api\GlobalApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->dnsInfo();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GlobalApi->dnsInfo: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
\Swagger\Client\Model\InlineResponse200
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\ProfileInfo getProfile()
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Swagger\Client\Api\GlobalApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->getProfile();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GlobalApi->getProfile: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
\Swagger\Client\Model\ProfileInfo
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\VersionInfo getVersionJson($body)
Gets information about the latest available version of AdGuard
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Swagger\Client\Api\GlobalApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \Swagger\Client\Model\GetVersionRequest(); // \Swagger\Client\Model\GetVersionRequest |
try {
$result = $apiInstance->getVersionJson($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GlobalApi->getVersionJson: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Swagger\Client\Model\GetVersionRequest |
\Swagger\Client\Model\VersionInfo
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
login($body)
Perform administrator log-in
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Swagger\Client\Api\GlobalApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \Swagger\Client\Model\Login(); // \Swagger\Client\Model\Login |
try {
$apiInstance->login($body);
} catch (Exception $e) {
echo 'Exception when calling GlobalApi->login: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Swagger\Client\Model\Login |
void (empty response body)
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
logout()
Perform administrator log-out
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Swagger\Client\Api\GlobalApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$apiInstance->logout();
} catch (Exception $e) {
echo 'Exception when calling GlobalApi->logout: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
mobileConfigDoH($host, $client_id)
Get DNS over HTTPS .mobileconfig.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Swagger\Client\Api\GlobalApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$host = "host_example"; // string | Host for which the config is generated. If no host is provided, `tls.server_name` from the configuration file is used. If `tls.server_name` is not set, the API returns an error with a 500 status.
$client_id = "client_id_example"; // string | ClientID.
try {
$apiInstance->mobileConfigDoH($host, $client_id);
} catch (Exception $e) {
echo 'Exception when calling GlobalApi->mobileConfigDoH: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
host | string | Host for which the config is generated. If no host is provided, `tls.server_name` from the configuration file is used. If `tls.server_name` is not set, the API returns an error with a 500 status. | |
client_id | string | ClientID. | [optional] |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
mobileConfigDoT($host, $client_id)
Get DNS over TLS .mobileconfig.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Swagger\Client\Api\GlobalApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$host = "host_example"; // string | Host for which the config is generated. If no host is provided, `tls.server_name` from the configuration file is used. If `tls.server_name` is not set, the API returns an error with a 500 status.
$client_id = "client_id_example"; // string | ClientID.
try {
$apiInstance->mobileConfigDoT($host, $client_id);
} catch (Exception $e) {
echo 'Exception when calling GlobalApi->mobileConfigDoT: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
host | string | Host for which the config is generated. If no host is provided, `tls.server_name` from the configuration file is used. If `tls.server_name` is not set, the API returns an error with a 500 status. | |
client_id | string | ClientID. | [optional] |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\ServerStatus status()
Get DNS server current status and general settings
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Swagger\Client\Api\GlobalApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->status();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GlobalApi->status: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
\Swagger\Client\Model\ServerStatus
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\UpstreamsConfigResponse testUpstreamDNS($body)
Test upstream configuration
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Swagger\Client\Api\GlobalApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \Swagger\Client\Model\UpstreamsConfig(); // \Swagger\Client\Model\UpstreamsConfig | Upstream configuration to be tested
try {
$result = $apiInstance->testUpstreamDNS($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GlobalApi->testUpstreamDNS: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Swagger\Client\Model\UpstreamsConfig | Upstream configuration to be tested | [optional] |
\Swagger\Client\Model\UpstreamsConfigResponse
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]