调用UpdateRepoWebhook更新镜像仓库触发器。
请求信息
请求行RequestLine
POST /repos/[RepoNamespace]/[RepoName]/webhooks/[WebhookId] HTTP/1.1
请求行参数URI Param
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
RepoNamespace | String | 是 | 命名空间名称 |
RepoName | String | 是 | 仓库名称 |
WebhookId | String | 是 | 触发器ID |
特有请求头RequestHead
无
请求体RequestBody
{
"Webhook": {
"WebhookName": "String",
"WebhookUrl": "String",
"TriggerName": "String",
"TriggerUrl": "String",
"TriggerType": "String"
}
}
请求体解析
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
WebhookName | String | 是 | 仓库触发器名称。长度限制2~30,支持小写字母、数字、下划线(_)(不能以下划线开头)。 |
WebhookUrl | String | 是 | 仓库触发器 URL。长度限制1~1024,支持小写字母、数字、中划线(-)、下划线(_) (不能以中划线和下划线开头)。 |
TriggerName | String | 是 | 触发器名称。 |
TriggerUrl | String | 否 | 触发器地址,例如:http://www.mysite.com。 |
TriggerType | String | 否 | 触发器类型,取值:
|
返回信息
返回行ResponseLine
HTTP/1.1 200 OK
特有返回头ResponseHead
无
返回体ResponseBody
{
"data": {
},
"requestId": "String"
}
返回体解析
无
示例
请求示例
POST /repos/[RepoNamespace]/[RepoName]/webhooks/[WebhookId] HTTP/1.1
<公共请求头>
{
"Webhook": {
"WebhookName": "justForTest",
"WebhookUrl": "https://www.****.com",
"TriggerName": "justForTest",
"TriggerUrl": "https://www.****.com",
"TriggerType": "ALL"
}
}
返回示例
HTTP/1.1 200 OK
<公共响应头>
{
"data": {
},
"requestId": "8DBD3292-A232-44F6-93DC-B30D70AF54E9"
}