Help Center/ CodeArts Repo/ API Reference/ APIs/ Project/ Obtaining Information About All Repositories in a Project
Updated on 2026-01-27 GMT+08:00

Obtaining Information About All Repositories in a Project

Function

This API is used to obtain the repository list. Fuzzy query is supported: If the project_id is not specified, fuzzy search by repository name or project name is supported. Otherwise, only fuzzy search by repository name is supported.

URI

GET /v1/projects/{project_uuid}/repositories

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_uuid

Yes

String

Explanation:

Project ID. For details, see Obtaining a Project ID. Constraints

None.

Range

32 digits and letters.

Default value

None.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

page_index

No

Integer

Explanation:

Page index.

Constraints

None.

Range

None.

Default value

1

page_size

No

Integer

Explanation:

Number of records on each page.

Constraints

None.

Range

1–100

Default value

20

search

No

String

Explanation:

Search keyword.

Constraints

None.

Range

None.

Default value

None.

Request Parameters

Table 3 Request header parameter

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Explanation

User token. It can be obtained by calling the corresponding IAM API. The value of X-Subject-Token in the response header is the user token.

Constraints

None.

Range

1–100,000 characters.

Default value

None.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

error

Error object

Explanation:

Response error.

Range

None

result

RepoListInfo object

Explanation:

Response result.

Range

None

status

String

Explanation:

Response status.

Range

  • success: The API call is successful.
  • failed: The API call failed.
Table 5 Error

Parameter

Type

Description

code

String

Explanation:

Error code.

Range

Max. 100 characters in the error code format.

message

String

Explanation:

Error message.

Range

None

Table 6 RepoListInfo

Parameter

Type

Description

repositorys

Array of RepoInfo objects

Explanation:

Repository list.

Range

None

total

Integer

Explanation:

Total number of repositories.

Range

None

Table 7 RepoInfo

Parameter

Type

Description

createAt

String

Explanation:

Creation time.

Range

None

groupName

String

Explanation:

Repository group name (the segment between the domain name and repository name in a clone address. Example: Demo00228 in git@repo.example.com:Demo00228/testword.git).

Range

None

httpUrl

String

Explanation:

Repository https url

Range

None

id

String

Explanation:

Repository UUID

Range

32 characters.

name

String

Explanation:

Repository name.

Range

None

projectId

String

Explanation:

Project ID.

Range

32 characters.

projectIsDelete

String

Whether the project is deleted.

repoId

String

Explanation:

Repository ID

Range

1-40

sshUrl

String

Explanation:

Repository ssh url

visibilityLevel

Integer

Explanation:

Visibility. 0: Private. 20: Public.

Range

  • 0: private repository
  • 20: public repository

webUrl

String

Explanation:

Repository web url

Range

None

Example Requests

GET https://{endpoint}/v1/projects/{project_uuid}/repositories

Example Responses

Status code: 200

OK

{
  "result" : {
    "total" : 1,
    "repositorys" : [ {
      "id" : "d0457f74cc5b43d989ded7248f71b4e5",
      "repoId" : "468480",
      "name" : "CreatRepository_2qD5i",
      ""sshUrl" : "git@repo.example.com: Demo00228/CreatRepository_2qD5i.git",
      "httpUrl" : "https://repo.example.com/Demo00228/CreatRepository_2qD5i.git",
      "groupName" : "Demo00228",
      "webUrl" : "https://repo.example.com/repo/468480/home",
      "visibilityLevel" : 0,
      "createAt" : "2019-10-15 09:40:26",
      "projectId" : "4838955a48e2492bbe44b31bc4c272f6",
      "projectIsDelete" : "false"
    } ],
    "status" : "success"
  }
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.