Kibelaでは、外部サービスへの通知用にOutgoing Webhookを用意しています。
Outgoing Webhookを使用すると、記事の公開やコメントの投稿などKibela上でイベントが発生した際に、設定されたURLに対してHTTPリクエストを送信できます。
設定方法
以下のURLにて設定が可能です。
https://my.kibe.la/team/settings/outgoing_webhooks/generics/new
Kibela上では以下の方法でアクセス出来ます。
- ヘッダー内のユーザーアイコンから、"設定"をクリック
- 左メニューの"Webhooks"をクリック
- "Webhookを追加"メニュー内の"Outgoing Webhook"をクリック


HTTPリクエストについて
イベント発生時、以下のHTTPリクエストが送信されます。
- HTTP version: HTTP/1.1
- HTTP method: POST
- Content-Type: application/json
- User-Agent: Kibela-Hookshot/v1
Request body
HTTPリクエストのRequest bodyには必ず resource_type, action パラメータが存在します。 resoruce_type はどのリソースに対してイベントが発生したかを表し、 action はどのようなイベントが発生したかを表しています。

イベント: Blogの投稿
- resource_type: blog
- action: create
- team: イベントが発生したチーム
- action_user: 投稿したユーザー
- blog: 投稿されたBlog
サンプルリクエスト
POST /payload HTTP/1.1
Host: localhost:3000
Content-Type: application/json
Content-Length: 1000
User-Agent: Kibela-Hookshot/v1
{
"action": "create",
"action_user": {
"account": "kibe",
"avatar_photo": {
"url": "https://cdn.kibe.la/media/public/1/kibe.png"
},
"id": "1",
"real_name": "kibe-san",
"url": "https://docs.kibe.la/@kibe"
},
"blog": {
"author": {
"account": "kibe",
"avatar_photo": {
"url": "https://cdn.kibe.la/media/public/1/kibe.png"
},
"id": "1",
"real_name": "kibe-san",
"url": "https://docs.kibe.la/@kibe"
},
"boards": [
{
"id": "1",
"name": "Product Team"
}
],
"content_html": "<h2>sample request</h2>",
"content_md": "## sample request",
"id": "1",
"title": "sample request",
"url": "https://docs.kibe.la/@kibe/1"
},
"resource_type": "blog",
"team": {
"name": "docs",
"url": "https://docs.kibe.la"
}
}
イベント: Blogの更新
- resource_type: blog
- action: update
- team: イベントが発生したチーム
- action_user: 更新したユーザー
- blog: 更新したBlog
サンプルリクエスト
POST /payload HTTP/1.1
Host: localhost:3000
Content-Type: application/json
Content-Length: 1000
User-Agent: Kibela-Hookshot/v1
{
"action": "update",
"action_user": {
"account": "kibe",
"avatar_photo": {
"url": "https://cdn.kibe.la/media/public/1/kibe.png"
},
"id": "1",
"real_name": "kibe-san",
"url": "https://docs.kibe.la/@kibe"
},
"blog": {
"author": {
"account": "kibe",
"avatar_photo": {
"url": "https://cdn.kibe.la/media/public/1/kibe.png"
},
"id": "1",
"real_name": "kibe-san",
"url": "https://docs.kibe.la/@kibe"
},
"boards": [
{
"id": "1",
"name": "Product Team"
}
],
"content_html": "<h2>sample request</h2>",
"content_md": "## sample request",
"content_diff": "+sample request\n-[WIP]sample request",
"revision_url": "https://docs.kibe.la/blogs/1/versions/1",
"id": "1",
"title": "sample request",
"url": "https://docs.kibe.la/@kibe/1"
},
"notify": true, # 廃止された"更新を知らせる"機能用のパラメータ
"resource_type": "blog",
"team": {
"name": "docs",
"url": "https://docs.kibe.la"
}
}
イベント: Blogの削除
- resource_type: blog
- action: delete
- team: イベントが発生したチーム
- action_user: 削除したユーザー
- blog: 削除されたBlog
サンプルリクエスト
POST /payload HTTP/1.1
Host: localhost:3000
Content-Type: application/json
Content-Length: 1000
User-Agent: Kibela-Hookshot/v1
{
"action": "delete",
"action_user": {
"account": "kibe",
"avatar_photo": {
"url": "https://cdn.kibe.la/media/public/1/kibe.png"
},
"id": "1",
"real_name": "kibe-san",
"url": "https://docs.kibe.la/@kibe"
},
"blog": {
"author": {
"account": "kibe",
"avatar_photo": {
"url": "https://cdn.kibe.la/media/public/1/kibe.png"
},
"id": "1",
"real_name": "kibe-san",
"url": "https://docs.kibe.la/@kibe"
},
"boards": [
{
"id": "1",
"name": "Product Team"
}
],
"comments": [
{
"author": {
"account": "kibe",
"avatar_photo": {
"url": "https://cdn.kibe.la/media/public/1/kibe.png"
},
"id": "1",
"real_name": "kibe-san",
"url": "https://docs.kibe.la/@kibe"
},
"id": "1",
"url": "https://docs.kibe.la/@kibe/1#comment_1"
}
],
"id": "1",
"title": "sample request",
"url": "https://docs.kibe.la/@kibe/1"
},
"resource_type": "blog",
"team": {
"name": "docs",
"url": "https://docs.kibe.la"
}
}
イベント: Wikiの投稿
- resource_type: wiki
- action: create
- team: イベントが発生したチーム
- action_user: 投稿したユーザー
- wiki: 投稿されたWiki
サンプルリクエスト
POST /payload HTTP/1.1
Host: localhost:3000
Content-Type: application/json
Content-Length: 1000
User-Agent: Kibela-Hookshot/v1
{
"action": "create",
"action_user": {
"account": "kibe",
"avatar_photo": {
"url": "https://cdn.kibe.la/media/public/1/kibe.png"
},
"id": "1",
"real_name": "kibe-san",
"url": "https://docs.kibe.la/@kibe"
},
"resource_type": "wiki",
"team": {
"name": "docs",
"url": "https://docs.kibe.la"
},
"wiki": {
"authors": [
{
"account": "kibe",
"avatar_photo": {
"url": "https://cdn.kibe.la/media/public/1/kibe.png"
},
"id": "1",
"real_name": "kibe-san",
"url": "https://docs.kibe.la/@kibe"
}
],
"boards": [
{
"id": "1",
"name": "Product Team"
}
],
"content_html": "<h2>sample request</h2>",
"content_md": "## sample request",
"id": "1",
"title": "sample request",
"url": "https://docs.kibe.la/wikis/sample_request/1"
}
}
イベント: Wikiの更新
- resource_type: wiki
- action: update
- team: イベントが発生したチーム
- action_user: 更新したユーザー
- wiki: 更新されたWiki
サンプルリクエスト
POST /payload HTTP/1.1
Host: localhost:3000
Content-Type: application/json
Content-Length: 1000
User-Agent: Kibela-Hookshot/v1
{
"action": "update",
"action_user": {
"account": "kibe",
"avatar_photo": {
"url": "https://cdn.kibe.la/media/public/1/kibe.png"
},
"id": "1",
"real_name": "kibe-san",
"url": "https://docs.kibe.la/@kibe"
},
"notify": true, # 廃止された"更新を知らせる"機能用のパラメータ
"resource_type": "wiki",
"team": {
"name": "docs",
"url": "https://docs.kibe.la"
},
"wiki": {
"authors": [
{
"account": "kibe",
"avatar_photo": {
"url": "https://cdn.kibe.la/media/public/1/kibe.png"
},
"id": "1",
"real_name": "kibe-san",
"url": "https://docs.kibe.la/@kibe"
}
],
"boards": [
{
"id": "1",
"name": "Product Team"
}
],
"content_html": "<h2>sample request</h2>",
"content_md": "## sample request",
"content_diff": "+sample request\n-[WIP]sample request",
"revision_url": "https://docs.kibe.la/wikis/1/versions/1",
"id": "1",
"title": "sample request",
"url": "https://docs.kibe.la/wikis/sample_request/1"
}
}
イベント: Wikiの削除
- resource_type: wiki
- action: delete
- team: イベントが発生したチーム
- action_user: 削除したユーザー
- wiki: 削除されたWiki
サンプルリクエスト
POST /payload HTTP/1.1
Host: localhost:3000
Content-Type: application/json
Content-Length: 1000
User-Agent: Kibela-Hookshot/v1
{
"action": "delete",
"action_user": {
"account": "kibe",
"avatar_photo": {
"url": "https://cdn.kibe.la/media/public/1/kibe.png"
},
"id": "1",
"real_name": "kibe-san",
"url": "https://docs.kibe.la/@kibe"
},
"resource_type": "wiki",
"team": {
"name": "docs",
"url": "https://docs.kibe.la"
},
"wiki": {
"author": {
"account": "kibe",
"avatar_photo": {
"url": "https://cdn.kibe.la/media/public/1/kibe.png"
},
"id": "1",
"real_name": "kibe-san",
"url": "https://docs.kibe.la/@kibe"
},
"boards": [
{
"id": "1",
"name": "Product Team"
}
],
"comments": [
{
"author": {
"account": "kibe",
"avatar_photo": {
"url": "https://cdn.kibe.la/media/public/1/kibe.png"
},
"id": "1",
"real_name": "kibe-san",
"url": "https://docs.kibe.la/@kibe"
},
"id": "1",
"url": "https://docs.kibe.la/@kibe/1#comment_1"
}
],
"id": "1",
"title": "sample request",
"url": "https://docs.kibe.la/wikis/sample_request/1"
}
}
イベント: Commentの投稿
- resource_type: comment
- action: create
- team: イベントが発生したチーム
- action_user: 投稿したユーザー
- comment: 投稿されたコメント
サンプルリクエスト
POST /payload HTTP/1.1
Host: localhost:3000
Content-Type: application/json
Content-Length: 1000
User-Agent: Kibela-Hookshot/v1
{
"action": "create",
"action_user": {
"account": "kibe",
"avatar_photo": {
"url": "https://cdn.kibe.la/media/public/1/kibe.png"
},
"id": "1",
"real_name": "kibe-san",
"url": "https://docs.kibe.la/@kibe"
},
"comment": {
"author": {
"account": "kibe",
"avatar_photo": {
"url": "https://cdn.kibe.la/media/public/1/kibe.png"
},
"id": "1",
"real_name": "kibe-san",
"url": "https://docs.kibe.la/@kibe"
},
"blog": {
"author": {
"account": "kibe",
"avatar_photo": {
"url": "https://cdn.kibe.la/media/public/1/kibe.png"
},
"id": "1",
"real_name": "kibe-san",
"url": "https://docs.kibe.la/@kibe"
},
"boards": [
{
"id": "1",
"name": "Product Team"
}
],
"content_html": "<h2>sample request</h2>",
"content_md": "## sample request",
"id": "1",
"title": "sample request",
"url": "https://docs.kibe.la/@kibe/1"
},
"content_html": "<h2>sample request</h2>",
"content_md": "## sample request",
"id": "1",
"url": "https://docs.kibe.la/@kibe/1#comment_1"
},
"resource_type": "comment",
"team": {
"name": "docs",
"url": "https://docs.kibe.la"
}
}
イベント: Commentの更新
- resource_type: comment
- action: update
- team: イベントが発生したチーム
- action_user: 更新したユーザー
- comment: 更新されたコメント
サンプルリクエスト
POST /payload HTTP/1.1
Host: localhost:3000
Content-Type: application/json
Content-Length: 1000
User-Agent: Kibela-Hookshot/v1
{
"action": "update",
"action_user": {
"account": "kibe",
"avatar_photo": {
"url": "https://cdn.kibe.la/media/public/1/kibe.png"
},
"id": "1",
"real_name": "kibe-san",
"url": "https://docs.kibe.la/@kibe"
},
"comment": {
"author": {
"account": "kibe",
"avatar_photo": {
"url": "https://cdn.kibe.la/media/public/1/kibe.png"
},
"id": "1",
"real_name": "kibe-san",
"url": "https://docs.kibe.la/@kibe"
},
"blog": {
"author": {
"account": "kibe",
"avatar_photo": {
"url": "https://cdn.kibe.la/media/public/1/kibe.png"
},
"id": "1",
"real_name": "kibe-san",
"url": "https://docs.kibe.la/@kibe"
},
"boards": [
{
"id": "1",
"name": "Product Team"
}
],
"content_html": "<h2>sample request</h2>",
"content_md": "## sample request",
"id": "1",
"title": "sample request",
"url": "https://docs.kibe.la/@kibe/1"
},
"content_html": "<h2>sample request</h2>",
"content_md": "## sample request",
"id": "1",
"url": "https://docs.kibe.la/@kibe/1#comment_1"
},
"resource_type": "comment",
"team": {
"name": "docs",
"url": "https://docs.kibe.la"
}
}
イベント: Commentの削除
- resource_type: comment
- action: delete
- team: イベントが発生したチーム
- action_user: 削除したユーザー
- comment: 削除されたコメント
サンプルリクエスト
POST /payload HTTP/1.1
Host: localhost:3000
Content-Type: application/json
Content-Length: 1000
User-Agent: Kibela-Hookshot/v1
{
"action": "delete",
"action_user": {
"account": "kibe",
"avatar_photo": {
"url": "https://cdn.kibe.la/media/public/1/kibe.png"
},
"id": "1",
"real_name": "kibe-san",
"url": "https://docs.kibe.la/@kibe"
},
"comment": {
"author": {
"account": "kibe",
"avatar_photo": {
"url": "https://cdn.kibe.la/media/public/1/kibe.png"
},
"id": "1",
"real_name": "kibe-san",
"url": "https://docs.kibe.la/@kibe"
},
"blog": {
"author": {
"account": "kibe",
"avatar_photo": {
"url": "https://cdn.kibe.la/media/public/1/kibe.png"
},
"id": "1",
"real_name": "kibe-san",
"url": "https://docs.kibe.la/@kibe"
},
"boards": [
{
"id": "1",
"name": "Product Team"
}
],
"content_html": "<h2>sample request</h2>",
"content_md": "## sample request",
"id": "1",
"title": "sample request",
"url": "https://docs.kibe.la/@kibe/1"
},
"id": "1",
"url": "https://docs.kibe.la/@kibe/1#comment_1"
},
"resource_type": "comment",
"team": {
"name": "docs",
"url": "https://docs.kibe.la"
}
}