หน้านี้ยังไม่พร้อมใช้งานในภาษาท้องถิ่นของคุณ เรากำลังพยายามอย่างหนักเพื่อเพิ่มเวอร์ชันภาษาอื่น ๆ เพิ่มเติม ขอบคุณสำหรับการสนับสนุนเสมอมา

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ CodeArts Repo/ API Reference/ APIs/ Project (V2)/ Querying All Repositories of a User

Querying All Repositories of a User

Updated on 2025-01-14 GMT+08:00

Function

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

Explanation:

Page index.

Range:

Minimum value: 1

Maximum value: 2147483647

Default value:

1

page_size

No

Integer

Explanation:

Number of records on each page.

Range:

Minimum value: 1

Maximum value: 100

Default value:

100

search

No

String

Explanation:

Search keyword.

Range:

1–512 characters.

Default value:

Empty.

Request Parameters

Table 2 Request header parameters

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:

Mandatory

Range:

1–100,000 characters.

Default value:

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

error

Error object

Explanation:

Response error.

Range:

None

result

RepoListInfoV2 object

Explanation:

Response result.

Range:

None

status

String

Explanation:

Response status of the API.

Range:

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

Parameter

Type

Description

code

String

Explanation:

Error code returned when the API fails to be called.

Range:

  • CH.080002

message

String

Explanation:

Error code returned when the API fails to be called.

Range:

  • CH.080002: Invalid parameter.
Table 5 RepoListInfoV2

Parameter

Type

Description

repositories

Array of RepoInfoV2 objects

Explanation:

Repository list.

total

Integer

Explanation:

Total number of repositories.

Range:

0–2147483647

Table 6 RepoInfoV2

Parameter

Type

Description

created_at

String

Explanation:

Creation time.

Constraints:

Format: yyyy-MM-dd HH:mm:ss

creator_name

String

Explanation:

Name of the creator.

Range:

128 digits and letters.

domain_name

String

Explanation:

Tenant name of the creator.

Range:

128 digits and letters.

group_name

String

Explanation:

Repository group name (the segment between the domain name and repository name in a clone address).

Example: Demo00228 in git@repo.alpha.devcloud.test.com:Demo00228/testword.git

Range:

2–255 characters.

https_url

String

Explanation:

HTTPS repository address.

Range:

Max. 2,000 characters.

iam_user_uuid

String

Explanation:

IAM user ID.

Range:

32 digits and letters.

is_owner

Integer

Explanation:

Whether the user is the repository creator.

Range:

1: Yes

0: No

lfs_size

String

Explanation:

Repository LFS capacity.

Constraints:

Measured in MB or GB, with two decimal places.

project_is_deleted

String

Explanation:

Whether the project has been deleted.

Range:

false: No

true: Yes

project_uuid

String

Explanation:

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

Range:

32 digits and letters.

repository_id

Integer

Explanation:

Repository ID.

Range:

0–2147483647

repository_name

String

Explanation:

Repository name.

Range:

2–255 characters.

repository_size

String

Explanation:

Total repository capacity = Repository LFS capacity + Git repository capacity.

Constraints:

Measured in MB or GB, with two decimal places.

repository_uuid

String

Explanation:

Repo UUID, which is returned by the CreateRepository API.

Constraints:

32 digits and letters.

ssh_url

String

Explanation:

SSH repository address.

Range:

Max. 2,000 characters.

star

Boolean

Explanation:

Whether you have followed the repository.

Range:

false: No

true: Yes

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:

Update time.

Constraints:

Format: yyyy-MM-dd HH:mm:ss

userRole

Integer

Explanation:

Your role in the repository.

Constraints:

20: Read-only member

30: Common member

40: Administrator

visibility_level

Integer

Explanation:

Repository visibility.

Range:

0: Private repository

20: Public repository

web_url

String

Explanation:

Web URL, which redirects you to the repository details page.

Range:

Max. 2,000 characters.

Example Requests

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

Example Responses

Status code: 200

OK

{
  "result" : {
    "total" : 29,
    "repositories" : {
      "repository_uuid" : "0bf1e7ceb5b341318cb72b42901abe54",
      "repository_id" : 468564,
      "repository_name" : "test",
      "ssh_url" : "git@repo.alpha.devcloud.test.com:test_new00001/test.git",
      "https_url" : "https://repo.alpha.devcloud.test.com/test_new00001/test.git",
      "group_name" : "test_new00001",
      "web_url" : "https://alpha.devcloud.test.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 Code

Description

200

OK

Error Codes

See Error Codes.

เราใช้คุกกี้เพื่อปรับปรุงไซต์และประสบการณ์การใช้ของคุณ การเรียกดูเว็บไซต์ของเราต่อแสดงว่าคุณยอมรับนโยบายคุกกี้ของเรา เรียนรู้เพิ่มเติม

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback