适用版本 | 中心版、Region版 |
服务接入点与授权信息
产品 | 资源 | 所需权限 |
应用交付 | 研发阶段 | 读写 |
请求语法
中心版
POST https://{domain}/oapi/v1/appstack/organizations/{organizationId}/apps/{appName}/releaseWorkflows/{releaseWorkflowSn}/releaseStages/{releaseStageSn}:executeRegion版
POST https://{domain}/oapi/v1/appstack/apps/{appName}/releaseWorkflows/{releaseWorkflowSn}/releaseStages/{releaseStageSn}:execute请求头
参数 | 类型 | 是否必填 | 描述 | 示例值 |
x-yunxiao-token | string | 是 | 个人访问令牌。 | pt-0fh3****0fbG_35af****0484 |
请求参数
参数 | 类型 | 位置 | 是否必填 | 描述 | 示例值 |
appName | string | path | 是 | 应用名。 | my-web-service |
releaseWorkflowSn | string | path | 是 | 发布流程唯一序列号。 | 3f472a12b15d4f418ad6227bb85f787c |
releaseStageSn | string | path | 是 | 发布流程阶段唯一序列号。 | 6b4c53eee9a842c6a11235b29d002a81 |
organizationId | string | path |
| 组织 ID。 | ec766e63aee3437d9a51f334d6exe671 |
| - | object | body | 否 | 执行流水线请求。 | |
params | object | body | 否 | 运行流水线参数(支持使用代码库指定分支触发运行,格式: "sourceId": "分支" )。支持使用变更运行研发阶段,参考示例值中的 releaseBranchRepoInfo。 | { |
请求示例
中心版
curl -X 'POST' \
'https://{domain}/oapi/v1/appstack/organizations/ec766e63aee3437d9a51f334d6exe671/apps/my-web-service/releaseWorkflows/3f472a12b15d4f418ad6227bb85f787c/releaseStages/6b4c53eee9a842c6a11235b29d002a81:execute' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"params": {
"${sourceId}": "branch",
"FLOW_INST_RUNNING_COMMENT": "运行备注1",
"k1": "v1",
"releaseBranchRepoInfo": {
"baseBranch": {
"branchName": "master"
},
"featureBranchs": [
{
"branchName": "feature/20251216_1",
"changeRequestSn": "25500xxxxxxaaf9855"
}
],
"needCreateBranch": false,
"releaseBranch": {
"branchName": "release/xxxxx_release_4468686_2"
},
"repo": "https://codeup.aliyun.com/xxxxxx/codeDemo.git"
}
}
}'Region版
curl -X 'POST' \
'https://{domain}/oapi/v1/appstack/apps/my-web-service/releaseWorkflows/3f472a12b15d4f418ad6227bb85f787c/releaseStages/6b4c53eee9a842c6a11235b29d002a81:execute' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"params": {
"${sourceId}": "branch",
"FLOW_INST_RUNNING_COMMENT": "运行备注1",
"k1": "v1",
"releaseBranchRepoInfo": {
"baseBranch": {
"branchName": "master"
},
"featureBranchs": [
{
"branchName": "feature/20251216_1",
"changeRequestSn": "25500xxxxxxaaf9855"
}
],
"needCreateBranch": false,
"releaseBranch": {
"branchName": "release/xxxxx_release_4468686_2"
},
"repo": "https://codeup.aliyun.com/xxxxxx/codeDemo.git"
}
}
}'返回参数
参数 | 类型 | 描述 | 示例值 |
| - | object | 执行流水线阶段结果。 | |
object | number | 流水线对象。 | 1 |
返回示例
{
"object": 1
}错误码
访问错误码中心查看 API 相关错误码。