{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/workingproxysites-info/json-schema/workingproxysites-info-report-request-schema.json",
  "title": "ReportRequest",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/workingproxysites-info-openapi.json#/components/schemas/ReportRequest",
  "type": "object",
  "properties": {
    "status": {
      "$ref": "#/$defs/ReportStatus"
    },
    "proxy_type": {
      "$ref": "#/$defs/ProxyType"
    },
    "region": {
      "type": "string",
      "description": "ISO 3166-1 alpha-2 country code (e.g. \"US\") or \"global\" (stored as null)."
    },
    "issue": {
      "allOf": [
        {
          "$ref": "#/$defs/Issue"
        }
      ],
      "description": "Main problem. Defaults to \"none\" when operational, otherwise \"other\"."
    },
    "http_status": {
      "type": "integer",
      "minimum": 100,
      "maximum": 599
    },
    "success_rate": {
      "type": "number",
      "minimum": 0,
      "maximum": 100,
      "description": "Percent of requests that succeeded."
    },
    "latency_ms": {
      "type": "integer",
      "minimum": 0,
      "maximum": 600000,
      "description": "Median latency in milliseconds."
    },
    "sample_size": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10000000,
      "description": "Requests behind this report."
    },
    "note": {
      "type": "string",
      "maxLength": 280,
      "description": "Plain text. Links and emails are rejected."
    },
    "observed_at": {
      "type": "string",
      "format": "date-time",
      "description": "Within the last 6 hours. Defaults to now."
    }
  },
  "required": [
    "status"
  ],
  "$defs": {
    "Issue": {
      "type": "string",
      "enum": [
        "none",
        "timeouts",
        "connection_errors",
        "auth_errors",
        "blocked",
        "captcha",
        "slow",
        "geo_mismatch",
        "ip_leak",
        "pool_exhausted",
        "dashboard",
        "billing",
        "other"
      ]
    },
    "ProxyType": {
      "type": "string",
      "enum": [
        "residential",
        "mobile",
        "datacenter",
        "isp"
      ]
    },
    "ReportStatus": {
      "type": "string",
      "enum": [
        "operational",
        "degraded",
        "down"
      ],
      "description": "Status observed by the reporting agent."
    }
  }
}