Project Webhook
User can configure project-level webhooks to let Bytebase post messages to the configured webhook endpoint upon various events.

Supported events
Issue creation- Post message when issue belonging to the configured project has been created.Issue status change- Post message when the status of the issue belonging to the configured project has been changed.Issue stage status change- Post message when issue's enclosing stage status has been changed.Issue task status change- Post message when issue's enclosing task status has been changed.Issue info change- Post message when issue's basic info such as assignee, title, description has been changed.Issue comment creation- Post message when new comment added to the issue.
Supported webhook endpoints
Slack
Discord
Microsoft Teams
DingTalk
info
DingTalk allows to specify a list of keywords in the security setting to protect webhook endpoint. You can add "Bytebase" to that keyword list.
Feishu (Lark)
info
Feishu (Lark) allows to specify a list of keywords in the security setting to protect webhook endpoint. You can add "Bytebase" to that keyword list.
WeCom
WeCom does not provide its own official guide. Please follow this similar setup from Tencent Cloud instead.
Custom
Custom is used to integrate with your own services via webhook.
info
You need to implement the webhook server yourself, it doesn't work out of the box.
API Definition as follow:
-
HTTP Method
POST -
Request Header
Key Value Description Content-Typeapplication/jsonJSON content -
Request Body
Key Type Description levelString One of:
 ÂINFO
 ÂSUCCESS
 ÂWARN
 ÂERRORactivity_typeString One of:
 Âbb.issue.create
 Âbb.issue.comment.create
 Âbb.issue.field.update
 Âbb.issue.status.update
 Âbb.pipeline.task.status.updatetitleString Webhook title descriptionString Webhook description linkString Webhook link creator_idInteger Updater id creator_nameInteger Updater name created_tsInteger Webhook create timestamp issueObject Issue Object - idInteger Issue ID - nameString Issue Name - statusString Issue Status, one of:
 ÂOPEN
 ÂDONE
 ÂCANCELED- typeString Issue Type, one of:
 Âbb.issue.database.create
 Âbb.issue.database.schema.update
 Âbb.issue.database.schema.update.ghost
 Âbb.issue.database.data.update- descriptionString Issue Description projectObject Project Object - idInteger Project ID - nameString Project Name -
Response Body
Key Type Description codeString Zero if success, non-zero if failed messageString Some error message -
Response StatusCode
- 200, OK
- Other, if any error
Example Request Body
{
"level": "INFO",
"activity_type": "bb.issue.created",
"title": "example webhook",
"description": "example description",
"link": "example link",
"creator_id": 1,
"creator_name": "Bytebase",
"created_ts": 1651212107,
"issue": {
"id": 1,
"name": "example issue",
"status": "OPEN",
"type": "bb.issue.database.create"
},
"project": {
"id": 1,
"name": "demo"
}
}Example Response Body
- Success
{ "code": 0, "message": "" } - Failed
{ "code": 400 "message": "Ops, some error occured!" }
