Halaman ini belum tersedia dalam bahasa lokal Anda. Kami berusaha keras untuk menambahkan lebih banyak versi bahasa. Terima kasih atas dukungan Anda.

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 in a Project

Querying All Repositories in a Project

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

Function

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

URI

GET /v2/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:

Mandatory

Range:

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

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:

Character string.

Default value:

None

Request Parameters

Table 3 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 4 Response body parameters

Parameter

Type

Description

error

Error object

Explanation:

Response error.

result

RepoListInfoV2 object

Explanation:

Response result.

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:

See Error Codes.

message

String

Explanation:

Error message.

Range:

Character string.

Table 6 RepoListInfoV2

Parameter

Type

Description

repositories

Array of RepoInfoV2 objects

Explanation:

Repository list.

total

Integer

Explanation:

Total number of repositories.

Range:

1–2147483647

Table 7 RepoInfoV2

Parameter

Type

Description

created_at

String

Explanation:

Creation time.

Range:

Character string.

creator_name

String

Explanation:

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

Range:

Character string.

domain_name

String

Explanation:

Tenant name of the creator.

Range:

Character string.

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:

Character string.

https_url

String

Explanation:

URL for cloning a repository using HTTPS.

Range:

Character string.

iam_user_uuid

String

Explanation:

IAM user UUID.

Range:

Character string.

is_owner

Integer

Explanation:

Whether the current user is the repository creator.

Range:

  • 1: Yes
  • 0: No

lfs_size

String

Explanation:

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

Range:

Character string.

project_is_deleted

String

Explanation:

Whether the project has been deleted.

Range:

Character string.

project_uuid

String

Explanation:

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

Range:

Character string.

repository_id

Integer

Explanation:

Repository primary key ID.

Range:

1–2147483647

repository_name

String

Explanation:

Repository name.

Range:

Character string.

repository_size

String

Explanation:

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.

Range:

Character string.

repository_uuid

String

Explanation:

Repo UUID, which is returned by the CreateRepository API.

Range:

Character string.

ssh_url

String

Explanation:

URL for cloning a repository in SSH mode.

Range:

Character string.

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:

Update time.

Range:

Character string.

userRole

Integer

Explanation:

Your permissions for the repository.

Range:

  • 20: Read-only member
  • 30: Common member
  • 40: Administrator

visibility_level

Integer

Explanation:

Visibility.

Range:

  • 0: Private repository
  • 20: Public repository

web_url

String

Explanation:

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

Range:

Character string.

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" : "CreatRepository_2qD5i",
      "ssh_url" : "git@repo.test.com:Demo00228/CreatRepository_2qD5i.git",
      "https_url" : "https://test.com/Demo00228/CreatRepository_2qD5i.git",
      "group_name" : "Demo00228",
      "web_url" : "https://test.com/repo/468480/home",
      "visibility_level" : 0,
      "created_at" : "2019-10-15 09:40:26",
      "updated_at" : "2019-10-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 Codes

Status Code

Description

200

OK

Error codes

See Error Codes.

Kami menggunakan cookie untuk meningkatkan kualitas situs kami dan pengalaman Anda. Dengan melanjutkan penelusuran di situs kami berarti Anda menerima kebijakan cookie kami. Cari tahu selengkapnya

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback