Help Center/ CodeArts Repo/ API Reference/ APIs/ V4/ MergeRequest/ Obtaining the Merge Request Commit List
Updated on 2026-01-27 GMT+08:00

Obtaining the Merge Request Commit List

Function

This API is used to obtain the merge request commit list.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

Authorization Information

Each account root user has all the permissions required to call all APIs, but IAM users must be assigned the following required identity policy-based permissions. For details about the required permissions, see Permissions Policies and Supported Actions.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

codeartsrepo:repository:getMergeRequest

Read

-

-

-

-

URI

GET https://{hostURL}/v4/repositories/{repository_id}/merge-requests/{merge_request_iid}/commits

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

repository_id

Yes

Integer

Definition

You can query the project list to obtain the repository ID by calling the API used to query user's all repositories.

Constraints

N/A

Default Value

N/A

Value range:

1~2147483647

merge_request_iid

Yes

Integer

Definition

MR internal ID (IID).

Value range:

1~2147483647

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

view

No

String

Definition

Whether to display commits in the simple mode. If simple is passed, commits are displayed in the simple mode. Otherwise, commits are normally displayed.

Constraints

  • simple: commits are displayed in the simple mode.

Enumeration values:

  • simple

offset

No

Integer

Definition

Offset, which starts from 0.

Value range:

0~2147483647

Default value:

0

limit

No

Integer

Definition

Number of returned records.

Value range:

1~100

Default value:

20

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. Obtain one by calling the IAM API Obtaining a User Token. The value of X-Subject-Token in the response header is a token.

Constraints

N/A

Range

1–100,000 characters.

Default Value

N/A

Response Parameters

Status code: 200

Table 4 Response header parameters

Parameter

Type

Description

X-Total

String

Definition

Total number of MR commits.

Table 5 Response body parameters

Parameter

Type

Description

[items]

Array of MergeRequestCommitDto objects

MR commit list details

Table 6 MergeRequestCommitDto

Parameter

Type

Description

id

String

commit id

short_id

String

Commit short ID

title

String

Commit title

message

String

Commit message

author_name

String

Commit author name

name

String

Username

user_name

String

Username

tenant_name

String

Tenant name

nick_name

String

Alias

authored_date

String

Initial commit date (local commit date)

committed_date

String

Commit date (date when the commit is pushed to the repository)

committer_name

String

Committer name

gpg_primary_key_id

String

pgp key id

open_gpg_verified

Boolean

Whether GPG public key verification is enabled

verification_status

Boolean

Whether GPG public key verification is passed

parent_ids

Array of strings

Commit parent commit node

created_at

String

Commit creation time recorded in the database

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

error_msg

String

Definition

Error message.

Status code: 401

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

error_msg

String

Definition

Error message.

Example Requests

None

Example Responses

Status code: 200

OK

{
  "id" : "c31a08bc85418c82f96e70fed197781ad62d3891",
  "short_id" : "c31a08bc",
  "title" : "Update dev",
  "message" : "Update dev",
  "author_name" : "example_name",
  "name" : "example.com",
  "user_name" : "example_name",
  "tenant_name" : "example_name",
  "nick_name" : "example_name",
  "authored_date" : "2024-12-18T16:09:26.000+08:00",
  "committed_date" : "2024-12-18T16:09:26.000+08:00",
  "committer_name" : "2024-12-18T16:09:26.000+08:00",
  "gpg_primary_key_id" : "87E44B5F42161434",
  "open_gpg_verified" : true,
  "verification_status" : 1,
  "parent_ids" : [ "ee792e378901e39008c6cbdd5bf01b056ba56e9b" ],
  "created_at" : "2024-12-18T16:09:26.000+08:00"
}

Status code: 400

Bad Request

{
  "error_code" : "CH.00405011",
  "error_msg" : "Request error."
}

Status code: 401

Unauthorized

{
  "error_code" : "DEV.00000003",
  "error_msg" : "Authentication information expired."
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

Error Codes

See Error Codes.