Help Center> CodeArts Repo> API Reference> APIs> Commit> Querying the Submission Information of a Warehouse
Updated on 2023-12-04 GMT+08:00

Querying the Submission Information of a Warehouse

Function

This interface is used to obtain submission information based on the repository short ID. The list of all commits in the path can be queried based on the file path.

URI

GET /v2/projects/{repo_id}/repository/commits

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

repo_id

Yes

Integer

Warehouse Short ID

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

ref_name

No

String

Branch name or tag name of the repository. If this parameter is left blank, the default branch is queried.

since

No

String

Submitted on or after this date in the format of YYYY-MM-DDTHH:MM:SSZ

until

No

String

Submitted before or on this date in the format of YYYY-MM-DDTHH:MM:SSZ

path

No

String

File path.

all

No

Boolean

Indicates whether to search for each submission in the warehouse.

with_stats

No

Boolean

Whether statistics about each submission are added to the response

page

No

Integer

Page.

Minimum: 1

Maximum: 2147483647

per_page

No

Integer

Specifies the number of records on each page.

Minimum: 1

Maximum: 100

Request Parameters

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

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

error

Error object

Response error.

result

Array of CommitInfo objects

Submission List

status

String

Response Status

Table 5 Error

Parameter

Type

Description

code

String

Error Codes

message

String

Error message

Table 6 CommitInfo

Parameter

Type

Description

id

String

Submit the corresponding SHA ID.

short_id

String

Submit the corresponding short SHA ID.

title

String

Submit Title

author_name

String

Author

author_email

String

Author Email

committer_name

String

Requester

committer_email

String

Submit Author Email

created_at

String

Created

message

String

Details

parent_ids

Array of strings

Parent Submission ID

committed_date

String

Submitted

authored_date

String

Author Submission Time

Example Requests

GET https://{endpoint}/v2/projects/859341/repository/commits

Example Responses

Status code: 200

OK

{
  "result" : [ {
    "id" : "85a0a9d5c6e43bc9c3e443ac01f789e24eeef02b",
    "title" : "some commit message",
    "message" : "some commit message",
    "short_id" : "85a0a9d5",
    "author_name" : "repo",
    "author_email" : null,
    "committer_name" : "repo",
    "committer_email" : null,
    "created_at" : "2021-09-26T03:44:51.000Z",
    "parent_ids" : [ "5c114bb316dff4d4a046e09a5c44c816f2433140" ],
    "committed_date" : "2021-09-26T03:44:51.000Z",
    "authored_date" : null
  }, {
    "id" : "5c114bb316dff4d4a046e09a5c44c816f2433140",
    "title" : "Updating README.md",
    "message" : "Updating README.md",
    "short_id" : "5c114bb3",
    "author_name" : "repo",
    "author_email" : null,
    "committer_name" : "repo",
    "committer_email" : null,
    "created_at" : "2021-08-26T12:02:58.000Z",
    "parent_ids" : [ "646fc72bd87eb02e1e84bf3b82179c7f6d22c2c2" ],
    "committed_date" : "2021-08-26T12:02:58.000Z",
    "authored_date" : null
  } ],
  "status" : "success"
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.