Help Center> CodeArts Repo> API Reference> APIs> V2Project> Associating Branches with Work Items
Updated on 2023-09-12 GMT+08:00

Associating Branches with Work Items

Function

Associating Branches with Work Items

URI

POST /v2/projects/issues

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the user token.

It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token.

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

branch

Yes

String

Branch Name

project_id

Yes

String

Project ID.

related_id

Yes

Array of strings

Work Item Set

repo_id

Yes

String

Specifies the repository ID.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

error

Error object

Response error.

status

String

Status code in a response

Table 4 Error

Parameter

Type

Description

code

String

Error Codes

message

String

Error message

Example Requests

POST https://{endpoint}/v2/projects/issues

{
  "project_id" : "a6142fa102b740988fe45cc40254d61c",
  "branch" : "unionsdk",
  "repo_id" : "2111616668",
  "related_id" : [ "5561081" ]
}

Example Responses

Status code: 200

OK

{
  "status" : "success"
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.