ListSearchCommit

Updated at:

Searches for relevant commit data based on filter conditions.

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 /search/commit HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

organizationId

string

Yes

The enterprise identifier, also known as the enterprise ID. It is a string and can be obtained from the Yunxiao access link, such as https://devops.aliyun.com/organization/[OrganizationId].

60d54f3daccf2bbd6659f3ad

body

object

Yes

The request body.

keyword

string

Yes

The search keyword.

test

page

integer

No

The page number. Default value: 1. Pagination starts from page 1.

1

pageSize

integer

No

The number of entries per page. Default value: 20. Valid values: 1 to 100.

10

order

string

No

The sort field. Default value: default. Valid values:

  • default: default sort, which is comprehensive sorting

  • created_at: creation time

  • updated_at: update time

  • star: number of favorites

  • like: number of likes

  • comment: number of comments

  • reply: number of replies

default

sort

string

No

The sort order. Default value: desc. Valid values:

  • desc: descending order

  • asc: ascending order

desc

scope

string

No

The search scope. Default value: all. Valid values:

  • all: global scope, including public repositories and private repositories with permissions

  • mine: repositories where you are a repository or group member and have read permissions

all

repoPath

object

No

The code repository query condition.

value

string

No

The full path of the code repository, such as organization/group/repo.

Note

If there are multiple full paths of code repositories, separate them with commas (,).

orgId/test-group/spring-boot-demo

operatorType

string

No

The query condition type. Valid values:

  • equal: equal to

  • unequal: not equal to

  • and: AND

  • or: OR

  • not: NOT

equal

matchType

string

No

The query match type. Valid values:

  • term: exact match

  • regex: regular expression match

  • phrase: phrase match, which is the default method

  • wildcard: fuzzy match

term

Response elements

Element

Type

Description

Example

object

Schema of Response

requestId

string

The request ID.

F7B85D1B-D1C2-140F-A039-341859F130B9

errorMessage

string

The error message.

""

errorCode

string

The error code.

SYSTEM_UNKNOWN_ERROR

success

boolean

Indicates whether the call was successful.

true

total

integer

The total number of records.

10

result

array<object>

The returned list.

array<object>

The returned commit data.

docId

string

The document ID.

60d54f3daccf2bbd6659f3ad/gitlabhq/master/config/environments/test.rb

highlightTextMap

object

The highlighted text information.

commitId

string

The commit ID.

df1b701cb0f3f7ca92320d49d31995821f2d045c

title

string

The commit title, which is the first line of the commit.

Commit title

commitMessage

string

The specific content of the commit.

Commit content

organizationId

string

The enterprise ID.

60de7a6852743a5162b5f957

source

object

The source information returned by Elasticsearch.

commitId

string

The commit ID.

a748f5ecb17a93900d4808944bfcc96dc158ee2d

title

string

The commit title, which is the first line of the commit.

Commit title

commitMessage

string

The commit message.

Commit message

authorTime

string

The commit time.

2022-11-11 11:11:11

repoPath

string

The full path of the code repository, including the full group path.

codeup/test-repo

organizationId

string

The enterprise identifier, also known as the enterprise ID. It is a string and can be obtained from the Yunxiao access link, such as https://devops.aliyun.com/organization/[OrganizationId].

61133b011bd96aa110f1b500

author

object

The author.

name

string

The name of the author.

Yunxiao

email

string

The email address of the author.

username@example.com

Examples

Success response

JSON format

{
  "requestId": "F7B85D1B-D1C2-140F-A039-341859F130B9",
  "errorMessage": "\"\"",
  "errorCode": "SYSTEM_UNKNOWN_ERROR",
  "success": true,
  "total": 10,
  "result": [
    {
      "docId": "\t\n60d54f3daccf2bbd6659f3ad/gitlabhq/master/config/environments/test.rb",
      "highlightTextMap": {
        "commitId": "df1b701cb0f3f7ca92320d49d31995821f2d045c",
        "title": "提交标题",
        "commitMessage": "提交内容",
        "organizationId": "60de7a6852743a5162b5f957"
      },
      "source": {
        "commitId": "a748f5ecb17a93900d4808944bfcc96dc158ee2d",
        "title": "提交标题",
        "commitMessage": "提交信息",
        "authorTime": "2022-11-11 11:11:11",
        "repoPath": "codeup/test-repo",
        "organizationId": "61133b011bd96aa110f1b500",
        "author": {
          "name": "云效",
          "email": "username@example.com"
        }
      }
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.