Obtaining the List of Public Sample Templates
Function
Obtaining the List of Public Sample Templates
URI
GET /v2/repositories/repository-templates
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
platform |
No |
String |
Template Platform Type |
language |
No |
String |
Language |
pipeline |
No |
String |
Whether pipelines are supported |
enter_type |
No |
String |
Template category |
search |
No |
String |
Template Name |
date_order |
No |
String |
Sorting Templates by Date |
used_time_order |
No |
String |
Sorting Profile Reference Times |
type |
No |
String |
Template Public Type |
region |
No |
String |
Region Name |
page_no |
Yes |
Integer |
Indicates the page number. |
page_size |
Yes |
Integer |
Number of data records on each page |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Specifies the user token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
error |
Error object |
Response error. |
result |
TemplateRepositoryList object |
Result |
status |
String |
Status code in a response |
Parameter |
Type |
Description |
---|---|---|
projects |
Array of TemplateRepository objects |
Template list |
total |
Integer |
Templates |
Parameter |
Type |
Description |
---|---|---|
id |
Integer |
Unique ID of a template. |
name |
String |
Template Name |
template_name |
String |
Name of the warehouse associated with the template. |
tags |
Array of strings |
Template Label |
description |
String |
Description |
brief_introduction |
String |
Introduction to Model Templates |
auto_pending_pipelines |
Integer |
Whether to automatically create a pipeline |
language |
String |
Template Language Classification |
created_at |
String |
Time when the template was created. |
used_times |
Integer |
Number of times a profile is referenced |
liked_times |
Integer |
Number of times that a template is liked. |
creator_name |
String |
Template Creator |
https_url |
String |
Template HTTPS Link |
Example Requests
GET https://{endpoint}/v2/repositories/repository-templates?page_no=1&page_size=10
Example Responses
Status code: 200
OK
{ "result" : { "projects" : [ { "id" : 453613, "name" : "javaMavenDemo", "template_name" : "javaMavenDemo", "tags" : [ "UnsupportedPipeline", "OTHERS", "Kunpeng ARM64" ], "description" : "javaMavenDemo", "brief_introduction" : "javaMavenDemo", "auto_pending_pipelines" : 0, "language" : "OTHERS", "created_at" : "Sep 25, 2019 4:03:31 PM", "used_times" : 58, "liked_times" : 1, "creator_name" : "repo", "https_url" : "https://repo.alpha.devcloud.inhuawei.com/chentest00001/javaMavenDemo.git" } ], "total" : 100 }, "status" : "success" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot