Skip to main content

CreateRepoWebhook

Description

call CreateRepoWebhook to create warehouse triggers.

Request Method

POST

Request Path

/apsara/route/cr/CreateRepoWebhook

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
RepoNamespaceBODYstringYesNo sample value for this parameter.namespace to which the repository belongs
regionIdBODYstringYesNo sample value for this parameter.region id
RepoNameBODYstringYesNo sample value for this parameter.warehouse name
versionBODYstringNo2016-01-01version of api

Return data

NameTypeSample valueDescription
WebhookUrlstringYesURL triggered during image push.
TriggerTypestringYestrigger type of trigger when image push, enumeration (ALL, TAG_REG_EXP, TAG_LIST), you can select mirror version trigger, regular expression trigger, and support both triggers at the same time.
WebhookNamestringYestrigger name.

Example

Successful Response example

{
"WebhookUrl":"Yes",
"TriggerType":"Yes",
"WebhookName":"Yes"
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}