All Products
Search
Document Center

Alibaba Cloud DevOps:ListTemplateRepositories - Query the list of template repositories

Last Updated:Jun 22, 2026

Queries the list of template repositories.

Endpoint and authorization information

Product

Resource

Required permission

Code Management

Code repository

Read-only

Request syntax

GET https://{domain}/oapi/v1/codeup/organizations/repositories/templates

Request headers

Parameter

Type

Required

Description

Example value

x-yunxiao-token

string

Yes

Personal access token.

pt-0fh3****0fbG_35af****0484

Request parameters

Parameter

Type

Location

Required

Description

Example value

page

integer

query

No

The page number. Default value: 1. Maximum value: 150.

1

perPage

integer

query

No

The number of entries per page. Default value: 20. Valid values: 1 to 100.

20

templateType

integer

query

Yes

The template type. Valid values: 1 (custom template repository) and 2 (system built-in template repository).

2

Request examples

curl -X 'GET' \
  'https://{domain}/oapi/v1/codeup/organizations/repositories/templates?page=1&perPage=20&templateType=2' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Response parameters

Parameter

Type

Description

Example value

-

array

-

object

avatarUrl

string

The avatar URL of the repository.

https://example/example/w/100/h/100

description

string

The description of the repository.

The description of the template repository

name

string

The name of the repository.

template-repo

path

string

The full path of the repository. Null for system preset templates.

null

projectId

integer

The ID of the template repository.

1

Response example

[
    {
        "avatarUrl": "https://example/example/w/100/h/100",
        "description": "The description of the template repository",
        "name": "template-repo",
        "path": "null",
        "projectId": 1
    }
]

Response headers

Parameter

Description

Example value

x-next-page

The next page.

3

x-page

The current page.

2

x-per-page

The number of entries per page.

20

x-prev-page

The previous page.

1

x-request-id

The request ID.

37294673-00CA-5B8B-914F-A8B35511E90A

x-total

The total number of entries.

50

x-total-pages

The total number of pages.

3

Error codes

For more information, see Error Code Center.