Creates a webhook for a repository.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
InstanceId String Yes cri-xkx6vujuhay0tp12

The ID of the instance.

RegionId String Yes cn-shanghai

The ID of the region.

RepoId String Yes crr-xwvi3osiy4ffoqwe

The ID of the image repository.

TriggerName String Yes trigger1

The name of the webhook.

TriggerTag String Yes 1

The image tag that triggers the webhook.

TriggerType String Yes ALL

The type of webhook. Valid values: ALL, TAG_LIST, and TAG_REG_EXP.

TriggerUrl String Yes

The URL of the webhook.

Response parameters

Parameter Type Example Description
IsSuccess Boolean true

Indicates whether the operation is successful.

Code String success

The return value.

RequestId String B79F5E0E-8770-407D-BCB6-ECF4BA9CDC26

The ID of the request.

TriggerId String crw-0z4pf81pgz35s5aa

The ID of the webhook.


Sample requests

http(s)://[Endpoint]/? Action=CreateRepoTrigger
&<Common request parameters>

Sample success responses

XML format


JSON format


Error codes

For a list of error codes, visit the API Error Center.