Help Center/ CodeArts Repo/ API Reference (Ally Region)/ APIs/ Repository/ Obtaining a Public Template List
Updated on 2026-01-08 GMT+08:00

Obtaining a Public Template List

Description

This API is used to obtain a public template list.

URI

GET /v2/repositories/repository-templates

Table 1 Query Parameters

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

Templates date order

used_time_order

No

String

Template reference time

type

No

String

Template visibility

region

No

String

Region name

page_no

Yes

Integer

Page number

page_size

Yes

Integer

Number of data records on each page

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

error

Error object

Response error

result

TemplateRepositoryList object

Response result

status

String

Response status

Table 4 Error

Parameter

Type

Description

code

String

Error codes

message

String

Error message

Table 5 TemplateRepositoryList

Parameter

Type

Description

projects

Array of TemplateRepository objects

Template list

total

Integer

Total number of templates

Table 6 TemplateRepository

Parameter

Type

Description

id

Integer

Template unique ID

name

String

Template name

template_name

String

Name of the repository associated with the template

tags

Array of strings

Template tag

description

String

Template description

brief_introduction

String

Template overview

auto_pending_pipelines

Integer

Whether to automatically create a pipeline

language

String

Template language category

created_at

String

Template creation time

used_times

Integer

Template reference time

liked_times

Integer

Likes

creator_name

String

Template creator

https_url

String

Template HTTPS link

Request Examples

GET https://{endpoint}/v2/repositories/repository-templates?page_no=1&page_size=10

Response Examples

Status code: 200

Request succeeded

{
  "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.test.com/chentest00001/javaMavenDemo.git"
    } ],
    "total" : 100
  },
  "status" : "success"
}

Status Codes

Status Codes

Description

200

Request succeeded

Error Codes

See Error Codes.