{
  "servers": [
    {
      "url": "https://api.edgecenter.ru/protection"
    },
    {
      "url": "/"
    }
  ],
  "info": {
    "title": "Protection",
    "version": "1.0.0",
    "description": "EdgeЦентр provides an API that allows you to interact with the Protection service.\n\nProtection API allows for managing resources that are under web protection.\n\n# Overview\n\nOur API has resource-oriented, predictable URLs and uses the HTTP response codes to indicate\nAPI errors. We use standard HTTP features, such as HTTP authentication and HTTP terminology,\nthat HTTP clients can understand. JSON is returned in all API responses, including errors.\n\n### Maximum body request\n\nMaximum API body request size is 1MB.\n\n### Rate limits\n\nThere is a general limit of 4 requests per second.\nIf you go over the rate limit, you will receive a response status of 429.\n"
  },
  "components": {
    "schemas": {
      "GetAllDDoSResources": {
        "type": "object",
        "example": [
          {
            "id": 1,
            "name": "example.com",
            "active": true,
            "client": 2,
            "enabled": true,
            "created": "2022-12-01T09:54:46.441966Z",
            "updated": "2022-12-01T10:21:30.738663Z",
            "is_waf_enabled": false,
            "is_redirect_to_https_enabled": true,
            "status": "active",
            "service_id": 1,
            "service_ip": "9.9.9.9",
            "aliases": [
              {
                "id": 2,
                "alias_id": 2,
                "alias_data": "second.example.com",
                "alias_ssl_expire": 0,
                "alias_ssl_type": null,
                "alias_ssl_status": null,
                "alias_created": "2023-01-01T15:36:25.458482Z",
                "alias_updated": "2023-01-01T15:36:25.458482Z"
              },
              {
                "id": 1,
                "alias_id": 1,
                "alias_data": "first.example.com",
                "alias_ssl_expire": 0,
                "alias_ssl_type": null,
                "alias_ssl_status": null,
                "alias_created": "2022-12-01T10:30:50.521849Z",
                "alias_updated": "2022-12-20T17:00:13.567864Z"
              }
            ],
            "origins": [
              {
                "id": 1,
                "origin_id": null,
                "origin_data": "1.1.1.1",
                "origin_weight": 50,
                "origin_mode": "primary",
                "origin_fail_timeout": 10,
                "origin_max_fails": 0
              },
              {
                "id": 2,
                "origin_id": null,
                "origin_data": "1.1.1.2",
                "origin_weight": 50,
                "origin_mode": "primary",
                "origin_fail_timeout": 10,
                "origin_max_fails": 0
              }
            ],
            "blacklists": [
              {
                "id": 10,
                "blacklist_id": 10,
                "blacklist_data": "100.100.100.100"
              },
              {
                "id": 11,
                "blacklist_id": null,
                "blacklist_data": "101.101.101.0/24"
              }
            ],
            "whitelists": [
              {
                "id": 10,
                "whitelist_id": null,
                "whitelist_data": "200.200.200.200"
              },
              {
                "id": 11,
                "whitelist_id": 11,
                "whitelist_data": "201.201.201.0/24"
              }
            ],
            "http_headers": [
              {
                "id": 10,
                "header_key": "Header-Key",
                "header_value": "Header.Value"
              }
            ],
            "service_botprotect": 0,
            "service_hsts": 0,
            "service_waf": "0",
            "service_client_id": 2,
            "service_https2http": 0,
            "service_http2": 0,
            "service_ssl_expire": 0,
            "service_ssl_status": 0,
            "service_iphash": 0,
            "service_enable": 1,
            "service_geoip_mode": 0,
            "service_geoip_list": "",
            "service_methods": "",
            "service_forcessl": 0,
            "service_wwwredir": 0,
            "service_cdn": 0,
            "service_cdn_host": "",
            "service_cdn_proxy_host": "",
            "service_stream": 0,
            "service_global_whitelist": 1,
            "feature_multiple_origins": "false,",
            "feature_wildcard_aliases": "false,",
            "ssl_type": null,
            "tls_versions_enabled": [
              "1",
              "1.1",
              "1.2"
            ]
          }
        ],
        "properties": {
          "id": {
            "description": "Resource ID",
            "type": "integer"
          },
          "enabled": {
            "description": "The field shows if your Resource is enabled or disabled\n<ul>\n<li><b>true</b> - Resource is active. Content is being delivered</li>\n<li><b>false</b> - Resource is deactivated and content is not being delivered</li>\n</ul>\nThis parameter is read only\n",
            "type": "boolean"
          },
          "active": {
            "description": "You can control enabled or disabled state of the Resource by setting value for this parameter",
            "type": "boolean"
          },
          "name": {
            "description": "The domain name of the protected resource\n<br><br>This parameter is read only\n",
            "type": "string"
          },
          "status": {
            "description": "The status of the Resource\n<br><br>Active status means that your Resources is active. Suspended status means that your trial ended\nor your account is blocked\n<br><br>In case of questions contact us at support@edgecenter.ru\n<br><br>This parameter is read only\n",
            "type": "string",
            "enum": [
              "processed",
              "error",
              "active",
              "suspended"
            ]
          },
          "client": {
            "description": "ID of your control panel\n<br><br>This parameter is read only\n",
            "type": "integer"
          },
          "created": {
            "description": "Shows the date when the Resource was created\n<br><br>This parameter is read only\n",
            "type": "string"
          },
          "updated": {
            "description": "Shows the date when the Resource was changed\n<br><br>This parameter is read only\n",
            "type": "string"
          },
          "is_waf_enabled": {
            "description": "Enable or disable WAF for ddos resource\n<br><br>Need access to change this parameter\n",
            "type": "boolean"
          },
          "is_redirect_to_https_enabled": {
            "type": "boolean",
            "description": "With this option, all requests through http will be redirected to https.\nOnly applied if ssl certificate is provided. Value true is used by default\n<ul>\n<li><b>true</b> - Enabled</li>\n<li><b>false</b> - Disabled</li>\n</ul>\n"
          },
          "service_ip": {
            "description": "This is the IP-address which we provide for protection.\nYou need to change the A-record for domain/aliases which you want to protect on this IP\n<br><br>This parameter is read only\n",
            "type": "string"
          },
          "service_botprotect": {
            "description": "This parameter determines whether application-level (L7) protection is activated or not.\n<ul>\n<li><b>0</b> - Disabled</li>\n<li><b>4</b> - Enabled</li>\n</ul>\n",
            "type": "integer",
            "enum": [
              0,
              4
            ],
            "default": 4
          },
          "ssl_type": {
            "enum": [
              "custom",
              "le",
              null
            ],
            "description": "Enable or disable using HTTPS with SSL certificate for the\nresource.\n<ul>\n<li><b>null</b> - Disabled</li>\n<li><b>custom</b> - Custom SSL certificate enabled</li>\n<li><b>le</b> - Let's Encrypt SSL certificate enabled</li>\n</ul>\nTo enable custom SSL certificate you should set `service_ssl_crt` and `service_ssl_key` parameters\n<br><br>Need access to change this parameter on <b>le</b>\n",
            "type": "string"
          },
          "service_ssl_status": {
            "type": "string",
            "enum": [
              "requested",
              "processing",
              "error_retry",
              "error",
              "done",
              null
            ],
            "description": "The status of the SSL certificate for the main resource url. Can be null if no SSL is associated"
          },
          "service_geoip_mode": {
            "description": "The parameter that determines the access policy for the protected resource\n<br>Sets up together with `service_geoip_list`\n<ul>\n<li><b>0</b> - Disabled</li>\n<li><b>1</b> - Allow, except list</li>\n<li><b>2</b> - Deny, except list</li>\n</ul>\n",
            "type": "integer",
            "enum": [
              0,
              1,
              2
            ]
          },
          "service_geoip_list": {
            "description": "This parameter sets up a list of countries for geo restrictions for the protected resource\n<br>Should be set together with parameter `service_geoip_mode`\n",
            "type": "string"
          },
          "service_https2http": {
            "description": "With this option, your website can be accessible to users via HTTPS,\nand the connection between the DDoS Protection platform and your web server will be via HTTP\n<ul>\n<li><b>0</b> - Disabled</li>\n<li><b>1</b> - Enabled</li>\n</ul>\n",
            "type": "integer",
            "enum": [
              0,
              1
            ]
          },
          "service_wwwredir": {
            "description": "This parameter allows to set up a redirect from the www.example.com to example.com\n<ul>\n<li><b>0</b> - Disabled</li>\n<li><b>1</b> - Enabled</li>\n</ul>\n",
            "type": "integer"
          },
          "service_cdn": {
            "description": "For internal use",
            "type": "integer"
          },
          "service_cdn_host": {
            "description": "For internal use",
            "type": "string"
          },
          "service_cdn_proxy_host": {
            "description": "For internal use",
            "type": "string"
          },
          "service_enable": {
            "description": "For internal use",
            "type": "integer"
          },
          "service_forcessl": {
            "description": "For internal use",
            "type": "integer"
          },
          "service_global_whitelist": {
            "description": "For internal use",
            "type": "integer"
          },
          "service_http2": {
            "description": "For internal use",
            "type": "integer"
          },
          "service_id": {
            "description": "For internal use",
            "type": "integer"
          },
          "service_iphash": {
            "description": "For internal use",
            "type": "integer"
          },
          "service_methods": {
            "description": "For internal use",
            "type": "integer"
          },
          "service_stream": {
            "description": "For internal use",
            "type": "integer"
          },
          "aliases": {
            "type": "array",
            "description": "The list of aliases for the main domain.\nThat you need to assign to the same protected IP\n",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The unique identifier of the alias\n<br><br>This parameter is read only\n"
                },
                "alias_id": {
                  "type": "integer",
                  "description": "For internal use"
                },
                "alias_data": {
                  "type": "string",
                  "description": "The alias domain or hostname"
                },
                "alias_ssl_expire": {
                  "type": "integer",
                  "description": "The expiration timestamp of the SSL certificate in Unix time (UTC).\nCan be 0 if no SSL certificate is associated\n"
                },
                "alias_ssl_type": {
                  "type": "string",
                  "enum": [
                    "custom",
                    "le",
                    null
                  ],
                  "description": "The type of SSL certificate for the alias. Null if no SSL is associated\n<br><br>Need access to change this parameter on <b>le</b>\n"
                },
                "alias_ssl_status": {
                  "type": "string",
                  "enum": [
                    "requested",
                    "processing",
                    "error_retry",
                    "error",
                    "done",
                    null
                  ],
                  "description": "The status of the SSL certificate for the alias. Can be null if no SSL is associated"
                },
                "alias_created": {
                  "description": "Shows the date when the alias was created\n<br><br>This parameter is read only\n",
                  "type": "string"
                },
                "alias_updated": {
                  "description": "Shows the date when the alias was changed\n<br><br>This parameter is read only\n"
                }
              }
            }
          },
          "origins": {
            "type": "array",
            "description": "Manually set the web server IPs and load balancing\n<br><br>Allowed to add more than one object to the list only if there is the required access\n",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The unique identifier of the origin\n<br><br>This parameter is read only\n"
                },
                "origin_id": {
                  "type": "integer",
                  "nullable": true,
                  "description": "For internal use"
                },
                "origin_data": {
                  "type": "string",
                  "description": "The IP address of the origin"
                },
                "origin_weight": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 100,
                  "default": 50,
                  "description": "The weight of the origin for load balancing"
                },
                "origin_mode": {
                  "type": "string",
                  "enum": [
                    "primary",
                    "secondary"
                  ],
                  "description": "The mode of the origin"
                },
                "origin_fail_timeout": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 1800,
                  "default": 10,
                  "description": "The fail timeout duration for the origin in seconds"
                },
                "origin_max_fails": {
                  "type": "integer",
                  "description": "The maximum number of failed attempts before considering the origin as down"
                }
              }
            }
          },
          "whitelists": {
            "type": "array",
            "description": "The list of whitelists containing ID, whitelist ID, and whitelist data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The unique identifier of the whitelist entry\n<br><br>This parameter is read only\n"
                },
                "whitelist_id": {
                  "type": "integer",
                  "nullable": true,
                  "description": "For internal use."
                },
                "whitelist_data": {
                  "type": "string",
                  "description": "The IP address or IP range included in the whitelist.\nFor example, \"200.200.200.200\" or \"201.201.201.0/24\"\n"
                }
              }
            }
          },
          "blacklists": {
            "type": "array",
            "description": "The list of blacklists containing ID, blacklist ID, and blacklist data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The unique identifier of the blacklist entry\n<br><br>This parameter is read only\n"
                },
                "blacklist_id": {
                  "type": "integer",
                  "nullable": true,
                  "description": "For internal use"
                },
                "blacklist_data": {
                  "type": "string",
                  "description": "The IP address or IP range included in the blacklist.\nFor example, \"100.100.100.100\" or \"101.101.101.0/24\"\n"
                }
              }
            }
          },
          "http_headers": {
            "type": "array",
            "description": "The list of HTTP headers in the response resource",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The unique identifier of the header entry\n<br><br>This parameter is read only\n"
                },
                "header_key": {
                  "type": "string",
                  "description": "The key of the HTTP header"
                },
                "header_value": {
                  "type": "string",
                  "description": "The value of the HTTP header"
                }
              }
            }
          },
          "tls_versions_enabled": {
            "type": "array",
            "description": "The list of enabled TLS versions.\nBy default, only TLS 1.0, 1.1, and 1.2 are enabled\n<br><br>This parameter is read only\n",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "1.1",
                "1.2",
                "1.3"
              ]
            },
            "default": [
              "1",
              "1.1",
              "1.2"
            ]
          }
        }
      },
      "GetDDoSResource": {
        "type": "object",
        "example": {
          "resource": {
            "id": 1,
            "name": "example.com",
            "active": true,
            "client": 2,
            "enabled": true,
            "created": "2022-12-01T09:54:46.441966Z",
            "updated": "2022-12-01T10:21:30.738663Z",
            "is_waf_enabled": false,
            "is_redirect_to_https_enabled": true,
            "status": "active",
            "service_id": 1,
            "service_ip": "9.9.9.9",
            "aliases": [
              {
                "id": 2,
                "alias_id": 2,
                "alias_data": "second.example.com",
                "alias_ssl_expire": 0,
                "alias_ssl_type": null,
                "alias_ssl_status": null,
                "alias_created": "2023-01-01T15:36:25.458482Z",
                "alias_updated": "2023-01-01T15:36:25.458482Z"
              },
              {
                "id": 1,
                "alias_id": 1,
                "alias_data": "first.example.com",
                "alias_ssl_expire": 0,
                "alias_ssl_type": null,
                "alias_ssl_status": null,
                "alias_created": "2022-12-01T10:30:50.521849Z",
                "alias_updated": "2022-12-20T17:00:13.567864Z"
              }
            ],
            "origins": [
              {
                "id": 1,
                "origin_id": null,
                "origin_data": "1.1.1.1",
                "origin_weight": 50,
                "origin_mode": "primary",
                "origin_fail_timeout": 100,
                "origin_max_fails": 5
              },
              {
                "id": 2,
                "origin_id": null,
                "origin_data": "1.1.1.2",
                "origin_weight": 50,
                "origin_mode": "primary",
                "origin_fail_timeout": 100,
                "origin_max_fails": 5
              }
            ],
            "blacklists": [
              {
                "id": 10,
                "blacklist_id": 10,
                "blacklist_data": "100.100.100.100"
              },
              {
                "id": 11,
                "blacklist_id": null,
                "blacklist_data": "101.101.101.0/24"
              }
            ],
            "whitelists": [
              {
                "id": 10,
                "whitelist_id": null,
                "whitelist_data": "200.200.200.200"
              },
              {
                "id": 11,
                "whitelist_id": 11,
                "whitelist_data": "201.201.201.0/24"
              }
            ],
            "http_headers": [
              {
                "id": 10,
                "header_key": "Header-Key",
                "header_value": "Header.Value"
              }
            ],
            "service_botprotect": 0,
            "service_hsts": 0,
            "service_waf": "0",
            "service_client_id": 2,
            "service_https2http": 0,
            "service_http2": 0,
            "service_ssl_expire": 0,
            "service_ssl_status": 0,
            "service_iphash": 0,
            "service_enable": 1,
            "service_geoip_mode": 0,
            "service_geoip_list": "",
            "service_methods": "",
            "service_forcessl": 0,
            "service_wwwredir": 0,
            "service_cdn": 0,
            "service_cdn_host": "",
            "service_cdn_proxy_host": "",
            "service_stream": 0,
            "service_global_whitelist": 1,
            "feature_multiple_origins": "false,",
            "feature_wildcard_aliases": "false,",
            "ssl_type": null,
            "tls_versions_enabled": [
              "1",
              "1.1",
              "1.2"
            ]
          },
          "errors": {}
        },
        "properties": {
          "id": {
            "description": "Resource ID",
            "type": "integer"
          },
          "enabled": {
            "description": "The field shows if your Resource is enabled or disabled\n<ul>\n<li><b>true</b> - Resource is active. Content is being delivered</li>\n<li><b>false</b> - Resource is deactivated and content is not being delivered</li>\n</ul>\nThis parameter is read only\n",
            "type": "boolean"
          },
          "active": {
            "description": "You can control enabled or disabled state of the Resource by setting value for this parameter",
            "type": "boolean"
          },
          "name": {
            "description": "The domain name of the protected resource\n<br><br>This parameter is read only\n",
            "type": "string"
          },
          "status": {
            "description": "The status of the Resource\n<br><br>Active status means that your Resources is active. Suspended status means that your trial ended\nor your account is blocked\n<br><br>In case of questions contact us at support@edgecenter.ru\n<br><br>This parameter is read only\n",
            "type": "string",
            "enum": [
              "processed",
              "error",
              "active",
              "suspended"
            ]
          },
          "client": {
            "description": "ID of your control panel\n<br><br>This parameter is read only\n",
            "type": "integer"
          },
          "created": {
            "description": "Shows the date when the Resource was created\n<br><br>This parameter is read only\n",
            "type": "string"
          },
          "updated": {
            "description": "Shows the date when the Resource was changed\n<br><br>This parameter is read only\n",
            "type": "string"
          },
          "is_waf_enabled": {
            "description": "Enable or disable WAF for ddos resource\n<br><br>Need access to change this parameter\n",
            "type": "boolean"
          },
          "is_redirect_to_https_enabled": {
            "type": "boolean",
            "description": "With this option, all requests through http will be redirected to https.\nOnly applied if ssl certificate is provided. Value true is used by default\n<ul>\n<li><b>true</b> - Enabled</li>\n<li><b>false</b> - Disabled</li>\n</ul>\n"
          },
          "service_ip": {
            "description": "This is the IP-address which we provide for protection.\nYou need to change the A-record for domain/aliases which you want to protect on this IP\n<br><br>This parameter is read only\n",
            "type": "string"
          },
          "service_botprotect": {
            "description": "This parameter determines whether application-level (L7) protection is activated or not.\n<ul>\n<li><b>0</b> - Disabled</li>\n<li><b>4</b> - Enabled</li>\n</ul>\n",
            "type": "integer",
            "enum": [
              0,
              4
            ],
            "default": 4
          },
          "ssl_type": {
            "enum": [
              "custom",
              "le",
              null
            ],
            "description": "Enable or disable using HTTPS with SSL certificate for the\nresource.\n<ul>\n<li><b>null</b> - Disabled</li>\n<li><b>custom</b> - Custom SSL certificate enabled</li>\n<li><b>le</b> - Let's Encrypt SSL certificate enabled</li>\n</ul>\nTo enable custom SSL certificate you should set `service_ssl_crt` and `service_ssl_key` parameters\n<br><br>Need access to change this parameter on <b>le</b>\n",
            "type": "string"
          },
          "service_ssl_status": {
            "type": "string",
            "enum": [
              "requested",
              "processing",
              "error_retry",
              "error",
              "done",
              null
            ],
            "description": "The status of the SSL certificate for the main resource url. Can be null if no SSL is associated"
          },
          "service_geoip_mode": {
            "description": "The parameter that determines the access policy for the protected resource\n<br>Sets up together with `service_geoip_list`\n<ul>\n<li><b>0</b> - Disabled</li>\n<li><b>1</b> - Allow, except list</li>\n<li><b>2</b> - Deny, except list</li>\n</ul>\n",
            "type": "integer",
            "enum": [
              0,
              1,
              2
            ]
          },
          "service_geoip_list": {
            "description": "This parameter sets up a list of countries for geo restrictions for the protected resource\n<br>Should be set together with parameter `service_geoip_mode`\n",
            "type": "string"
          },
          "service_https2http": {
            "description": "With this option, your website can be accessible to users via HTTPS,\nand the connection between the DDoS Protection platform and your web server will be via HTTP\n<ul>\n<li><b>0</b> - Disabled</li>\n<li><b>1</b> - Enabled</li>\n</ul>\n",
            "type": "integer",
            "enum": [
              0,
              1
            ]
          },
          "service_wwwredir": {
            "description": "This parameter allows to set up a redirect from the www.example.com to example.com\n<ul>\n<li><b>0</b> - Disabled</li>\n<li><b>1</b> - Enabled</li>\n</ul>\n",
            "type": "integer"
          },
          "service_cdn": {
            "description": "For internal use",
            "type": "integer"
          },
          "service_cdn_host": {
            "description": "For internal use",
            "type": "string"
          },
          "service_cdn_proxy_host": {
            "description": "For internal use",
            "type": "string"
          },
          "service_enable": {
            "description": "For internal use",
            "type": "integer"
          },
          "service_forcessl": {
            "description": "For internal use",
            "type": "integer"
          },
          "service_global_whitelist": {
            "description": "For internal use",
            "type": "integer"
          },
          "service_http2": {
            "description": "For internal use",
            "type": "integer"
          },
          "service_id": {
            "description": "For internal use",
            "type": "integer"
          },
          "service_iphash": {
            "description": "For internal use",
            "type": "integer"
          },
          "service_methods": {
            "description": "For internal use",
            "type": "integer"
          },
          "service_stream": {
            "description": "For internal use",
            "type": "integer"
          },
          "aliases": {
            "type": "array",
            "description": "The list of aliases for the main domain.\nThat you need to assign to the same protected IP\n",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The unique identifier of the alias\n<br><br>This parameter is read only\n"
                },
                "alias_id": {
                  "type": "integer",
                  "description": "For internal use"
                },
                "alias_data": {
                  "type": "string",
                  "description": "The alias domain or hostname"
                },
                "alias_ssl_expire": {
                  "type": "integer",
                  "description": "The expiration timestamp of the SSL certificate in Unix time (UTC).\nCan be 0 if no SSL certificate is associated\n"
                },
                "alias_ssl_type": {
                  "type": "string",
                  "enum": [
                    "custom",
                    "le",
                    null
                  ],
                  "description": "The type of SSL certificate for the alias. Null if no SSL is associated\n<br><br>Need access to change this parameter on <b>le</b>\n"
                },
                "alias_ssl_status": {
                  "type": "string",
                  "enum": [
                    "requested",
                    "processing",
                    "error_retry",
                    "error",
                    "done",
                    null
                  ],
                  "description": "The status of the SSL certificate for the alias. Can be null if no SSL is associated"
                },
                "alias_created": {
                  "description": "Shows the date when the alias was created\n<br><br>This parameter is read only\n",
                  "type": "string"
                },
                "alias_updated": {
                  "description": "Shows the date when the alias was changed\n<br><br>This parameter is read only\n"
                }
              }
            }
          },
          "origins": {
            "type": "array",
            "description": "Manually set the web server IPs and load balancing\n<br><br>Allowed to add more than one object to the list only if there is the required access\n",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The unique identifier of the origin\n<br><br>This parameter is read only\n"
                },
                "origin_id": {
                  "type": "integer",
                  "nullable": true,
                  "description": "For internal use"
                },
                "origin_data": {
                  "type": "string",
                  "description": "The IP address of the origin"
                },
                "origin_weight": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 100,
                  "default": 50,
                  "description": "The weight of the origin for load balancing"
                },
                "origin_mode": {
                  "type": "string",
                  "enum": [
                    "primary",
                    "secondary"
                  ],
                  "description": "The mode of the origin"
                },
                "origin_fail_timeout": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 1800,
                  "default": 10,
                  "description": "The fail timeout duration for the origin in seconds"
                },
                "origin_max_fails": {
                  "type": "integer",
                  "description": "The maximum number of failed attempts before considering the origin as down"
                }
              }
            }
          },
          "whitelists": {
            "type": "array",
            "description": "The list of whitelists containing ID, whitelist ID, and whitelist data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The unique identifier of the whitelist entry\n<br><br>This parameter is read only\n"
                },
                "whitelist_id": {
                  "type": "integer",
                  "nullable": true,
                  "description": "For internal use."
                },
                "whitelist_data": {
                  "type": "string",
                  "description": "The IP address or IP range included in the whitelist.\nFor example, \"200.200.200.200\" or \"201.201.201.0/24\"\n"
                }
              }
            }
          },
          "blacklists": {
            "type": "array",
            "description": "The list of blacklists containing ID, blacklist ID, and blacklist data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The unique identifier of the blacklist entry\n<br><br>This parameter is read only\n"
                },
                "blacklist_id": {
                  "type": "integer",
                  "nullable": true,
                  "description": "For internal use"
                },
                "blacklist_data": {
                  "type": "string",
                  "description": "The IP address or IP range included in the blacklist.\nFor example, \"100.100.100.100\" or \"101.101.101.0/24\"\n"
                }
              }
            }
          },
          "http_headers": {
            "type": "array",
            "description": "The list of HTTP headers in the response resource",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The unique identifier of the header entry\n<br><br>This parameter is read only\n"
                },
                "header_key": {
                  "type": "string",
                  "description": "The key of the HTTP header"
                },
                "header_value": {
                  "type": "string",
                  "description": "The value of the HTTP header"
                }
              }
            }
          },
          "tls_versions_enabled": {
            "type": "array",
            "description": "The list of enabled TLS versions.\nBy default, only TLS 1.0, 1.1, and 1.2 are enabled\n<br><br>This parameter is read only\n",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "1.1",
                "1.2",
                "1.3"
              ]
            },
            "default": [
              "1",
              "1.1",
              "1.2"
            ]
          }
        }
      },
      "CreateDDoSResource": {
        "type": "object",
        "example": {
          "name": "example.com",
          "aliases": [
            {
              "alias_data": "first.example.com"
            },
            {
              "alias_data": "second.example.com"
            }
          ],
          "origins": [
            {
              "origin_data": "1.1.1.1"
            },
            {
              "origin_data": "1.1.1.2"
            }
          ],
          "http_headers": [
            {
              "header_key": "Header-Key",
              "header_value": "Header.Value"
            }
          ],
          "is_waf_enabled": false
        },
        "properties": {
          "name": {
            "description": "The domain name of the protected resource\n",
            "type": "string"
          },
          "aliases": {
            "type": "array",
            "description": "The list of aliases for the main domain.\nThat you need to assign to the same protected IP\n",
            "items": {
              "type": "object",
              "properties": {
                "alias_data": {
                  "type": "string",
                  "description": "The alias domain or hostname"
                }
              }
            }
          },
          "origins": {
            "type": "array",
            "description": "Manually set the web server IPs and load balancing\n<br><br>Allowed to add more than one object to the list only if there is the required access\n",
            "items": {
              "type": "object",
              "properties": {
                "origin_data": {
                  "type": "string",
                  "description": "The IP address of the origin"
                },
                "origin_weight": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 100,
                  "default": 50,
                  "description": "The weight of the origin for load balancing"
                },
                "origin_mode": {
                  "type": "string",
                  "enum": [
                    "primary",
                    "secondary"
                  ],
                  "description": "The mode of the origin"
                },
                "origin_fail_timeout": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 1800,
                  "default": 10,
                  "description": "The fail timeout duration for the origin in seconds"
                },
                "origin_max_fails": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1000,
                  "default": 0,
                  "description": "The maximum number of failed attempts before considering the origin as down"
                }
              }
            }
          },
          "http_headers": {
            "type": "array",
            "description": "The list of HTTP headers in the response resource",
            "items": {
              "type": "object",
              "properties": {
                "header_key": {
                  "type": "string",
                  "description": "The key of the HTTP header"
                },
                "header_value": {
                  "type": "string",
                  "description": "The value of the HTTP header"
                }
              }
            }
          },
          "is_waf_enabled": {
            "description": "Enable or disable WAF for ddos resource\n<br><br>Need access to change this parameter\n",
            "type": "boolean"
          }
        }
      },
      "DDoSResource": {
        "type": "object",
        "example": {
          "id": 1,
          "name": "example.com",
          "active": true,
          "client": 2,
          "enabled": true,
          "created": "2022-12-01T09:54:46.441966Z",
          "updated": "2022-12-01T10:21:30.738663Z",
          "is_waf_enabled": false,
          "is_redirect_to_https_enabled": true,
          "status": "active",
          "service_id": 1,
          "service_ip": "9.9.9.9",
          "aliases": [
            {
              "id": 2,
              "alias_id": 2,
              "alias_data": "second.example.com",
              "alias_ssl_expire": 0,
              "alias_ssl_type": null,
              "alias_ssl_status": null,
              "alias_created": "2023-01-01T15:36:25.458482Z",
              "alias_updated": "2023-01-01T15:36:25.458482Z"
            },
            {
              "id": 1,
              "alias_id": 1,
              "alias_data": "first.example.com",
              "alias_ssl_expire": 0,
              "alias_ssl_type": null,
              "alias_ssl_status": null,
              "alias_created": "2022-12-01T10:30:50.521849Z",
              "alias_updated": "2022-12-20T17:00:13.567864Z"
            }
          ],
          "origins": [
            {
              "id": 1,
              "origin_id": null,
              "origin_data": "1.1.1.1",
              "origin_weight": 50,
              "origin_mode": "primary",
              "origin_fail_timeout": 100,
              "origin_max_fails": 5
            },
            {
              "id": 2,
              "origin_id": null,
              "origin_data": "1.1.1.2",
              "origin_weight": 50,
              "origin_mode": "primary",
              "origin_fail_timeout": 100,
              "origin_max_fails": 5
            }
          ],
          "blacklists": [
            {
              "id": 10,
              "blacklist_id": 10,
              "blacklist_data": "100.100.100.100"
            },
            {
              "id": 11,
              "blacklist_id": null,
              "blacklist_data": "101.101.101.0/24"
            }
          ],
          "whitelists": [
            {
              "id": 10,
              "whitelist_id": null,
              "whitelist_data": "200.200.200.200"
            },
            {
              "id": 11,
              "whitelist_id": 11,
              "whitelist_data": "201.201.201.0/24"
            }
          ],
          "http_headers": [
            {
              "id": 10,
              "header_key": "Header-Key",
              "header_value": "Header.Value"
            }
          ],
          "service_botprotect": 0,
          "service_hsts": 0,
          "service_waf": "0",
          "service_client_id": 2,
          "service_https2http": 0,
          "service_http2": 0,
          "service_ssl_expire": 0,
          "service_ssl_status": 0,
          "service_iphash": 0,
          "service_enable": 1,
          "service_geoip_mode": 0,
          "service_geoip_list": "",
          "service_methods": "",
          "service_forcessl": 0,
          "service_wwwredir": 0,
          "service_cdn": 0,
          "service_cdn_host": "",
          "service_cdn_proxy_host": "",
          "service_stream": 0,
          "service_global_whitelist": 1,
          "feature_multiple_origins": "false,",
          "feature_wildcard_aliases": "false,",
          "ssl_type": null,
          "tls_versions_enabled": [
            "1",
            "1.1",
            "1.2"
          ]
        },
        "properties": {
          "id": {
            "description": "Resource ID",
            "type": "integer"
          },
          "enabled": {
            "description": "The field shows if your Resource is enabled or disabled\n<ul>\n<li><b>true</b> - Resource is active. Content is being delivered</li>\n<li><b>false</b> - Resource is deactivated and content is not being delivered</li>\n</ul>\nThis parameter is read only\n",
            "type": "boolean"
          },
          "active": {
            "description": "You can control enabled or disabled state of the Resource by setting value for this parameter",
            "type": "boolean"
          },
          "name": {
            "description": "The domain name of the protected resource\n<br><br>This parameter is read only\n",
            "type": "string"
          },
          "status": {
            "description": "The status of the Resource\n<br><br>Active status means that your Resources is active. Suspended status means that your trial ended\nor your account is blocked\n<br><br>In case of questions contact us at support@edgecenter.ru\n<br><br>This parameter is read only\n",
            "type": "string",
            "enum": [
              "processed",
              "error",
              "active",
              "suspended"
            ]
          },
          "client": {
            "description": "ID of your control panel\n<br><br>This parameter is read only\n",
            "type": "integer"
          },
          "created": {
            "description": "Shows the date when the Resource was created\n<br><br>This parameter is read only\n",
            "type": "string"
          },
          "updated": {
            "description": "Shows the date when the Resource was changed\n<br><br>This parameter is read only\n",
            "type": "string"
          },
          "is_waf_enabled": {
            "description": "Enable or disable WAF for ddos resource\n<br><br>Need access to change this parameter\n",
            "type": "boolean"
          },
          "is_redirect_to_https_enabled": {
            "type": "boolean",
            "description": "With this option, all requests through http will be redirected to https.\nOnly applied if ssl certificate is provided. Value true is used by default\n<ul>\n<li><b>true</b> - Enabled</li>\n<li><b>false</b> - Disabled</li>\n</ul>\n"
          },
          "service_ip": {
            "description": "This is the IP-address which we provide for protection.\nYou need to change the A-record for domain/aliases which you want to protect on this IP\n<br><br>This parameter is read only\n",
            "type": "string"
          },
          "service_botprotect": {
            "description": "This parameter determines whether application-level (L7) protection is activated or not.\n<ul>\n<li><b>0</b> - Disabled</li>\n<li><b>4</b> - Enabled</li>\n</ul>\n",
            "type": "integer",
            "enum": [
              0,
              4
            ],
            "default": 4
          },
          "ssl_type": {
            "enum": [
              "custom",
              "le",
              null
            ],
            "description": "Enable or disable using HTTPS with SSL certificate for the\nresource.\n<ul>\n<li><b>null</b> - Disabled</li>\n<li><b>custom</b> - Custom SSL certificate enabled</li>\n<li><b>le</b> - Let's Encrypt SSL certificate enabled</li>\n</ul>\nTo enable custom SSL certificate you should set `service_ssl_crt` and `service_ssl_key` parameters\n<br><br>Need access to change this parameter on <b>le</b>\n",
            "type": "string"
          },
          "service_ssl_status": {
            "type": "string",
            "enum": [
              "requested",
              "processing",
              "error_retry",
              "error",
              "done",
              null
            ],
            "description": "The status of the SSL certificate for the main resource url. Can be null if no SSL is associated"
          },
          "service_geoip_mode": {
            "description": "The parameter that determines the access policy for the protected resource\n<br>Sets up together with `service_geoip_list`\n<ul>\n<li><b>0</b> - Disabled</li>\n<li><b>1</b> - Allow, except list</li>\n<li><b>2</b> - Deny, except list</li>\n</ul>\n",
            "type": "integer",
            "enum": [
              0,
              1,
              2
            ]
          },
          "service_geoip_list": {
            "description": "This parameter sets up a list of countries for geo restrictions for the protected resource\n<br>Should be set together with parameter `service_geoip_mode`\n",
            "type": "string"
          },
          "service_https2http": {
            "description": "With this option, your website can be accessible to users via HTTPS,\nand the connection between the DDoS Protection platform and your web server will be via HTTP\n<ul>\n<li><b>0</b> - Disabled</li>\n<li><b>1</b> - Enabled</li>\n</ul>\n",
            "type": "integer",
            "enum": [
              0,
              1
            ]
          },
          "service_wwwredir": {
            "description": "This parameter allows to set up a redirect from the www.example.com to example.com\n<ul>\n<li><b>0</b> - Disabled</li>\n<li><b>1</b> - Enabled</li>\n</ul>\n",
            "type": "integer"
          },
          "service_cdn": {
            "description": "For internal use",
            "type": "integer"
          },
          "service_cdn_host": {
            "description": "For internal use",
            "type": "string"
          },
          "service_cdn_proxy_host": {
            "description": "For internal use",
            "type": "string"
          },
          "service_enable": {
            "description": "For internal use",
            "type": "integer"
          },
          "service_forcessl": {
            "description": "For internal use",
            "type": "integer"
          },
          "service_global_whitelist": {
            "description": "For internal use",
            "type": "integer"
          },
          "service_http2": {
            "description": "For internal use",
            "type": "integer"
          },
          "service_id": {
            "description": "For internal use",
            "type": "integer"
          },
          "service_iphash": {
            "description": "For internal use",
            "type": "integer"
          },
          "service_methods": {
            "description": "For internal use",
            "type": "integer"
          },
          "service_stream": {
            "description": "For internal use",
            "type": "integer"
          },
          "aliases": {
            "type": "array",
            "description": "The list of aliases for the main domain.\nThat you need to assign to the same protected IP\n",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The unique identifier of the alias\n<br><br>This parameter is read only\n"
                },
                "alias_id": {
                  "type": "integer",
                  "description": "For internal use"
                },
                "alias_data": {
                  "type": "string",
                  "description": "The alias domain or hostname"
                },
                "alias_ssl_expire": {
                  "type": "integer",
                  "description": "The expiration timestamp of the SSL certificate in Unix time (UTC).\nCan be 0 if no SSL certificate is associated\n"
                },
                "alias_ssl_type": {
                  "type": "string",
                  "enum": [
                    "custom",
                    "le",
                    null
                  ],
                  "description": "The type of SSL certificate for the alias. Null if no SSL is associated\n<br><br>Need access to change this parameter on <b>le</b>\n"
                },
                "alias_ssl_status": {
                  "type": "string",
                  "enum": [
                    "requested",
                    "processing",
                    "error_retry",
                    "error",
                    "done",
                    null
                  ],
                  "description": "The status of the SSL certificate for the alias. Can be null if no SSL is associated"
                },
                "alias_created": {
                  "description": "Shows the date when the alias was created\n<br><br>This parameter is read only\n",
                  "type": "string"
                },
                "alias_updated": {
                  "description": "Shows the date when the alias was changed\n<br><br>This parameter is read only\n"
                }
              }
            }
          },
          "origins": {
            "type": "array",
            "description": "Manually set the web server IPs and load balancing\n<br><br>Allowed to add more than one object to the list only if there is the required access\n",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The unique identifier of the origin\n<br><br>This parameter is read only\n"
                },
                "origin_id": {
                  "type": "integer",
                  "nullable": true,
                  "description": "For internal use"
                },
                "origin_data": {
                  "type": "string",
                  "description": "The IP address of the origin"
                },
                "origin_weight": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 100,
                  "default": 50,
                  "description": "The weight of the origin for load balancing"
                },
                "origin_mode": {
                  "type": "string",
                  "enum": [
                    "primary",
                    "secondary"
                  ],
                  "description": "The mode of the origin"
                },
                "origin_fail_timeout": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 1800,
                  "default": 10,
                  "description": "The fail timeout duration for the origin in seconds"
                },
                "origin_max_fails": {
                  "type": "integer",
                  "description": "The maximum number of failed attempts before considering the origin as down"
                }
              }
            }
          },
          "whitelists": {
            "type": "array",
            "description": "The list of whitelists containing ID, whitelist ID, and whitelist data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The unique identifier of the whitelist entry\n<br><br>This parameter is read only\n"
                },
                "whitelist_id": {
                  "type": "integer",
                  "nullable": true,
                  "description": "For internal use."
                },
                "whitelist_data": {
                  "type": "string",
                  "description": "The IP address or IP range included in the whitelist.\nFor example, \"200.200.200.200\" or \"201.201.201.0/24\"\n"
                }
              }
            }
          },
          "blacklists": {
            "type": "array",
            "description": "The list of blacklists containing ID, blacklist ID, and blacklist data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The unique identifier of the blacklist entry\n<br><br>This parameter is read only\n"
                },
                "blacklist_id": {
                  "type": "integer",
                  "nullable": true,
                  "description": "For internal use"
                },
                "blacklist_data": {
                  "type": "string",
                  "description": "The IP address or IP range included in the blacklist.\nFor example, \"100.100.100.100\" or \"101.101.101.0/24\"\n"
                }
              }
            }
          },
          "http_headers": {
            "type": "array",
            "description": "The list of HTTP headers in the response resource",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The unique identifier of the header entry\n<br><br>This parameter is read only\n"
                },
                "header_key": {
                  "type": "string",
                  "description": "The key of the HTTP header"
                },
                "header_value": {
                  "type": "string",
                  "description": "The value of the HTTP header"
                }
              }
            }
          },
          "tls_versions_enabled": {
            "type": "array",
            "description": "The list of enabled TLS versions.\nBy default, only TLS 1.0, 1.1, and 1.2 are enabled\n<br><br>This parameter is read only\n",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "1.1",
                "1.2",
                "1.3"
              ]
            },
            "default": [
              "1",
              "1.1",
              "1.2"
            ]
          }
        }
      }
    },
    "securitySchemes": {
      "APIKey": {
        "description": "To get access to our API, you need to have an account registered. Sign\nup if you don't have one.\n\nMost API requests require an API token which is a unique key that allows you to interact with our services.\nAdditionally, it helps the API check if the user is allowed to perform the action.\n\nUse a permanent [API token](https://accounts.edgecenter.ru/profile/api-tokens) for regular automated requests.\nYou can set its validity period when creating it or issue a token for an unlimited time.\nPlease address the API documentation of the specific product in order to check if it supports API tokens.\n\nYou can send only 5 requests per second.\n\nTo manage services, add your permanent API token after __APIKey__ in the __Authorization__ header.\n\n    'Authorization: APIKey eyJ0eXAiOiJKV'\n\n__Important!__ When authorizing via SAML SSO, be informed that our system does not have any\ninformation about permissions given to the user by the identity provider.\nEven if the provider revokes the user's access rights, their tokens remain active.\nTherefore, if necessary, the token will need to be deleted manually.\n",
        "name": "Authorization",
        "in": "header",
        "type": "apiKey"
      }
    }
  },
  "paths": {
    "/resources": {
      "get": {
        "description": "Get information about all Resources in your account.",
        "parameters": [
          {
            "in": "query",
            "name": "ordering",
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id",
                "name",
                "-name",
                "service_id",
                "-service_id",
                "created",
                "-created",
                "updated",
                "-updated"
              ],
              "default": "-id"
            },
            "description": "The ordering parameter specifies the sorting order of the results.\nUse the prefix \"-\" to sort in descending order\n<br><br>_Example of sorting results by date_created in descending order:_\n<br>_?ordering=-date_created_\n"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAllDDoSResources"
                }
              }
            },
            "description": "Successful."
          }
        },
        "summary": "Get All Resources",
        "tags": [
          "Web protection"
        ],
        "x-accepts": "application/json"
      },
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDDoSResource"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application": {
                "schema": {
                  "$ref": "#/components/schemas/GetDDoSResource"
                }
              }
            },
            "description": "Successful."
          }
        },
        "summary": "Create Resource",
        "tags": [
          "Web protection"
        ],
        "x-codegen-request-body-name": "body",
        "x-contentType": "application/json",
        "x-accepts": "application/json"
      }
    },
    "/resources/{resource_id}": {
      "delete": {
        "parameters": [
          {
            "description": "Resource ID.",
            "in": "path",
            "name": "resource_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "content": {},
            "description": "Resource has been deleted successfully"
          }
        },
        "summary": "Delete Resource",
        "tags": [
          "Web protection"
        ],
        "x-accepts": "application/json"
      },
      "get": {
        "parameters": [
          {
            "description": "Resource ID.",
            "in": "path",
            "name": "resource_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application": {
                "schema": {
                  "$ref": "#/components/schemas/GetDDoSResource"
                }
              }
            },
            "description": "Successful."
          }
        },
        "summary": "Get Resource",
        "tags": [
          "Web protection"
        ],
        "x-accepts": "application"
      },
      "put": {
        "parameters": [
          {
            "description": "Resource ID.",
            "in": "path",
            "name": "resource_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DDoSResource"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application": {
                "schema": {
                  "$ref": "#/components/schemas/GetDDoSResource"
                }
              }
            },
            "description": "Successful. You will see renewed details of the Resource in the response."
          }
        },
        "summary": "Change Resource",
        "tags": [
          "Web protection"
        ],
        "x-codegen-request-body-name": "body",
        "x-contentType": "application/json",
        "x-accepts": "application/json"
      }
    }
  },
  "security": [
    {
      "APIKey": []
    }
  ],
  "contact": {
    "email": "support@edgecenter.ru"
  },
  "openapi": "3.0.1"
}