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.
URI
GET https://{hostURL}/v4/repository-templates
| 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: Default value: N/A. |
| pipeline | No | String | Definition: Whether to support automatic pipeline creation. Constraints: N/A. Value range: Default value: N/A. Enumeration values: |
| type | Yes | String | Definition: Automatically create a pipeline. Constraints: N/A Value range: Default value: N/A Enumeration values: |
| 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: Default value: N/A. |
| date_order | No | String | Definition: Sort template repositories by creation time. Constraints: N/A. Value range: Default value: N/A. Enumeration values: |
| language | No | String | Definition: Programming language. Constraints: N/A. Value range: 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. Value range: 32 characters |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User token. Obtain a token by calling the IAM API for obtaining a user token. The value of X-Subject-Token in the response header is the user token. Constraints Mandatory. Range 1–100,000 characters. Default Value N/A. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| X-Total | String | Total number of results of the current request. |
| Parameter | Type | Description |
|---|---|---|
| [items] | Array of RepositoryTemplateDto objects | Template repository list. |
| 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: |
| 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
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition Error code. |
| error_msg | String | Definition Error message. |
Status code: 403
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition Error code. |
| error_msg | String | Definition Error message. |
Status code: 404
| 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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.