12
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Backlogから送信されるPOSTリクエストの内容〜Webhook〜

Posted at

###お命頂だいっ!
どうも、リクームです。

Backlogでのイベントを検知してアプリケーションを作成した際に、APIの仕様が見当たらなかったため、自分用にまとめてみました。
※ここで載せているjsonはBacklogインテグレーションの中の「Webhook」から参照することが可能です。
※個人情報に当たる部分などはマスキングしています。

課題の追加

課題の追加
{
    "created": "2019-02-13T23:27:02Z",
    "project": {
        "archived": false,
        "projectKey": "TEST",
        "name": "TestProject",
        "chartEnabled": false,
        "id": 100,
        "subtaskingEnabled": false
    },
    "id": 10,
    "type": 1,
    "content": {
        "summary": "test issue",
        "key_id": 100,
        "customFields": [],
        "dueDate": "",
        "description": "test description",
        "priority": {
            "name": "",
            "id": null
        },
        "resolution": {
            "name": "",
            "id": null
        },
        "actualHours": null,
        "issueType": {
            "color": "null",
            "name": "Bug",
            "displayOrder": null,
            "id": 400,
            "projectId": null
        },
        "milestone": [
            {
                "archived": "false",
                "releaseDueDate": "null",
                "name": "prototype release",
                "displayOrder": null,
                "description": "",
                "id": null,
                "projectId": null,
                "startDate": "null"
            },
            {
                "archived": "false",
                "releaseDueDate": "null",
                "name": "alpha release",
                "displayOrder": null,
                "description": "",
                "id": null,
                "projectId": null,
                "startDate": "null"
            },
            {
                "archived": "false",
                "releaseDueDate": "null",
                "name": "beta release",
                "displayOrder": null,
                "description": "",
                "id": null,
                "projectId": null,
                "startDate": "null"
            },
            {
                "archived": "false",
                "releaseDueDate": "null",
                "name": "product release",
                "displayOrder": null,
                "description": "",
                "id": null,
                "projectId": null,
                "startDate": "null"
            }
        ],
        "versions": [
            {
                "archived": "false",
                "releaseDueDate": "null",
                "name": "Version0.1",
                "displayOrder": null,
                "description": "",
                "id": null,
                "projectId": null,
                "startDate": "null"
            },
            {
                "archived": "false",
                "releaseDueDate": "null",
                "name": "Version0.2",
                "displayOrder": null,
                "description": "",
                "id": null,
                "projectId": null,
                "startDate": "null"
            },
            {
                "archived": "false",
                "releaseDueDate": "null",
                "name": "Version1.0",
                "displayOrder": null,
                "description": "",
                "id": null,
                "projectId": null,
                "startDate": "null"
            }
        ],
        "parentIssueId": null,
        "estimatedHours": null,
        "id": 100,
        "assignee": null,
        "category": [
            {
                "name": "Category1",
                "displayOrder": null,
                "id": null
            },
            {
                "name": "Category2",
                "displayOrder": null,
                "id": null
            }
        ],
        "startDate": "",
        "status": {
            "name": "In Progress",
            "id": 2
        }
    },
    "notifications": [],
    "createdUser": {
        "nulabAccount": {
            "nulabId": "nulabIdが記載されます。",
            "name": "名前が記載されます。",
            "uniqueId": "uniqueIdが記載されます。"
        },
        "name": "名前が記載されます。",
        "mailAddress": null,
        "id": "idが記載されます。",
        "roleType": 1,
        "lang": "ja",
        "userId": null
    }
}

課題の更新

課題の更新
{
    "created": "2019-02-13T23:27:06Z",
    "project": {
        "archived": false,
        "projectKey": "TEST",
        "name": "TestProject",
        "chartEnabled": false,
        "id": 100,
        "subtaskingEnabled": false
    },
    "id": 10,
    "type": 2,
    "content": {
        "summary": "test issue",
        "key_id": 100,
        "changes": [
            {
                "field": "priority",
                "old_value": "",
                "type": "standard",
                "new_value": ""
            }
        ],
        "description": "test description",
        "comment": {
            "id": 200,
            "content": ""
        },
        "id": 100
    },
    "notifications": [],
    "createdUser": {
        "nulabAccount": {
            "nulabId": "nulabIdが記載されます。",
            "name": "名前が記載されます。",
            "uniqueId": "uniqueIdが記載されます。"
        },
        "name": "名前が記載されます。",
        "mailAddress": null,
        "id": "idが記載されます。",
        "roleType": 1,
        "lang": "ja",
        "userId": null
    }
}

課題にコメント

課題にコメント
{
    "created": "2019-02-13T23:27:10Z",
    "project": {
        "archived": false,
        "projectKey": "TEST",
        "name": "TestProject",
        "chartEnabled": false,
        "id": 100,
        "subtaskingEnabled": false
    },
    "id": 10,
    "type": 3,
    "content": {
        "summary": "test issue",
        "key_id": 100,
        "description": "test description",
        "comment": {
            "id": 200,
            "content": "test comment"
        },
        "id": 100
    },
    "notifications": [],
    "createdUser": {
        "nulabAccount": {
            "nulabId": "nulabIdが記載されます。",
            "name": "名前が記載されます。",
            "uniqueId": "uniqueIdが記載されます。"
        },
        "name": "名前が記載されます。",
        "mailAddress": null,
        "id": "idが記載されます。",
        "roleType": 1,
        "lang": "ja",
        "userId": null
    }
}

課題の削除

課題の削除
{
    "created": "2019-02-13T23:27:14Z",
    "project": {
        "archived": false,
        "projectKey": "TEST",
        "name": "TestProject",
        "chartEnabled": false,
        "id": 100,
        "subtaskingEnabled": false
    },
    "id": 10,
    "type": 4,
    "content": {
        "key_id": 100,
        "id": 100
    },
    "notifications": [],
    "createdUser": {
        "nulabAccount": {
            "nulabId": "nulabIdが記載されます。",
            "name": "名前が記載されます。",
            "uniqueId": "uniqueIdが記載されます。"
        },
        "name": "名前が記載されます。",
        "mailAddress": null,
        "id": "idが記載されます。",
        "roleType": 1,
        "lang": "ja",
        "userId": null
    }
}

課題をまとめて更新

課題をまとめて更新
{
    "created": "2019-02-13T23:27:17Z",
    "project": {
        "archived": false,
        "projectKey": "TEST",
        "name": "TestProject",
        "chartEnabled": false,
        "id": 100,
        "subtaskingEnabled": false
    },
    "id": 10,
    "type": 14,
    "content": {
        "link": [
            {
                "key_id": "100",
                "id": "100",
                "title": "test issue1"
            },
            {
                "key_id": "101",
                "id": "101",
                "title": "test issue2"
            }
        ],
        "changes": [
            {
                "field": "priority",
                "type": "standard",
                "new_value": "高"
            }
        ],
        "tx_id": "200"
    },
    "notifications": [],
    "createdUser": {
        "nulabAccount": {
            "nulabId": "nulabIdが記載されます。",
            "name": "名前が記載されます。",
            "uniqueId": "uniqueIdが記載されます。"
        },
        "name": "名前が記載されます。",
        "mailAddress": null,
        "id": "idが記載されます。",
        "roleType": 1,
        "lang": "ja",
        "userId": null
    }
}

お知らせの追加

お知らせの追加
{
    "created": "2019-02-13T23:27:21Z",
    "project": {
        "archived": false,
        "projectKey": "TEST",
        "name": "TestProject",
        "chartEnabled": false,
        "id": 100,
        "subtaskingEnabled": false
    },
    "id": 10,
    "type": 17,
    "content": {
        "summary": "test issue",
        "key_id": 100,
        "description": "test description",
        "comment": {
            "id": 200,
            "content": "test comment"
        },
        "id": 100
    },
    "notifications": [],
    "createdUser": {
        "nulabAccount": {
            "nulabId": "nulabIdが記載されます。",
            "name": "名前が記載されます。",
            "uniqueId": "uniqueIdが記載されます。"
        },
        "name": "名前が記載されます。",
        "mailAddress": null,
        "id": "idが記載されます。",
        "roleType": 1,
        "lang": "ja",
        "userId": null
    }
}

