All Products
Search
Document Center

UpdateRepoWebhook

Last Updated: Jan 22, 2020

Description

You can call this operation to update a trigger of an image repository.

Request information

Request line

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

Request parameters

Parameter Type Required Description
RepoNamespace String Yes The namespace to which the image repository belongs.
RepoName String Yes The name of the image repository.
WebhookId String Yes The ID of the trigger that you want to update.

Custom request headers

None.

Request body

  1. {
  2. "Webhook": {
  3. "WebhookName": "String",
  4. "WebhookUrl": "String",
  5. "TriggerName": "String",
  6. "TriggerUrl": "String",
  7. "TriggerType": "String"
  8. }
  9. }

Request body description

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 cannot start with an underscore ().
WebhookUrl String Yes The URL of the trigger. The value must be [1 to 1024] characters in length and can contain lowercase letters, digits, hyphens (-), and underscores (). It cannot start with a hyphen (-) or an underscore ().

Response information

Response line

  1. HTTP/1.1 200 OK

Custom response headers

None.

Response body

  1. {
  2. "data": {
  3. },
  4. "requestId": "String"
  5. }

Response body description

None.

Examples

Sample requests

  1. POST /repos/[RepoNamespace]/[RepoName]/webhooks/[WebhookId] HTTP/1.1
  2. <Common request headers>
  3. {
  4. "Webhook": {
  5. "WebhookName": "justForTest",
  6. "WebhookUrl": "https://www.****.com",
  7. "TriggerName": "justForTest",
  8. "TriggerUrl": "https://www.****.com",
  9. "TriggerType": "ALL"
  10. }
  11. }

Sample responses

  1. HTTP/1.1 200 OK
  2. <Common response headers>
  3. {
  4. "data": {
  5. },
  6. "requestId": "8DBD3292-A232-44F6-93DC-B30D70AF54E9"
  7. }