UpdateGroup - 更新代码组信息

更新时间:
复制 MD 格式

更新单个代码组信息,以pathWithNamespace作为唯一标识。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

当前API暂无授权信息透出。

请求语法

PUT /groups/modify HTTP/1.1

请求参数

名称

类型

必填

描述

示例值

organizationId

string

是

企业标识,也称企业 ID,字符串形式,可在云效访问链接中获取,如 https://devops.aliyun.com/organization/【OrganizationId】

1e9903d8b3f1xxxxxf9286ef5

accessToken

string

否

个人访问令牌。 使用阿里云 AK+SK 或使用 STS 临时授权方式不需要传该字段

f0b1e61dxxxxxxx975a93f9129d2513

body

object

是

请求 Body

pathWithNamespace

string

是

代码组完整路径(含父路径)

org/group/subgroup/here

name

string

是

代码组名称

codeup_group

path

string

是

代码组路径

codeup_group

visibilityLevel

integer

否

代码组的可见性

  • 0:私有

  • 10:企业可见

10

description

string

否

代码组描述

描述信息的具体内容

avatarUrl

string

否

代码组的头像地址

https://tcs-devops.aliyuncs.com/thumbnail/112afcb7a6a35c3f67f1bea827c4/w/100/h/100

返回参数

名称

类型

描述

示例值

object

Schema of Response

requestId

string

请求 ID

ASSDS-ASSASX-XSAXSA-XSAXSAXS

errorCode

string

错误码

success

errorMessage

string

错误信息

InvalidParam.NoPermission

success

boolean

调用是否成功

true

result

object

返回详情结果

id

integer

代码组主键 ID

30815

pathWithNamespace

string

代码组完整路径(含父路径)

codeup-test-org/test-codeup

nameWithNamespace

string

代码组完整名称(含父路径)

codeup-test-org / codeup(斜杠两侧有空格)

name

string

代码组名称

codeup

path

string

代码组路径

test-codeup

ownerId

integer

拥有者 ID

19230

parentId

integer

父路径 ID

26842

description

string

代码组的描述信息

描述信息的具体内容

avatarUrl

string

代码组头像地址

https://tcs-devops.aliyuncs.com/thumbnail/112afcb7a6a35c4ef67f1bea827c4/w/100/h/100

webUrl

string

页面访问时的 URL

""

type

string

类型,默认为 Group

Group

visibilityLevel

integer

代码组的可见性

  • 0:私有

  • 10:企业可见

10

示例

正常返回示例

JSON格式

{
  "requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS",
  "errorCode": "success",
  "errorMessage": "InvalidParam.NoPermission",
  "success": true,
  "result": {
    "id": 30815,
    "pathWithNamespace": "codeup-test-org/test-codeup",
    "nameWithNamespace": "codeup-test-org / codeup(斜杠两侧有空格)",
    "name": "codeup",
    "path": "test-codeup",
    "ownerId": 19230,
    "parentId": 26842,
    "description": "描述信息的具体内容",
    "avatarUrl": "https://tcs-devops.aliyuncs.com/thumbnail/112afcb7a6a35c4ef67f1bea827c4/w/100/h/100",
    "webUrl": "\"\"",
    "type": "Group",
    "visibilityLevel": 10
  }
}

错误码

HTTP status code

错误码

错误信息

描述

403 Forbidden.UserNotAdminOrOwner The current user is not an admin or owner in the organization and is not authorized to perform the operation. 当前用户非该企业管理员或拥有者,无权进行操作。

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情。