Updated on 2025-11-12 GMT+08:00

Obtaining Pipeline Templates

Function

This API is used to query pipeline templates.

Calling Method

For details, see Calling APIs.

URI

POST /v3/pipeline/templates/list

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition:

User token. Obtain a token (the value of the X-Subject-Token response header) by calling the IAM API forobtaining a user token.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

X-Language

No

String

Definition:

Language type.

Constraints:

N/A

Value range:

  • zh-cn: Chinese.

  • en-us: English.

Default value:

en-us.

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

is_system

No

Boolean

Definition:

Whether the template is a system template.

Constraints:

N/A

Value range:

  • true: The template is a system template.

  • false: The template is not a system template.

Default value:

N/A

template_name

No

String

Definition:

Template name.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

offset

No

Long

Definition:

Offset where the query starts.

Constraints:

N/A

Value range:

The offset value must be no less than 0.

Default value:

0.

limit

No

Long

Definition:

Number of records of each query.

Constraints:

N/A

Value range:

The value is no less than 0.

Default value:

10.

sort_key

No

String

Definition:

(Optional) Field for sorting.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

sort_dir

No

String

Definition:

(Optional) Sorting type.

Constraints:

N/A

Value range:

  • asc: by sorting field in ascending order.

  • desc: by sorting field in descending order.

Default value:

N/A

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

offset

Integer

Parameter description:

Initial offset.

Value range:

None.

limit

Integer

Parameter description:

Number of queried records.

Value range:

None.

total

Integer

Parameter description:

Total number of records.

Value range:

None.

templates

Array of PipelineTemplateSimpleVO objects

Parameter description:

Pipeline template list, including details about pipeline templates.

Value Range:

N/A.

Table 4 PipelineTemplateSimpleVO

Parameter

Type

Description

id

String

Definition:

Template ID.

Value range:

The value consists of 32 characters, including digits and letters.

name

String

Parameter description:

Template name.

Value range:

None.

icon

String

Parameter description:

Template icon.

Value range:

None.

manifest_version

String

Parameter description:

Version.

Value range:

The default value is 3.0.

language

String

Definition:

Template language.

Value range:

  • Java.

  • Python.

  • Node.js.

  • Go.

  • .NET.

  • cpp.

  • PHP.

  • Other.

  • None.

description

String

Parameter description:

Template description.

Value range:

None.

is_system

Boolean

Definition:

Whether the template is a system template.

Value range:

  • true: The template is a system template.

  • false: The template is not a system template.

region

String

Parameter description:

Template region.

Value range:

None.

domain_id

String

Definition:

ID of the tenant to which the template belongs.

Value range:

The value consists of 32 characters, including digits and letters.

creator_id

String

Definition:

Template creator ID.

Value range:

The value consists of 32 characters, including digits and letters.

creator_name

String

Parameter description:

Template creator name.

Value range:

None.

updater_id

String

Definition:

Template updater ID.

Value range:

The value consists of 32 characters, including digits and letters.

create_time

Integer

Parameter description:

Creation time.

Value range:

None.

update_time

Integer

Parameter description:

Update time.

Value range:

None.

is_collect

Boolean

Definition:

Whether to add the object to favorites.

Value range:

  • true: Add the object to favorites.

  • false: Do not add the object to favorites.

is_show_source

String

Definition:

Whether to display the pipeline source.

Value range:

  • true: The pipeline source is displayed.

  • false: The pipeline source is not displayed.

stages

Array of stages objects

Parameter description:

Stages of template orchestration.

Constraints:

N/A

Table 5 stages

Parameter

Type

Description

name

String

Parameter description:

Stage name.

Value range:

Enter only letters, digits, hyphens (-), underscores (_), commas (,), semicolons (;), colons (:), periods (.), slashes (/), parentheses (), and spaces. The name cannot start or end with a space, and the length is 1128 characters.

sequence

Integer

Parameter description:

Stage sequence.

Value range:

No less than 0.

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_msg

String

Parameter description:

Error message.

Value range:

N/A

error_code

String

Parameter description:

Error code.

Value range:

N/A

Example Requests

POST https://{endpoint}/v3/pipeline/templates/list

{
  "template_name" : "1",
  "is_system" : "true",
  "sort_key" : "template_name",
  "sort_dir" : "asc",
  "offset" : 1,
  "limit" : 20
}

Example Responses

Status code: 200

OK

{
  "offset" : 10,
  "limit" : 2,
  "total" : 423,
  "result" : [ {
    "watched" : "true",
    "icon" : "pure-tomato",
    "id" : "ed3a99ae76b346818d6b2d09422d166d",
    "name" : "template-20221201154239",
    "user_id" : "847a5317086c41798469d0868535943a",
    "user_name" : "Beta environment account",
    "domain_id" : "ce8df55870164338a72d7e828a966a2a",
    "domain_name" : "devcloud_devcloud_h00485561_01",
    "description" : "",
    "create_time" : "2022-12-01 15:43:00",
    "modify_time" : "2024-04-15 16:51:31",
    "is_system" : 0
  }, {
    "watched" : "true",
    "icon" : "pure-mint",
    "id" : "8f5ed64c74464866b771d9c982648efb",
    "name" : "testttttt",
    "user_id" : "fbee1146498c465d851c1b8dd2a253c6",
    "user_name" : null,
    "domain_id" : "ce8df55870164338a72d7e828a966a2a",
    "domain_name" : "devcloud_devcloud_h00485561_01",
    "description" : "",
    "create_time" : "2022-12-01 09:04:56",
    "modify_time" : "2022-12-01 09:04:56",
    "is_system" : 0
  } ]
}

Status Codes

Status Code

Description

200

OK

400

Bad request

401

Unauthorized

403

Forbidden

404

Not Found

Error Codes

See Error Codes.