Listing Templates
Function
Querying the Pipeline Template List
URI
POST /v5/{tenant_id}/api/pipeline-templates/list
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
tenant_id |
Yes |
String |
TenantID |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
language |
No |
String |
Language |
is_system |
No |
Boolean |
Indicates whether the template is a system template. |
name |
No |
String |
The template name. |
offset |
No |
Long |
Offset from which the query starts. The value of offset is greater than or equal to 0. The default value is 0. |
limit |
No |
Long |
Number of items queried each time. |
sort_key |
No |
String |
Field used for sorting, which is optional. The value can be name or create_time. |
sort_dir |
No |
String |
Sorting type, which is optional. asc: by sorting field in ascending order; desc: by sorting field in descending order |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
offset |
Integer |
Specifies the initial offset. |
limit |
Integer |
Number of records displayed on each page. |
total |
Integer |
Total number. |
templates |
Array of PipelineTemplateSimpleVO objects |
Pipeline Template List |
Parameter |
Type |
Description |
---|---|---|
id |
String |
The template ID. |
name |
String |
The template name. |
icon |
String |
Template Icon |
manifest_version |
String |
Version |
language |
String |
Language |
description |
String |
Template Description |
is_system |
Boolean |
Indicates whether the template is a system template. |
region |
String |
Template Site |
domain_id |
String |
ID of the tenant to which the template belongs. |
creator_id |
String |
Template Creator ID |
creator_name |
String |
Template Creator Name |
updater_id |
String |
Template Updater ID |
create_time |
Integer |
Created |
update_time |
Integer |
Updated |
is_collect |
Boolean |
Favorite |
is_show_source |
String |
Indicates whether to display the pipeline source. |
stages |
Array of stages objects |
Template Orchestration stages |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_msg |
String |
Error Message |
error_code |
String |
Error code. |
Example Requests
This API is used to query the pipeline template list. Set the start offset to 0 and the number to 3.
POST https://{endpoint}/v5/a5f63758220947b7821e70ae2734c01d/api/pipeline-templates/list { "is_system" : "", "offset" : 0, "limit" : 3, "name" : "" }
Example Responses
Status code: 200
OK
{ "offset" : 0, "limit" : 3, "total" : 19, "templates" : [ { "id" : "e908740fe06e44a28f30c0f3c81b2ad5", "name" : "Serverless-maven Compilation and Deployment", "icon" : "maven60", "manifest_version" : "3.0", "language" : "Java", "description" : "Use Maven to build and deploy serverless project code.", "is_system" : true, "region" : "system", "domain_id" : "system", "creator_id" : "system", "creator_name" : "system", "updater_id" : "e908740fe06e44a28f30c0f3c81b2ad5", "create_time" : 1671172288000, "update_time" : 1677640980000, "is_collect" : true, "is_show_source" : null, "stages" : [ { "name" : "Build and Check", "sequence" : 0 }, { "name" : "Deployment and Test", "sequence" : 1 } ] }, { "id" : "ac3b3b9a6cb64ef6b732c8f8459ab578", "name" : "Building a Container Image on a Node", "icon" : "npm60", "manifest_version" : "3.0", "language" : "Node.js", "description" : "Use nodes to build container images and push them to SWR for storage.", "is_system" : true, "region" : "system", "domain_id" : "system", "creator_id" : "system", "creator_name" : "system", "updater_id" : "ac3b3b9a6cb64ef6b732c8f8459ab578", "create_time" : 1671172288000, "update_time" : 1677640980000, "is_collect" : true, "is_show_source" : null, "stages" : [ { "name" : "Build", "sequence" : 0 } ] }, { "id" : "8ea4d170ba0d45d9b1b647a9780ebcf8", "name" : "Get Started", "icon" : null, "manifest_version" : "3.0", "language" : "java", "description" : "Pipeline template for beginners", "is_system" : true, "region" : "system", "domain_id" : "system", "creator_id" : "system", "creator_name" : "system", "updater_id" : "ac3b3b9a6cb64ef6b732c8f8459ab578", "create_time" : 1680769082000, "update_time" : 1680770243000, "is_collect" : false, "is_show_source" : null, "stages" : [ { "name" : "Code check", "sequence" : 0 }, { "name" : "Build Phase", "sequence" : 1 }, { "name" : "Deployment and Publish", "sequence" : 2 } ] } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.