Skip to main content
PATCH
/
v1
/
projects
/
{project}
/
webhooks
/
{webhook}
:updateWebhook
cURL
curl --request PATCH \
  --url https://api.example.com/v1/projects/{project}/webhooks/{webhook}:updateWebhook \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "WEBHOOK_TYPE_UNSPECIFIED",
  "title": "<string>",
  "url": "<string>",
  "name": "<string>",
  "directMessage": true,
  "notificationTypes": [
    "TYPE_UNSPECIFIED"
  ]
}
'
{
  "name": "<string>",
  "state": "STATE_UNSPECIFIED",
  "title": "<string>",
  "webhooks": [
    {
      "type": "WEBHOOK_TYPE_UNSPECIFIED",
      "title": "<string>",
      "url": "<string>",
      "name": "<string>",
      "directMessage": true,
      "notificationTypes": [
        "TYPE_UNSPECIFIED"
      ]
    }
  ],
  "dataClassificationConfigId": "<string>",
  "issueLabels": [
    {
      "value": "<string>",
      "color": "<string>",
      "group": "<string>"
    }
  ],
  "forceIssueLabels": true,
  "allowModifyStatement": true,
  "autoResolveIssue": true,
  "enforceIssueTitle": true,
  "autoEnableBackup": true,
  "skipBackupErrors": true,
  "postgresDatabaseTenantMode": true,
  "allowSelfApproval": true,
  "executionRetryPolicy": {
    "maximumRetries": 123
  },
  "ciSamplingSize": 123,
  "parallelTasksPerRollout": 123,
  "labels": {},
  "enforceSqlReview": true,
  "requireIssueApproval": true,
  "requirePlanCheckNoError": true
}

Path Parameters

project
string
required

The project id.

webhook
string
required

The webhook id.

Query Parameters

updateMask
string<field-mask>

The list of fields to update.

allowMissing
boolean

If set to true, and the webhook is not found, a new webhook will be created. In this situation, update_mask is ignored.

Body

application/json
type
enum<string>
required

Webhook integration type. type is the type of the webhook.

Available options:
WEBHOOK_TYPE_UNSPECIFIED,
SLACK,
DISCORD,
TEAMS,
DINGTALK,
FEISHU,
WECOM,
LARK
title
string
required

title is the title of the webhook.

url
string
required

url is the url of the webhook, should be unique within the project.

name
string

name is the name of the webhook, generated by the server. format: projects/{project}/webhooks/{webhook}

directMessage
boolean

if direct_message is set, the notification is sent directly to the persons and url will be ignored. IM integration setting should be set for this function to work.

notificationTypes
enum<string>[]

notification_types is the list of activities types that the webhook is interested in. Bytebase will only send notifications to the webhook if the activity type is in the list. It should not be empty, and should be a subset of the following:

  • ISSUE_CREATE
  • ISSUE_COMMENT_CREATE
  • ISSUE_FIELD_UPDATE
  • ISSUE_STATUS_UPDATE
  • ISSUE_APPROVAL_NOTIFY
  • ISSUE_PIPELINE_STAGE_STATUS_UPDATE
  • ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE
  • NOTIFY_ISSUE_APPROVED
  • NOTIFY_PIPELINE_ROLLOUT
Available options:
TYPE_UNSPECIFIED,
ISSUE_CREATE,
ISSUE_COMMENT_CREATE,
ISSUE_FIELD_UPDATE,
ISSUE_STATUS_UPDATE,
ISSUE_PIPELINE_STAGE_STATUS_UPDATE,
ISSUE_APPROVAL_NOTIFY,
ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE,
NOTIFY_ISSUE_APPROVED,
NOTIFY_PIPELINE_ROLLOUT

Response

OK

name
string

The name of the project. Format: projects/{project}

state
enum<string>

The lifecycle state of the project.

Available options:
STATE_UNSPECIFIED,
ACTIVE,
DELETED
title
string

The title or name of a project. It's not unique within the workspace.

webhooks
object[]

The list of webhooks configured for the project.

dataClassificationConfigId
string

The data classification configuration ID for the project.

issueLabels
object[]

Labels available for tagging issues in this project.

forceIssueLabels
boolean

Force issue labels to be used when creating an issue.

allowModifyStatement
boolean

Allow modifying SQL statements after issue is created.

autoResolveIssue
boolean

Enable automatic issue resolution when tasks complete.

enforceIssueTitle
boolean

Enforce issue title to be created by user instead of generated by Bytebase.

autoEnableBackup
boolean

Whether to automatically enable backup for database changes.

skipBackupErrors
boolean

Whether to skip backup errors and continue with data migration.

postgresDatabaseTenantMode
boolean

Whether to enable database tenant mode for PostgreSQL. If enabled, issues will include "set role <db_owner>" statement.

allowSelfApproval
boolean

Whether to allow issue creators to self-approve their own issues.

executionRetryPolicy
object

Execution retry policy for task runs.

ciSamplingSize
integer<int32>

The maximum number of database rows to sample during CI data validation. Without specification, sampling is disabled, resulting in full validation.

parallelTasksPerRollout
integer<int32>

The maximum number of parallel tasks allowed during rollout execution.

labels
object

Labels are key-value pairs that can be attached to the project. For example, { "environment": "production", "team": "backend" }

enforceSqlReview
boolean

Whether to enforce SQL review checks to pass before issue creation. If enabled, issues cannot be created when SQL review finds errors.

requireIssueApproval
boolean

Whether to require issue approval before rollout.

requirePlanCheckNoError
boolean

Whether to require plan check to have no error before rollout.