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

查询模板详情

功能介绍

查询模板详情

调用方法

请参见如何调用API

URI

GET /v5/{tenant_id}/api/pipeline-templates/{template_id}

表1 路径参数

参数

是否必选

参数类型

描述

tenant_id

String

租户ID

template_id

String

模板ID

请求参数

响应参数

状态码: 200

表2 响应Body参数

参数

参数类型

描述

id

String

模板ID

name

String

模板名称

icon

String

模板图标

manifest_version

String

版本

language

String

模板语言

description

String

模板描述

is_system

Boolean

是否系统模板

region

String

所属局点

domain_id

String

所属租户ID

variables

Array of CustomVariable objects

自定义参数

creator_id

String

创建人ID

updater_id

String

编辑人ID

create_time

Integer

创建日期

update_time

Integer

更新日期

is_collect

String

是否收藏

is_show_source

Boolean

是否显示流水线源

definition

String

模板编排json,包含stages

表3 CustomVariable

参数

参数类型

描述

pipeline_id

String

流水线ID

name

String

自定义参数名称

sequence

Integer

自定义参数顺序

type

String

自定义参数类型

value

String

自定义参数默认值

is_secret

Boolean

是否私密参数

description

String

自定义参数描述

is_runtime

Boolean

是否运行时设置

limits

Array of objects

限定枚举值

is_reset

Boolean

是否重置

latest_value

String

最近一次参数值

runtime_value

String

运行时传入值

状态码: 400

表4 响应Body参数

参数

参数类型

描述

error_msg

String

错误信息

error_code

String

错误码

请求示例

查询流水线模板详情

GET https://{endpoint}/v5/a5f63758220947b7821e70ae2734c01d/api/pipeline-templates/deb18013bb6c4659b160b15fd7468644

响应示例

状态码: 200

OK

{
  "id" : "deb18013bb6c4659b160b15fd7468644",
  "name" : "新建流水线模板-20230112115711",
  "icon" : null,
  "manifest_version" : "3.0",
  "language" : "none",
  "description" : "",
  "is_system" : false,
  "region" : "region01",
  "domain_id" : "70ffec613024477bbaf266128bd9778d",
  "variables" : [ ],
  "creator_id" : "5ffd41c9df9d4506862ce27e209bb106",
  "updater_id" : "5ffd41c9df9d4506862ce27e209bb106",
  "create_time" : 1673495851000,
  "update_time" : 1673495851000,
  "is_collect" : null,
  "is_show_source" : true,
  "definition" : "{\"stages\":[{\"name\":\"阶段_1\",\"sequence\":\"0\",\"jobs\":[{\"stage_id\":1673495831907,\"identifier\":\"16734958501367554c26c-561b-4831-a906-e88316c8e674\",\"name\":\"新建任务\",\"depends_on\":[],\"timeout\":\"\",\"timeout_unit\":\"\",\"steps\":[],\"exec_type\":\"AGENTLESS_JOB\",\"sequence\":0}],\"identifier\":\"0\",\"pre\":[{\"task\":\"official_devcloud_autoTrigger\",\"sequence\":0}],\"post\":null,\"depends_on\":[],\"run_always\":false}]}"
}

状态码

状态码

描述

200

OK

400

Bad request

401

Unauthorized

403

Forbidden

404

Not Found

错误码

请参见错误码

分享:

    相关文档

    相关产品