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

Creating a Software Repository Project

Function

This API is used to create a software repository project.

URI

POST /v1/{project_id}/git/repos/{namespace}/projects

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.

Request

Request parameters

Table 2 Request parameters

Parameter

Type

Mandatory

Description

name

String

Yes

Project name.

Response

Response parameters

Table 3 Response parameters

Parameter

Type

Description

id

String

Project ID.

name

String

Project name.

clone_url

String

Clone URL.

Example

Example request

None

Example response

{
  "id": "string",
  "name": "string",
  "clone_url": "string"
}

Status Code

Table 4 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.