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

Viewing the Commit List

Function

This API is used to view the 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:getRepository

Read

-

-

-

-

URI

GET https://{hostURL}/v4/repositories/{repository_id}/repository/commit-list

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

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

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

ref_name

No

String

Branch/Tag name

since

No

String

Start time (excluded)

until

No

String

End time (excluded)

path

No

String

The file path

message

No

String

Commit message or commit ID

author

No

String

Code author name

order_by_date

No

Boolean

Whether to sort by time in descending order

follow

No

Boolean

If the value is true, the commit records before and after file movement and renaming can be traced.

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 body parameters

Parameter

Type

Description

commits

Array of CommitDto objects

Commit list

date_title

Array of DateTitleDto objects

Statistics by day

Table 5 CommitDto

Parameter

Type

Description

id

String

id

message

String

Message

parent_ids

Array of strings

Parent node commit ID

authored_date

String

Time when the branch was created.

author_name

String

Creator name

author_email

String

Creator's email.

committed_date

String

Code commit date and time

committer_name

String

Committer name

committer_email

String

Committer email

open_gpg_verified

Boolean

Whether to enable the GPG verification

verification_status

Integer

Verification status

Value range:

0~1

gpg_primary_key_id

String

Identifier of the GPG public key

name

String

Username

gpg_nick_name

String

Alias

gpg_tenant_name

String

Tenant name

gpg_user_name

String

Information about a specific GPG user

short_id

String

Short ID

created_at

String

Creation time

title

String

Title

author_avatar_url

String

author_avatar_url

committer_avatar_url

String

committer_avatar_url

relate_url

Array of RelatedCommitSimpleDto objects

only for DevCloud

nick_name

String

Title

tenant_name

String

tenant_name

user_name

String

Username

Table 6 RelatedCommitSimpleDto

Parameter

Type

Description

related_id

String

Associated work item ID

related_url

String

Associated work item URL

Table 7 DateTitleDto

Parameter

Type

Description

day

String

Time (day)

commits_count

Integer

Number of commits

Value range:

0~100000

Status code: 401

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

error_msg

String

Definition

Error message.

Status code: 403

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

error_msg

String

Definition

Error message.

Example Requests

/api/v4/repositories/{repository_id}/repository/commit-list?ref_name=master&since=2025-01-01&until=2025-02-01&offset=0&limit=20

Example Responses

Status code: 200

The commit list was obtained.

{
  "commits" : [ {
    "id" : "97b70c9e6e****ba981d19feaad61135",
    "message" : "xx",
    "parent_ids" : [ "assdf" ],
    "authored_date" : "2025-06-27T01:52:33.000Z",
    "author_name" : "****",
    "author_email" : null,
    "committed_date" : "2025-06-27T01:52:33.000Z",
    "committer_name" : "****",
    "committer_email" : null,
    "open_gpg_verified" : true,
    "verification_status" : 1,
    "gpg_primary_key_id" : "****",
    "name" : "****",
    "gpg_nick_name" : null,
    "gpg_tenant_name" : null,
    "gpg_user_name" : null,
    "short_id" : "97b70c9e",
    "created_at" : "2025-06-27T01:52:33.000Z",
    "title" : "****",
    "author_avatar_url" : null,
    "committer_avatar_url" : null,
    "relate_url" : [ {
      "related_id" : "related_id_e8a2e829628e",
      "related_url" : "related_url_cadb457b1b14"
    } ],
    "nick_name" : null,
    "tenant_name" : null,
    "user_name" : null
  } ],
  "date_title" : [ {
    "day" : "2025-06-27",
    "commits_count" : 2
  }, {
    "day" : "2025-06-25",
    "commits_count" : 1
  }, {
    "day" : "2025-06-24",
    "commits_count" : 2
  }, {
    "day" : "2025-06-23",
    "commits_count" : 4
  }, {
    "day" : "2025-06-21",
    "commits_count" : 2
  }, {
    "day" : "2025-06-09",
    "commits_count" : 2
  } ]
}

Status code: 401

Unauthorized

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

Status code: 403

Bad Request

{
  "error_code" : "CH.004403",
  "error_msg" : "Insufficient permissions. Apply for the required permissions and try again."
}

Status Codes

Status Code

Description

200

The commit list was obtained.

401

Unauthorized

403

Bad Request

Error Codes

See Error Codes.