Updated on 2026-01-27 GMT+08:00

Querying a Repository in a Project (Deprecated)

Function

This API is used to query repository details in a project.

This API has been deprecated. Use the API in Querying the Details About a Repository.

URI

GET /v1/repositories/{repository_uuid}

Table 1 Path parameters

Parameter

Mandatory

Type

Description

repository_uuid

Yes

String

UUID of the repository to be viewed

Request Parameters

Table 2 Request header parameter

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

Table 3 Response body parameters

Parameter

Type

Description

error

Error object

Response error.

result

RepoInfo object

Response result.

status

String

Explanation:

Response status

Range:

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

Parameter

Type

Description

code

String

Error code.

message

String

Error message.

Table 5 RepoInfo

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.