{
  "openapi": "3.0.1",
  "info": {
    "description": "DNS API documentation",
    "title": "AdGuard DNS API",
    "version": "1.12"
  },
  "servers": [
    {
      "url": "https://api.adguard-dns.io"
    }
  ],
  "security": [
    {
      "ApiKey": [],
      "AuthToken": []
    }
  ],
  "tags": [
    {
      "description": "Web services",
      "name": "Web services"
    },
    {
      "description": "DNS servers",
      "name": "DNS servers"
    },
    {
      "description": "Statistics",
      "name": "Statistics"
    },
    {
      "description": "Dedicated IP addresses",
      "name": "Dedicated IP addresses"
    },
    {
      "description": "Account",
      "name": "Account"
    },
    {
      "description": "Authentication",
      "name": "Authentication"
    },
    {
      "description": "Devices",
      "name": "Devices"
    },
    {
      "description": "Filter lists",
      "name": "Filter lists"
    },
    {
      "description": "Query log",
      "name": "Query log"
    }
  ],
  "paths": {
    "/oapi/v1/account/limits": {
      "get": {
        "operationId": "getAccountLimits",
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/AccountLimits"
                }
              }
            },
            "description": "Account limits info"
          }
        },
        "summary": "Gets account limits",
        "tags": [
          "Account"
        ]
      }
    },
    "/oapi/v1/dedicated_addresses/ipv4": {
      "get": {
        "operationId": "listDedicatedIPv4Addresses",
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DedicatedIPv4Address"
                  }
                }
              }
            },
            "description": "List of dedicated IPv4 addresses"
          }
        },
        "summary": "Lists allocated dedicated IPv4 addresses",
        "tags": [
          "Dedicated IP addresses"
        ]
      },
      "post": {
        "operationId": "allocateDedicatedIPv4Address",
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/DedicatedIPv4Address"
                }
              }
            },
            "description": "New IPv4 successfully allocated"
          },
          "429": {
            "description": "Dedicated IPv4 count reached the limit"
          }
        },
        "summary": "Allocates new dedicated IPv4",
        "tags": [
          "Dedicated IP addresses"
        ]
      }
    },
    "/oapi/v1/devices": {
      "get": {
        "operationId": "listDevices",
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Device"
                  }
                }
              }
            },
            "description": "List of devices"
          }
        },
        "summary": "Lists devices",
        "tags": [
          "Devices"
        ]
      },
      "post": {
        "operationId": "createDevice",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Device"
                }
              }
            },
            "description": "Device created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation failed"
          },
          "429": {
            "description": "Devices count reached the limit"
          }
        },
        "summary": "Creates a new device",
        "tags": [
          "Devices"
        ]
      }
    },
    "/oapi/v1/devices/{device_id}": {
      "delete": {
        "operationId": "removeDevice",
        "parameters": [
          {
            "in": "path",
            "name": "device_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Device deleted"
          },
          "404": {
            "description": "Device not found"
          }
        },
        "summary": "Removes a device",
        "tags": [
          "Devices"
        ]
      },
      "get": {
        "operationId": "getDevice",
        "parameters": [
          {
            "in": "path",
            "name": "device_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Device"
                }
              }
            },
            "description": "Device info"
          },
          "404": {
            "description": "Device not found"
          }
        },
        "summary": "Gets an existing device by ID",
        "tags": [
          "Devices"
        ]
      },
      "put": {
        "operationId": "updateDevice",
        "parameters": [
          {
            "in": "path",
            "name": "device_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Device updated"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation failed"
          },
          "404": {
            "description": "Device not found"
          }
        },
        "summary": "Updates an existing device",
        "tags": [
          "Devices"
        ]
      }
    },
    "/oapi/v1/devices/{device_id}/dedicated_addresses": {
      "get": {
        "operationId": "listDedicatedAddressesForDevice",
        "parameters": [
          {
            "in": "path",
            "name": "device_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/DedicatedIps"
                }
              }
            },
            "description": "Dedicated IPv4 and IPv6"
          }
        },
        "summary": "List dedicated IPv4 and IPv6 addresses for a device",
        "tags": [
          "Devices"
        ]
      }
    },
    "/oapi/v1/devices/{device_id}/dedicated_addresses/ipv4": {
      "delete": {
        "operationId": "unlinkDedicatedIPv4Address",
        "parameters": [
          {
            "in": "path",
            "name": "device_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Dedicated IPv4",
            "in": "query",
            "name": "ip",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Dedicated IPv4 successfully unlinked from the device"
          },
          "404": {
            "description": "Device or address not found"
          }
        },
        "summary": "Unlink dedicated IPv4 from the device",
        "tags": [
          "Devices"
        ]
      },
      "post": {
        "operationId": "linkDedicatedIPv4Address",
        "parameters": [
          {
            "in": "path",
            "name": "device_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkDedicatedIPv4"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Dedicated IPv4 successfully linked to the device"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation failed"
          },
          "404": {
            "description": "Device or address not found"
          },
          "429": {
            "description": "Linked dedicated IPv4 count reached the limit"
          }
        },
        "summary": "Link dedicated IPv4 to the device",
        "tags": [
          "Devices"
        ]
      }
    },
    "/oapi/v1/devices/{device_id}/doh.mobileconfig": {
      "get": {
        "operationId": "getDoHMobileConfig",
        "parameters": [
          {
            "in": "path",
            "name": "device_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "List Wi-Fi networks by their SSID in which you want AdGuard DNS to be disabled",
            "in": "query",
            "name": "exclude_wifi_networks",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "description": "List domains that will use default DNS servers instead of AdGuard DNS",
            "in": "query",
            "name": "exclude_domain",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "DNS-over-HTTPS .plist file"
          },
          "404": {
            "description": "Device not found"
          }
        },
        "summary": "Gets DNS-over-HTTPS .mobileconfig file.",
        "tags": [
          "Devices"
        ]
      }
    },
    "/oapi/v1/devices/{device_id}/doh_password/reset": {
      "put": {
        "operationId": "resetDOHPassword",
        "parameters": [
          {
            "in": "path",
            "name": "device_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "DNS-over-HTTPS password successfully reset"
          },
          "404": {
            "description": "Device not found"
          }
        },
        "summary": "Generate and set new DNS-over-HTTPS password",
        "tags": [
          "Devices"
        ]
      }
    },
    "/oapi/v1/devices/{device_id}/dot.mobileconfig": {
      "get": {
        "operationId": "getDoTMobileConfig",
        "parameters": [
          {
            "in": "path",
            "name": "device_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "List Wi-Fi networks by their SSID in which you want AdGuard DNS to be disabled",
            "in": "query",
            "name": "exclude_wifi_networks",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "description": "List domains that will use default DNS servers instead of AdGuard DNS",
            "in": "query",
            "name": "exclude_domain",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "DNS-over-HTTPS .plist file"
          },
          "404": {
            "description": "Device not found"
          }
        },
        "summary": "Gets DNS-over-TLS .mobileconfig file.",
        "tags": [
          "Devices"
        ]
      }
    },
    "/oapi/v1/devices/{device_id}/settings": {
      "put": {
        "operationId": "updateDeviceSettings",
        "parameters": [
          {
            "in": "path",
            "name": "device_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSettingsUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Device settings updated"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation failed"
          },
          "404": {
            "description": "Device not found"
          }
        },
        "summary": "Updates device settings",
        "tags": [
          "Devices"
        ]
      }
    },
    "/oapi/v1/dns_servers": {
      "get": {
        "description": "Lists DNS servers that belong to the user. By default there is at least one default server.",
        "operationId": "listDNSServers",
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DNSServer"
                  }
                }
              }
            },
            "description": "List of DNS servers"
          }
        },
        "summary": "Lists DNS servers that belong to the user.",
        "tags": [
          "DNS servers"
        ]
      },
      "post": {
        "description": "Creates a new DNS server. You can attach custom settings, otherwise DNS server will be created with default settings.",
        "operationId": "createDNSServer",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DNSServerCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/DNSServer"
                }
              }
            },
            "description": "DNS server created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation failed"
          },
          "429": {
            "description": "DNS servers count reached the limit"
          }
        },
        "summary": "Creates a new DNS server",
        "tags": [
          "DNS servers"
        ]
      }
    },
    "/oapi/v1/dns_servers/{dns_server_id}": {
      "delete": {
        "description": "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.",
        "operationId": "removeDNSServer",
        "parameters": [
          {
            "in": "path",
            "name": "dns_server_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "DNS server deleted"
          },
          "404": {
            "description": "DNS server not found"
          }
        },
        "summary": "Removes a DNS server",
        "tags": [
          "DNS servers"
        ]
      },
      "get": {
        "operationId": "getDNSServer",
        "parameters": [
          {
            "in": "path",
            "name": "dns_server_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/DNSServer"
                }
              }
            },
            "description": "DNS server info"
          },
          "404": {
            "description": "DNS server not found"
          }
        },
        "summary": "Gets an existing DNS server by ID",
        "tags": [
          "DNS servers"
        ]
      },
      "put": {
        "operationId": "updateDNSServer",
        "parameters": [
          {
            "in": "path",
            "name": "dns_server_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DNSServerUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "DNS server updated"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation failed"
          },
          "404": {
            "description": "DNS server not found"
          }
        },
        "summary": "Updates an existing DNS server",
        "tags": [
          "DNS servers"
        ]
      }
    },
    "/oapi/v1/dns_servers/{dns_server_id}/settings": {
      "put": {
        "operationId": "updateDNSServerSettings",
        "parameters": [
          {
            "in": "path",
            "name": "dns_server_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DNSServerSettingsUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "DNS server settings updated"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation failed"
          },
          "404": {
            "description": "DNS server not found"
          }
        },
        "summary": "Updates DNS server settings",
        "tags": [
          "DNS servers"
        ]
      }
    },
    "/oapi/v1/filter_lists": {
      "get": {
        "operationId": "listFilterLists",
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FilterList"
                  }
                }
              }
            },
            "description": "List of filters"
          }
        },
        "summary": "Gets filter lists",
        "tags": [
          "Filter lists"
        ]
      }
    },
    "/oapi/v1/oauth_token": {
      "post": {
        "operationId": "accessToken",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/AccessTokenCredentials"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/AccessTokenResponse"
                }
              }
            },
            "description": "Access token issued"
          },
          "400": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/AccessTokenResponse"
                }
              }
            },
            "description": "Missing required parameters"
          },
          "401": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/AccessTokenErrorResponse"
                }
              }
            },
            "description": "Invalid credentials, MFA token or refresh token provided"
          }
        },
        "security": [],
        "summary": "Generates Access and Refresh token",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/oapi/v1/query_log": {
      "delete": {
        "operationId": "clearQueryLog",
        "responses": {
          "202": {
            "description": "Query log was cleared"
          }
        },
        "summary": "Clears query log",
        "tags": [
          "Query log"
        ]
      },
      "get": {
        "operationId": "getQueryLog",
        "parameters": [
          {
            "description": "Time from in milliseconds (inclusive)",
            "in": "query",
            "name": "time_from_millis",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "description": "Time to in milliseconds (inclusive)",
            "in": "query",
            "name": "time_to_millis",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "description": "Filter by devices",
            "in": "query",
            "name": "devices",
            "required": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "description": "Filter by countries",
            "in": "query",
            "name": "countries",
            "required": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "description": "Filter by companies",
            "in": "query",
            "name": "companies",
            "required": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "description": "Filter by statuses",
            "in": "query",
            "name": "statuses",
            "required": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/FilteringActionStatus"
              }
            }
          },
          {
            "description": "Filter by categories",
            "in": "query",
            "name": "categories",
            "required": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/CategoryType"
              }
            }
          },
          {
            "description": "Filter by domain name",
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Limit the number of records to be returned",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 1000,
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          },
          {
            "description": "Pagination cursor. Use cursor from response to paginate through the pages.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/QueryLogResponse"
                }
              }
            },
            "description": "Query log"
          }
        },
        "summary": "Gets query log",
        "tags": [
          "Query log"
        ]
      }
    },
    "/oapi/v1/revoke_token": {
      "post": {
        "operationId": "revokeToken",
        "parameters": [
          {
            "description": "Refresh Token",
            "in": "query",
            "name": "refresh_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Refresh token revoked"
          }
        },
        "security": [],
        "summary": "Revokes a Refresh Token",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/oapi/v1/stats/categories": {
      "get": {
        "operationId": "getCategoriesQueriesStats",
        "parameters": [
          {
            "description": "Time from in milliseconds (inclusive)",
            "in": "query",
            "name": "time_from_millis",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "description": "Time to in milliseconds (inclusive)",
            "in": "query",
            "name": "time_to_millis",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "description": "Filter by devices",
            "in": "query",
            "name": "devices",
            "required": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "description": "Filter by countries",
            "in": "query",
            "name": "countries",
            "required": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/CategoryQueriesStatsList"
                }
              }
            },
            "description": "Categories statistics received"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation failed"
          }
        },
        "summary": "Gets categories statistics",
        "tags": [
          "Statistics"
        ]
      }
    },
    "/oapi/v1/stats/companies": {
      "get": {
        "operationId": "getCompaniesStats",
        "parameters": [
          {
            "description": "Time from in milliseconds (inclusive)",
            "in": "query",
            "name": "time_from_millis",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "description": "Time to in milliseconds (inclusive)",
            "in": "query",
            "name": "time_to_millis",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "description": "Filter by devices",
            "in": "query",
            "name": "devices",
            "required": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "description": "Filter by countries",
            "in": "query",
            "name": "countries",
            "required": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyQueriesStatsList"
                }
              }
            },
            "description": "Companies statistics received"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation failed"
          }
        },
        "summary": "Gets companies statistics",
        "tags": [
          "Statistics"
        ]
      }
    },
    "/oapi/v1/stats/companies/detailed": {
      "get": {
        "operationId": "getDetailedCompaniesStats",
        "parameters": [
          {
            "description": "Time from in milliseconds (inclusive)",
            "in": "query",
            "name": "time_from_millis",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "description": "Time to in milliseconds (inclusive)",
            "in": "query",
            "name": "time_to_millis",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "description": "Filter by devices",
            "in": "query",
            "name": "devices",
            "required": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "description": "Filter by countries",
            "in": "query",
            "name": "countries",
            "required": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "description": "Pagination cursor",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyDetailedQueriesStatsList"
                }
              }
            },
            "description": "Detailed companies statistics received"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation failed"
          }
        },
        "summary": "Gets detailed companies statistics",
        "tags": [
          "Statistics"
        ]
      }
    },
    "/oapi/v1/stats/countries": {
      "get": {
        "operationId": "getCountriesQueriesStats",
        "parameters": [
          {
            "description": "Time from in milliseconds (inclusive)",
            "in": "query",
            "name": "time_from_millis",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "description": "Time to in milliseconds (inclusive)",
            "in": "query",
            "name": "time_to_millis",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "description": "Filter by devices",
            "in": "query",
            "name": "devices",
            "required": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "description": "Filter by countries",
            "in": "query",
            "name": "countries",
            "required": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/CountryQueriesStatsList"
                }
              }
            },
            "description": "Countries statistics received"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation failed"
          }
        },
        "summary": "Gets countries statistics",
        "tags": [
          "Statistics"
        ]
      }
    },
    "/oapi/v1/stats/devices": {
      "get": {
        "operationId": "getDevicesQueriesStats",
        "parameters": [
          {
            "description": "Time from in milliseconds (inclusive)",
            "in": "query",
            "name": "time_from_millis",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "description": "Time to in milliseconds (inclusive)",
            "in": "query",
            "name": "time_to_millis",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "description": "Filter by devices",
            "in": "query",
            "name": "devices",
            "required": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "description": "Filter by countries",
            "in": "query",
            "name": "countries",
            "required": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceQueriesStatsList"
                }
              }
            },
            "description": "Devices statistics received"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation failed"
          }
        },
        "summary": "Gets devices statistics",
        "tags": [
          "Statistics"
        ]
      }
    },
    "/oapi/v1/stats/domains": {
      "get": {
        "operationId": "getDomainsQueriesStats",
        "parameters": [
          {
            "description": "Time from in milliseconds (inclusive)",
            "in": "query",
            "name": "time_from_millis",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "description": "Time to in milliseconds (inclusive)",
            "in": "query",
            "name": "time_to_millis",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "description": "Filter by devices",
            "in": "query",
            "name": "devices",
            "required": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "description": "Filter by countries",
            "in": "query",
            "name": "countries",
            "required": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/DomainQueriesStatsList"
                }
              }
            },
            "description": "Domains statistics received"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation failed"
          }
        },
        "summary": "Gets domains statistics",
        "tags": [
          "Statistics"
        ]
      }
    },
    "/oapi/v1/stats/time": {
      "get": {
        "operationId": "getTimeQueriesStats",
        "parameters": [
          {
            "description": "Time from in milliseconds (inclusive)",
            "in": "query",
            "name": "time_from_millis",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "description": "Time to in milliseconds (inclusive)",
            "in": "query",
            "name": "time_to_millis",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "description": "Filter by devices",
            "in": "query",
            "name": "devices",
            "required": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "description": "Filter by countries",
            "in": "query",
            "name": "countries",
            "required": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/TimeQueriesStatsList"
                }
              }
            },
            "description": "Time statistics received"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation failed"
          }
        },
        "summary": "Gets time statistics",
        "tags": [
          "Statistics"
        ]
      }
    },
    "/oapi/v1/web_services": {
      "get": {
        "operationId": "listWebServices",
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebService"
                  }
                }
              }
            },
            "description": "List of web-services"
          }
        },
        "summary": "Lists web services",
        "tags": [
          "Web services"
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "AccessTokenCredentials": {
        "type": "object",
        "properties": {
          "mfa_token": {
            "type": "string",
            "description": "Two-Factor authentication token"
          },
          "password": {
            "type": "string",
            "description": "Account password"
          },
          "refresh_token": {
            "type": "string",
            "description": "Refresh Token using which a new access token has to be generated"
          },
          "username": {
            "type": "string",
            "description": "Account email"
          }
        }
      },
      "AccessTokenErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "Error type",
            "example": "unauthorized"
          },
          "error_code": {
            "type": "string",
            "description": "Error code",
            "example": "2fa_required"
          },
          "error_description": {
            "type": "string",
            "description": "Error description",
            "example": "2FA is required"
          }
        },
        "description": "Access token error response"
      },
      "AccessTokenResponse": {
        "required": [
          "expires_in"
        ],
        "type": "object",
        "properties": {
          "access_token": {
            "type": "string",
            "description": "Access token",
            "example": "jTFho_aymtN20pZR5RRSQAzd81I"
          },
          "expires_in": {
            "type": "integer",
            "description": "The lifetime in seconds of the access token",
            "format": "int32",
            "example": 2620978
          },
          "refresh_token": {
            "type": "string",
            "description": "Refresh token",
            "example": "H3SW6YFJ-tOPe0FQCM1Jd6VnMiA"
          },
          "token_type": {
            "type": "string",
            "description": "The type of the token issued",
            "example": "bearer"
          }
        },
        "description": "Access token success response"
      },
      "AccountLimits": {
        "required": [
          "access_rules",
          "dedicated_ipv4",
          "devices",
          "dns_servers",
          "requests",
          "user_rules"
        ],
        "type": "object",
        "properties": {
          "access_rules": {
            "$ref": "#/components/schemas/Limit"
          },
          "dedicated_ipv4": {
            "$ref": "#/components/schemas/Limit"
          },
          "devices": {
            "$ref": "#/components/schemas/Limit"
          },
          "dns_servers": {
            "$ref": "#/components/schemas/Limit"
          },
          "requests": {
            "$ref": "#/components/schemas/Limit"
          },
          "user_rules": {
            "$ref": "#/components/schemas/Limit"
          }
        },
        "description": "Account limits"
      },
      "BlockedWebService": {
        "required": [
          "enabled",
          "id"
        ],
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether service blocking is enabled"
          },
          "id": {
            "type": "string",
            "description": "Web-service identifier",
            "example": "9gag"
          }
        },
        "description": "Blocked web-service"
      },
      "BlockedWebServiceUpdate": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether service blocking is enabled"
          },
          "id": {
            "maxLength": 64,
            "minLength": 1,
            "type": "string",
            "description": "Web-service identifier",
            "example": "9gag"
          }
        },
        "description": "Blocked web-service update action"
      },
      "BlockingMode": {
        "type": "string",
        "description": "Blocking mode",
        "enum": [
          "NONE",
          "NULL_IP",
          "REFUSED",
          "NXDOMAIN",
          "CUSTOM_IP"
        ]
      },
      "BlockingModeSettings": {
        "required": [
          "blocking_mode"
        ],
        "type": "object",
        "properties": {
          "blocking_mode": {
            "$ref": "#/components/schemas/BlockingMode"
          },
          "ipv4_blocking_address": {
            "type": "string",
            "description": "Custom IPv4 address for blocking mode CUSTOM IP"
          },
          "ipv6_blocking_address": {
            "type": "string",
            "description": "Custom IPv6 address for blocking mode CUSTOM IP"
          }
        },
        "description": "Blocking mode settings"
      },
      "BlockingModeSettingsUpdate": {
        "required": [
          "blocking_mode"
        ],
        "type": "object",
        "properties": {
          "blocking_mode": {
            "$ref": "#/components/schemas/BlockingMode"
          },
          "ipv4_blocking_address": {
            "type": "string",
            "description": "Custom IPv4 address for blocking mode CUSTOM IP"
          },
          "ipv6_blocking_address": {
            "type": "string",
            "description": "Custom IPv6 address for blocking mode CUSTOM IP"
          }
        },
        "description": "Blocking mode settings"
      },
      "CategoryQueriesStats": {
        "required": [
          "category_type",
          "queries"
        ],
        "type": "object",
        "properties": {
          "category_type": {
            "$ref": "#/components/schemas/CategoryType"
          },
          "queries": {
            "type": "integer",
            "description": "Queries",
            "format": "int64"
          }
        },
        "description": "Category queries stats"
      },
      "CategoryQueriesStatsList": {
        "required": [
          "stats"
        ],
        "type": "object",
        "properties": {
          "stats": {
            "type": "array",
            "description": "List of queries stats",
            "items": {
              "$ref": "#/components/schemas/CategoryQueriesStats"
            }
          }
        },
        "description": "Categories queries statistics"
      },
      "CategoryType": {
        "type": "string",
        "description": "Category type",
        "enum": [
          "ADS",
          "TRACKERS",
          "SOCIAL_MEDIA",
          "CDN",
          "OTHERS"
        ]
      },
      "CompanyDetailedQueriesStats": {
        "required": [
          "company_name",
          "domains_count",
          "top_queries_domain",
          "value"
        ],
        "type": "object",
        "properties": {
          "company_name": {
            "type": "string",
            "description": "Company name",
            "example": "Google"
          },
          "domains_count": {
            "type": "integer",
            "description": "Domains count",
            "format": "int32",
            "example": 100
          },
          "top_blocked_domain": {
            "type": "string",
            "description": "Top domain by blocked queries",
            "example": "advertising.google.com"
          },
          "top_queries_domain": {
            "type": "string",
            "description": "Top domain by queries",
            "example": "ads.apple.com"
          },
          "value": {
            "$ref": "#/components/schemas/QueriesStats"
          }
        },
        "description": "Company detailed queries stats"
      },
      "CompanyDetailedQueriesStatsList": {
        "required": [
          "pages",
          "stats"
        ],
        "type": "object",
        "properties": {
          "pages": {
            "type": "array",
            "description": "Pagination",
            "items": {
              "$ref": "#/components/schemas/Page"
            }
          },
          "stats": {
            "type": "array",
            "description": "List of queries stats",
            "items": {
              "$ref": "#/components/schemas/CompanyDetailedQueriesStats"
            }
          }
        },
        "description": "Company detailed queries statistics"
      },
      "CompanyQueriesStats": {
        "required": [
          "company_name",
          "value"
        ],
        "type": "object",
        "properties": {
          "company_name": {
            "type": "string",
            "description": "Company name",
            "example": "Google"
          },
          "value": {
            "$ref": "#/components/schemas/QueriesStats"
          }
        },
        "description": "Company queries stats"
      },
      "CompanyQueriesStatsList": {
        "required": [
          "stats"
        ],
        "type": "object",
        "properties": {
          "stats": {
            "type": "array",
            "description": "List of queries stats",
            "items": {
              "$ref": "#/components/schemas/CompanyQueriesStats"
            }
          }
        },
        "description": "Companies queries statistics"
      },
      "ConnectDeviceType": {
        "type": "string",
        "description": "Connect Device Type",
        "example": "ANDROID",
        "enum": [
          "WINDOWS",
          "ANDROID",
          "MAC",
          "IOS",
          "LINUX",
          "ROUTER",
          "SMART_TV",
          "GAME_CONSOLE",
          "UNKNOWN"
        ]
      },
      "CountryQueriesStats": {
        "required": [
          "country",
          "value"
        ],
        "type": "object",
        "properties": {
          "country": {
            "type": "string",
            "description": "Country code",
            "example": "US"
          },
          "value": {
            "$ref": "#/components/schemas/QueriesStats"
          }
        },
        "description": "Country queries stats"
      },
      "CountryQueriesStatsList": {
        "required": [
          "stats"
        ],
        "type": "object",
        "properties": {
          "stats": {
            "type": "array",
            "description": "List of queries stats",
            "items": {
              "$ref": "#/components/schemas/CountryQueriesStats"
            }
          }
        },
        "description": "Countries queries statistics"
      },
      "DNSAddresses": {
        "required": [
          "adguard_dns_over_https_url",
          "adguard_dns_over_quic_url",
          "adguard_dns_over_tls_url",
          "adguard_vpn_dns_over_https_url",
          "adguard_vpn_dns_over_quic_url",
          "adguard_vpn_dns_over_tls_url",
          "dns_over_https_url",
          "dns_over_quic_url",
          "dns_over_tls_url"
        ],
        "type": "object",
        "properties": {
          "adguard_dns_over_https_url": {
            "type": "string",
            "description": "AdGuard DNS-over-HTTPS url",
            "example": "adguard:add_dns_server?address=https%3A%2F%2Ff3750181.d.adguard.ch%2Fdns-query%26name%3DAdGuard%20Personal%20DNS"
          },
          "adguard_dns_over_https_with_auth_url": {
            "type": "string",
            "description": "AdGuard DNS-over-HTTPS with authentication url",
            "example": "adguard:add_dns_server?address=https%3A%2F%2Ff3750181:jaNh9iXS@d.adguard.ch%2Fdns-query%26name%3DAdGuard%20Personal%20DNS"
          },
          "adguard_dns_over_quic_url": {
            "type": "string",
            "description": "AdGuard DNS-over-QUIC url",
            "example": "adguard:add_dns_server?address=quic%3A%2F%2Ff3750181.d.adguard.ch%2Fdns-query%26name%3DAdGuard%20Personal%20DNS"
          },
          "adguard_dns_over_tls_url": {
            "type": "string",
            "description": "AdGuard DNS-over-TLS url",
            "example": "adguard:add_dns_server?address=tls%3A%2F%2Ff3750181.d.adguard.ch%2Fdns-query%26name%3DAdGuard%20Personal%20DNS"
          },
          "adguard_vpn_dns_over_https_url": {
            "type": "string",
            "description": "AdGuard VPN DNS-over-HTTPS url",
            "example": "adguardvpn:add_dns_server?address=https%3A%2F%2Ff3750181.d.adguard.ch%2Fdns-query%26name%3DAdGuard%20Personal%20DNS"
          },
          "adguard_vpn_dns_over_https_with_auth_url": {
            "type": "string",
            "description": "AdGuard VPN DNS-over-HTTPS with authentication url",
            "example": "adguardvpn:add_dns_server?address=https%3A%2F%2Ff3750181:jaNh9iXS@.d.adguard.ch%2Fdns-query%26name%3DAdGuard%20Personal%20DNS"
          },
          "adguard_vpn_dns_over_quic_url": {
            "type": "string",
            "description": "AdGuard VPN DNS-over-QUIC url",
            "example": "adguardvpn:add_dns_server?address=quic%3A%2F%2Ff3750181.d.adguard.ch%2Fdns-query%26name%3DAdGuard%20Personal%20DNS"
          },
          "adguard_vpn_dns_over_tls_url": {
            "type": "string",
            "description": "AdGuard VPN DNS-over-TLS url",
            "example": "adguardvpn:add_dns_server?address=tls%3A%2F%2Ff3750181.d.adguard.ch%2Fdns-query%26name%3DAdGuard%20Personal%20DNS"
          },
          "dns_over_https_url": {
            "type": "string",
            "description": "DNS-over-HTTPS",
            "example": "https://b3e82cd1.adguard-dns.com/dns-query"
          },
          "dns_over_https_with_auth_url": {
            "type": "string",
            "description": "DNS-over-HTTPS with authentication",
            "example": "https://b3e82cd1:jaNh9iXS@d.adguard-dns.com/dns-query"
          },
          "dns_over_quic_url": {
            "type": "string",
            "description": "DNS-over-QUIC",
            "example": "quic://b3e82cd1.adguard-dns.com"
          },
          "dns_over_tls_url": {
            "type": "string",
            "description": "DNS-over-TLS",
            "example": "tls://b3e82cd1.adguard-dns.com"
          },
          "ip_addresses": {
            "type": "array",
            "description": "IP addresses",
            "items": {
              "$ref": "#/components/schemas/IpAddress"
            }
          }
        },
        "description": "DNS connecting info"
      },
      "DNSServer": {
        "required": [
          "default",
          "device_ids",
          "id",
          "name",
          "settings"
        ],
        "type": "object",
        "properties": {
          "default": {
            "type": "boolean",
            "description": "Default",
            "example": false
          },
          "device_ids": {
            "type": "array",
            "description": "List of connected devices",
            "items": {
              "type": "string",
              "description": "List of connected devices"
            }
          },
          "id": {
            "type": "string",
            "description": "DNS server ID",
            "example": "a9f29be1"
          },
          "name": {
            "type": "string",
            "description": "Name",
            "example": "Main DNS server"
          },
          "settings": {
            "$ref": "#/components/schemas/DNSServerSettings"
          }
        },
        "description": "DNS server (aka profile)"
      },
      "DNSServerAccessSettings": {
        "required": [
          "allowed_clients",
          "block_known_scanners",
          "blocked_clients",
          "blocked_domain_rules",
          "enabled"
        ],
        "type": "object",
        "properties": {
          "allowed_clients": {
            "type": "array",
            "description": "Allowed IP's, CIDR's or ASN's",
            "items": {
              "type": "string",
              "description": "Allowed IP's, CIDR's or ASN's"
            }
          },
          "block_known_scanners": {
            "type": "boolean",
            "description": "If known scanners should be blocked"
          },
          "blocked_clients": {
            "type": "array",
            "description": "Blocked IP's, CIDR's or ASN's",
            "items": {
              "type": "string",
              "description": "Blocked IP's, CIDR's or ASN's"
            }
          },
          "blocked_domain_rules": {
            "type": "array",
            "description": "Blocked domain rules",
            "items": {
              "type": "string",
              "description": "Blocked domain rules"
            }
          },
          "enabled": {
            "type": "boolean",
            "description": "Flag that access settings are enabled"
          }
        },
        "description": "DNS server access settings"
      },
      "DNSServerAccessSettingsUpdate": {
        "type": "object",
        "properties": {
          "allowed_clients": {
            "type": "array",
            "description": "Allowed IP's, CIDR's or ASN's",
            "items": {
              "type": "string",
              "description": "Allowed IP's, CIDR's or ASN's"
            }
          },
          "block_known_scanners": {
            "type": "boolean",
            "description": "If known scanners should be blocked"
          },
          "blocked_clients": {
            "type": "array",
            "description": "Blocked IP's, CIDR's or ASN's",
            "items": {
              "type": "string",
              "description": "Blocked IP's, CIDR's or ASN's"
            }
          },
          "blocked_domain_rules": {
            "type": "array",
            "description": "Blocked domain rules",
            "items": {
              "maxLength": 1024,
              "minLength": 0,
              "type": "string",
              "description": "Blocked domain rules"
            }
          },
          "enabled": {
            "type": "boolean",
            "description": "Flag that access settings are enabled"
          }
        },
        "description": "DNS server access settings update"
      },
      "DNSServerCreate": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 64,
            "minLength": 1,
            "type": "string",
            "description": "DNS server name",
            "example": "My profile"
          },
          "settings": {
            "$ref": "#/components/schemas/DNSServerSettingsUpdate"
          }
        },
        "description": "DNS server create action"
      },
      "DNSServerSettings": {
        "required": [
          "access_settings",
          "auto_connect_devices_enabled",
          "block_chrome_prefetch",
          "block_firefox_canary",
          "block_private_relay",
          "block_ttl_seconds",
          "blocking_mode_settings",
          "filter_lists_settings",
          "ip_log_enabled",
          "parental_control_settings",
          "protection_enabled",
          "safebrowsing_settings",
          "user_rules_settings"
        ],
        "type": "object",
        "properties": {
          "access_settings": {
            "$ref": "#/components/schemas/DNSServerAccessSettings"
          },
          "auto_connect_devices_enabled": {
            "type": "boolean",
            "description": "Approval for auto-connecting devices through a specific link type"
          },
          "block_chrome_prefetch": {
            "type": "boolean",
            "description": "Block prefetch proxy in Google chrome"
          },
          "block_firefox_canary": {
            "type": "boolean",
            "description": "If Firefox Canary should be blocked"
          },
          "block_private_relay": {
            "type": "boolean",
            "description": "Is private relay should be blocked"
          },
          "block_ttl_seconds": {
            "type": "integer",
            "description": "TTL for blocked request",
            "format": "int32"
          },
          "blocking_mode_settings": {
            "$ref": "#/components/schemas/BlockingModeSettings"
          },
          "filter_lists_settings": {
            "$ref": "#/components/schemas/FilterListsSettings"
          },
          "ip_log_enabled": {
            "type": "boolean",
            "description": "Consent to log IP addresses of requests"
          },
          "parental_control_settings": {
            "$ref": "#/components/schemas/ParentalControlSettings"
          },
          "protection_enabled": {
            "type": "boolean",
            "description": "Is protection enabled"
          },
          "safebrowsing_settings": {
            "$ref": "#/components/schemas/SafebrowsingSettings"
          },
          "user_rules_settings": {
            "$ref": "#/components/schemas/UserRulesSettings"
          }
        },
        "description": "DNS server settings"
      },
      "DNSServerSettingsUpdate": {
        "type": "object",
        "properties": {
          "access_settings": {
            "$ref": "#/components/schemas/DNSServerAccessSettingsUpdate"
          },
          "auto_connect_devices_enabled": {
            "type": "boolean",
            "description": "Approval for auto-connecting devices through a specific link type"
          },
          "block_chrome_prefetch": {
            "type": "boolean",
            "description": "Block prefetch proxy in Google chrome"
          },
          "block_firefox_canary": {
            "type": "boolean",
            "description": "If Firefox Canary should be blocked"
          },
          "block_private_relay": {
            "type": "boolean",
            "description": "Is private relay should be blocked"
          },
          "block_ttl_seconds": {
            "maximum": 3600,
            "minimum": 0,
            "type": "integer",
            "description": "TTL for blocked request",
            "format": "int32"
          },
          "blocking_mode_settings": {
            "$ref": "#/components/schemas/BlockingModeSettingsUpdate"
          },
          "filter_lists_settings": {
            "$ref": "#/components/schemas/FilterListsSettingsUpdate"
          },
          "ip_log_enabled": {
            "type": "boolean",
            "description": "Consent to log IP addresses of requests"
          },
          "parental_control_settings": {
            "$ref": "#/components/schemas/ParentalControlSettingsUpdate"
          },
          "protection_enabled": {
            "type": "boolean",
            "description": "Is protection enabled"
          },
          "safebrowsing_settings": {
            "$ref": "#/components/schemas/SafebrowsingSettingsUpdate"
          },
          "user_rules_settings": {
            "$ref": "#/components/schemas/UserRulesSettingsUpdate"
          }
        },
        "description": "DNS server settings update action"
      },
      "DNSServerUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 64,
            "minLength": 1,
            "type": "string",
            "description": "DNS server name",
            "example": "My profile"
          }
        },
        "description": "DNS server update action"
      },
      "DayOfWeek": {
        "type": "string",
        "description": "Day of week",
        "enum": [
          "MONDAY",
          "TUESDAY",
          "WEDNESDAY",
          "THURSDAY",
          "FRIDAY",
          "SATURDAY",
          "SUNDAY"
        ]
      },
      "DedicatedIPv4Address": {
        "required": [
          "ip"
        ],
        "type": "object",
        "properties": {
          "device_id": {
            "type": "string",
            "description": "Linked device ID, or null if address is vacant",
            "example": "b3e82cd1"
          },
          "ip": {
            "type": "string",
            "description": "IP address",
            "example": "94.140.14.15"
          }
        },
        "description": "Dedicated IPv4 address"
      },
      "DedicatedIps": {
        "required": [
          "ipv4",
          "ipv4_limit",
          "ipv6"
        ],
        "type": "object",
        "properties": {
          "ipv4": {
            "type": "array",
            "description": "Dedicated IPv4 address",
            "items": {
              "type": "string",
              "description": "Dedicated IPv4 address"
            }
          },
          "ipv4_limit": {
            "$ref": "#/components/schemas/Limit"
          },
          "ipv6": {
            "type": "array",
            "description": "Dedicated IPv6 address",
            "items": {
              "type": "string",
              "description": "Dedicated IPv6 address"
            }
          }
        },
        "description": "Dedicated IPs"
      },
      "Device": {
        "required": [
          "device_type",
          "dns_addresses",
          "dns_server_id",
          "id",
          "name",
          "settings"
        ],
        "type": "object",
        "properties": {
          "device_type": {
            "$ref": "#/components/schemas/ConnectDeviceType"
          },
          "dns_addresses": {
            "$ref": "#/components/schemas/DNSAddresses"
          },
          "dns_server_id": {
            "type": "string",
            "description": "DNS server ID",
            "example": "a9f29be1"
          },
          "id": {
            "type": "string",
            "description": "Device ID",
            "example": "b3e82cd1"
          },
          "name": {
            "type": "string",
            "description": "Device name",
            "example": "My iphone"
          },
          "settings": {
            "$ref": "#/components/schemas/DeviceSettings"
          }
        },
        "description": "Device"
      },
      "DeviceCreate": {
        "required": [
          "device_type",
          "dns_server_id",
          "name"
        ],
        "type": "object",
        "properties": {
          "device_type": {
            "$ref": "#/components/schemas/ConnectDeviceType"
          },
          "dns_server_id": {
            "type": "string",
            "description": "DNS server ID",
            "example": "a9f29be1"
          },
          "name": {
            "maxLength": 64,
            "minLength": 1,
            "type": "string",
            "description": "Device name",
            "example": "My android"
          }
        },
        "description": "Device create action"
      },
      "DeviceQueriesStats": {
        "required": [
          "device_id",
          "value"
        ],
        "type": "object",
        "properties": {
          "device_id": {
            "type": "string",
            "description": "Device ID",
            "example": "b3e82cd1"
          },
          "last_activity_time_millis": {
            "type": "integer",
            "description": "Last activity time in millis",
            "format": "int64"
          },
          "value": {
            "$ref": "#/components/schemas/QueriesStats"
          }
        },
        "description": "Device queries stats"
      },
      "DeviceQueriesStatsList": {
        "required": [
          "stats"
        ],
        "type": "object",
        "properties": {
          "stats": {
            "type": "array",
            "description": "List of queries stats",
            "items": {
              "$ref": "#/components/schemas/DeviceQueriesStats"
            }
          }
        },
        "description": "Devices queries statistics"
      },
      "DeviceSettings": {
        "required": [
          "detect_doh_auth_only",
          "protection_enabled"
        ],
        "type": "object",
        "properties": {
          "detect_doh_auth_only": {
            "type": "boolean",
            "description": "Use only DNS-over-HTTPS with authentication"
          },
          "protection_enabled": {
            "type": "boolean",
            "description": "Is protection enabled"
          }
        },
        "description": "Device settings"
      },
      "DeviceSettingsUpdate": {
        "type": "object",
        "properties": {
          "detect_doh_auth_only": {
            "type": "boolean",
            "description": "Use only DNS-over-HTTPS with authentication"
          },
          "protection_enabled": {
            "type": "boolean",
            "description": "Enable protection"
          }
        },
        "description": "Device settings update"
      },
      "DeviceUpdate": {
        "type": "object",
        "properties": {
          "device_type": {
            "$ref": "#/components/schemas/ConnectDeviceType"
          },
          "dns_server_id": {
            "type": "string",
            "description": "DNS server ID",
            "example": "a9f29be1"
          },
          "name": {
            "maxLength": 64,
            "minLength": 1,
            "type": "string",
            "description": "Device name",
            "example": "My android"
          }
        },
        "description": "Device update action"
      },
      "DnsProtoResponseType": {
        "type": "string",
        "description": "DNS proto response type",
        "enum": [
          "RcodeSuccess",
          "RcodeFormatError",
          "RcodeServerFailure",
          "RcodeNameError",
          "RcodeNotImplemented",
          "RcodeRefused",
          "RcodeYXDomain",
          "RcodeYXRrset",
          "RcodeNXRrset",
          "RcodeNotAuth",
          "RcodeNotZone",
          "RcodeBadSig",
          "RcodeBadVers",
          "RcodeBadKey",
          "RcodeBadTime",
          "RcodeBadMode",
          "RcodeBadName",
          "RcodeBadAlg",
          "RcodeBadTrunc",
          "RcodeBadCookie"
        ]
      },
      "DnsProtoType": {
        "type": "object",
        "description": "DNS protocol type",
        "example": "DOT",
        "oneOf": [
          {
            "$ref": "#/components/schemas/SecureDnsProtoType"
          },
          {
            "$ref": "#/components/schemas/RegularDnsProtoType"
          }
        ],
        "properties": {
          "value": {
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "value"
        ]
      },
      "DomainQueriesStats": {
        "required": [
          "domain",
          "value"
        ],
        "type": "object",
        "properties": {
          "domain": {
            "type": "string",
            "description": "Domain name",
            "example": "facebook.com"
          },
          "value": {
            "$ref": "#/components/schemas/QueriesStats"
          }
        },
        "description": "Domain queries stats"
      },
      "DomainQueriesStatsList": {
        "required": [
          "stats"
        ],
        "type": "object",
        "properties": {
          "stats": {
            "type": "array",
            "description": "List of queries stats",
            "items": {
              "$ref": "#/components/schemas/DomainQueriesStats"
            }
          }
        },
        "description": "Domains queries statistics"
      },
      "ErrorCodes": {
        "type": "string",
        "description": "Possible error codes",
        "example": "FIELD_REQUIRED",
        "enum": [
          "BAD_REQUEST",
          "FIELD_REQUIRED",
          "FIELD_WRONG_VALUE",
          "FIELD_REACHED_LIMIT",
          "UNKNOWN"
        ]
      },
      "ErrorResponse": {
        "required": [
          "error_code",
          "fields"
        ],
        "type": "object",
        "properties": {
          "error_code": {
            "$ref": "#/components/schemas/ErrorCodes"
          },
          "fields": {
            "type": "array",
            "description": "Fields errors",
            "items": {
              "$ref": "#/components/schemas/FieldError"
            }
          },
          "message": {
            "type": "string",
            "description": "Error message",
            "example": "Validation failed"
          }
        },
        "description": "Error response"
      },
      "FieldError": {
        "required": [
          "error_code",
          "field"
        ],
        "type": "object",
        "properties": {
          "error_code": {
            "$ref": "#/components/schemas/ErrorCodes"
          },
          "field": {
            "type": "string",
            "description": "Field name",
            "example": "name"
          },
          "message": {
            "type": "string",
            "description": "Error message",
            "example": "Field is required"
          }
        },
        "description": "Fields errors"
      },
      "FilterList": {
        "required": [
          "categories",
          "description",
          "download_url",
          "filter_id",
          "homepage_url",
          "name",
          "rules_count",
          "source_url",
          "tags",
          "time_updated"
        ],
        "type": "object",
        "properties": {
          "categories": {
            "type": "array",
            "description": "Filter categories",
            "items": {
              "$ref": "#/components/schemas/FilterListCategory"
            }
          },
          "description": {
            "type": "string",
            "description": "Filter description",
            "example": "Filter composed of several other filters (AdGuard Base filter, Social Media filter)..."
          },
          "download_url": {
            "type": "string",
            "description": "Filter download url",
            "example": "https://adguardteam.github.io/HostlistsRegistry/assets/filter_1.txt"
          },
          "filter_id": {
            "type": "string",
            "description": "Filter ID",
            "example": "adguard_dns_filter"
          },
          "homepage_url": {
            "type": "string",
            "description": "Filter homepage url",
            "example": "https://github.com/AdguardTeam/AdGuardSDNSFilter"
          },
          "name": {
            "type": "string",
            "description": "Filter name",
            "example": "AdGuard DNS filter"
          },
          "rules_count": {
            "type": "integer",
            "description": "Rules count in filter",
            "format": "int32",
            "example": 10000
          },
          "source_url": {
            "type": "string",
            "description": "Filter source url",
            "example": "https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt"
          },
          "tags": {
            "type": "array",
            "description": "Filter tags",
            "example": [
              "purpose:general"
            ],
            "items": {
              "type": "string",
              "description": "Filter tags",
              "example": "[\"purpose:general\"]"
            }
          },
          "time_updated": {
            "type": "string",
            "description": "Filter last updated time",
            "format": "date-time"
          }
        },
        "description": "Filter list"
      },
      "FilterListCategory": {
        "required": [
          "category",
          "description"
        ],
        "type": "object",
        "properties": {
          "category": {
            "$ref": "#/components/schemas/FilterListCategoryType"
          },
          "description": {
            "type": "string",
            "description": "Localized description"
          },
          "value": {
            "type": "string",
            "description": "Filter category value"
          }
        },
        "description": "Filter category info"
      },
      "FilterListCategoryType": {
        "type": "string",
        "description": "Filter list category type",
        "enum": [
          "GENERAL",
          "SECURITY",
          "REGIONAL",
          "OTHER"
        ]
      },
      "FilterListItem": {
        "required": [
          "enabled",
          "filter_id"
        ],
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "The flag that the filter is on or off"
          },
          "filter_id": {
            "type": "string",
            "description": "Filter identifier"
          }
        },
        "description": "Filter"
      },
      "FilterListItemUpdate": {
        "required": [
          "filter_id"
        ],
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "The flag that the filter is on or off"
          },
          "filter_id": {
            "minLength": 1,
            "type": "string",
            "description": "Filter identifier"
          }
        },
        "description": "Filter update action"
      },
      "FilterListsSettings": {
        "required": [
          "enabled",
          "filter_list"
        ],
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "The flag that all filters are on or off"
          },
          "filter_list": {
            "type": "array",
            "description": "Filter list",
            "items": {
              "$ref": "#/components/schemas/FilterListItem"
            }
          }
        },
        "description": "Filter lists settings"
      },
      "FilterListsSettingsUpdate": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "The flag that all filters are on or off"
          },
          "filter_list": {
            "type": "array",
            "description": "Filter list",
            "items": {
              "$ref": "#/components/schemas/FilterListItemUpdate"
            }
          }
        },
        "description": "Filter lists settings update"
      },
      "FilteringActionSource": {
        "type": "string",
        "description": "Filtering action source",
        "enum": [
          "FILTERS",
          "USER_FILTER",
          "SAFEBROWSING",
          "PARENTAL_SAFE_SEARCH",
          "PARENTAL_YOUTUBE",
          "PARENTAL_ADULT",
          "PARENTAL_BLOCKED_SERVICE",
          "PARENTAL_SCHEDULE",
          "NEWLY_REGISTERED_DOMAINS"
        ]
      },
      "FilteringActionStatus": {
        "type": "string",
        "description": "Filtering action status",
        "enum": [
          "UNKNOWN",
          "NONE",
          "REQUEST_BLOCKED",
          "RESPONSE_BLOCKED",
          "REQUEST_ALLOWED",
          "RESPONSE_ALLOWED",
          "MODIFIED"
        ]
      },
      "FilteringInfo": {
        "type": "object",
        "properties": {
          "blocked_service_id": {
            "type": "string",
            "description": "Web service ID",
            "example": "instagram"
          },
          "filter_id": {
            "type": "string",
            "description": "Filter ID",
            "example": "adguard_dns_filter"
          },
          "filter_rule": {
            "type": "string",
            "description": "Filter rule",
            "example": "||example.org^"
          },
          "filtering_status": {
            "$ref": "#/components/schemas/FilteringActionStatus"
          },
          "filtering_type": {
            "$ref": "#/components/schemas/FilteringActionSource"
          }
        },
        "description": "Filtering info"
      },
      "IpAddress": {
        "required": [
          "ip_address",
          "type"
        ],
        "type": "object",
        "properties": {
          "ip_address": {
            "type": "string",
            "description": "IP address string"
          },
          "type": {
            "$ref": "#/components/schemas/IpType"
          }
        },
        "description": "IP address info"
      },
      "IpType": {
        "type": "string",
        "description": "IP address type",
        "enum": [
          "V4",
          "V6"
        ]
      },
      "Limit": {
        "required": [
          "limit",
          "used"
        ],
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "description": "Max count",
            "format": "int32"
          },
          "used": {
            "type": "integer",
            "description": "Used count",
            "format": "int64"
          }
        },
        "description": "Entity of the limit"
      },
      "LinkDedicatedIPv4": {
        "required": [
          "ip"
        ],
        "type": "object",
        "properties": {
          "ip": {
            "type": "string",
            "description": "Dedicated IPv4"
          }
        },
        "description": "Link dedicated IPv4 address to device"
      },
      "Page": {
        "required": [
          "current",
          "page_cursor",
          "page_number"
        ],
        "type": "object",
        "properties": {
          "current": {
            "type": "boolean",
            "description": "Is current page",
            "example": false
          },
          "page_cursor": {
            "type": "string",
            "description": "Pagination cursor",
            "example": "1645451419441:1:20:3118"
          },
          "page_number": {
            "type": "integer",
            "description": "Page number",
            "format": "int32",
            "example": 1
          }
        },
        "description": "Pagination"
      },
      "ParentalControlSettings": {
        "required": [
          "block_adult_websites_enabled",
          "blocked_services",
          "enabled",
          "engines_safe_search_enabled",
          "screen_time_schedule",
          "youtube_safe_search_enabled"
        ],
        "type": "object",
        "properties": {
          "block_adult_websites_enabled": {
            "type": "boolean",
            "description": "Disable porno content"
          },
          "blocked_services": {
            "type": "array",
            "description": "List of services with restricted access",
            "items": {
              "$ref": "#/components/schemas/BlockedWebService"
            }
          },
          "enabled": {
            "type": "boolean",
            "description": "Is parental control enabled or not"
          },
          "engines_safe_search_enabled": {
            "type": "boolean",
            "description": "Enforces safe search for some search engines"
          },
          "screen_time_schedule": {
            "$ref": "#/components/schemas/ScheduleWeek"
          },
          "youtube_safe_search_enabled": {
            "type": "boolean",
            "description": "Enforces safe search on YouTube"
          }
        },
        "description": "Parental control settings"
      },
      "ParentalControlSettingsUpdate": {
        "type": "object",
        "properties": {
          "block_adult_websites_enabled": {
            "type": "boolean",
            "description": "Disable porno content"
          },
          "blocked_services": {
            "type": "array",
            "description": "List of services with restricted access",
            "items": {
              "$ref": "#/components/schemas/BlockedWebServiceUpdate"
            }
          },
          "enabled": {
            "type": "boolean",
            "description": "Is parental control enabled or not"
          },
          "engines_safe_search_enabled": {
            "type": "boolean",
            "description": "Enforces safe search for some search engines"
          },
          "screen_time_schedule": {
            "$ref": "#/components/schemas/ScheduleWeekUpdate"
          },
          "youtube_safe_search_enabled": {
            "type": "boolean",
            "description": "Enforces safe search on YouTube"
          }
        },
        "description": "Parental control settings update action"
      },
      "QueriesStats": {
        "required": [
          "blocked",
          "companies",
          "queries"
        ],
        "type": "object",
        "properties": {
          "blocked": {
            "type": "integer",
            "description": "Blocked queries count",
            "format": "int64",
            "example": 14
          },
          "companies": {
            "type": "integer",
            "description": "Companies count",
            "format": "int32",
            "example": 4
          },
          "queries": {
            "type": "integer",
            "description": "Overall queries count",
            "format": "int64",
            "example": 86
          }
        },
        "description": "Overall / blocked / companies queries count"
      },
      "QueryLogItem": {
        "required": [
          "category_type",
          "company_id",
          "dnssec",
          "domain",
          "filtering_info",
          "time_iso",
          "time_millis"
        ],
        "type": "object",
        "properties": {
          "asn": {
            "type": "integer",
            "description": "AS number",
            "format": "int32",
            "example": 25227
          },
          "category_type": {
            "$ref": "#/components/schemas/CategoryType"
          },
          "client_country": {
            "type": "string",
            "description": "Client country code",
            "example": "RU"
          },
          "company_id": {
            "type": "string",
            "description": "Company ID",
            "example": "google"
          },
          "device_id": {
            "type": "string",
            "description": "Device ID",
            "example": "b3e82cd1"
          },
          "dns_proto_type": {
            "$ref": "#/components/schemas/DnsProtoType"
          },
          "dns_request_type": {
            "type": "string",
            "description": "DNS protocol request type",
            "example": "TypeA"
          },
          "dns_response_type": {
            "$ref": "#/components/schemas/DnsProtoResponseType"
          },
          "dnssec": {
            "type": "boolean",
            "description": "Requested with DNSSec",
            "example": false
          },
          "domain": {
            "type": "string",
            "description": "Domain name",
            "example": "ads.apple.com"
          },
          "filtering_info": {
            "$ref": "#/components/schemas/FilteringInfo"
          },
          "network": {
            "type": "string",
            "description": "Network name",
            "example": "JSC Avantel"
          },
          "response_country": {
            "type": "string",
            "description": "Response country code",
            "example": "US"
          },
          "time_iso": {
            "type": "string",
            "description": "Event time",
            "format": "date-time",
            "example": "2022-02-21T16:50:19.441+03:00"
          },
          "time_millis": {
            "type": "integer",
            "description": "Event time",
            "format": "int64",
            "example": 1645451419441
          }
        },
        "description": "Query log item info"
      },
      "QueryLogResponse": {
        "required": [
          "items",
          "pages"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "description": "Query log items",
            "items": {
              "$ref": "#/components/schemas/QueryLogItem"
            }
          },
          "pages": {
            "type": "array",
            "description": "Pagination",
            "items": {
              "$ref": "#/components/schemas/Page"
            }
          }
        },
        "description": "Query log response"
      },
      "RegularDnsProtoType": {
        "type": "string",
        "description": "Regular DNS proto type. Scheduled for removal: PLAIN_TCP, PLAIN_UDP",
        "enum": [
          "DNS",
          "PLAIN_TCP",
          "PLAIN_UDP"
        ]
      },
      "SafebrowsingSettings": {
        "required": [
          "block_dangerous_domains",
          "block_nrd",
          "blocking_mode_settings",
          "enabled",
          "typosquatting_protection_enabled"
        ],
        "type": "object",
        "properties": {
          "block_dangerous_domains": {
            "type": "boolean",
            "description": "Whether filtering dangerous domains are enabled"
          },
          "block_nrd": {
            "type": "boolean",
            "description": "Whether filtering newly registered domains are enabled"
          },
          "blocking_mode_settings": {
            "$ref": "#/components/schemas/BlockingModeSettings"
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether safebrowsing settings are enabled"
          },
          "typosquatting_protection_enabled": {
            "type": "boolean",
            "description": "True if typosquatting protection is enabled"
          }
        },
        "description": "Safebrowsing settings"
      },
      "SafebrowsingSettingsUpdate": {
        "type": "object",
        "properties": {
          "block_dangerous_domains": {
            "type": "boolean",
            "description": "Whether filtering dangerous domains are enabled"
          },
          "block_nrd": {
            "type": "boolean",
            "description": "Whether filtering newly registered domains are enabled"
          },
          "blocking_mode_settings": {
            "$ref": "#/components/schemas/BlockingModeSettingsUpdate"
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether safebrowsing settings are enabled"
          },
          "typosquatting_protection_enabled": {
            "type": "boolean",
            "description": "True if typosquatting protection is enabled"
          }
        },
        "description": "Safebrowsing settings update action"
      },
      "ScheduleDay": {
        "required": [
          "day_of_week",
          "enabled",
          "from_time",
          "to_time"
        ],
        "type": "object",
        "properties": {
          "day_of_week": {
            "$ref": "#/components/schemas/DayOfWeek"
          },
          "enabled": {
            "type": "boolean",
            "description": "Shows enabled/disabled day"
          },
          "from_time": {
            "$ref": "#/components/schemas/ScheduleTime"
          },
          "to_time": {
            "$ref": "#/components/schemas/ScheduleTime"
          }
        },
        "description": "Describes a schedule for day"
      },
      "ScheduleDayUpdate": {
        "required": [
          "day_of_week"
        ],
        "type": "object",
        "properties": {
          "day_of_week": {
            "$ref": "#/components/schemas/DayOfWeek"
          },
          "enabled": {
            "type": "boolean",
            "description": "Shows enabled/disabled day"
          },
          "from_time": {
            "$ref": "#/components/schemas/ScheduleTime"
          },
          "to_time": {
            "$ref": "#/components/schemas/ScheduleTime"
          }
        },
        "description": "Describes a schedule for day"
      },
      "ScheduleTime": {
        "required": [
          "hours",
          "minutes"
        ],
        "type": "object",
        "properties": {
          "hours": {
            "maximum": 23,
            "minimum": 0,
            "type": "integer",
            "description": "Hour in day",
            "format": "int32"
          },
          "minutes": {
            "maximum": 59,
            "minimum": 0,
            "type": "integer",
            "description": "Minute in hour",
            "format": "int32"
          }
        },
        "description": "Describes a time"
      },
      "ScheduleWeek": {
        "required": [
          "daily_schedule"
        ],
        "type": "object",
        "properties": {
          "daily_schedule": {
            "type": "array",
            "description": "Schedule by days",
            "items": {
              "$ref": "#/components/schemas/ScheduleDay"
            }
          }
        },
        "description": "Describes a schedule for week"
      },
      "ScheduleWeekUpdate": {
        "required": [
          "daily_schedule"
        ],
        "type": "object",
        "properties": {
          "daily_schedule": {
            "type": "array",
            "description": "Schedule by days",
            "items": {
              "$ref": "#/components/schemas/ScheduleDayUpdate"
            }
          }
        },
        "description": "Describes a schedule for week"
      },
      "SecureDnsProtoType": {
        "type": "string",
        "description": "Secure DNS proto type. Scheduled for removal: DNSCRYPT_TCP, DNSCRYPT_UDP",
        "enum": [
          "DOH",
          "DOQ",
          "DOT",
          "DNSCRYPT",
          "DNSCRYPT_TCP",
          "DNSCRYPT_UDP"
        ]
      },
      "TimeQueriesStats": {
        "required": [
          "time_millis",
          "value"
        ],
        "type": "object",
        "properties": {
          "time_millis": {
            "type": "integer",
            "description": "Time in millis",
            "format": "int64",
            "example": 1655804673
          },
          "value": {
            "$ref": "#/components/schemas/QueriesStats"
          }
        },
        "description": "Time moment query stats"
      },
      "TimeQueriesStatsList": {
        "required": [
          "stats"
        ],
        "type": "object",
        "properties": {
          "stats": {
            "type": "array",
            "description": "List of queries stats",
            "items": {
              "$ref": "#/components/schemas/TimeQueriesStats"
            }
          }
        },
        "description": "Time series query statistics"
      },
      "UserRulesSettings": {
        "required": [
          "enabled",
          "rules",
          "rules_count"
        ],
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "The flag that all rules are on or off"
          },
          "rules": {
            "type": "array",
            "description": "List of rules",
            "items": {
              "type": "string",
              "description": "List of rules"
            }
          },
          "rules_count": {
            "type": "integer",
            "description": "Rules count in user list",
            "format": "int32"
          }
        },
        "description": "User rules"
      },
      "UserRulesSettingsUpdate": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "The flag that all rules are on or off"
          },
          "rules": {
            "type": "array",
            "description": "List of rules",
            "items": {
              "maxLength": 1024,
              "minLength": 0,
              "type": "string",
              "description": "List of rules"
            }
          }
        },
        "description": "User rules update action"
      },
      "WebService": {
        "required": [
          "icon_svg",
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "icon_svg": {
            "type": "string",
            "description": "SVG icon",
            "example": "<svg><path d=\"M 44 14 C 44 13...\" /></svg>"
          },
          "id": {
            "type": "string",
            "description": "Web-service identifier",
            "example": "9gag"
          },
          "name": {
            "type": "string",
            "description": "Web-service name",
            "example": "9GAG"
          }
        },
        "description": "Web-service"
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "description": "API Key authentication. Enter your key with 'ApiKey ' prefix (e.g., 'ApiKey your-api-key-here')",
        "in": "header",
        "name": "Authorization",
        "type": "apiKey"
      },
      "AuthToken": {
        "description": "Authorization token",
        "in": "header",
        "scheme": "Bearer",
        "type": "http"
      }
    }
  }
}
