跳转至

获取自建拨测节点列表



GET /api/v1/dialing_region/list

概述

读取当前工作空间的自建拨测节点列表。

调用前和使用步骤

仅owner=custom且归属本空间,不包含默认公共节点或移动资源。isAlive省略不限制存活,true只存活,false只不存活;结果按上游create_at倒序,无分页/总数。名称按当前请求语言回退显示,nameI18n保留多语言映射。

createAt/creator/updateAt/updator由extend_info补齐,与上游create_at/heartbeat不同;列表另补身份资料,缺失{}。列表中的节点uuid用于普通任务regions;注册成功但未安装/未心跳的节点不一定在线。参见自建节点管理安装与验收;默认节点使用默认地域列表,移动节点使用移动资源入口。

请求头

参数名 类型 必选 说明
DF-API-KEY string Y 工作空间的 OpenAPI 鉴权凭据。
例子: <DF-API-KEY>
获取或填写方式: 从目标工作空间的 API Key 管理获取有该操作权限的 OpenAPI Key。

Query 请求参数

参数名 类型 必选 说明
isAlive string 可选,可省略不限制存活;Query字符串,不是JSON boolean或任务ok/stop。
允许 null: True
可选值: ['true', 'false']
例子: true
获取或填写方式: 按是否只查看在线节点选择true/false字符串。

请求例子

curl --get 'https://openapi.guance.com/api/v1/dialing_region/list' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  --data-urlencode isAlive=true

响应

HTTP 200,application/json。下方示例展示可直接读取的主要字段。

