Creating a Project Tag

Function

This API is used to create a project tag.

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}/{project}/tags

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 or URL code name.

project

String

Yes

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

Table 2 Query parameter

Parameter

Type

Mandatory

Description

ref

String

Yes

Branch name, tag name, or commit SHA value.

Request

Request parameters

Table 3 Request parameters

Parameter

Type

Mandatory

Description

name

String

Yes

Tag name.

description

String

Yes

Description.

Response

Response parameters

Table 4 Response parameters

Parameter

Type

Description

name

String

Project tag name.

Example

Example request

{
  "name": "string",
  "description": "string"
}

Example response

{
  "name": "string"
}

Status Code

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