{
  "openapi": "3.0.1",
  "info": {
    "title": "API Gateway",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.pubtest.nic.it"
    }
  ],
  "tags": [
    {
      "name": "Public",
      "description": "Public API, authentication not required"
    },
    {
      "name": "DNS-Check",
      "description": "Public API for dns-check, authentication not required"
    },
    {
      "name": "Public Stats",
      "description": "Public API for domains and registrars statistics"
    }
  ],
  "paths": {
    "/v1/province": {
      "get": {
        "tags": [
          "Public"
        ],
        "description": "List of italian province",
        "summary": "Get list of italian province",
        "operationId": "publicProvince",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProvinciaItaliana"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/countries": {
      "get": {
        "tags": [
          "Public"
        ],
        "description": "List of the supported countries to use in .it domain name registration",
        "summary": "Get list of countries",
        "operationId": "publicCountries",
        "parameters": [
          {
            "name": "enabledOnly",
            "in": "query",
            "description": "True per ottenere solo le nazioni abilitate per essere utilizzati come nazionalità del registrante nei domini .it",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "True per ottenere solo le nazioni abilitate per essere utilizzati come nazionalità del registrante nei domini .it",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Country"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/dns-check/validate": {
      "post": {
        "description": "Domain DNS Check.\n\nPlease note that in both *Content-Type* and *Accept* headers can be used *application/xml* value, but due to lack in the XML support of OpenAPI specs is not documented here.",
        "operationId": "dnsCheck",
        "parameters": [
          {
            "name": "view",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "minimal",
                "terse",
                "verbose"
              ],
              "description": "The verbosity level of the response (JSON content-type only)",
              "default": "verbose"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DnsCheckRequests"
              }
            }
          },
          "description": "Domain DNS Check Request",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DnsCheckResult"
                }
              }
            },
            "description": "Successful operation"
          },
          "400": {
            "description": "Invalid Request"
          }
        },
        "summary": "Domain DNS validation",
        "tags": [
          "DNS-Check"
        ]
      }
    },
    "/v1/dns-check/config": {
      "get": {
        "tags": [
          "DNS-Check"
        ],
        "description": "Get the DNS-Check configuration, useful for configuration of the dns-check web application",
        "summary": "Get the DNS-Check configuration",
        "operationId": "getDnsCheckConfiguration",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DnsCheckConfiguration"
                }
              }
            }
          }
        }
      }
    },
    "/v2/stats/public/domain/counter": {
      "get": {
        "tags": [
          "Public Stats"
        ],
        "summary": "Counter of registered domains",
        "operationId": "getStatsDomainCounter",
        "description": "Counter of registered domains. The result is cached and updated at fixed time",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsDomainCounter"
                }
              }
            }
          }
        }
      }
    },
    "/v2/stats/public/domain/sync/{event}/count": {
      "get": {
        "tags": [
          "Public Stats"
        ],
        "summary": "Sync domains events count",
        "operationId": "getStatsDomainEventCount",
        "description": "Count of domains events created by the synchronous registration system",
        "parameters": [
          {
            "name": "event",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "registration",
                "delete",
                "renewal",
                "transfer",
                "transferTrade",
                "transferTotal",
                "transferBulk",
                "trade",
                "reassign",
                "restore"
              ],
              "type": "string"
            }
          },
          {
            "name": "area",
            "in": "query",
            "schema": {
              "description": "Area can be used only if a 'zone' has been specified.\n\nIf zone is 'italy', supported values are (StatsItalyArea): nord, centro, sud.\nIf zone is 'foreign', supported value are world region (StatsForeignArea).\n",
              "type": "string",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/StatsItalyArea"
                },
                {
                  "$ref": "#/components/schemas/StatsForeignArea"
                }
              ]
            }
          },
          {
            "name": "bottom",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "country",
            "in": "query",
            "schema": {
              "description": "Two letters country code",
              "type": "string"
            }
          },
          {
            "name": "edu",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "end",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsGroupBy"
            }
          },
          {
            "name": "idn",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "province",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "registrant",
            "in": "query",
            "schema": {
              "maximum": 7,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "name": "start",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "top",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "ts",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsZone"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsSingleValueResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsErrorMessage"
                }
              }
            }
          }
        }
      }
    },
    "/v2/stats/public/domain/sync/{event}/daily": {
      "get": {
        "tags": [
          "Public Stats"
        ],
        "summary": "Daily statistics of sync domains events",
        "operationId": "getStatsDomainEventDaily",
        "description": "Daily statistics of domains events created by the synchronous registration system",
        "parameters": [
          {
            "name": "event",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "registration",
                "delete",
                "renewal",
                "transfer",
                "transferTrade",
                "transferTotal",
                "transferBulk",
                "trade",
                "reassign",
                "restore"
              ],
              "type": "string"
            }
          },
          {
            "name": "area",
            "in": "query",
            "schema": {
              "description": "Area can be used only if a 'zone' has been specified.\n\nIf zone is 'italy', supported values are (StatsItalyArea): nord, centro, sud.\nIf zone is 'foreign', supported value are world region (StatsForeignArea).",
              "type": "string",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/StatsItalyArea"
                },
                {
                  "$ref": "#/components/schemas/StatsForeignArea"
                }
              ]
            }
          },
          {
            "name": "bottom",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "country",
            "in": "query",
            "schema": {
              "description": "Two letters country code",
              "type": "string"
            }
          },
          {
            "name": "edu",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "end",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsGroupBy"
            }
          },
          {
            "name": "idn",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "province",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "registrant",
            "in": "query",
            "schema": {
              "maximum": 7,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "name": "start",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "top",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "ts",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsZone"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsMultiValueResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsErrorMessage"
                }
              }
            }
          }
        }
      }
    },
    "/v2/stats/public/domain/sync/{event}/daily/{year}/{month}": {
      "get": {
        "tags": [
          "Public Stats"
        ],
        "summary": "Daily statistics of sync domains events for a month",
        "operationId": "getStatsDomainEventDailyByYearMonth",
        "parameters": [
          {
            "name": "event",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "registration",
                "delete",
                "renewal",
                "transfer",
                "transferTrade",
                "transferTotal",
                "transferBulk",
                "trade",
                "reassign",
                "restore"
              ],
              "type": "string"
            }
          },
          {
            "name": "month",
            "in": "path",
            "required": true,
            "schema": {
              "maximum": 12,
              "minimum": 1,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "name": "year",
            "in": "path",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "name": "area",
            "in": "query",
            "schema": {
              "description": "Area can be used only if a 'zone' has been specified.\n\nIf zone is 'italy', supported values are (StatsItalyArea): nord, centro, sud.\nIf zone is 'foreign', supported value are world region (StatsForeignArea).",
              "type": "string",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/StatsItalyArea"
                },
                {
                  "$ref": "#/components/schemas/StatsForeignArea"
                }
              ]
            }
          },
          {
            "name": "bottom",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "country",
            "in": "query",
            "schema": {
              "description": "Two letters country code",
              "type": "string"
            }
          },
          {
            "name": "edu",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsGroupBy"
            }
          },
          {
            "name": "idn",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "province",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "registrant",
            "in": "query",
            "schema": {
              "maximum": 7,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "name": "top",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "ts",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsZone"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsMultiValueResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsErrorMessage"
                }
              }
            }
          }
        }
      }
    },
    "/v2/stats/public/domain/sync/{event}/hourly/{year}/{month}/{day}": {
      "get": {
        "tags": [
          "Public Stats"
        ],
        "summary": "Hourly statistics of sync domains events for a day",
        "operationId": "getStatsDomainEventHourlyByYearMonthDay",
        "description": "Hourly statistics, for a day, of domains events created by the synchronous registration system",
        "parameters": [
          {
            "name": "day",
            "in": "path",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "name": "event",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "registration",
                "delete",
                "renewal",
                "transfer",
                "transferTrade",
                "transferTotal",
                "transferBulk",
                "trade",
                "reassign",
                "restore"
              ],
              "type": "string"
            }
          },
          {
            "name": "month",
            "in": "path",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "name": "year",
            "in": "path",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "name": "area",
            "in": "query",
            "schema": {
              "description": "Area can be used only if a 'zone' has been specified.\n\nIf zone is 'italy', supported values are (StatsItalyArea): nord, centro, sud.\nIf zone is 'foreign', supported value are world region (StatsForeignArea).",
              "type": "string",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/StatsItalyArea"
                },
                {
                  "$ref": "#/components/schemas/StatsForeignArea"
                }
              ]
            }
          },
          {
            "name": "bottom",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "country",
            "in": "query",
            "schema": {
              "description": "Two letters country code",
              "type": "string"
            }
          },
          {
            "name": "edu",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsGroupBy"
            }
          },
          {
            "name": "idn",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "province",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "registrant",
            "in": "query",
            "schema": {
              "maximum": 7,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "name": "top",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "ts",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsZone"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsMultiValueResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsErrorMessage"
                }
              }
            }
          }
        }
      }
    },
    "/v2/stats/public/domain/sync/{event}/monthly": {
      "get": {
        "tags": [
          "Public Stats"
        ],
        "summary": "Monthly statistics of sync domains events",
        "operationId": "getStatsDomainEventMonthly",
        "description": "Monthly statistics of domains events created by the synchronous registration system",
        "parameters": [
          {
            "name": "event",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "registration",
                "delete",
                "renewal",
                "transfer",
                "transferTrade",
                "transferTotal",
                "transferBulk",
                "trade",
                "reassign",
                "restore"
              ],
              "type": "string"
            }
          },
          {
            "name": "area",
            "in": "query",
            "schema": {
              "description": "Area can be used only if a 'zone' has been specified.\n\nIf zone is 'italy', supported values are (StatsItalyArea): nord, centro, sud.\nIf zone is 'foreign', supported value are world region (StatsForeignArea).",
              "type": "string",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/StatsItalyArea"
                },
                {
                  "$ref": "#/components/schemas/StatsForeignArea"
                }
              ]
            }
          },
          {
            "name": "bottom",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "country",
            "in": "query",
            "schema": {
              "description": "Two letters country code",
              "type": "string"
            }
          },
          {
            "name": "edu",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "end",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsGroupBy"
            }
          },
          {
            "name": "idn",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "province",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "registrant",
            "in": "query",
            "schema": {
              "maximum": 7,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "name": "start",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "top",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "ts",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsZone"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsMultiValueResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsErrorMessage"
                }
              }
            }
          }
        }
      }
    },
    "/v2/stats/public/domain/sync/{event}/monthly/{year}": {
      "get": {
        "tags": [
          "Public Stats"
        ],
        "summary": "Monthly statistics of the sync domains events for a year",
        "operationId": "getStatsDomainEventMonthlyByYear",
        "description": "Monthly statistics, for a year, of domains events created by the synchronous registration system",
        "parameters": [
          {
            "name": "event",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "registration",
                "delete",
                "renewal",
                "transfer",
                "transferTrade",
                "transferTotal",
                "transferBulk",
                "trade",
                "reassign",
                "restore"
              ],
              "type": "string"
            }
          },
          {
            "name": "year",
            "in": "path",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "name": "area",
            "in": "query",
            "schema": {
              "description": "Area can be used only if a 'zone' has been specified.\n\nIf zone is 'italy', supported values are (StatsItalyArea): nord, centro, sud.\nIf zone is 'foreign', supported value are world region (StatsForeignArea).",
              "type": "string",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/StatsItalyArea"
                },
                {
                  "$ref": "#/components/schemas/StatsForeignArea"
                }
              ]
            }
          },
          {
            "name": "bottom",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "country",
            "in": "query",
            "schema": {
              "description": "Two letters country code",
              "type": "string"
            }
          },
          {
            "name": "edu",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsGroupBy"
            }
          },
          {
            "name": "idn",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "province",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "registrant",
            "in": "query",
            "schema": {
              "maximum": 7,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "name": "top",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "ts",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsZone"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsMultiValueResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsErrorMessage"
                }
              }
            }
          }
        }
      }
    },
    "/v2/stats/public/domain/sync/{event}/yearly": {
      "get": {
        "tags": [
          "Public Stats"
        ],
        "summary": "Yearly statistics of the sync domains events",
        "operationId": "getStatsDomainEventYearly",
        "description": "Yearly statistics of domains events created by the synchronous registration system",
        "parameters": [
          {
            "name": "event",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "registration",
                "delete",
                "renewal",
                "transfer",
                "transferTrade",
                "transferTotal",
                "transferBulk",
                "trade",
                "reassign",
                "restore"
              ],
              "type": "string"
            }
          },
          {
            "name": "area",
            "in": "query",
            "schema": {
              "description": "Area can be used only if a 'zone' has been specified.\n\nIf zone is 'italy', supported values are (StatsItalyArea): nord, centro, sud.\nIf zone is 'foreign', supported value are world region (StatsForeignArea).",
              "type": "string",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/StatsItalyArea"
                },
                {
                  "$ref": "#/components/schemas/StatsForeignArea"
                }
              ]
            }
          },
          {
            "name": "bottom",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "country",
            "in": "query",
            "schema": {
              "description": "Two letters country code",
              "type": "string"
            }
          },
          {
            "name": "edu",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "end",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsGroupBy"
            }
          },
          {
            "name": "idn",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "province",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "registrant",
            "in": "query",
            "schema": {
              "maximum": 7,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "name": "start",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "top",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "ts",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsZone"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsMultiValueResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsErrorMessage"
                }
              }
            }
          }
        }
      }
    },
    "/v2/stats/public/domain/async/{event}/count": {
      "get": {
        "tags": [
          "Public Stats"
        ],
        "summary": "Async domains events count",
        "operationId": "getStatsDomainAsyncEventCount",
        "description": "Count of domains events created by the asynchronous registration system",
        "parameters": [
          {
            "name": "event",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "registration",
                "delete",
                "renewal",
                "transfer",
                "transferTrade",
                "transferTotal",
                "transferBulk",
                "trade",
                "reassign",
                "restore"
              ],
              "type": "string"
            }
          },
          {
            "name": "area",
            "in": "query",
            "schema": {
              "description": "Area can be used only if a 'zone' has been specified.\n\nIf zone is 'italy', supported values are (StatsItalyArea): nord, centro, sud.\nIf zone is 'foreign', supported value are world region (StatsForeignArea).",
              "type": "string",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/StatsItalyArea"
                },
                {
                  "$ref": "#/components/schemas/StatsForeignArea"
                }
              ]
            }
          },
          {
            "name": "bottom",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "country",
            "in": "query",
            "schema": {
              "description": "Two letters country code",
              "type": "string"
            }
          },
          {
            "name": "edu",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "end",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsGroupBy"
            }
          },
          {
            "name": "idn",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "province",
            "in": "query",
            "description": "Two letters code for italian province. Can be specified only when zone is 'italy'",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "registrant",
            "in": "query",
            "schema": {
              "maximum": 7,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "name": "start",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "top",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "ts",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsZone"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsSingleValueResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsErrorMessage"
                }
              }
            }
          }
        }
      }
    },
    "/v2/stats/public/domain/async/{event}/daily": {
      "get": {
        "tags": [
          "Public Stats"
        ],
        "summary": "Daily statistics of async domains events",
        "operationId": "getStatsDomainAsyncEventDaily",
        "description": "Daily statistics of domains events created by the asynchronous registration system",
        "parameters": [
          {
            "name": "event",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "registration",
                "delete",
                "renewal",
                "transfer",
                "transferTrade",
                "transferTotal",
                "transferBulk",
                "trade",
                "reassign",
                "restore"
              ],
              "type": "string"
            }
          },
          {
            "name": "area",
            "in": "query",
            "schema": {
              "description": "Area can be used only if a 'zone' has been specified.\n\nIf zone is 'italy', supported values are (StatsItalyArea): nord, centro, sud.\nIf zone is 'foreign', supported value are world region (StatsForeignArea).",
              "type": "string",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/StatsItalyArea"
                },
                {
                  "$ref": "#/components/schemas/StatsForeignArea"
                }
              ]
            }
          },
          {
            "name": "bottom",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "country",
            "in": "query",
            "schema": {
              "description": "Two letters country code",
              "type": "string"
            }
          },
          {
            "name": "edu",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "end",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsGroupBy"
            }
          },
          {
            "name": "idn",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "province",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "registrant",
            "in": "query",
            "schema": {
              "maximum": 7,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "name": "start",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "top",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "ts",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsZone"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsMultiValueResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsErrorMessage"
                }
              }
            }
          }
        }
      }
    },
    "/v2/stats/public/domain/async/{event}/daily/{year}/{month}": {
      "get": {
        "tags": [
          "Public Stats"
        ],
        "operationId": "getStatsDomainAsyncEventDailyByYearMonth",
        "summary": "Daily statistics of async domains events for a month",
        "description": "Daily statistics, for a month, of domains events created by the asynchronous registration system",
        "parameters": [
          {
            "name": "event",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "registration",
                "delete",
                "renewal",
                "transfer",
                "transferTrade",
                "transferTotal",
                "transferBulk",
                "trade",
                "reassign",
                "restore"
              ],
              "type": "string"
            }
          },
          {
            "name": "month",
            "in": "path",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "name": "year",
            "in": "path",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "name": "area",
            "in": "query",
            "schema": {
              "description": "Area can be used only if a 'zone' has been specified.\n\nIf zone is 'italy', supported values are (StatsItalyArea): nord, centro, sud.\nIf zone is 'foreign', supported value are world region (StatsForeignArea).",
              "type": "string",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/StatsItalyArea"
                },
                {
                  "$ref": "#/components/schemas/StatsForeignArea"
                }
              ]
            }
          },
          {
            "name": "bottom",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "country",
            "in": "query",
            "schema": {
              "description": "Two letters country code",
              "type": "string"
            }
          },
          {
            "name": "edu",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsGroupBy"
            }
          },
          {
            "name": "idn",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "province",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "registrant",
            "in": "query",
            "schema": {
              "maximum": 7,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "name": "top",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "ts",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsZone"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsMultiValueResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsErrorMessage"
                }
              }
            }
          }
        }
      }
    },
    "/v2/stats/public/domain/async/{event}/hourly/{year}/{month}/{day}": {
      "get": {
        "tags": [
          "Public Stats"
        ],
        "summary": "Hourly statistics of async domains events for a day",
        "operationId": "getStatsDomainAsyncEventHourlyByYearMonthDay",
        "description": "Hourly statistics, for a day, of domains events created by the asynchronous registration system",
        "parameters": [
          {
            "name": "day",
            "in": "path",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "name": "event",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "registration",
                "delete",
                "renewal",
                "transfer",
                "transferTrade",
                "transferTotal",
                "transferBulk",
                "trade",
                "reassign",
                "restore"
              ],
              "type": "string"
            }
          },
          {
            "name": "month",
            "in": "path",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "name": "year",
            "in": "path",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "name": "area",
            "in": "query",
            "schema": {
              "description": "Area can be used only if a 'zone' has been specified.\n\nIf zone is 'italy', supported values are (StatsItalyArea): nord, centro, sud.\nIf zone is 'foreign', supported value are world region (StatsForeignArea).",
              "type": "string",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/StatsItalyArea"
                },
                {
                  "$ref": "#/components/schemas/StatsForeignArea"
                }
              ]
            }
          },
          {
            "name": "bottom",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "country",
            "in": "query",
            "schema": {
              "description": "Two letters country code",
              "type": "string"
            }
          },
          {
            "name": "edu",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsGroupBy"
            }
          },
          {
            "name": "idn",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "province",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "registrant",
            "in": "query",
            "schema": {
              "maximum": 7,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "name": "top",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "ts",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsZone"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsMultiValueResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsErrorMessage"
                }
              }
            }
          }
        }
      }
    },
    "/v2/stats/public/domain/async/{event}/monthly": {
      "get": {
        "tags": [
          "Public Stats"
        ],
        "summary": "Monthly statistics of async domains events",
        "operationId": "getStatsDomainAsyncEventMonthly",
        "description": "Monthly statistics of domains events created by the asynchronous registration system",
        "parameters": [
          {
            "name": "event",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "registration",
                "delete",
                "renewal",
                "transfer",
                "transferTrade",
                "transferTotal",
                "transferBulk",
                "trade",
                "reassign",
                "restore"
              ],
              "type": "string"
            }
          },
          {
            "name": "area",
            "in": "query",
            "schema": {
              "description": "Area can be used only if a 'zone' has been specified.\n\nIf zone is 'italy', supported values are (StatsItalyArea): nord, centro, sud.\nIf zone is 'foreign', supported value are world region (StatsForeignArea).",
              "type": "string",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/StatsItalyArea"
                },
                {
                  "$ref": "#/components/schemas/StatsForeignArea"
                }
              ]
            }
          },
          {
            "name": "bottom",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "country",
            "in": "query",
            "schema": {
              "description": "Two letters country code",
              "type": "string"
            }
          },
          {
            "name": "edu",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "end",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsGroupBy"
            }
          },
          {
            "name": "idn",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "province",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "registrant",
            "in": "query",
            "schema": {
              "maximum": 7,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "name": "start",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "top",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "ts",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsZone"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsMultiValueResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsErrorMessage"
                }
              }
            }
          }
        }
      }
    },
    "/v2/stats/public/domain/async/{event}/monthly/{year}": {
      "get": {
        "tags": [
          "Public Stats"
        ],
        "summary": "Monthly statistics of async domains events for a year",
        "operationId": "getStatsDomainAsyncEventMonthlyByYear",
        "description": "Monthly statistics, for a year, of domains events created by the asynchronous registration system",
        "parameters": [
          {
            "name": "event",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "registration",
                "delete",
                "renewal",
                "transfer",
                "transferTrade",
                "transferTotal",
                "transferBulk",
                "trade",
                "reassign",
                "restore"
              ],
              "type": "string"
            }
          },
          {
            "name": "year",
            "in": "path",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "name": "area",
            "in": "query",
            "schema": {
              "description": "Area can be used only if a 'zone' has been specified.\n\nIf zone is 'italy', supported values are (StatsItalyArea): nord, centro, sud.\nIf zone is 'foreign', supported value are world region (StatsForeignArea).",
              "type": "string",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/StatsItalyArea"
                },
                {
                  "$ref": "#/components/schemas/StatsForeignArea"
                }
              ]
            }
          },
          {
            "name": "bottom",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "country",
            "in": "query",
            "schema": {
              "description": "Two letters country code",
              "type": "string"
            }
          },
          {
            "name": "edu",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsGroupBy"
            }
          },
          {
            "name": "idn",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "province",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "registrant",
            "in": "query",
            "schema": {
              "maximum": 7,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "name": "top",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "ts",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsZone"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsMultiValueResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsErrorMessage"
                }
              }
            }
          }
        }
      }
    },
    "/v2/stats/public/domain/async/{event}/yearly": {
      "get": {
        "tags": [
          "Public Stats"
        ],
        "summary": "Yearly statistics of the async domains events",
        "operationId": "getStatsDomainAsyncEventYearly",
        "description": "Yearly statistics of domains events created by the asynchronous registration system",
        "parameters": [
          {
            "name": "event",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "registration",
                "delete",
                "renewal",
                "transfer",
                "transferTrade",
                "transferTotal",
                "transferBulk",
                "trade",
                "reassign",
                "restore"
              ],
              "type": "string"
            }
          },
          {
            "name": "area",
            "in": "query",
            "schema": {
              "description": "Area can be used only if a 'zone' has been specified.\n\nIf zone is 'italy', supported values are (StatsItalyArea): nord, centro, sud.\nIf zone is 'foreign', supported value are world region (StatsForeignArea).",
              "type": "string",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/StatsItalyArea"
                },
                {
                  "$ref": "#/components/schemas/StatsForeignArea"
                }
              ]
            }
          },
          {
            "name": "bottom",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "country",
            "in": "query",
            "schema": {
              "description": "Two letters country code",
              "type": "string"
            }
          },
          {
            "name": "edu",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "end",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsGroupBy"
            }
          },
          {
            "name": "idn",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsIDNFilter"
            }
          },
          {
            "name": "province",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "registrant",
            "in": "query",
            "schema": {
              "maximum": 7,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "name": "start",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "top",
            "in": "query",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "name": "ts",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsZone"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsMultiValueResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsErrorMessage"
                }
              }
            }
          }
        }
      }
    },
    "/v2/stats/public/registrar/{type}/monthly": {
      "get": {
        "tags": [
          "Public Stats"
        ],
        "summary": "Monthly statistics about registrars",
        "operationId": "getStatsRegistrarMonthly",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/StatsRegistrarQueryType"
            }
          },
          {
            "name": "area",
            "in": "query",
            "description": "Area can be used only if a 'zone' has been specified.\n\nIf zone is 'italy', supported values are (StatsItalyArea): nord, centro, sud.\nIf zone is 'foreign', supported value are world region (StatsForeignArea).\n",
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/StatsItalyArea"
                },
                {
                  "$ref": "#/components/schemas/StatsForeignArea"
                }
              ]
            }
          },
          {
            "name": "country",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "end",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsGroupBy"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsZone"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsMultiValueResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsErrorMessage"
                }
              }
            }
          }
        }
      }
    },
    "/v2/stats/public/registrar/{type}/monthly/{year}": {
      "get": {
        "tags": [
          "Public Stats"
        ],
        "summary": "Monthly statistics about registrars, for a year",
        "operationId": "getStatsRegistrarMonthlyByYear",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/StatsRegistrarQueryType"
            }
          },
          {
            "name": "year",
            "in": "path",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "name": "area",
            "description": "Area can be used only if a 'zone' has been specified.\n\nIf zone is 'italy', supported values are (StatsItalyArea): nord, centro, sud.\nIf zone is 'foreign', supported value are world region (StatsForeignArea).\n",
            "in": "query",
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/StatsItalyArea"
                },
                {
                  "$ref": "#/components/schemas/StatsForeignArea"
                }
              ]
            }
          },
          {
            "name": "country",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsGroupBy"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsZone"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsMultiValueResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsErrorMessage"
                }
              }
            }
          }
        }
      }
    },
    "/v2/stats/public/registrar/{type}/yearly": {
      "get": {
        "tags": [
          "Public Stats"
        ],
        "summary": "Yearly statistics about registrars",
        "operationId": "getStatsRegistrarYearly",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/StatsRegistrarQueryType"
            }
          },
          {
            "name": "area",
            "in": "query",
            "description": "Area can be used only if a 'zone' has been specified.\n\nIf zone is 'italy', supported values are (StatsItalyArea): nord, centro, sud.\nIf zone is 'foreign', supported value are world region (StatsForeignArea).\n",
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/StatsItalyArea"
                },
                {
                  "$ref": "#/components/schemas/StatsForeignArea"
                }
              ]
            }
          },
          {
            "name": "country",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "end",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "groupby",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsGroupBy"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StatsZone"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsMultiValueResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsErrorMessage"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ProvinciaItaliana": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Uppercase two letters code of the italian provincia",
            "example": "PI"
          },
          "name": {
            "type": "string",
            "description": "Name of the italian provincia",
            "example": "Pisa"
          }
        }
      },
      "Country": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the country",
            "example": "Italy"
          },
          "enabled": {
            "type": "boolean",
            "description": "True if the registrant with this nationality is enabled to register the .it domains",
            "example": true
          },
          "code": {
            "type": "string",
            "description": "Codice due lettere della nazione (ISO 3166)",
            "example": "it"
          }
        }
      },
      "dnsCheckNameserver": {
        "properties": {
          "name": {
            "description": "Nameserver name",
            "example": "dns.nic.it",
            "type": "string"
          },
          "address": {
            "items": {
              "$ref": "#/components/schemas/DnsCheckIPAddress"
            },
            "type": "array"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "DnsCheckIPAddress": {
        "properties": {
          "value": {
            "description": "The IP address",
            "example": "192.12.192.5",
            "type": "string"
          },
          "type": {
            "description": "Type of IP address",
            "enum": [
              "IPv4",
              "IPv6"
            ],
            "example": "IPv4",
            "type": "string"
          }
        },
        "required": [
          "type",
          "value"
        ],
        "type": "object"
      },
      "DnsCheckRequests": {
        "properties": {
          "id": {
            "description": "Unique identifier for DNS check request",
            "example": "abc-123",
            "type": "string"
          },
          "domain": {
            "description": "Domain name to validate",
            "example": "nic.it",
            "type": "string"
          },
          "dnsSecDisabled": {
            "default": false,
            "description": "Disable DnsSec validation",
            "example": true,
            "type": "boolean"
          },
          "nameservers": {
            "items": {
              "$ref": "#/components/schemas/dnsCheckNameserver"
            },
            "type": "array"
          }
        },
        "required": [
          "domain"
        ],
        "type": "object"
      },
      "DnsCheckResult": {
        "properties": {
          "validationId": {
            "description": "Unique identifier for DNS validation",
            "example": "abc-123",
            "type": "string"
          },
          "domain": {
            "description": "Domain name to validate",
            "example": "nic.it",
            "type": "string"
          },
          "status": {
            "description": "Validation status",
            "enum": [
              "SUCCEEDED",
              "WARNING",
              "FAILED"
            ],
            "type": "string"
          },
          "validationDate": {
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "description": "Result schema version",
            "type": "string"
          },
          "nameservers": {
            "items": {
              "$ref": "#/components/schemas/dnsCheckNameserver"
            },
            "type": "array"
          },
          "tests": {
            "description": "List of executed tests",
            "items": {
              "$ref": "#/components/schemas/DnsCheckTest"
            },
            "type": "array"
          },
          "dnsSecSection": {
            "$ref": "#/components/schemas/DnsCheckDNSSecSectionRecord"
          },
          "queries": {
            "description": "List of executed queries",
            "items": {
              "$ref": "#/components/schemas/DnsCheckQuery"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "DnsCheckQuery": {
        "description": "Information and result about the DNS query executed",
        "properties": {
          "id": {
            "description": "Query number",
            "type": "integer"
          },
          "queryFor": {
            "description": "Target name for query",
            "type": "string"
          },
          "destination": {
            "description": "Nameserver queried",
            "type": "string"
          },
          "type": {
            "description": "Query type",
            "enum": [
              "ANY",
              "SOA",
              "NS",
              "A",
              "MX",
              "AAAA",
              "CNAME",
              "PTR",
              "TXT",
              "DNSKEY",
              "RRSIG",
              "DS"
            ],
            "type": "string"
          },
          "result": {
            "description": "Query result",
            "type": "string"
          }
        },
        "required": [
          "destination",
          "queryFor",
          "type"
        ],
        "type": "object"
      },
      "DnsCheckTest": {
        "description": "Information about the validation test executed",
        "properties": {
          "name": {
            "description": "Test name",
            "type": "string"
          },
          "status": {
            "description": "Test status",
            "enum": [
              "SUCCEEDED",
              "WARNING",
              "FAILED"
            ],
            "type": "string"
          },
          "skipped": {
            "description": "true if the test has been skipped",
            "type": "boolean"
          },
          "detail": {
            "description": "List of details",
            "items": {
              "$ref": "#/components/schemas/DnsCheckDetail"
            },
            "type": "array"
          },
          "nameserver": {
            "items": {
              "$ref": "#/components/schemas/DnsCheckNameserverResult"
            },
            "type": "array"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "DnsCheckDetail": {
        "properties": {
          "value": {
            "description": "Message or information",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "description": "Detail status",
            "enum": [
              "SUCCEEDED",
              "WARNING",
              "FAILED"
            ],
            "type": "string"
          },
          "queryId": {
            "description": "Id of the executed query referenced by this detail",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "DnsCheckNameserverResult": {
        "properties": {
          "name": {
            "type": "string"
          },
          "status": {
            "description": "Test status",
            "enum": [
              "SUCCEEDED",
              "WARNING",
              "FAILED"
            ],
            "type": "string"
          },
          "detail": {
            "description": "List of details",
            "items": {
              "$ref": "#/components/schemas/DnsCheckDetail"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "DnsCheckDSRecord": {
        "properties": {
          "keytag": {
            "type": "integer"
          },
          "algorithm": {
            "type": "integer"
          },
          "digestType": {
            "type": "integer"
          },
          "digest": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "DnsCheckDNSSecSectionRecord": {
        "properties": {
          "dsRecord": {
            "items": {
              "$ref": "#/components/schemas/DnsCheckDSRecord"
            },
            "type": "array"
          },
          "test": {
            "items": {
              "$ref": "#/components/schemas/DnsCheckTest"
            },
            "type": "array"
          },
          "query": {
            "items": {
              "$ref": "#/components/schemas/DnsCheckQuery"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "DnsCheckConfiguration": {
        "type": "object",
        "properties": {
          "itOnly": {
            "type": "boolean",
            "description": "true if the dns check is restricted to .it domains"
          },
          "maxDSRecords": {
            "type": "integer",
            "description": "max number of supported DS records"
          },
          "nameserversMin": {
            "type": "integer",
            "description": "minimum numbers of nameservers"
          },
          "nameserversMax": {
            "type": "integer",
            "description": "max numbers of nameservers"
          },
          "dnsSecEnabled": {
            "type": "integer",
            "description": "true if DNSSec validation is supported"
          },
          "ipv6Enabled": {
            "type": "integer",
            "description": "true if IPv6 queries are supported"
          }
        }
      },
      "StatsDomainCounter": {
        "type": "object",
        "properties": {
          "it": {
            "format": "int64",
            "type": "integer",
            "description": ".it domain name counter"
          },
          "edu": {
            "format": "int64",
            "type": "integer",
            "description": ".edu.it domain name counter"
          },
          "counter": {
            "format": "int64",
            "type": "integer",
            "description": "total domain name counter"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "StatsZone": {
        "enum": [
          "italy",
          "foreign"
        ],
        "type": "string"
      },
      "StatsErrorMessage": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "invalidParameters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatsInvalidParameter"
            }
          }
        }
      },
      "StatsForeignArea": {
        "enum": [
          "africa",
          "antartica",
          "americas",
          "asia",
          "eu_east",
          "eu_north",
          "eu_south",
          "eu_west",
          "oceania"
        ],
        "type": "string"
      },
      "StatsGroupBy": {
        "enum": [
          "continent",
          "country",
          "area",
          "region",
          "province",
          "zone"
        ],
        "type": "string"
      },
      "StatsIDNFilter": {
        "enum": [
          "only",
          "no"
        ],
        "type": "string"
      },
      "StatsInvalidParameter": {
        "type": "object",
        "properties": {
          "parameter": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "StatsItalyArea": {
        "enum": [
          "nord",
          "centro",
          "sud"
        ],
        "type": "string"
      },
      "StatsMultiValueResult": {
        "type": "object",
        "properties": {
          "cols": {
            "type": "array",
            "items": {
              "format": "date",
              "type": "string",
              "example": "2022-03-10"
            }
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatsMultiValueRow"
            }
          }
        }
      },
      "StatsMultiValueRow": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "values": {
            "type": "array",
            "items": {
              "type": "number"
            }
          }
        }
      },
      "StatsSingleValueResult": {
        "type": "object",
        "properties": {
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatsSingleValueRow"
            }
          }
        }
      },
      "StatsSingleValueRow": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "value": {
            "type": "number"
          }
        }
      },
      "StatsRegistrarQueryType": {
        "enum": [
          "count",
          "domain",
          "registration",
          "delete",
          "transfer_in",
          "transfer_out",
          "contract_transfer_in",
          "contract_transfer_out"
        ],
        "type": "string"
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "errors": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WrongValue"
            }
          }
        }
      },
      "WrongValue": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "value": {
            "type": "object"
          },
          "message": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        }
      }
    }
  }
}