{
  "tags": [
    "四层转发"
  ],
  "description": "更新指定四层转发组的名称或备注。路径中的 `group_id` 会写入请求对象，客户端传入的 `id` 无法改变更新目标。请求体必须是 JSON 对象；普通用户仅能更新自己的转发组，管理员可更新其他用户的组。",
  "operationId": "user_put_v1_stream_groups_group_id",
  "security": [
    {
      "AccessToken": []
    },
    {
      "ApiKey": [],
      "ApiSecret": []
    }
  ],
  "responses": {
    "200": {
      "description": "请求已被处理。成功时 `code` 为 0、`msg` 为“更新转发组成功”、`data` 为 null；组不存在、无权限、名称为空或重名时仍返回 HTTP 200。",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "code",
              "msg",
              "data"
            ],
            "properties": {
              "code": {
                "type": "integer",
                "description": "业务状态码；成功为 0。",
                "example": 0
              },
              "msg": {
                "type": "string",
                "description": "处理结果说明。",
                "example": "更新转发组成功"
              },
              "data": {
                "type": "string",
                "nullable": true,
                "description": "成功时为 null；失败时为空字符串。",
                "example": null
              }
            }
          },
          "examples": {
            "success": {
              "summary": "更新备注",
              "value": {
                "code": 0,
                "msg": "更新转发组成功",
                "data": null
              }
            },
            "notFound": {
              "summary": "组不存在",
              "value": {
                "code": "stream_group-6",
                "msg": "group id不存在",
                "data": ""
              }
            }
          },
          "example": {
            "code": 0,
            "msg": "更新转发组成功",
            "data": null
          }
        }
      }
    }
  },
  "x-python-handler": "stream.StreamGroupAPI",
  "x-python-route-line": 650,
  "x-audience": "user",
  "x-auth": "user",
  "x-reviewed": true,
  "parameters": [
    {
      "name": "group_id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "integer",
        "minimum": 1,
        "example": 3
      },
      "description": "要更新的转发组 ID；必须存在且当前用户有操作权限。"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "name": {
              "type": "string",
              "minLength": 1,
              "description": "新的转发组名称；会进行 XSS 过滤，且同一归属用户下必须唯一。未传则保持原名称。",
              "example": "生产转发"
            },
            "des": {
              "type": "string",
              "description": "新的备注；会进行 XSS 过滤，可传空字符串清空备注。未传则保持原备注。",
              "example": "迁移后的 TCP 服务"
            },
            "uid": {
              "type": "integer",
              "minimum": 1,
              "description": "管理员专用。用于指定当前操作用户；更新已有组时不会改变组的归属用户。",
              "example": 12
            }
          },
          "example": {
            "name": "生产转发",
            "des": "迁移后的 TCP 服务"
          }
        }
      }
    }
  },
  "x-itecdn-source-reviewed": true,
  "extensions": [
    {
      "key": "x-python-handler",
      "value": "stream.StreamGroupAPI"
    },
    {
      "key": "x-python-route-line",
      "value": 650
    },
    {
      "key": "x-audience",
      "value": "user"
    },
    {
      "key": "x-auth",
      "value": "user"
    },
    {
      "key": "x-reviewed",
      "value": true
    },
    {
      "key": "x-itecdn-source-reviewed",
      "value": true
    }
  ],
  "method": "put",
  "path": "/v1/stream-groups/{group_id}",
  "servers": [
    {
      "url": "https://master.example.invalid",
      "description": "不可调用的示例地址；复制示例后替换为自己的主控域名。"
    }
  ],
  "securitySchemes": {
    "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 同时发送。"
    }
  },
  "jsonRequestBodyExample": {
    "name": "生产转发",
    "des": "迁移后的 TCP 服务"
  },
  "info": {
    "title": "itecdn v5 用户 API",
    "version": "5.x",
    "description": "itecdn v5.x Python 主控用户 API。本文档不适用于 v6 或其它实现。"
  },
  "postman": {
    "name": "更新四层转发组",
    "description": {
      "content": "更新指定四层转发组的名称或备注。路径中的 `group_id` 会写入请求对象，客户端传入的 `id` 无法改变更新目标。请求体必须是 JSON 对象；普通用户仅能更新自己的转发组，管理员可更新其他用户的组。",
      "type": "text/plain"
    },
    "url": {
      "path": [
        "v1",
        "stream-groups",
        ":group_id"
      ],
      "host": [
        "{{baseUrl}}"
      ],
      "query": [],
      "variable": [
        {
          "disabled": false,
          "description": {
            "content": "(Required) 要更新的转发组 ID；必须存在且当前用户有操作权限。",
            "type": "text/plain"
          },
          "type": "any",
          "value": "",
          "key": "group_id"
        }
      ]
    },
    "header": [
      {
        "key": "Content-Type",
        "value": "application/json"
      },
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "method": "PUT",
    "body": {
      "mode": "raw",
      "raw": "",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    },
    "auth": {
      "type": "apikey",
      "apikey": [
        {
          "type": "any",
          "value": "access-token",
          "key": "key"
        },
        {
          "type": "any",
          "value": "{{apiKey}}",
          "key": "value"
        },
        {
          "type": "any",
          "value": "header",
          "key": "in"
        }
      ]
    }
  }
}