Help Center> ServiceStage> API Reference> Git Repository Access APIs> Creating a Software Repository Project

Creating a Software Repository Project

Function

This API is used to create a software repository project.

The request header parameter X-Repo-Auth needs to be added for this API. Its value is the name of the OAuth authorization created in Creating OAuth Authorization.

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

HTTP Status Code

Description

200

OK

400

Bad Request

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