wikiの追加

wikiの追加
{
    "created": "2019-02-13T23:27:24Z",
    "project": {
        "archived": false,
        "projectKey": "TEST",
        "name": "TestProject",
        "chartEnabled": false,
        "id": 100,
        "subtaskingEnabled": false
    },
    "id": 10,
    "type": 5,
    "content": {
        "name": "test wiki",
        "id": 100,
        "content": "test content"
    },
    "notifications": [],
    "createdUser": {
        "nulabAccount": {
            "nulabId": "nulabIdが記載されます。",
            "name": "名前が記載されます。",
            "uniqueId": "uniqueIdが記載されます。"
        },
        "name": "名前が記載されます。",
        "mailAddress": null,
        "id": "idが記載されます。",
        "roleType": 1,
        "lang": "ja",
        "userId": null
    }
}

wikiの更新

wikiの更新
{
    "created": "2019-02-13T23:27:29Z",
    "project": {
        "archived": false,
        "projectKey": "TEST",
        "name": "TestProject",
        "chartEnabled": false,
        "id": 100,
        "subtaskingEnabled": false
    },
    "id": 10,
    "type": 6,
    "content": {
        "name": "test wiki",
        "diff": "1c1\n<test content---\n>test",
        "id": 100,
        "version": 3,
        "content": "test content"
    },
    "notifications": [],
    "createdUser": {
        "nulabAccount": {
            "nulabId": "nulabIdが記載されます。",
            "name": "名前が記載されます。",
            "uniqueId": "uniqueIdが記載されます。"
        },
        "name": "名前が記載されます。",
        "mailAddress": null,
        "id": "idが記載されます。",
        "roleType": 1,
        "lang": "ja",
        "userId": null
    }
}

wikiの削除

wikiの削除
{
    "created": "2019-02-13T23:27:32Z",
    "project": {
        "archived": false,
        "projectKey": "TEST",
        "name": "TestProject",
        "chartEnabled": false,
        "id": 100,
        "subtaskingEnabled": false
    },
    "id": 10,
    "type": 7,
    "content": {
        "name": "test wiki",
        "id": 100,
        "content": "test content"
    },
    "notifications": [],
    "createdUser": {
        "nulabAccount": {
            "nulabId": "nulabIdが記載されます。",
            "name": "名前が記載されます。",
            "uniqueId": "uniqueIdが記載されます。"
        },
        "name": "名前が記載されます。",
        "mailAddress": null,
        "id": "idが記載されます。",
        "roleType": 1,
        "lang": "ja",
        "userId": null
    }
}

##ファイルの追加

ファイルの追加
{
    "created": "2019-02-13T23:27:36Z",
    "project": {
        "archived": false,
        "projectKey": "TEST",
        "name": "TestProject",
        "chartEnabled": false,
        "id": 100,
        "subtaskingEnabled": false
    },
    "id": 10,
    "type": 8,
    "content": {
        "size": 128,
        "name": "test.txt",
        "id": 100,
        "dir": "/"
    },
    "notifications": [],
    "createdUser": {
        "nulabAccount": {
            "nulabId": "nulabIdが記載されます。",
            "name": "名前が記載されます。",
            "uniqueId": "uniqueIdが記載されます。"
        },
        "name": "名前が記載されます。",
        "mailAddress": null,
        "id": "idが記載されます。",
        "roleType": 1,
        "lang": "ja",
        "userId": null
    }
}

##ファイルの更新

ファイルの更新
{
    "created": "2019-02-13T23:27:39Z",
    "project": {
        "archived": false,
        "projectKey": "TEST",
        "name": "TestProject",
        "chartEnabled": false,
        "id": 100,
        "subtaskingEnabled": false
    },
    "id": 10,
    "type": 9,
    "content": {
        "size": 128,
        "name": "test.txt",
        "id": 100,
        "dir": "/"
    },
    "notifications": [],
    "createdUser": {
        "nulabAccount": {
            "nulabId": "nulabIdが記載されます。",
            "name": "名前が記載されます。",
            "uniqueId": "uniqueIdが記載されます。"
        },
        "name": "名前が記載されます。",
        "mailAddress": null,
        "id": "idが記載されます。",
        "roleType": 1,
        "lang": "ja",
        "userId": null
    }
}

