文档首页/ 流水线 CodeArts Pipeline/ API参考/ API/ 流水线管理/ 查询流水线可用的系统参数
更新时间:2024-08-22 GMT+08:00
分享

查询流水线可用的系统参数

功能介绍

查询流水线可用的系统参数

调用方法

请参见如何调用API

URI

GET /v5/{project_id}/api/pipelines/{pipeline_id}/list-system-vars

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

参数解释: CodeArts项目ID。 约束限制: 不涉及 取值范围: 32位字符。 默认取值: 不涉及。

pipeline_id

String

参数解释: 流水线ID。 约束限制: 不涉及 取值范围: 32位字符。 默认取值: 不涉及。

请求参数

响应参数

状态码: 200

表2 响应Body参数

参数

参数类型

描述

[数组元素]

Array of ListPipelineSystemVarsResp objects

响应体

表3 ListPipelineSystemVarsResp

参数

参数类型

描述

name

String

参数名称

value

String

参数值

type

String

参数类型

description

String

参数描述

isShow

Boolean

是否展示

ordinal

Integer

参数序号

isAlias

Boolean

参数别名

kind

String

参数上下文类型

contextName

String

上下文名称

sourceIdentifier

String

标识符

请求示例

https://(endpoint)/v5/e2e18230a85d4d6ab0b56cb6d2246c18/api/pipelines/0747d5a7099e45f69dc1d099945909a9/list-system-vars

响应示例

状态码: 200

响应体

[ {
  "name" : "PROJECT_ID",
  "value" : null,
  "type" : "string",
  "description" : "当前流水线所属项目ID",
  "isShow" : true,
  "ordinal" : 0,
  "isAlias" : false,
  "kind" : null,
  "contextName" : null,
  "sourceIdentifier" : null
}, {
  "name" : "PIPELINE_ID",
  "value" : null,
  "type" : "string",
  "description" : "当前流水线ID",
  "isShow" : true,
  "ordinal" : 1,
  "isAlias" : false,
  "kind" : null,
  "contextName" : null,
  "sourceIdentifier" : null
}, {
  "name" : "PIPELINE_NUMBER",
  "value" : null,
  "type" : "string",
  "description" : "流水线执行编号",
  "isShow" : true,
  "ordinal" : 2,
  "isAlias" : false,
  "kind" : null,
  "contextName" : null,
  "sourceIdentifier" : null
}, {
  "name" : "COMMIT_ID",
  "value" : null,
  "type" : "string",
  "description" : "执行时代码最后一次提交的ID",
  "isShow" : true,
  "ordinal" : 3,
  "isAlias" : false,
  "kind" : null,
  "contextName" : null,
  "sourceIdentifier" : null
}, {
  "name" : "COMMIT_ID_SHORT",
  "value" : null,
  "type" : "string",
  "description" : "执行时代码最后一次提交的短ID",
  "isShow" : true,
  "ordinal" : 4,
  "isAlias" : false,
  "kind" : null,
  "contextName" : null,
  "sourceIdentifier" : null
}, {
  "name" : "TIMESTAMP",
  "value" : null,
  "type" : "string",
  "description" : "流水线执行时间戳。例如:20211222124301",
  "isShow" : true,
  "ordinal" : 5,
  "isAlias" : false,
  "kind" : null,
  "contextName" : null,
  "sourceIdentifier" : null
}, {
  "name" : "PIPELINE_TRIGGER_TYPE",
  "value" : null,
  "type" : "string",
  "description" : "流水线触发类型,包括Manual,Scheduler,RollBack,以及WebHook类型:CreateTag,Note,Issue,MR,Push",
  "isShow" : true,
  "ordinal" : 6,
  "isAlias" : false,
  "kind" : null,
  "contextName" : null,
  "sourceIdentifier" : null
}, {
  "name" : "REPO_URL",
  "value" : null,
  "type" : "string",
  "description" : "代码仓地址(HTTPS)",
  "isShow" : true,
  "ordinal" : 11,
  "isAlias" : false,
  "kind" : null,
  "contextName" : null,
  "sourceIdentifier" : null
}, {
  "name" : "PIPELINE_RUN_ID",
  "value" : null,
  "type" : "string",
  "description" : "流水线执行ID",
  "isShow" : true,
  "ordinal" : 24,
  "isAlias" : false,
  "kind" : null,
  "contextName" : null,
  "sourceIdentifier" : null
}, {
  "name" : "MERGE_ID",
  "value" : null,
  "type" : "string",
  "description" : "合并请求ID",
  "isShow" : true,
  "ordinal" : 25,
  "isAlias" : false,
  "kind" : null,
  "contextName" : null,
  "sourceIdentifier" : null
}, {
  "name" : "WEBHOOK_PAYLOAD",
  "value" : null,
  "type" : "string",
  "description" : "Webhook 请求负载信息",
  "isShow" : true,
  "ordinal" : 27,
  "isAlias" : false,
  "kind" : null,
  "contextName" : null,
  "sourceIdentifier" : null
} ]

状态码

状态码

描述

200

响应体

错误码

请参见错误码

相关文档