Querying a Repository in a Project (Deprecated)
Function
This API is used to query repository details in a project.
URI
GET /v1/repositories/{repository_uuid}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| repository_uuid | Yes | String | UUID of the repository to be viewed |
Request 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
| Parameter | Type | Description |
|---|---|---|
| error | Error object | Response error. |
| result | RepoInfo object | Response result. |
| status | String | Explanation: Response status Range:
|
| Parameter | Type | Description |
|---|---|---|
| createAt | String | Creation time. |
| groupName | String | Repository group name (The part between the domain name and the project name. Example: In git@example.com:Demo00228/testword.git, the group name is Demo00228.) |
| httpUrl | String | https url |
| id | String | Repository UUID returned by the CreateRepository API. Minimum length: 32 Maximum length: 32 |
| name | String | Repository name. Minimum length: 2 Maximum length: 128 |
| projectId | String | Project UUID Minimum length: 32 Maximum length: 32 |
| projectIsDelete | String | Whether the project is deleted |
| repoId | String | Repository primary key ID Minimum length: 1 Maximum length: 40 |
| sshUrl | String | ssh url |
| visibilityLevel | Integer | Whether a repository is visible. 0 indicates private repository and 20 indicates public repository |
| webUrl | String | Web URL access path |
Example Requests
GET https://{endpoint}/v1/repositories/{repository_uuid} Example Responses
Status code: 200
OK
{
"result" : {
"id" : "dadb20863d7d4ef8bc0b4740db7358be",
"repoId" : "472210",
"name" : "testword",
"sshUrl" : "git@example.com:Demo00228/testword.git",
"httpUrl" : "https://example.com/Demo00228/testword.git",
"groupName" : "Demo00228",
"webUrl" : "https://example.com/codehub/472210/home",
"visibilityLevel" : 0,
"createAt" : "2019-10-21 17:49:33",
"projectId" : "4838955a48e2492bbe44b31bc4c272f6",
"projectIsDelete" : "false"
},
"status" : "success"
} Status Code
| Status Code | Description |
|---|---|
| 200 | OK |
Error Code
See error codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.
