Skip to content

Latest commit

 

History

History
190 lines (159 loc) · 12.4 KB

File metadata and controls

190 lines (159 loc) · 12.4 KB

PSAdGuardDNS - the PowerShell module for the AdGuard DNS API

DNS API documentation

This PowerShell module is automatically generated by the OpenAPI Generator project:

  • API version: 1.11
  • SDK version: 1.0.0
  • Generator version: 7.16.0
  • Build package: org.openapitools.codegen.languages.PowerShellClientCodegen

Frameworks supported

  • PowerShell 6.2 or later

Dependencies

Installation

To install from the source, run the following command to build and install the PowerShell module locally:

Build.ps1
Import-Module -Name '.\src\PSAdGuardDNS' -Verbose

To avoid function name collision, one can use -Prefix, e.g. Import-Module -Name '.\src\PSAdGuardDNS' -Prefix prefix

To uninstall the module, simply run:

Remove-Module -FullyQualifiedName @{ModuleName = "PSAdGuardDNS"; ModuleVersion = "1.0.0"}

Tests

To install and run Pester, please execute the following commands in the terminal:

Install-module -name Pester -force

Invoke-Pester

For troubleshooting, please run $DebugPreference = 'Continue' to turn on debugging and disable it with $DebugPreference = 'SilentlyContinue' when done with the troubleshooting.

Documentation for API Endpoints

All URIs are relative to https://api.adguard-dns.io

Class Method HTTP request Description
AccountApi Get-AccountLimits GET /oapi/v1/account/limits Gets account limits
AuthenticationApi Invoke-AccessToken POST /oapi/v1/oauth_token Generates Access and Refresh token
AuthenticationApi Revoke-Token POST /oapi/v1/revoke_token Revokes a Refresh Token
DNSServersApi New-DNSServer POST /oapi/v1/dns_servers Creates a new DNS server
DNSServersApi Get-DNSServer GET /oapi/v1/dns_servers/{dns_server_id} Gets an existing DNS server by ID
DNSServersApi Invoke-ListDNSServers GET /oapi/v1/dns_servers Lists DNS servers that belong to the user.
DNSServersApi Remove-DNSServer DELETE /oapi/v1/dns_servers/{dns_server_id} Removes a DNS server
DNSServersApi Update-DNSServer PUT /oapi/v1/dns_servers/{dns_server_id} Updates an existing DNS server
DNSServersApi Update-DNSServerSettings PUT /oapi/v1/dns_servers/{dns_server_id}/settings Updates DNS server settings
DedicatedIPAddressesApi New-DedicatedIPv4Address POST /oapi/v1/dedicated_addresses/ipv4 Allocates new dedicated IPv4
DedicatedIPAddressesApi Invoke-ListDedicatedIPv4Addresses GET /oapi/v1/dedicated_addresses/ipv4 Lists allocated dedicated IPv4 addresses
DevicesApi New-Device POST /oapi/v1/devices Creates a new device
DevicesApi Get-Device GET /oapi/v1/devices/{device_id} Gets an existing device by ID
DevicesApi Get-DoHMobileConfig GET /oapi/v1/devices/{device_id}/doh.mobileconfig Gets DNS-over-HTTPS .mobileconfig file.
DevicesApi Get-DoTMobileConfig GET /oapi/v1/devices/{device_id}/dot.mobileconfig Gets DNS-over-TLS .mobileconfig file.
DevicesApi Invoke-LinkDedicatedIPv4Address POST /oapi/v1/devices/{device_id}/dedicated_addresses/ipv4 Link dedicated IPv4 to the device
DevicesApi Invoke-ListDedicatedAddressesForDevice GET /oapi/v1/devices/{device_id}/dedicated_addresses List dedicated IPv4 and IPv6 addresses for a device
DevicesApi Invoke-ListDevices GET /oapi/v1/devices Lists devices
DevicesApi Remove-Device DELETE /oapi/v1/devices/{device_id} Removes a device
DevicesApi Reset-DOHPassword PUT /oapi/v1/devices/{device_id}/doh_password/reset Generate and set new DNS-over-HTTPS password
DevicesApi Invoke-UnlinkDedicatedIPv4Address DELETE /oapi/v1/devices/{device_id}/dedicated_addresses/ipv4 Unlink dedicated IPv4 from the device
DevicesApi Update-Device PUT /oapi/v1/devices/{device_id} Updates an existing device
DevicesApi Update-DeviceSettings PUT /oapi/v1/devices/{device_id}/settings Updates device settings
FilterListsApi Invoke-ListFilterLists GET /oapi/v1/filter_lists Gets filter lists
QueryLogApi Clear-QueryLog DELETE /oapi/v1/query_log Clears query log
QueryLogApi Get-QueryLog GET /oapi/v1/query_log Gets query log
StatisticsApi Get-CategoriesQueriesStats GET /oapi/v1/stats/categories Gets categories statistics
StatisticsApi Get-CompaniesStats GET /oapi/v1/stats/companies Gets companies statistics
StatisticsApi Get-CountriesQueriesStats GET /oapi/v1/stats/countries Gets countries statistics
StatisticsApi Get-DetailedCompaniesStats GET /oapi/v1/stats/companies/detailed Gets detailed companies statistics
StatisticsApi Get-DevicesQueriesStats GET /oapi/v1/stats/devices Gets devices statistics
StatisticsApi Get-DomainsQueriesStats GET /oapi/v1/stats/domains Gets domains statistics
StatisticsApi Get-TimeQueriesStats GET /oapi/v1/stats/time Gets time statistics
WebServicesApi Invoke-ListWebServices GET /oapi/v1/web_services Lists web services

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

ApiKey

  • Type: API key

  • API key parameter name: Authorization

  • Location: HTTP header

AuthToken

  • Type: HTTP Bearer Token authentication