Updated on 2024-05-08 GMT+08:00

Querying Template Details

Function

This API is used to query template details.

Calling Method

For details, see Calling APIs.

URI

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

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

tenant_id

Yes

String

Tenant ID.

template_id

Yes

String

Template ID.

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

id

String

Template ID.

name

String

Template name.

icon

String

Template icon.

manifest_version

String

Version.

language

String

Template language.

description

String

Template description.

is_system

Boolean

Whether the template is a system template.

region

String

Region.

domain_id

String

Tenant ID.

variables

Array of CustomVariable objects

Custom parameter.

creator_id

String

Creator ID.

updater_id

String

Editor ID.

create_time

Integer

Creation date.

update_time

Integer

Update date.

is_collect

String

Whether to follow or not.

is_show_source

Boolean

Whether to display the pipeline source.

definition

String

Template orchestration JSON file, including stages.

Table 3 CustomVariable

Parameter

Type

Description

pipeline_id

String

Pipeline ID.

name

String

Custom parameter name.

sequence

Integer

Custom parameter sequence.

type

String

Custom parameter type.

value

String

Default values of custom parameters.

is_secret

Boolean

Private parameter or not.

description

String

Custom parameter description.

is_runtime

Boolean

Runtime setting or not.

limits

Array of objects

Limited enumerated value.

is_reset

Boolean

Reset or not.

latest_value

String

Latest parameter value.

runtime_value

String

Runtime input value.

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_msg

String

Error message.

error_code

String

Error code.

Example Requests

Querying Pipeline Template Details

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

Example Responses

Status code: 200

OK

{
  "id" : "deb18013bb6c4659b160b15fd7468644",
  "name" : "Creating a Pipeline Template-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\":\"Phase _1\",\"sequence\":\"0\",\"jobs\":[{\"stage_id\":1673495831907,\"identifier\":\"16734958501367554c26c-561b-4831-a906-e88316c8e674\",\"name\": \"New Task\",\"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}]}"
}

Status Codes

Status Code

Description

200

OK

400

Bad request

401

Unauthorized

403

Forbidden

404

Not Found

Error Codes

See Error Codes.