itecdn 5.x / 用户 API
获取四层转发组详情
GET
/v1/stream-groups/{group_id}查询单个四层转发组的基础资料。普通用户只能查询自己创建的转发组;查询其他用户的转发组需要管理员权限。
身份认证
access-token
api-key + api-secret
认证定义
{
"AccessToken": {
"type": "apiKey",
"in": "header",
"name": "access-token",
"description": "通过登录接口获得的短期访问令牌。"
},
"ApiKey": {
"type": "apiKey",
"in": "header",
"name": "api-key",
"description": "API Key;必须和 api-secret 同时发送。"
},
"ApiSecret": {
"type": "apiKey",
"in": "header",
"name": "api-secret",
"description": "API Secret;必须和 api-key 同时发送。"
}
}请求参数
| 参数 | 位置 | 类型 | 必填 | 说明与约束 |
|---|---|---|---|---|
group_id | path | integer | 必填 | 要查询的转发组 ID;必须存在且当前用户有权限查看。 完整参数定义 |
响应
HTTP 200
请求已被处理。成功时 code 为 0、msg 为空字符串、data 为转发组;转发组不存在或无权限时也返回 HTTP 200。
application/json
object
| 字段 | 类型 | 必填 | 说明与约束 | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
code | integer | 必填 | 业务状态码;成功为 0。 约束 / 默认值 / 示例 | ||||||||||||||||||||
msg | string | 必填 | 成功时为空字符串,失败时为错误说明。 约束 / 默认值 / 示例 | ||||||||||||||||||||
data | object | 必填 | 转发组详情。 约束 / 默认值 / 示例展开字段结构转发组详情。
|
完整 Schema
{
"type": "object",
"required": [
"code",
"msg",
"data"
],
"properties": {
"code": {
"type": "integer",
"description": "业务状态码;成功为 0。",
"example": 0
},
"msg": {
"type": "string",
"description": "成功时为空字符串,失败时为错误说明。",
"example": ""
},
"data": {
"type": "object",
"description": "转发组详情。",
"required": [
"id",
"uid",
"name",
"des"
],
"properties": {
"id": {
"type": "integer",
"description": "转发组 ID。"
},
"uid": {
"type": "integer",
"description": "归属用户 ID。"
},
"name": {
"type": "string",
"description": "转发组名称。"
},
"des": {
"type": "string",
"description": "转发组备注。"
}
}
}
}
}示例
{
"code": 0,
"msg": "",
"data": {
"id": 3,
"uid": 12,
"name": "生产转发",
"des": "TCP 服务"
}
}查询成功
{
"code": 0,
"msg": "",
"data": {
"id": 3,
"uid": 12,
"name": "生产转发",
"des": "TCP 服务"
}
}转发组不存在
{
"code": "stream_group-3",
"msg": "转发组不存在",
"data": ""
}cURL 示例
根据文档生成;请替换主控地址、路径参数和凭证,并按上表补充查询参数。
curl --request GET \
"https://master.example.invalid/v1/stream-groups/{group_id}" \
--header "access-token: YOUR_ACCESS_TOKEN"