All URIs are relative to https://api.adguard-dns.io
| Method | HTTP request | Description |
|---|---|---|
| New-Device | POST /oapi/v1/devices | Creates a new device |
| Get-Device | GET /oapi/v1/devices/{device_id} | Gets an existing device by ID |
| Get-DoHMobileConfig | GET /oapi/v1/devices/{device_id}/doh.mobileconfig | Gets DNS-over-HTTPS .mobileconfig file. |
| Get-DoTMobileConfig | GET /oapi/v1/devices/{device_id}/dot.mobileconfig | Gets DNS-over-TLS .mobileconfig file. |
| Invoke-LinkDedicatedIPv4Address | POST /oapi/v1/devices/{device_id}/dedicated_addresses/ipv4 | Link dedicated IPv4 to the device |
| Invoke-ListDedicatedAddressesForDevice | GET /oapi/v1/devices/{device_id}/dedicated_addresses | List dedicated IPv4 and IPv6 addresses for a device |
| Invoke-ListDevices | GET /oapi/v1/devices | Lists devices |
| Remove-Device | DELETE /oapi/v1/devices/{device_id} | Removes a device |
| Reset-DOHPassword | PUT /oapi/v1/devices/{device_id}/doh_password/reset | Generate and set new DNS-over-HTTPS password |
| Invoke-UnlinkDedicatedIPv4Address | DELETE /oapi/v1/devices/{device_id}/dedicated_addresses/ipv4 | Unlink dedicated IPv4 from the device |
| Update-Device | PUT /oapi/v1/devices/{device_id} | Updates an existing device |
| Update-DeviceSettings | PUT /oapi/v1/devices/{device_id}/settings | Updates device settings |
Device New-Device
[-DeviceCreate]
Creates a new device
# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: ApiKey
$Configuration.ApiKey.Authorization = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.Authorization = "Bearer"
$DeviceCreate = Initialize-DeviceCreate -DeviceType "WINDOWS" -DnsServerId "a9f29be1" -Name "My android" # DeviceCreate |
# Creates a new device
try {
$Result = New-Device -DeviceCreate $DeviceCreate
} catch {
Write-Host ("Exception occurred when calling New-Device: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}| Name | Type | Description | Notes |
|---|---|---|---|
| DeviceCreate | DeviceCreate |
Device (PSCustomObject)
- Content-Type: application/json
- Accept: /, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Device Get-Device
[-DeviceId]
Gets an existing device by ID
# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: ApiKey
$Configuration.ApiKey.Authorization = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.Authorization = "Bearer"
$DeviceId = "MyDeviceId" # String |
# Gets an existing device by ID
try {
$Result = Get-Device -DeviceId $DeviceId
} catch {
Write-Host ("Exception occurred when calling Get-Device: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}| Name | Type | Description | Notes |
|---|---|---|---|
| DeviceId | String |
Device (PSCustomObject)
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void Get-DoHMobileConfig
[-DeviceId]
[-ExcludeWifiNetworks] <String[]>
[-ExcludeDomain] <String[]>
Gets DNS-over-HTTPS .mobileconfig file.
# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: ApiKey
$Configuration.ApiKey.Authorization = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.Authorization = "Bearer"
$DeviceId = "MyDeviceId" # String |
$ExcludeWifiNetworks = "MyExcludeWifiNetworks" # String[] | List Wi-Fi networks by their SSID in which you want AdGuard DNS to be disabled (optional)
$ExcludeDomain = "MyExcludeDomain" # String[] | List domains that will use default DNS servers instead of AdGuard DNS (optional)
# Gets DNS-over-HTTPS .mobileconfig file.
try {
$Result = Get-DoHMobileConfig -DeviceId $DeviceId -ExcludeWifiNetworks $ExcludeWifiNetworks -ExcludeDomain $ExcludeDomain
} catch {
Write-Host ("Exception occurred when calling Get-DoHMobileConfig: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}| Name | Type | Description | Notes |
|---|---|---|---|
| DeviceId | String | ||
| ExcludeWifiNetworks | String[] | List Wi-Fi networks by their SSID in which you want AdGuard DNS to be disabled | [optional] |
| ExcludeDomain | String[] | List domains that will use default DNS servers instead of AdGuard DNS | [optional] |
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]
void Get-DoTMobileConfig
[-DeviceId]
[-ExcludeWifiNetworks] <String[]>
[-ExcludeDomain] <String[]>
Gets DNS-over-TLS .mobileconfig file.
# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: ApiKey
$Configuration.ApiKey.Authorization = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.Authorization = "Bearer"
$DeviceId = "MyDeviceId" # String |
$ExcludeWifiNetworks = "MyExcludeWifiNetworks" # String[] | List Wi-Fi networks by their SSID in which you want AdGuard DNS to be disabled (optional)
$ExcludeDomain = "MyExcludeDomain" # String[] | List domains that will use default DNS servers instead of AdGuard DNS (optional)
# Gets DNS-over-TLS .mobileconfig file.
try {
$Result = Get-DoTMobileConfig -DeviceId $DeviceId -ExcludeWifiNetworks $ExcludeWifiNetworks -ExcludeDomain $ExcludeDomain
} catch {
Write-Host ("Exception occurred when calling Get-DoTMobileConfig: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}| Name | Type | Description | Notes |
|---|---|---|---|
| DeviceId | String | ||
| ExcludeWifiNetworks | String[] | List Wi-Fi networks by their SSID in which you want AdGuard DNS to be disabled | [optional] |
| ExcludeDomain | String[] | List domains that will use default DNS servers instead of AdGuard DNS | [optional] |
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]
void Invoke-LinkDedicatedIPv4Address
[-DeviceId]
[-LinkDedicatedIPv4]
Link dedicated IPv4 to the device
# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: ApiKey
$Configuration.ApiKey.Authorization = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.Authorization = "Bearer"
$DeviceId = "MyDeviceId" # String |
$LinkDedicatedIPv4 = Initialize-LinkDedicatedIPv4 -Ip "MyIp" # LinkDedicatedIPv4 |
# Link dedicated IPv4 to the device
try {
$Result = Invoke-LinkDedicatedIPv4Address -DeviceId $DeviceId -LinkDedicatedIPv4 $LinkDedicatedIPv4
} catch {
Write-Host ("Exception occurred when calling Invoke-LinkDedicatedIPv4Address: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}| Name | Type | Description | Notes |
|---|---|---|---|
| DeviceId | String | ||
| LinkDedicatedIPv4 | LinkDedicatedIPv4 |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DedicatedIps Invoke-ListDedicatedAddressesForDevice
[-DeviceId]
List dedicated IPv4 and IPv6 addresses for a device
# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: ApiKey
$Configuration.ApiKey.Authorization = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.Authorization = "Bearer"
$DeviceId = "MyDeviceId" # String |
# List dedicated IPv4 and IPv6 addresses for a device
try {
$Result = Invoke-ListDedicatedAddressesForDevice -DeviceId $DeviceId
} catch {
Write-Host ("Exception occurred when calling Invoke-ListDedicatedAddressesForDevice: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}| Name | Type | Description | Notes |
|---|---|---|---|
| DeviceId | String |
DedicatedIps (PSCustomObject)
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Device[] Invoke-ListDevices
Lists devices
# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: ApiKey
$Configuration.ApiKey.Authorization = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.Authorization = "Bearer"
# Lists devices
try {
$Result = Invoke-ListDevices
} catch {
Write-Host ("Exception occurred when calling Invoke-ListDevices: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}This endpoint does not need any parameter.
Device[] (PSCustomObject)
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void Remove-Device
[-DeviceId]
Removes a device
# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: ApiKey
$Configuration.ApiKey.Authorization = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.Authorization = "Bearer"
$DeviceId = "MyDeviceId" # String |
# Removes a device
try {
$Result = Remove-Device -DeviceId $DeviceId
} catch {
Write-Host ("Exception occurred when calling Remove-Device: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}| Name | Type | Description | Notes |
|---|---|---|---|
| DeviceId | String |
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]
void Reset-DOHPassword
[-DeviceId]
Generate and set new DNS-over-HTTPS password
# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: ApiKey
$Configuration.ApiKey.Authorization = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.Authorization = "Bearer"
$DeviceId = "MyDeviceId" # String |
# Generate and set new DNS-over-HTTPS password
try {
$Result = Reset-DOHPassword -DeviceId $DeviceId
} catch {
Write-Host ("Exception occurred when calling Reset-DOHPassword: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}| Name | Type | Description | Notes |
|---|---|---|---|
| DeviceId | String |
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]
void Invoke-UnlinkDedicatedIPv4Address
[-DeviceId]
[-Ip]
Unlink dedicated IPv4 from the device
# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: ApiKey
$Configuration.ApiKey.Authorization = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.Authorization = "Bearer"
$DeviceId = "MyDeviceId" # String |
$Ip = "MyIp" # String | Dedicated IPv4
# Unlink dedicated IPv4 from the device
try {
$Result = Invoke-UnlinkDedicatedIPv4Address -DeviceId $DeviceId -Ip $Ip
} catch {
Write-Host ("Exception occurred when calling Invoke-UnlinkDedicatedIPv4Address: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}| Name | Type | Description | Notes |
|---|---|---|---|
| DeviceId | String | ||
| Ip | String | Dedicated IPv4 |
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]
void Update-Device
[-DeviceId]
[-DeviceUpdate]
Updates an existing device
# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: ApiKey
$Configuration.ApiKey.Authorization = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.Authorization = "Bearer"
$DeviceId = "MyDeviceId" # String |
$DeviceUpdate = Initialize-DeviceUpdate -DeviceType "WINDOWS" -DnsServerId "a9f29be1" -Name "My android" # DeviceUpdate |
# Updates an existing device
try {
$Result = Update-Device -DeviceId $DeviceId -DeviceUpdate $DeviceUpdate
} catch {
Write-Host ("Exception occurred when calling Update-Device: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}| Name | Type | Description | Notes |
|---|---|---|---|
| DeviceId | String | ||
| DeviceUpdate | DeviceUpdate |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void Update-DeviceSettings
[-DeviceId]
[-DeviceSettingsUpdate]
Updates device settings
# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: ApiKey
$Configuration.ApiKey.Authorization = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.Authorization = "Bearer"
$DeviceId = "MyDeviceId" # String |
$DeviceSettingsUpdate = Initialize-DeviceSettingsUpdate -DetectDohAuthOnly $false -ProtectionEnabled $false # DeviceSettingsUpdate |
# Updates device settings
try {
$Result = Update-DeviceSettings -DeviceId $DeviceId -DeviceSettingsUpdate $DeviceSettingsUpdate
} catch {
Write-Host ("Exception occurred when calling Update-DeviceSettings: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}| Name | Type | Description | Notes |
|---|---|---|---|
| DeviceId | String | ||
| DeviceSettingsUpdate | DeviceSettingsUpdate |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]