swagger: '2.0' info: version: v1 title: agent manager API description: agent manager API schemes: - https host: localhost.com basePath: / tags: - name: WorkSpaceMember paths: /v1/{project_id}/agent-manager/workspace/member: get: tags: - WorkSpaceMember description: 查询团队空间成员列表 operationId: queryWorkspaceMemberList consumes: - application/json produces: - application/json parameters: - name: project_id in: path required: true description: 项目ID。 type: string - name: workspace_id in: query required: true description: 空间ID。 type: string - name: member_name in: query required: false type: string description: 用户名称。 - name: role in: query required: false type: string description: 用户角色。 - name: page_num in: query type: integer default: 1 description: 页码。 - name: page_size in: query type: integer default: 10 description: 每页条数。 responses: '200': description: 获取团队空间成员列表响应体。 schema: $ref: '#/definitions/GetWorkspaceMemberListRsp' '400': description: Bad Request schema: $ref: 'AgentStudio-Manager-API.yaml#/definitions/ErrorRsp' post: tags: - WorkSpaceMember description: 批量添加团队空间成员。 operationId: batchAddWorkspaceMember consumes: - application/json produces: - application/json parameters: - name: project_id in: path required: true description: 项目ID。 type: string - name: workspace_id in: query required: true description: 空间ID。 type: string - name: body in: body required: true schema: type: object required: - members properties: members: type: array description: 待添加的成员列表。 items: $ref: '#/definitions/AddWorkspaceMemberReq' responses: '200': description: 批量添加团队空间成员成功。 schema: type: integer '400': description: 请求参数错误。 schema: $ref: 'AgentStudio-Manager-API.yaml#/definitions/ErrorRsp' delete: tags: - WorkSpaceMember description: 批量移除团队空间成员。 operationId: batchDeleteWorkspaceMember consumes: - application/json produces: - application/json parameters: - name: project_id in: path required: true type: string description: 项目ID。 - name: workspace_id in: query required: true type: string description: 空间ID。 - name: deleteWorkspaceBody in: body required: true description: 批量删除空间成员请求体。 schema: $ref: '#/definitions/DeleteWorkspaceMemberReq' responses: '200': description: 批量移除成员成功。 schema: type: integer '400': description: 请求参数错误。 schema: $ref: 'AgentStudio-Manager-API.yaml#/definitions/ErrorRsp' '403': description: 无权限移除成员(如移除所有者)。 schema: $ref: 'AgentStudio-Manager-API.yaml#/definitions/ErrorRsp' patch: tags: - WorkSpaceMember description: 修改团队空间成员角色。 operationId: batchUpdateWorkspaceMemberRole consumes: - application/json produces: - application/json parameters: - name: project_id in: path required: true type: string description: 项目ID。 - name: workspace_id in: query required: true type: string description: 空间ID。 - name: batchUpdateWorkspaceMemberBody in: body required: true schema: type: object required: - members properties: members: type: array description: 待更新的成员列表。 items: $ref: '#/definitions/UpdateWorkspaceMemberReq' responses: '200': description: 成员角色修改成功。 schema: type: integer '400': description: 请求参数错误。 schema: $ref: 'AgentStudio-Manager-API.yaml#/definitions/ErrorRsp' '403': description: 无权限修改该成员角色。 schema: $ref: 'AgentStudio-Manager-API.yaml#/definitions/ErrorRsp' /v1/{project_id}/agent-manager/workspace/users: get: tags: - WorkSpaceMember description: 获取IAM用户列表。 operationId: queryIamUserList consumes: - application/json produces: - application/json parameters: - name: project_id in: path required: true type: string description: 项目ID。 - name: workspace_id in: query required: true type: string description: 空间ID。 responses: '200': description: 获取当前租户下面的用户列表。 schema: $ref: '#/definitions/GetWorkspaceMemberListRsp' '400': description: 请求参数错误。 schema: $ref: 'AgentStudio-Manager-API.yaml#/definitions/ErrorRsp' /v1/{project_id}/agent-manager/workspace/member/role: get: tags: - WorkSpaceMember description: 获取团队空间下的角色列表。 operationId: queryRoleList consumes: - application/json produces: - application/json parameters: - name: project_id in: path required: true type: string description: 项目ID。 - name: workspace_id in: query required: true type: string description: 空间ID。 responses: '200': description: 获取当前租户下面的用户列表。 schema: $ref: '#/definitions/GetWorkspaceMemberRoleRsp' '400': description: 请求参数错误。 schema: $ref: 'AgentStudio-Manager-API.yaml#/definitions/ErrorRsp' /v1/{project_id}/agent-manager/workspace/member/me: delete: tags: - WorkSpaceMember description: 当前用户退出指定空间 operationId: exitWorkspace produces: - application/json parameters: - name: project_id in: path required: true type: string description: 项目ID。 - name: workspace_id in: query required: true type: string description: 要退出的空间ID。 responses: '200': description: 退出空间成功。 schema: "$ref": "#/definitions/CommonResponse" /v1/{project_id}/agent-manager/workspace/member/ownership: put: tags: - WorkSpaceMember description: 转让空间所有权给指定用户。 operationId: transferWorkspaceOwnership consumes: - application/json produces: - application/json parameters: - name: project_id in: path required: true type: string description: 项目ID。 - name: workspace_id in: query required: true type: string description: 空间ID。 - name: body in: body required: true schema: type: object required: - workspace_id - next_owner_id properties: workspace_id: type: string description: 空间ID。 next_owner_id: type: string description: 新所有者用户ID。 responses: '200': description: 操作完成。 schema: "$ref": "#/definitions/CommonResponse" definitions: GetWorkspaceMemberRoleRsp: type: object description: 团队空间成员角色响应列表。 properties: roleList: type: array items: $ref: '#/definitions/RoleInfo' description: 角色列表 GetWorkspaceMemberListRsp: type: object description: 团队空间成员响应列表。 properties: count: type: integer format: int32 description: 总数 workspaceList: type: array items: $ref: '#/definitions/WorkspaceMemberInfo' description: 工作空间列表。 WorkspaceMemberInfo: type: object description: 团队空间成员描述信息。 properties: id: type: string example: 22104392-0535-48cc-a060-bd173199c5c3 description: 团队空间ID。 minLength: 1 maxLength: 64 pattern: ^[a-zA-Z0-9_-]+$ workspaceId: type: string description: 工作空间ID。 minLength: 1 maxLength: 64 pattern: ^[a-zA-Z0-9_()\-]+$ memberName: type: string description: 团队空间成员名称。 minLength: 1 maxLength: 64 pattern: ^[a-zA-Z0-9\u4e00-\u9fa5._-][a-zA-Z0-9\u4e00-\u9fa5._\- ]{0,63}$ memberId: type: string description: 团队空间成员ID。 minLength: 1 maxLength: 64 pattern: ^[a-zA-Z0-9_-]+$ memberSource: type: string description: 成员来源。 minLength: 1 maxLength: 128 domainId: type: string description: 租户ID。 minLength: 1 maxLength: 64 pattern: ^[a-zA-Z0-9_-]+$ role: type: string description: 成员角色。 minLength: 1 maxLength: 64 createdOn: type: string format: date-time description: 创建时间。 updatedOn: type: string format: date-time description: 更新时间。 creator: type: string description: 添加人。 minLength: 1 maxLength: 128 updater: type: string description: 修改人。 minLength: 1 maxLength: 128 creatorId: type: string description: 创建用户ID。 minLength: 1 maxLength: 128 updaterId: type: string description: 更新用户ID。 minLength: 1 maxLength: 128 IamUserInfo: type: object description: IAM用户信息。 properties: iamUserId: type: string description: IAM用户ID。 iamUserName: type: string description: IAM用户名。 RoleInfo: type: object description: 角色。 properties: roleId: type: string description: 角色ID。 roleNameCn: type: string description: 角色中文名。 roleNameEn: description: 角色英文名。 WorkspaceMemberDetailRsp: type: object description: 工作空间成员的详细信息。 properties: code: type: integer format: int32 description: 状态码,0表示成功,非0表示失败。 message: type: string description: 结果描述。 data: $ref: '#/definitions/WorkspaceMemberInfo' description: 工作空间成员信息对象。 MemberRole: type: string description: 工作空间成员角色。 enum: - OWNER - ADMIN - DEVELOPER - OPERATOR example: OWNER x-enum-descriptions: - 工作空间所有者,拥有最高权限 - 工作空间管理员,拥有管理权限 - 开发工程师,拥有开发操作权限 - 运维工程师,拥有运维操作权限 AddWorkspaceMemberReq: type: object description: 新增空间成员信息定义类。 properties: member_id: type: string description: 团队空间成员ID。 minLength: 1 maxLength: 64 pattern: ^[a-zA-Z0-9_-]+$ member_name: type: string description: 团队空间成员名称。 minLength: 1 maxLength: 64 pattern: ^[a-zA-Z0-9\u4e00-\u9fa5._-][a-zA-Z0-9\u4e00-\u9fa5._\- ]{0,63}$ member_source: type: string default: IAM description: 成员来源。 minLength: 1 maxLength: 128 role: $ref: '#/definitions/MemberRole' description: 成员角色(OWNER:工作空间所有者,ADMIN:工作空间管理员,DEVELOPER:开发工程师,OPERATOR:运维工程师)。 UpdateWorkspaceMemberReq: type: object description: 工作空间成员信息修改请求类。 properties: member_id: type: string description: IAM用户ID。 minLength: 1 maxLength: 64 pattern: ^[a-zA-Z0-9_-]+$ role: $ref: '#/definitions/MemberRole' description: 成员角色(OWNER:工作空间所有者,ADMIN:工作空间管理员,DEVELOPER:开发工程师,OPERATOR:运维工程师)。 DeleteWorkspaceMemberReq: type: object required: - user_ids properties: user_ids: type: array items: type: string description: 待移除的用户ID列表。 minItems: 1 maxItems: 1000 x-maxLength: 1000 CommonResponse: type: object description: 通用API响应结构。 required: - code - message properties: code: type: integer format: int32 description: 业务状态码(0表示成功,非0表示失败)。 example: 0 message: type: string description: 操作结果描述信息 example: "操作成功" data: type: object description: 响应数据(成功时返回具体业务数据,失败时可能为null)。 example: { } ErrorRsp: type: object description: 完整错误信息。 properties: error_code: type: string description: 错误码。 error_msg: type: string description: 错误信息。 details: type: array items: $ref: '#/definitions/ErrorDetail' description: 调用接口返回的错误信息。 ErrorDetail: type: object description: 错误信息 properties: error_code: type: string description: 错误码 error_msg: type: string description: 错误信息