##ファイルの削除

ファイルの削除
{
    "created": "2019-02-13T23:27:42Z",
    "project": {
        "archived": false,
        "projectKey": "TEST",
        "name": "TestProject",
        "chartEnabled": false,
        "id": 100,
        "subtaskingEnabled": false
    },
    "id": 10,
    "type": 10,
    "content": {
        "size": 128,
        "name": "test.txt",
        "id": 100,
        "dir": "/"
    },
    "notifications": [],
    "createdUser": {
        "nulabAccount": {
            "nulabId": "nulabIdが記載されます。",
            "name": "名前が記載されます。",
            "uniqueId": "uniqueIdが記載されます。"
        },
        "name": "名前が記載されます。",
        "mailAddress": null,
        "id": "idが記載されます。",
        "roleType": 1,
        "lang": "ja",
        "userId": null
    }
}

##Subversionコミット

Subversionコミット
{
    "created": "2019-02-13T23:27:46Z",
    "project": {
        "archived": false,
        "projectKey": "TEST",
        "name": "TestProject",
        "chartEnabled": false,
        "id": 100,
        "subtaskingEnabled": false
    },
    "id": 10,
    "type": 11,
    "content": {
        "rev": 100,
        "comment": "test commit"
    },
    "notifications": [],
    "createdUser": {
        "nulabAccount": {
            "nulabId": "nulabIdが記載されます。",
            "name": "名前が記載されます。",
            "uniqueId": "uniqueIdが記載されます。"
        },
        "name": "名前が記載されます。",
        "mailAddress": null,
        "id": "idが記載されます。",
        "roleType": 1,
        "lang": "ja",
        "userId": null
    }
}

##Gitプッシュ

Gitプッシュ
{
    "created": "2019-02-13T23:27:49Z",
    "project": {
        "archived": false,
        "projectKey": "TEST",
        "name": "TestProject",
        "chartEnabled": false,
        "id": 100,
        "subtaskingEnabled": false
    },
    "id": 10,
    "type": 12,
    "content": {
        "ref": "refs/heads/test",
        "revision_type": "commit",
        "revisions": [
            {
                "rev": "e1cf1103242ea1ce59382ac2e2ab4de43751524d",
                "link": {
                    "text": "e1cf1103242ea1ce59382ac2e2ab4de43751524d",
                    "url": "git/TEST/test/commit/e1cf1103242ea1ce59382ac2e2ab4de43751524d"
                },
                "comment": "test"
            }
        ],
        "change_type": "update",
        "revision_count": 1,
        "repository": {
            "name": "app",
            "id": 3
        }
    },
    "notifications": [],
    "createdUser": {
        "nulabAccount": {
            "nulabId": "nulabIdが記載されます。",
            "name": "名前が記載されます。",
            "uniqueId": "uniqueIdが記載されます。"
        },
        "name": "名前が記載されます。",
        "mailAddress": null,
        "id": "idが記載されます。",
        "roleType": 1,
        "lang": "ja",
        "userId": null
    }
}

##Gitリポジトリの作成

Gitリポジトリの作成
{
    "created": "2019-02-13T23:27:52Z",
    "project": {
        "archived": false,
        "projectKey": "TEST",
        "name": "TestProject",
        "chartEnabled": false,
        "id": 100,
        "subtaskingEnabled": false
    },
    "id": 10,
    "type": 13,
    "content": {
        "repository": {
            "name": "test",
            "description": "",
            "id": 100
        }
    },
    "notifications": [],
    "createdUser": {
        "nulabAccount": {
            "nulabId": "nulabIdが記載されます。",
            "name": "名前が記載されます。",
            "uniqueId": "uniqueIdが記載されます。"
        },
        "name": "名前が記載されます。",
        "mailAddress": null,
        "id": "idが記載されます。",
        "roleType": 1,
        "lang": "ja",
        "userId": null
    }
}

##プロジェクトに参加

