Skip to content

GET /api/v1/internal/peer-list

GET/api/v1/internal/peer-list

获取对端节点列表(不含自身)

internaloperationId: internalPeerList

请求参数

名称类型位置必填说明
node_idstringquery否—

请求示例

cURL
curl -X GET 'http://localhost:8080/api/v1/internal/peer-list' \
  -H 'Accept: application/json' \
  -H 'X-Agent-Secret: <AGENT_SECRET>'
JavaScript
const res = await fetch('http://localhost:8080/api/v1/internal/peer-list', {
  method: 'GET',
  headers: {
    'Accept': 'application/json',
    'X-Agent-Secret': '<AGENT_SECRET>'
  },
});
const data = await res.json();
Python
import requests

res = requests.get(
    'http://localhost:8080/api/v1/internal/peer-list',
    headers={'Accept': 'application/json', 'X-Agent-Secret': '<AGENT_SECRET>'}
)
print(res.json())

响应

200成功

application/json

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "node_type": {
            "type": "string",
            "description": "普通节点或 high_defense 高防节点"
          },
          "ip_address": {
            "type": "string"
          },
          "ip_version": {
            "type": "integer"
          },
          "dnspod_record_id": {
            "type": "string"
          },
          "lb_weight": {
            "type": "integer"
          },
          "lb_enabled": {
            "type": "boolean"
          },
          "max_capacity_hint": {
            "type": "integer",
            "nullable": true
          },
          "status": {
            "type": "string"
          },
          "consecutive_failures": {
            "type": "integer"
          },
          "consecutive_successes": {
            "type": "integer"
          },
          "last_checked_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "status_changed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "note": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    }
  }
}
401X-Agent-Secret 缺失或不匹配
503NODE_AGENT_SECRET 未配置,端点未启用

在线调试

在线调试
凭证仅保存在当前页面内存中
自定义请求 Header