更新时间:2024-08-22 GMT+08:00
分享

查询流水线上的变更

功能介绍

查询流水线上的变更

调用方法

请参见如何调用API

URI

POST /v2/{cloudProjectId}/pipeline/change-requests/search

表1 路径参数

参数

是否必选

参数类型

描述

cloudProjectId

String

项目ID

请求参数

表2 请求Body参数

参数

是否必选

参数类型

描述

component_id

String

微服务ID

limit

Integer

页大小

offset

Integer

偏移

statuses

Array of strings

变更状态

title

String

变更名

响应参数

状态码: 200

表3 响应Body参数

参数

参数类型

描述

total

Integer

记录数

data

Array of ChangeRequestVO objects

变更记录

表4 ChangeRequestVO

参数

参数类型

描述

id

String

变更ID

component_id

String

微服务ID

status

String

状态

title

String

标题

repos

Array of repos objects

变更代码仓信息

workitem_ids

Array of strings

工作项ID

release_time

String

发布时间

creator_id

String

创建人ID

creator_name

String

创建人名称

create_time

String

创建时间

updater_id

String

更新人ID

updater_name

String

更新人名称

update_time

String

更新时间

表5 repos

参数

参数类型

描述

repo_id

String

Repo代码仓ID

http_url

String

代码仓HTTP地址

git_url

String

代码仓GIT地址

feature_branch

String

特性分支

main_branch

String

默认分支

delete_branch_after_released

Boolean

发布后是否删除特性分支

请求示例

POST https://{endpoint}/v2/2d09f712e9504b61b034cc8f40e475a8/pipeline/change-requests/search

{
  "component_id" : "f7ced2341b204d2b82c607c6f0de5b4a",
  "limit" : 10,
  "offset" : 0,
  "statuses" : [ "releasing", "to_be_released" ],
  "title" : ""
}

响应示例

状态码: 200

分页变更数据

{
  "total" : 1,
  "data" : [ {
    "id" : "adebc0cd4e9f44dfb92a6f5ad5106c2b",
    "component_id" : "f7ced2341b204d2b82c607c6f0de5b4a",
    "status" : "developing",
    "title" : "11",
    "repos" : [ {
      "repo_id" : "804934",
      "http_url" : "https://example.com/test00001/maven.git",
      "git_url" : "git@example.com:test00001/maven.git",
      "feature_branch" : "aaa",
      "main_branch" : "master",
      "delete_branch_after_released" : false
    } ],
    "workitem_ids" : null,
    "release_time" : null,
    "creator_id" : "05d8ca972f114765a8984795a8aa4d41",
    "creator_name" : "test5",
    "create_time" : "1719231005",
    "updater_id" : "05d8ca972f114765a8984795a8aa4d41",
    "updater_name" : "test5",
    "update_time" : "1719231005"
  } ]
}

状态码

状态码

描述

200

分页变更数据

错误码

请参见错误码

相关文档