プロジェクトに参加
{
    "created": "2019-02-13T23:27:56Z",
    "project": {
        "archived": false,
        "projectKey": "TEST",
        "name": "TestProject",
        "chartEnabled": false,
        "id": 100,
        "subtaskingEnabled": false
    },
    "id": 10,
    "type": 15,
    "content": {
        "comment": "",
        "users": [
            {
                "nulabAccount": {
                    "nulabId": "nulabIdが記載されます。",
                    "name": "名前が記載されます。",
                    "uniqueId": "uniqueIdが記載されます。"
                },
                "name": "test user",
                "id": 100
            }
        ]
    },
    "notifications": [],
    "createdUser": {
        "nulabAccount": {
            "nulabId": "nulabIdが記載されます。",
            "name": "名前が記載されます。",
            "uniqueId": "uniqueIdが記載されます。"
        },
        "name": "名前が記載されます。",
        "mailAddress": null,
        "id": "idが記載されます。",
        "roleType": 1,
        "lang": "ja",
        "userId": null
    }
}

##プロジェクトから脱退

プロジェクトから脱退
{
    "created": "2019-02-13T23:28:01Z",
    "project": {
        "archived": false,
        "projectKey": "TEST",
        "name": "TestProject",
        "chartEnabled": false,
        "id": 100,
        "subtaskingEnabled": false
    },
    "id": 10,
    "type": 16,
    "content": {
        "users": [
            {
                "nulabAccount": {
                    "nulabId": "nulabIdが記載されます。",
                    "name": "名前が記載されます。",
                    "uniqueId": "uniqueIdが記載されます。"
                },
                "name": "test user",
                "id": 100
            }
        ]
    },
    "notifications": [],
    "createdUser": {
        "nulabAccount": {
            "nulabId": "nulabIdが記載されます。",
            "name": "名前が記載されます。",
            "uniqueId": "uniqueIdが記載されます。"
        },
        "name": "名前が記載されます。",
        "mailAddress": null,
        "id": "idが記載されます。",
        "roleType": 1,
        "lang": "ja",
        "userId": null
    }
}

##プルリクエストの追加

プルリクエストの追加
{
    "created": "2019-02-13T23:28:04Z",
    "project": {
        "archived": false,
        "projectKey": "TEST",
        "name": "TestProject",
        "chartEnabled": false,
        "id": 100,
        "subtaskingEnabled": false
    },
    "id": 10,
    "type": 18,
    "content": {
        "summary": "test pull request",
        "number": 100,
        "issue": null,
        "changes": [],
        "description": "test description",
        "diff": null,
        "comment": null,
        "id": 100,
        "assignee": null,
        "repository": {
            "name": "test repository",
            "description": "test description",
            "id": 100
        },
        "branch": "feature",
        "base": "master"
    },
    "notifications": [],
    "createdUser": {
        "nulabAccount": {
            "nulabId": "nulabIdが記載されます。",
            "name": "名前が記載されます。",
            "uniqueId": "uniqueIdが記載されます。"
        },
        "name": "名前が記載されます。",
        "mailAddress": null,
        "id": "idが記載されます。",
        "roleType": 1,
        "lang": "ja",
        "userId": null
    }
}

##プルリクエストの更新

プルリクエストの更新
{
    "created": "2019-02-13T23:28:07Z",
    "project": {
        "archived": false,
        "projectKey": "TEST",
        "name": "TestProject",
        "chartEnabled": false,
        "id": 100,
        "subtaskingEnabled": false
    },
    "id": 10,
    "type": 19,
    "content": {
        "summary": "test pull request",
        "number": 100,
        "issue": null,
        "changes": [],
        "description": "test description",
        "diff": "1c1\n<test description---\n>test",
        "comment": null,
        "id": 100,
        "assignee": null,
        "repository": {
            "name": "test repository",
            "description": "test description",
            "id": 100
        },
        "branch": "feature",
        "base": "master"
    },
    "notifications": [],
    "createdUser": {
        "nulabAccount": {
            "nulabId": "nulabIdが記載されます。",
            "name": "名前が記載されます。",
            "uniqueId": "uniqueIdが記載されます。"
        },
        "name": "名前が記載されます。",
        "mailAddress": null,
        "id": "idが記載されます。",
        "roleType": 1,
        "lang": "ja",
        "userId": null
    }
}

