Project Webhook

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

project-webhook-configure

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

Official guide

Discord

Official guide

Microsoft Teams

Official guide

DingTalk

Official guide

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)

Official guide

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.

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

    KeyValueDescription
    Content-Typeapplication/jsonJSON content
  • Request Body

    KeyTypeDescription
    levelStringOne of:
      INFO
      SUCCESS
      WARN
      ERROR
    activity_typeStringOne of:
      bb.issue.create
      bb.issue.comment.create
      bb.issue.field.update
      bb.issue.status.update
      bb.pipeline.task.status.update
    titleStringWebhook title
    descriptionStringWebhook description
    linkStringWebhook link
    creator_idIntegerUpdater id
    creator_nameIntegerUpdater name
    created_tsIntegerWebhook create timestamp
    issueObjectIssue Object
    - idIntegerIssue ID
    - nameStringIssue Name
    - statusStringIssue Status, one of:
      OPEN
      DONE
      CANCELED
    - typeStringIssue Type, one of:
      bb.issue.database.create
      bb.issue.database.schema.update
      bb.issue.database.schema.update.ghost
      bb.issue.database.data.update
    - descriptionStringIssue Description
    projectObjectProject Object
    - idIntegerProject ID
    - nameStringProject Name
  • Response Body

    KeyTypeDescription
    codeStringZero if success, non-zero if failed
    messageStringSome 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!"
    }
Edit this page on GitHub

Subscribe to Newsletter

By subscribing, you agree with Bytebase's Terms of Service and Privacy Policy.