Help Center/ CodeArts Repo/ API Reference/ APIs/ V4/ Repository/ Template Repository List
Updated on 2026-01-27 GMT+08:00

Template Repository List

Function

Template repository list.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

Authorization Information

Each account root user has all the permissions required to call all APIs, but IAM users must be assigned the following required identity policy-based permissions. For details about the required permissions, see Permissions Policies and Supported Actions.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

codeartsrepo:repository:getRepository

Read

-

-

-

-

URI

GET https://{hostURL}/v4/repository-templates

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Definition

Offset, which starts from 0.

Value range:

0~2147483647

Default value:

0

limit

No

Integer

Definition

Number of returned records.

Value range:

1~100

Default value:

20

platform

No

String

Definition:

Application type.

Constraints:

N/A.

Value range:

  • Android.

  • Console.

  • HarmonyOS.

  • OTHERS.

  • REST API.

  • ServiceStage.

  • Website.

  • Graphical user interface.

Default value:

N/A.

pipeline

No

String

Definition:

Whether to support automatic pipeline creation.

Constraints:

N/A.

Value range:

  • SupportPipeline: Yes.

  • UnsupportedPipeline: No.

Default value:

N/A.

Enumeration values:

  • SupportPipeline

  • UnsupportedPipeline

type

Yes

String

Definition:

Automatically create a pipeline.

Constraints:

N/A

Value range:

  • SYSTEM, USER: personal and official templates

  • SYSTEM: official template

  • USER: personal template

Default value:

N/A

Enumeration values:

  • SYSTEM,USER

  • SYSTEM

  • USER

search

No

String

Definition:

Search keyword. Templates are searched by template repository title.

Constraints:

N/A.

Value range:

0 to 50 characters.

Default value:

N/A.

enter_type

No

String

Definition:

Competition type.

Constraints:

N/A.

Value range:

  • AI.

  • Big data.

  • Mini program.

  • Microservice.

Default value:

N/A.

date_order

No

String

Definition:

Sort template repositories by creation time.

Constraints:

N/A.

Value range:

  • up: Ascending order.

  • down: Descending order.

Default value:

N/A.

Enumeration values:

  • up

  • down

language

No

String

Definition:

Programming language.

Constraints:

N/A.

Value range:

  • ArkTS.

  • ASP.NET.

  • C.

  • C#.

  • C++.

  • Go.

  • Groovy.

  • HTML.

  • Java.

  • NodeJS.

  • OTHERS.

  • PHP.

  • Python.

Default value:

N/A.

project_id

No

String

Definition:

You can obtain the unique project identifier, 32-character UUID, by calling the API used to query the project list.

Constraints:

If this parameter is not left blank, only the template repository that meets the search criteria in the current project is returned.

Value range:

32 characters.

Value range:

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. Obtain one by calling the IAM API Obtaining a User Token. The value of X-Subject-Token in the response header is a token.

Constraints

N/A

Range

1–100,000 characters.

Default Value

N/A

Response Parameters

Status code: 200

Table 3 Response header parameters

Parameter

Type

Description

X-Total

String

Total number of results of the current request.

Table 4 Response body parameters

Parameter

Type

Description

[items]

Array of RepositoryTemplateDto objects

Template repository list.

Table 5 RepositoryTemplateDto

Parameter

Type

Description

repository_id

Integer

Definition:

Repository ID.

Value range:

1~2147483647

name

String

Definition:

Template repository title.

Value range:

1 to 50 characters.

system

Boolean

Definition:

Whether the template is a system template.

Value range:

  • true: system template

  • false: personal template

tags

Array of strings

Definition:

Tag list.

Value range:

N/A.

description

String

Definition:

Repository description.

Value range:

0 to 2,000 characters.

language

String

Definition:

Programming language.

Value range:

0 to 32 characters.

repository_name

String

Definition:

Template repository name.

Value range:

0 to 255 characters.

brief_introduction

String

Definition:

Introduction to the template repository.

Value range:

0 to 32 characters.

created_at

String

Definition:

Creation time.

used_times

Integer

Definition:

Number of times that the template repository is used.

Value range:

0~2147483647

liked_times

Integer

Definition:

Number of likes of the template repository.

Value range:

0~2147483647

creator_name

String

Definition:

Author.

Value range:

0 to 128 characters.

https_url

String

Definition:

Git address of the repository using HTTPS.

Value range:

Max. 512 characters.

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

error_msg

String

Definition

Error message.

Status code: 403

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

error_msg

String

Definition

Error message.

Status code: 404

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

error_msg

String

Definition

Error message.

Example Requests

GET https://{endpoint}/v4/repository-templates

Example Responses

Status code: 200

Template repository list.

[ {
  "repository_id" : 10015,
  "name" : "Java Web Demo",
  "system" : true,
  "description" : "A Hello World applet compiled based on Spring boot",
  "language" : "Java",
  "tags" : [ "Java", "Website.", "SupportPipeline" ],
  "repository_name" : "javaWebDemo",
  "brief_introduction" : "A Hello World applet compiled based on Spring boot",
  "created_at" : "2021-06-07T13:18:38.000Z",
  "used_times" : 2976,
  "liked_times" : 0,
  "creator_name" : "CodeArts",
  "https_url" : "https://example.com/demo_group_name/javaWebDemo.git"
} ]

Status code: 401

Unauthorized

{
  "error_code" : "DEV.00000003",
  "error_msg" : "Authentication information expired."
}

Status code: 403

Bad Request

{
  "error_code" : "CH.004403",
  "error_msg" : "Insufficient permissions. Apply for the required permissions and try again."
}

Status code: 404

Not Found

{
  "error_code" : "DEV-23-50527",
  "error_msg" : "The repository does not exist or has been deleted."
}

Status Codes

Status Code

Description

200

Template repository list.

401

Unauthorized

403

Bad Request

404

Not Found

Error Codes

See Error Codes.