Help Center/ CodeArts Repo/ API Reference/ APIs/ WebHook/ Querying the Webhook of a Specified Warehouse
Updated on 2023-05-06 GMT+08:00

Querying the Webhook of a Specified Warehouse

Function

Get warehouse webhook

URI

GET /v1/repositories/{group_name}/{repository_name}/hooks

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

group_name

Yes

String

Group Name (Example: git@repo.alpha.devcloud.inhuawei.com:Demo00228/testword.git Group Name: Demo00228)

repository_name

Yes

String

Repository name

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

hook_id

No

String

hook id

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

RepoListHook object

Result

status

String

Status code in a response

Table 5 Error

Parameter

Type

Description

code

String

Error Codes

message

String

Error message

Table 6 RepoListHook

Parameter

Type

Description

hooks

Array of RepoHook objects

Hook List

Table 7 RepoHook

Parameter

Type

Description

build_events

Boolean

Indicates whether to trigger the build_events event.

created_at

String

Time when warehouse statistics are created.

enable_ssl_verification

Boolean

Indicates whether to use SSL authentication.

id

Integer

hook id

issues_events

Boolean

Trigger issues_events

merge_requests_events

Boolean

Whether to trigger the merge_requests_events event

note_events

Boolean

Indicates whether to trigger the note_events event.

pipeline_events

Boolean

Whether to trigger the pipeline_events event

project_id

Integer

Specifies the repository ID.

push_events

Boolean

Whether to trigger the push_events event

repository_update_events

Boolean

Whether to trigger the repository_update_events event

tag_push_events

Boolean

Whether to trigger the tag_push_events event

wiki_page_events

Boolean

Trigger wiki_page_events

Example Requests

GET https://{endpoint}/v1/repositories/{group_name}/{repository_name}/hooks

Example Responses

Status code: 200

OK

{
  "result" : {
    "hooks" : [ {
      "id" : 2111600786,
      "project_id" : 2111615967,
      "created_at" : "2021-11-09 16:35:15",
      "enable_ssl_verification" : false,
      "push_events" : true,
      "tag_push_events" : false,
      "repository_update_events" : false,
      "merge_requests_events" : false,
      "issues_events" : false,
      "note_events" : false,
      "pipeline_events" : false,
      "wiki_page_events" : false
    } ]
  },
  "status" : "success"
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.