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.
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 UUID, by calling the API used to query the project list. Value range: 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 a token by calling the IAM API for obtaining a user token. The value of X-Subject-Token in the response header is the user token. Constraints Mandatory. 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.