Help Center/ CodeArts Repo/ API Reference/ APIs/ WebHook/ Deletes the hook of a specified repository.
Updated on 2023-05-06 GMT+08:00

Deletes the hook of a specified repository.

Function

Code submission automatically triggers compilation and building, and the repository hook is deleted.

URI

DELETE /v1/repositories/{group_name}/{repository_name}/hooks/{hook_id}

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)

hook_id

Yes

Integer

Deletes the hook of a specified repository by ID.

repository_name

Yes

String

Repository name

Request Parameters

Table 2 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 3 Response body parameters

Parameter

Type

Description

error

Error object

Response error.

result

Object

Result

status

String

Response Status

Table 4 Error

Parameter

Type

Description

code

String

Error Codes

message

String

Error message

Example Requests

null

DELETE https://{endpoint}/v1/repositories/{group_name}/{repository_name}/hooks/{hook_id}

Example Responses

Status code: 200

OK

{
  "result" : "",
  "status" : "success"
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.