Help Center/ CodeArts Repo/ API Reference (Ally Region)/ APIs/ Project (V2)/ Querying All Repositories of a User
Updated on 2026-01-08 GMT+08:00

Querying All Repositories of a User

Description

This API is used to obtain all repository information of a user.

URI

GET /v2/projects/repositories

Table 1 Query parameters

Parameter

Mandatory

Type

Description

page_index

No

Integer

Page index, starting from 1

page_size

No

Integer

Record number on each page

search

No

String

Search keyword

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

error

Error object

Response error

result

RepoListInfoV2 object

Response result

status

String

Response status

Table 4 Error

Parameter

Type

Description

code

String

Error codes

message

String

Error message

Table 5 RepoListInfoV2

Parameter

Type

Description

repositories

Array of RepoInfoV2 objects

Repository list

total

Integer

Total number of repositories

Table 6 RepoInfoV2

Parameter

Type

Description

created_at

String

Creation time

creator_name

String

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

domain_name

String

Tenant name of the creator

group_name

String

Repository group name (Segment following the domain name and before the repository name in the clone address. Example: git@repo.alpha.devcloud.intest.com:Demo00228/testword.git. Repository group name: Demo00228.)

https_url

String

URL for cloning repositories using HTTPS

iam_user_uuid

String

IAM user UUID

is_owner

Integer

Whether the current user is the repository creator. 1: Yes. 0: No

lfs_size

String

Repository LFS capacity in MB. If the capacity is greater than 1,024 MB, the unit is GB.

project_is_deleted

String

Whether the project is deleted

project_uuid

String

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

repository_id

Integer

Repository primary key ID

repository_name

String

Repository name

repository_size

String

Total repository capacity = Repository LFS capacity + Git repository capacity. The unit is MB. If the capacity is greater than 1,024 MB, the unit is GB.

repository_uuid

String

Repository UUID returned by the CreateRepository API.

ssh_url

String

URL for cloning repositories using SSH

star

Boolean

Whether you have followed the repository

status

Integer

Repository status. 0: Created. 1: Creating. 2: Failed. 3: Frozen. 4: Closed.

updated_at

String

Update time

userRole

Integer

Your permission in the repository. 20: Read-only member. 30: Common member. 40: Administrator.

visibility_level

Integer

Visibility. 0: Private. 20: Public

web_url

String

Web URL. If you access it, the repository details page is displayed.

Request Examples

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

Response Examples

Status code: 200

Request succeeded

{
  "result" : {
    "total" : 29,
    "repositories" : {
      "repository_uuid" : "0bf1e7ceb5b341318cb72b42901abe54",
      "repository_id" : 468564,
      "repository_name" : "test",
      "ssh_url" : "git@repo.alpha.devcloud.intest.com:test_new00001/test.git",
      "https_url" : "https://repo.alpha.devcloud.intest.com/test_new00001/test.git",
      "group_name" : "test_new00001",
      "web_url" : "https://alpha.devcloud.intest.com/repo/468564/home",
      "visibility_level" : 0,
      "created_at" : "2019-10-15 11:00:11",
      "updated_at" : "2019-10-15 11:00:11",
      "repository_size" : "0.05M",
      "lfs_size" : "0.00M",
      "creator_name" : "repo",
      "domain_name" : "repo",
      "star" : true,
      "status" : 0,
      "is_owner" : 1,
      "iam_user_uuid" : "a618e34bd5704be3ae3395dfede06041",
      "project_uuid" : "dc19b3ca6f334ce894a1ec467689797d",
      "project_is_deleted" : "false",
      "userRole" : null
    }
  },
  "status" : "success"
}

Status Codes

Status Codes

Description

200

Request succeeded

Error Codes

See Error Codes.