字段 类型 说明
content array<object> 自建节点数组,空[],不含pageInfo。
content[].uuid string regn_节点UUID,创建普通任务regions使用此值。
content[].keycode string 节点部署/标识码,不用作regions UUID。
content[].owner string 自建节点custom。
content[].name string 按当前请求语言选择的名称。
content[].nameEn string 英语兼容显示名。
content[].name_en string 上游旧英语名称,条件保留。
content[].nameI18n object 规范语言名称映射。
content[].nameI18n.语言码 string 该语言显示名。
content[].internal boolean true国内、false海外,非网络私有性。
content[].country string 国家。
content[].province string 省份。
content[].city string 城市。
content[].isp string 运营商/提供方。
content[].status string 节点服务状态如OK/disabled,不是任务执行状态。
content[].heartbeat integer 节点最近心跳Unix秒,上游定义为准。
content[].region string 上游区域标识。
content[].company string 企业资料。
content[].external_id string 自建归属等上游字段,默认节点通常空。
content[].parent_ak string 上游兼容归属字段,可能空;客户端不把它当OpenAPI Key。
content[].extend_info string 上游扩展JSON字符串或空串,不默认对象。
content[].create_at integer 上游创建时间字段,历史可-1;区别任务createAt。
content[].其他上游字段 JSON 上游兼容附加字段原样承接,未列键不要直接当作可写参数。
content[].createAt integer 从extend_info读取的创建Unix秒,缺失-1。
content[].creator string 从扩展读取的创建身份,缺失空串。
content[].updateAt integer 从扩展读取的更新Unix秒,缺失-1。
content[].updator string 从扩展读取的更新身份,缺失空串。
content[].creatorInfo object 仅列表补充身份资料,无匹配{}。
content[].creatorInfo.uuid string 条件返回;身份UUID。
content[].creatorInfo.name string 条件返回;显示名称。
content[].creatorInfo.email string 条件返回;邮箱。
content[].creatorInfo.username string 条件返回;登录名。
content[].creatorInfo.status integer 条件返回;账号状态。
content[].creatorInfo.wsAccountStatus integer 条件返回;空间关系状态。
content[].creatorInfo.iconUrl string 条件返回;头像地址。
content[].creatorInfo.mobile string 条件返回;手机号。
content[].creatorInfo.countryCode string 条件返回;手机区号。
content[].creatorInfo.acntWsNickname string 条件返回;空间昵称。
content[].updatorInfo object 仅列表补充身份资料,无匹配{}。
content[].updatorInfo.uuid string 条件返回;身份UUID。
content[].updatorInfo.name string 条件返回;显示名称。
content[].updatorInfo.email string 条件返回;邮箱。
content[].updatorInfo.username string 条件返回;登录名。
content[].updatorInfo.status integer 条件返回;账号状态。
content[].updatorInfo.wsAccountStatus integer 条件返回;空间关系状态。
content[].updatorInfo.iconUrl string 条件返回;头像地址。
content[].updatorInfo.mobile string 条件返回;手机号。
content[].updatorInfo.countryCode string 条件返回;手机区号。
content[].updatorInfo.acntWsNickname string 条件返回;空间昵称。
content[].declaration object 或 null 非空响应业务对象附带的工作空间公共声明,未配置时可为null或空对象;空对象不添加。
{
  "code": 200,
  "content": [
    {
      "uuid": "regn_example",
      "keycode": "example-self-node",
      "owner": "custom",
      "name": "生产自建节点",
      "nameEn": "Production self node",
      "nameI18n": {
        "zh": "生产自建节点",
        "en": "Production self node"
      },
      "internal": true,
      "country": "China",
      "province": "Zhejiang",
      "city": "Hangzhou",
      "isp": "example-isp",
      "status": "OK",
      "heartbeat": 1785427200,
      "region": "example-region",
      "company": "example",
      "external_id": "wksp_example",
      "parent_ak": "",
      "extend_info": "{\"createAt\":1785427200,\"updateAt\":1785427200,\"creator\":\"wsak_example\",\"updator\":\"wsak_example\"}",
      "create_at": 1785427200,
      "creator": "wsak_example",
      "updator": "wsak_example",
      "createAt": 1785427200,
      "updateAt": 1785427200,
      "creatorInfo": {},
      "updatorInfo": {},
      "declaration": {}
    }
  ],
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

错误响应

鉴权、限流和公共请求错误参见公共错误定义。

普通拨测SDK对下游error_code=dialtesting.invalidRegion统一映射ft.DialingRegionError并保留实际HTTP(不局限400);其他下游4xx保留实际HTTP与error_code/message(含无ft前缀的上游码),未列举码也可能返回;>=500由公开入口统一包装500 ft.InternalServerError。SDK返回上游content,本控制器不会统一重新封装为某个固定regionInfo/ak结构,须按实际部署版本识别平铺或兼容包装,未知附加字段兼容保留。

HTTP 状态 errorCode 触发条件 消息或响应说明 处理方式
406 ft.ParameterValidationFailed 请求字段缺失,或字段值违反声明的校验条件 参数解析失败 核对参数位置、字段名、类型和取值。
406 ft.DialingBrandNoSetError 空间对应拨测服务品牌配置缺失 未配置{}品牌的拨测配置。 由管理员核对当前空间拨测服务。
400 ft.DialingAKNoSetError 拨测服务签名凭据未配置 未配置拨测 AK 信息,请检查 Launcher 激活配置 由管理员核对服务激活信息,客户端不在本Body提交这些凭据。
400 ft.DialingServerError 下游拨测节点接口返回400业务失败或响应媒体无法解析 拨测服务接口调用失败 查看message/traceId,由管理员检查节点服务,不能把失败当无节点。
500 ft.InternalServerError 普通下游5xx/连接异常,或历史节点/关联字段格式、名称和响应组装异常 内部错误 缩小到具体节点/筛选,核对上游响应格式和服务可用性;持续失败保留traceId。
400 ft.DialingRegionError 下游响应error_code=dialtesting.invalidRegion时映射为该错误;其他4xx保留各自上游错误码与实际状态,不统一映射。 当前任务存在部分拨测节点失效,请更新配置后重新保存。 核对有效自建节点及节点服务状态,不以原始dialtesting码进行固定匹配。

文档评价

文档内容是否对您有帮助?