LinkMergeRequestLabel

Updated at:

Associates labels with a merge request.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /api/v4/projects/merge_requests/link_labels HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

organizationId

string

Yes

The organization ID. Find the organization ID in the URL of your organization in Alibaba Cloud DevOps. For example, if the URL is https://devops.aliyun.com/organization/5ebbc0228123212b59xxxxx, the organization ID is 5ebbc0228123212b59xxxxx.

5ebbc0228123212b59xxxxx

accessToken

string

No

The personal access token. This parameter is not required if you authenticate using an Alibaba Cloud AccessKey pair or Security Token Service (STS).

f0b1e61db5961df5975a93f9129d2513

repositoryIdentity

string

Yes

The ID or full path of the repository.

2835387 或 codeup/codeup-demo

localId

integer

Yes

The local ID of the merge request, which is unique to the repository.

1

body

object

No

The request body.

labelIds

array

Yes

A list of label IDs to associate with the merge request.

Important This is an overwrite operation. To retain existing labels, include their IDs in the request along with the new label IDs. Otherwise, this operation unlinks all existing labels.

string

No

The ID of a label.

f2bf0e0b4ce34a348b2d971c69a1d11f

Response elements

Element

Type

Description

Example

object

The response schema.

requestId

string

The request ID.

ASSDS-ASSASX-XSAXSA-XSAXSAXS

success

boolean

Indicates whether the request succeeded.

true

errorCode

string

The error code.

SYSTEM_UNKNOWN_ERROR

errorMessage

string

The error message.

""

result

object

The result of the request.

result

boolean

Indicates whether the operation successfully linked the labels.

true

Examples

Success response

JSON format

{
  "requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS",
  "success": true,
  "errorCode": "SYSTEM_UNKNOWN_ERROR",
  "errorMessage": "\"\"",
  "result": {
    "result": true
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.