Updated on 2023-06-25 GMT+08:00

Obtaining a Project Branch

Function

This API is used to obtain a project branch.

URI

GET /v1/{project_id}/git/repos/{namespace}/{project}/branches

Table 1 describes the parameters.

Table 1 Path parameters

Parameter

Type

Mandatory

Description

project_id

String

Yes

Tenant's project ID.

namespace

String

Yes

Namespace ID.

project

String

Yes

Repository project ID. If the value contains a slash (/), replace it with a colon (:).

Request

Request parameters

None

Response

Response parameters

Table 2 Response parameters

Parameter

Type

Description

branches

Array<String>

Project branch.

Example

Example request

None

Example response

{
  "branches": [
    "string"
  ]
}

Status Code

Table 3 Status codes

Status Code

Description

200

OK

400

Bad Request

Error Code

Error code must be in the format of SVCSTG.REPO.[Error_ID]. Example: SVCSTG.REPO.0401. See ServiceStage Error Codes.