创建代码库标签(Tag)。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求语法
POST /repository/{repositoryId}/tags/create
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 | 
|---|---|---|---|---|
| organizationId | string | 是 | 企业标识,也称企业 id,字符串形式,可在云效访问链接中获取,如 https://devops.aliyun.com/organization/【OrganizationId】 | 60de7a6852743a5162b5f957 | 
| accessToken | string | 否 | 个人访问令牌。 使用阿里云 AK+SK 或使用 STS 临时授权方式不需要传该字段 | f0b1e61db5961df5975a93f9129d2513 | 
| repositoryId | long | 是 | 代码库 ID | 2080972 | 
| body | object | 是 | 请求 Body | |
| tagName | string | 是 | 标签名 | v1.0 | 
| ref | string | 是 | 标签创建的来源,可以为分支名称、标签名称或提交版本 | master | 
| message | string | 否 | 标签的描述信息 | 描述信息 | 
返回参数
示例
正常返回示例
JSON格式
{
  "requestId": "F7B85D1B-D1C2-140F-A039-341859F130B9",
  "errorCode": "SYSTEM_UNKNOWN_ERROR",
  "errorMessage": "\"\"",
  "success": true,
  "result": {
    "id": "0e3b6aa5eab2b086b59fde74766b28d4e5faab0d",
    "name": "v1.0",
    "message": "描述内容",
    "commit": {
      "id": "e0297d8fb0393c833a8531e7cc8832739e3cba6d",
      "shortId": "e0297d8f",
      "title": "提交标题\n",
      "message": "具体的提交内容\n",
      "createdAt": "2022-03-18 10:00:00",
      "authorName": "阿里云云效",
      "authorEmail": "username@example.com",
      "authoredDate": "2022-03-18 10:00:00",
      "committerName": "阿里云云效committer",
      "committerEmail": "username@example.com",
      "committedDate": "2022-03-18 09:00:00",
      "parentIds": [
        "34d2c47c7ce46a5c4639c5ffe208a66dda975a05"
      ]
    }
  }
}错误码
| HTTP status code | 错误码 | 错误信息 | 描述 | 
|---|---|---|---|
| 403 | Forbidden.AccessDenied | The user is not authorized to perform the operation. | 用户无权限执行相关操作 | 
| 403 | Forbidden.UserNotInCurrentOrganization | The user is not in the organization and is not authorized to perform the operation. | 当前用户不在该企业中,无权进行操作。 | 
访问错误中心查看更多错误码。
变更历史
| 变更时间 | 变更内容概要 | 操作 | 
|---|
暂无变更历史
