{
  "openapi": "3.1.0",
  "info": {
    "title": "仪表板统计",
    "version": "1.2"
  },
  "servers": [
    {
      "url": "https://api.decodo.com/api/v2/statistics"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/targets": {
      "post": {
        "x-mint": {
          "href": "/cn/api-reference/targets/get-targets"
        },
        "summary": "获取目标",
        "description": "",
        "operationId": "get-targets",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "startDate": {
                    "type": "string",
                    "description": "时区为 UTC。最大日期返回间隔为 180 天。日期格式：YYYY-MM-DD HH:MM:SS",
                    "default": "2024-09-01 00:00:00"
                  },
                  "endDate": {
                    "type": "string",
                    "description": "时区为 UTC。最大日期返回间隔为 180 天。日期格式：YYYY-MM-DD HH:MM:SS",
                    "default": "2024-10-01 00:00:00"
                  },
                  "proxyUsers": {
                    "type": "array",
                    "description": "从[此处](https://help.decodo.com/cn/api-reference/sub-users/get-sub-users)获取的代理用户 ID 列表（仅适用于 residential_proxies）。不适用于 RTC 代理（抓取 API）",
                    "items": {
                      "type": "string"
                    }
                  },
                  "search": {
                    "type": "string",
                    "description": "搜索目标中的特定字符串。最少 3 个字符。留空将返回所有目标"
                  },
                  "proxyType": {
                    "type": "string",
                    "description": "RTC 代理即抓取 API",
                    "default": "residential_proxies",
                    "enum": [
                      "residential_proxies",
                      "mobile_proxies",
                      "rtc_universal_proxies",
                      "rtc_universal_core_proxies",
                      "modular_scraper"
                    ]
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "目标"
        ]
      }
    },
    "/traffic": {
      "post": {
        "x-mint": {
          "href": "/cn/api-reference/traffic/get-traffic"
        },
        "summary": "获取流量",
        "description": "",
        "operationId": "get-traffic",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "proxyType": {
                    "type": "string",
                    "default": "residential_proxies",
                    "description": "RTC 代理即抓取 API",
                    "enum": [
                      "residential_proxies",
                      "mobile_proxies",
                      "rtc_universal_proxies",
                      "rtc_universal_core_proxies",
                      "modular_scraper"
                    ]
                  },
                  "startDate": {
                    "type": "string",
                    "description": "最大日期返回间隔为 180 天。日期格式：YYYY-MM-DD HH:MM:SS",
                    "default": "2024-09-01 00:00:00"
                  },
                  "endDate": {
                    "type": "string",
                    "description": "最大日期返回间隔为 180 天。日期格式：YYYY-MM-DD HH:MM:SS",
                    "default": "2024-10-01 00:00:00"
                  },
                  "proxyUsers": {
                    "type": "array",
                    "description": "从[此处](https://help.decodo.com/cn/api-reference/sub-users/get-sub-users)获取的代理用户 ID 列表（仅适用于 residential_proxies）。不适用于 RTC 代理（抓取 API）",
                    "items": {
                      "type": "string"
                    }
                  },
                  "groupBy": {
                    "type": "string",
                    "description": "结果分组方式。hour 显示最近一天每小时的使用情况，但必须在最近 2 周内有流量使用才会显示。",
                    "default": "target",
                    "enum": [
                      "day",
                      "target",
                      "country",
                      "protocol",
                      "proxy_user",
                      "hour",
                      "week",
                      "month"
                    ]
                  },
                  "targets": {
                    "type": "array",
                    "description": "目标 URL 列表（数组）",
                    "items": {
                      "type": "string"
                    }
                  },
                  "locations": {
                    "type": "array",
                    "description": "按 ISO-2 格式（IT、US、ES 等）过滤结果的位置列表。不适用于 RTC 代理（抓取 API）",
                    "items": {
                      "type": "string"
                    }
                  },
                  "limit": {
                    "type": "integer",
                    "description": "返回的条目数量",
                    "default": 500,
                    "format": "int32"
                  },
                  "page": {
                    "type": "integer",
                    "description": "返回的页码",
                    "default": 1,
                    "format": "int32"
                  },
                  "sortBy": {
                    "type": "string",
                    "description": "期望的响应分组方式",
                    "default": "grouping_key",
                    "enum": [
                      "grouping_key",
                      "requests",
                      "totals"
                    ]
                  },
                  "sortOrder": {
                    "type": "string",
                    "description": "排序顺序：升序或降序",
                    "default": "asc",
                    "enum": [
                      "asc",
                      "desc"
                    ]
                  },
                  "protocols": {
                    "type": "array",
                    "description": "有效协议：http、https、socks5。留空将返回所有协议。不适用于 RTC 代理（抓取 API）",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "流量"
        ]
      }
    }
  },
  "tags": [
    {
      "name": "仪表板统计",
      "description": "仪表板统计端点"
    }
  ]
}
