Help Center/ CodeArts Repo/ API Reference/ APIs/ Project (V2)/ Querying Repositories in a Project of Your Current Account
Updated on 2026-01-27 GMT+08:00

Querying Repositories in a Project of Your Current Account

Function

This API is used to query the repositories in the current project of your current account, that is, the list of repositories of you as a repository member.

URI

GET /v2/projects/{project_uuid}/repositories

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_uuid

Yes

String

Explanation

32-bit UUID of a project. It uniquely identifies a project. You can query the project list by calling the API for querying the project list.

Constraints

None.

Range

A string of 32 characters.

Default value

None

Table 2 Query parameters

Parameter

Mandatory

Type

Description

page_index

No

Integer

Explanation

Page index, starting from 1.

Constraints

None.

Range

1–2,147,483,647

Range

1–2147483647

Default value

1

page_size

No

Integer

Explanation

Number of records on each page.

Constraints

None.

Range

1–100

Range

1–100

Default value

20

search

No

String

Explanation

Search keyword. You can search for repositories by repository name or creator username (IAM username). Creator alias cannot be used for search.

Constraints

None.

Range

A string of 0 to 128 characters.

Default value

None

Request Parameters

Table 3 Request header parameter

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Explanation

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

Constraints

None.

Range

The value contains no more than 20,000 characters.

Default value

None.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

error

Error object

Explanation

Error message. If the status is fail, the API fails to be called and the error message is displayed.

Range

None.

result

RepoListInfoV2 object

Explanation

Response result.

Range

None.

status

String

Explanation

Response status.

Range

  • success: The API call is successful.

  • fail: The API call failed.

Table 5 Error

Parameter

Type

Description

code

String

Explanation

Error code.

Range

For details, see Error Codes.

message

String

Explanation

Error message.

Range

None.

Table 6 RepoListInfoV2

Parameter

Type

Description

repositories

Array of RepoInfoV2 objects

Explanation

Indicates the queried repository list.

Range

None.

total

Integer

Explanation

Number of repositories of the user in the project.

Range

0–2,147,483,647

Range

0–2147483647

Table 7 RepoInfoV2

Parameter

Type

Description

created_at

String

Explanation

Indicates the time when the repository is created. Format: YYYY-MM-DD HH:MM:SS.

Range

None.

creator_name

String

Explanation

Username of the creator. If the user is a tenant, the username is the same as the tenant name.

Range

None.

domain_name

String

Explanation

Tenant name of the creator.

Range

None.

group_name

String

Explanation

Repository group name. For example, git@repo.example.com:Demo2025/testword.git. In this example, the group name is Demo2025.

Range

A string of 2 to 255 characters.

https_url

String

Explanation

Address used to clone a repository using HTTPS.

Range

None.

iam_user_uuid

String

Explanation

IAM user ID.

Range

None.

is_owner

Integer

Explanation

Whether the current user is the repository creator.

Range

  • 1: Yes

  • 0: No

lfs_size

String

Explanation

Repository LFS usage, rounded to two decimal places. Example: 50.00 M, 1.20 G

Range

None.

project_is_deleted

String

Explanation

Whether the project has been deleted.

Range

  • true: deleted

  • false: not deleted

project_uuid

String

Explanation

32-bit UUID of a project.

Range

  • true: deleted

  • false: not deleted

repository_id

Integer

Explanation

Repository ID.

Range

None.

repository_name

String

Explanation

Repository name.

Range

None.

repository_size

String

Explanation

Total repository capacity, rounded to two decimal places. Example: 50 M, 1.2 G

Range

None.

repository_uuid

String

Explanation

Repository UUID.

Range

None.

ssh_url

String

Explanation

Address used to clone a repository using SSH.

Range

None.

star

Boolean

Explanation

Whether you have followed the repository.

Range

  • true: Yes

  • false: No

status

Integer

Explanation

Repository status.

Range

  • 0: The repository has been created.

  • 1: The repository is being created.

  • 2: The creation failed.

  • 3: The repository is frozen.

  • 4: The repository is closed.

updated_at

String

Explanation

Indicates the update time of the repository. Format: YYYY-MM-DD HH:MM:SS.

Range

None.

userRole

Integer

Explanation

Your permissions for the repository.

Range

  • null: The 2.0 permission system cannot obtain users'permissions in the repository.

  • 20: Read-only member

  • 30: Common member

  • 40: Administrator

visibility_level

Integer

Explanation

Repository visibility.

Range

  • 0: Private

  • 20: Public

web_url

String

Explanation

Homepage address of the repository.

Range

None.

Example Requests

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

Example Responses

Status code: 200

OK

{
  "result" : {
    "total" : 14,
    "repositories" : {
      "repository_uuid" : "d0457f74cc5b43d989ded7248f71b4e5",
      "repository_id" : 468480,
      "repository_name" : "testword",
      "ssh_url" : "git@repo.example.com:Demo2025/testword.git",
      "https_url" : "https://repo.example.com/Demo2025/testword.git",
      "group_name" : "Demo2025",
      "web_url" : "https://console.example.com/repo/468480/home",
      "visibility_level" : 0,
      "created_at" : "2025-02-15 09:40:26",
      "updated_at" : "2025-02-15 09:40:26",
      "repository_size" : "0.06M",
      "lfs_size" : "0.00M",
      "creator_name" : "repo",
      "domain_name" : "repo",
      "star" : false,
      "status" : 0,
      "is_owner" : 1,
      "iam_user_uuid" : "a618e34bd5704be3ae3395dfede06041",
      "project_uuid" : "4838955a48e2492bbe44b31bc4c272f6",
      "project_is_deleted" : "false",
      "userRole" : null
    }
  },
  "status" : "success"
}

Status Code

Status Code

Description

200

OK

Error Codes

For details, see Error Codes.