获取自建拨测节点详情¶
GET /api/v1/dialing_region/{region_uuid}/info
概述¶
读取一个当前空间自建节点及部署服务地址。
调用前和使用步骤¶
先查询本空间自建节点归属,再取下游详情;默认公共节点/其他空间节点或不存在UUID被视为无效自建节点403。此接口无Query业务参数,不触发任务执行或安装。server由当前部署服务协议/主机/端口组成,用于节点连接;应结合自建节点管理中region_id/ak/sk配置,不把server当本次OpenAPI Endpoint。
下游content原样承接,并在外层增加server与规范显示名;当前平铺节点示例与旧ak/regionInfo包装都可能出现,嵌套包装不递归归一名称,credentials仅在上游实际返回时存在。获取包含节点凭据的响应应安全保管;无法从本响应取得完整部署凭据时使用产品“获取配置”,不要自行拼造AK/SK。
路由参数¶
| 参数名 | 类型 | 必选 | 说明 |
|---|---|---|---|
| region_uuid | string | Y | 不是默认公共节点、移动节点ID、keycode或任务UUID。 例子: regn_example获取或填写方式: 从自建节点列表uuid取当前空间owner=custom节点。 |
请求头¶
| 参数名 | 类型 | 必选 | 说明 |
|---|---|---|---|
| DF-API-KEY | string | Y | 工作空间的 OpenAPI 鉴权凭据。 例子: <DF-API-KEY>获取或填写方式: 从目标工作空间的 API Key 管理获取有该操作权限的 OpenAPI Key。 |
请求例子¶
curl --get 'https://openapi.guance.com/api/v1/dialing_region/regn_example/info' \
-H 'DF-API-KEY: <DF-API-KEY>'
响应¶
HTTP 200,application/json。下方示例展示可直接读取的主要字段。
| 字段 | 类型 | 说明 |
|---|---|---|
| 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.ak | object | 部分上游注册/详情返回的节点部署凭据对象;无此对象时通过产品获取配置,不假定字段总存在。 |
| content.ak.ak | string | 节点AK标识,不是本请求DF-API-KEY。 |
| content.ak.sk | string | 节点SK,仅用于安全部署配置,不公开或记录实际值。 |
| content.ak.external_id | string | 凭据归属工作空间标识。 |
| content.ak.owner | string | 上游凭据owner字段。 |
| content.ak.parent_ak | string | 上游父凭据标识,不当作可直接认证的秘密。 |
| content.ak.status | string | 上游凭据状态。 |
| content.ak.update_at | integer | 上游更新时间,保留实际单位/历史0,不混同Studio updateAt。 |
| content.regionInfo | object | 部分上游的包装节点对象,与平铺节点字段语义相同;此控制器不递归归一该对象的名称。 |
| content.regionInfo.uuid | string | regn_节点UUID,创建普通任务regions使用此值。 |
| content.regionInfo.keycode | string | 节点部署/标识码,不用作regions UUID。 |
| content.regionInfo.owner | string | 自建节点custom。 |
| content.regionInfo.name | string | 按当前请求语言选择的名称。 |
| content.regionInfo.nameEn | string | 英语兼容显示名。 |
| content.regionInfo.name_en | string | 上游旧英语名称,条件保留。 |
| content.regionInfo.nameI18n | object | 规范语言名称映射。 |
| content.regionInfo.nameI18n.语言码 | string | 该语言显示名。 |
| content.regionInfo.internal | boolean | true国内、false海外,非网络私有性。 |
| content.regionInfo.country | string | 国家。 |
| content.regionInfo.province | string | 省份。 |
| content.regionInfo.city | string | 城市。 |
| content.regionInfo.isp | string | 运营商/提供方。 |
| content.regionInfo.status | string | 节点服务状态如OK/disabled,不是任务执行状态。 |
| content.regionInfo.heartbeat | integer | 节点最近心跳Unix秒,上游定义为准。 |
| content.regionInfo.region | string | 上游区域标识。 |
| content.regionInfo.company | string | 企业资料。 |
| content.regionInfo.external_id | string | 自建归属等上游字段,默认节点通常空。 |
| content.regionInfo.parent_ak | string | 上游兼容归属字段,可能空;客户端不把它当OpenAPI Key。 |
| content.regionInfo.extend_info | string | 上游扩展JSON字符串或空串,不默认对象。 |
| content.regionInfo.create_at | integer | 上游创建时间字段,历史可-1;区别任务createAt。 |
| content.regionInfo.其他上游字段 | JSON | 上游兼容附加字段原样承接,未列键不要直接当作可写参数。 |
| content.server | string | 当前节点服务完整基础地址,部署节点使用,不是本OpenAPI地址。 |
| 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,
"server": "https://dialing-service.example.com",
"declaration": {}
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
兼容上游包装示例(凭据均占位,regionInfo保留上游结构;最外层名称未必代表内层节点):
{
"code": 200,
"content": {
"ak": {
"ak": "NODE-AK-PLACEHOLDER",
"sk": "NODE-SK-PLACEHOLDER",
"external_id": "wksp_example",
"owner": "",
"parent_ak": "PARENT-AK-ID",
"status": "",
"update_at": 0
},
"regionInfo": {
"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",
"status": "OK",
"heartbeat": 1785427200,
"region": "example-region",
"company": "",
"external_id": "wksp_example",
"parent_ak": "",
"extend_info": "",
"create_at": 1785427200
},
"server": "https://dialing-service.example.com",
"name": "",
"nameEn": "",
"nameI18n": {
"zh": "",
"en": "",
"zh-hant": "",
"id": "",
"ja": "",
"ko": ""
},
"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 | 触发条件 | 消息或响应说明 | 处理方式 |
|---|---|---|---|---|
| 403 | ft.ForbiddenInvalidSelfBuiltNode | UUID不在当前空间自建节点集合,包括默认/他空间/不存在 | 非法操作, 无效的自建节点ID | 从本空间自建列表重取uuid,不以keycode代替。 |
| 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码进行固定匹配。 |