Updates a trigger for an image repository.

Request information

Request line

POST /repos/[RepoNamespace]/[RepoName]/webhooks/[WebhookId] HTTP/1.1

Request line parameters

Parameter Type Required Description
RepoNamespace String Yes The name of the namespace.
RepoName String Yes The name of the repository.
WebhookId String Yes The ID of the trigger.

Operation-specific request headers

None.

Request body

{
   "Webhook": {
      "WebhookName": "String",
      "WebhookUrl": "String",
      "TriggerName": "String",
      "TriggerUrl": "String",
      "TriggerType": "String"
   }
}

Request body parameters

Parameter Type Required Description
WebhookName String Yes The name of the trigger. The name must be 2 to 30 characters in length, and can contain lowercase letters, digits, and underscores (_). It must not start with an underscore.
WebhookUrl String Yes The URL of the trigger. The URL must be 1 to 1,024 characters in length, and can contain lowercase letters, digits, hyphens (-), and underscores (_). It must not start with a hyphen or an underscore.

Response information

Response line

HTTP/1.1 200 OK

Operation-specific response headers

None.

Response body

{
    "data": {
    },
    "requestId": "String"
}

Response body parameters

None.

Examples

Sample requests

POST /repos/[RepoNamespace]/[RepoName]/webhooks/[WebhookId] HTTP/1.1
<Common request headers>

{
   "Webhook": {
      "WebhookName": "justForTest",
      "WebhookUrl": "https://www. ****.com",
      "TriggerName": "justForTest",
      "TriggerUrl": "https://www. ****.com",
      "TriggerType": "ALL"
   }
}

Sample responses

HTTP/1.1 200 OK
<Common response headers>

{
    "data": {
    },
    "requestId": "8DBD3292-A232-44F6-93DC-B30D70AF54E9"
}