Obtaining the Repository List of a Project
Function
This API is used to obtain the repository list of a project.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account root user has all the permissions required to call all APIs, but IAM users must be assigned the following required identity policy-based permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
|
Action |
Access Level |
Resource Type (*: required) |
Condition Key |
Alias |
Dependencies |
|---|---|---|---|---|---|
|
codeartsrepo:repository:getRepository |
Read |
- |
- |
- |
- |
URI
GET https://{hostURL}/v4/projects/{project_id}/repositories
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition You can obtain the unique project identifier, 32-character project UUID, by calling the API used to query the project list. Range String length: 32 characters. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
search |
No |
String |
Definition: Keyword for searching for a repository Value range: N/A Constraints: N/A Default value: N/A |
|
offset |
No |
Integer |
Definition Offset, which starts from 0. Value range: 0~2147483647 Default value: 0 |
|
limit |
No |
Integer |
Definition Number of returned records. Value range: 1~100 Default value: 20 |
|
order_by |
No |
String |
Definition: Sorting field Value range:
Constraints: N/A Default value: updated_at Default value: updated_at Enumeration values:
|
|
sort |
No |
String |
Definition: Sorting field Value range:
Constraints: N/A Default value: desc Default value: desc Enumeration values:
|
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition User token. Obtain one by calling the IAM API Obtaining a User Token. The value of X-Subject-Token in the response header is a token. Constraints N/A Range 1–100,000 characters. Default Value N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
[items] |
Array of BasicRepositoryDto objects |
Repository information |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
Integer |
Definition: Repository ID Constraints: N/A Value range: 1~2147483647 |
|
name |
String |
Definition: Repository name Constraints: N/A |
|
namespace |
String |
Definition: Namespace Constraints: N/A |
|
path |
String |
Definition: Repository path Constraints: N/A |
|
develop_mode |
String |
Definition: Development mode Enumerated values. normal: merge request mode; CR: change request mode Constraints: N/A |
|
visibility |
String |
Definition: Repository visibility Enumerated values. private: internal; public: public Constraints: N/A |
|
security |
String |
Definition: Security level Enumerated values. product_internal: public within the project; tenant_internal: public within tenant Constraints: N/A |
|
name_with_namespace |
String |
Definition: Repository name with a namespace Constraints: N/A |
|
archived |
Boolean |
Definition: Archived or not. true: archived; false: not archived Constraints: N/A |
|
status |
String |
Definition: Repository status Constraints: N/A |
Example Requests
None
Example Responses
Status code: 200
Repository list in a project
[ {
"id" : 2112041493,
"name" : "test3",
"namespace" : "3e1f6634946144c2b1ccb46fb8152b8f/test3",
"path" : "test3",
"develop_mode" : "normal",
"visibility" : "private",
"security" : "internal",
"name_with_namespace" : "3e1f6634946144c2b1ccb46fb8152b8f / test3",
"archived" : false,
"status" : "0"
} ]
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Repository list in a project |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot