All Products
Search
Document Center

Alibaba Cloud DevOps:ListTemplateRepositories

Last Updated:Apr 14, 2025

Queries a list of template repositories.

Prerequisites

  • Replace <domain> in your API request URL with the endpoint that you obtain. For more information, see Endpoint.

  • Obtain your access token. For more information, see Obtain a personal access token.

Authorization information

Application

Resource

Required permission

Codeup

Code repository

Read-only

Request syntax

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

Request header

Parameter

Type

Required

Description

Example

x-yunxiao-token

string

Yes

The access token.

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

Request parameters

Parameter

Type

Location

Required

Description

Example

page

integer

query

No

The page number. Pages start from page 1. We recommend that you do not specify a value greater than 150.

1

perPage

integer

query

No

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

20

templateType

integer

query

Yes

The template type. Valid values:

  • 1: custom template repository

  • 2: system built-in template repository

2

Sample request

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

-

array

-

object

avatarUrl

string

Repository avatar link.

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

description

string

Repository description.

Description of the template repository

name

string

Repository name.

template-repo

path

string

The full path of the repository. If the template repository is a system built-in template repository, the value of this parameter is null.

null

projectId

integer

Template repository ID.

1

Sample success response

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

Error codes

For a list of error codes, see Service error codes.