##プルリクエストにコメント

プルリクエストにコメント
{
    "created": "2019-02-13T23:28:10Z",
    "project": {
        "archived": false,
        "projectKey": "TEST",
        "name": "TestProject",
        "chartEnabled": false,
        "id": 100,
        "subtaskingEnabled": false
    },
    "id": 10,
    "type": 20,
    "content": {
        "summary": "test pull request",
        "number": 100,
        "issue": null,
        "changes": [],
        "description": "test description",
        "diff": null,
        "comment": {
            "id": 100,
            "content": "test comment"
        },
        "id": 100,
        "assignee": null,
        "repository": {
            "name": "test repository",
            "description": "test description",
            "id": 100
        },
        "branch": "feature",
        "base": "master"
    },
    "notifications": [],
    "createdUser": {
        "nulabAccount": {
            "nulabId": "nulabIdが記載されます。",
            "name": "名前が記載されます。",
            "uniqueId": "uniqueIdが記載されます。"
        },
        "name": "名前が記載されます。",
        "mailAddress": null,
        "id": "idが記載されます。",
        "roleType": 1,
        "lang": "ja",
        "userId": null
    }
}

##発生バージョン/マイルストーンの追加

発生バージョン/マイルストーンの追加
{
    "created": "2019-02-13T23:28:13Z",
    "project": {
        "archived": false,
        "projectKey": "TEST",
        "name": "TestProject",
        "chartEnabled": false,
        "id": 100,
        "subtaskingEnabled": false
    },
    "id": 10,
    "type": 22,
    "content": {
        "name": "test version",
        "description": "test description",
        "id": 100,
        "reference_date": "",
        "start_date": ""
    },
    "notifications": [],
    "createdUser": {
        "nulabAccount": {
            "nulabId": "nulabIdが記載されます。",
            "name": "名前が記載されます。",
            "uniqueId": "uniqueIdが記載されます。"
        },
        "name": "名前が記載されます。",
        "mailAddress": null,
        "id": "idが記載されます。",
        "roleType": 1,
        "lang": "ja",
        "userId": null
    }
}

##発生バージョン/マイルストーンの更新

発生バージョン/マイルストーンの更新
{
    "created": "2019-02-13T23:28:16Z",
    "project": {
        "archived": false,
        "projectKey": "TEST",
        "name": "TestProject",
        "chartEnabled": false,
        "id": 100,
        "subtaskingEnabled": false
    },
    "id": 10,
    "type": 23,
    "content": {
        "name": "test version",
        "changes": [
            {
                "field": "name",
                "old_value": "test old version",
                "new_value": "test version"
            },
            {
                "field": "description",
                "old_value": "test old description",
                "new_value": "test description"
            }
        ],
        "id": 100
    },
    "notifications": [],
    "createdUser": {
        "nulabAccount": {
            "nulabId": "nulabIdが記載されます。",
            "name": "名前が記載されます。",
            "uniqueId": "uniqueIdが記載されます。"
        },
        "name": "名前が記載されます。",
        "mailAddress": null,
        "id": "idが記載されます。",
        "roleType": 1,
        "lang": "ja",
        "userId": null
    }
}

##発生バージョン/マイルストーンの削除

発生バージョン/マイルストーンの削除
{
    "created": "2019-02-13T23:28:18Z",
    "project": {
        "archived": false,
        "projectKey": "TEST",
        "name": "TestProject",
        "chartEnabled": false,
        "id": 100,
        "subtaskingEnabled": false
    },
    "id": 10,
    "type": 24,
    "content": {
        "name": "test version",
        "description": "test description",
        "id": 100,
        "reference_date": "",
        "start_date": ""
    },
    "notifications": [],
    "createdUser": {
        "nulabAccount": {
            "nulabId": "nulabIdが記載されます。",
            "name": "名前が記載されます。",
            "uniqueId": "uniqueIdが記載されます。"
        },
        "name": "名前が記載されます。",
        "mailAddress": null,
        "id": "idが記載されます。",
        "roleType": 1,
        "lang": "ja",
        "userId": null
    }
}
12
5
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?