Backlogのwebhookの中身


BacklogのWebhookの中身を以下にメモします。
※2016/10時点です。

公式ドキュメントに記載がないため、勝手にコロコロ変わる可能性があると思ってます。


## 課題の追加
```
{
    "content": {
        "actualHours": null, 
        "assignee": null, 
        "category": [
            {
                "displayOrder": null, 
                "id": null, 
                "name": "Category1"
            }, 
            {
                "displayOrder": null, 
                "id": null, 
                "name": "Category2"
            }
        ], 
        "customFields": [], 
        "description": "test description", 
        "dueDate": "", 
        "estimatedHours": null, 
        "id": 100, 
        "issueType": {
            "color": "null", 
            "displayOrder": null, 
            "id": 400, 
            "name": "Bug", 
            "projectId": null
        }, 
        "key_id": 100, 
        "milestone": [
            {
                "archived": "false", 
                "description": "", 
                "displayOrder": null, 
                "id": null, 
                "name": "prototype release", 
                "projectId": null, 
                "releaseDueDate": "null", 
                "startDate": "null"
            }, 
            {
                "archived": "false", 
                "description": "", 
                "displayOrder": null, 
                "id": null, 
                "name": "alpha release", 
                "projectId": null, 
                "releaseDueDate": "null", 
                "startDate": "null"
            }, 
            {
                "archived": "false", 
                "description": "", 
                "displayOrder": null, 
                "id": null, 
                "name": "beta release", 
                "projectId": null, 
                "releaseDueDate": "null", 
                "startDate": "null"
            }, 
            {
                "archived": "false", 
                "description": "", 
                "displayOrder": null, 
                "id": null, 
                "name": "product release", 
                "projectId": null, 
                "releaseDueDate": "null", 
                "startDate": "null"
            }
        ], 
        "parentIssueId": null, 
        "priority": {
            "id": null, 
            "name": ""
        }, 
        "resolution": {
            "id": null, 
            "name": ""
        }, 
        "startDate": "", 
        "status": {
            "id": 2, 
            "name": "In Progress"
        }, 
        "summary": "test issue", 
        "versions": [
            {
                "archived": "false", 
                "description": "", 
                "displayOrder": null, 
                "id": null, 
                "name": "Version0.1", 
                "projectId": null, 
                "releaseDueDate": "null", 
                "startDate": "null"
            }, 
            {
                "archived": "false", 
                "description": "", 
                "displayOrder": null, 
                "id": null, 
                "name": "Version0.2", 
                "projectId": null, 
                "releaseDueDate": "null", 
                "startDate": "null"
            }, 
            {
                "archived": "false", 
                "description": "", 
                "displayOrder": null, 
                "id": null, 
                "name": "Version1.0", 
                "projectId": null, 
                "releaseDueDate": "null", 
                "startDate": "null"
            }
        ]
    }, 
    "created": "2016-10-15T09:37:43Z", 
    "createdUser": {
        "id": 46584, 
        "mailAddress": null, 
        "name": "高橋洋樹", 
        "nulabAccount": {
            "name": "高橋洋樹", 
            "nulabId": "xxxxxxxx", 
            "uniqueId": "xxxxxxxx"
        }, 
        "roleType": 1, 
        "userId": null
    }, 
    "id": 10, 
    "notifications": [], 
    "project": {
        "archived": false, 
        "chartEnabled": false, 
        "id": 100, 
        "name": "TestProject", 
        "projectKey": "TEST", 
        "subtaskingEnabled": false
    }, 
    "type": 1
}
```


##課題の更新
```
{
    "content": {
        "changes": [
            {
                "field": "priority", 
                "new_value": "", 
                "old_value": "", 
                "type": "standard"
            }
        ], 
        "comment": {
            "content": "", 
            "id": 200
        }, 
        "description": "test description", 
        "id": 100, 
        "key_id": 100, 
        "summary": "test issue"
    }, 
    "created": "2016-10-15T09:40:22Z", 
    "createdUser": {
        "id": 46584, 
        "mailAddress": null, 
        "name": "高橋洋樹", 
        "nulabAccount": {
            "name": "高橋洋樹", 
            "nulabId": "xxxxxxxx", 
            "uniqueId": "xxxxxxxx"
        }, 
        "roleType": 1, 
        "userId": null
    }, 
    "id": 10, 
    "notifications": [], 
    "project": {
        "archived": false, 
        "chartEnabled": false, 
        "id": 100, 
        "name": "TestProject", 
        "projectKey": "TEST", 
        "subtaskingEnabled": false
    }, 
    "type": 2
}

```

##課題にコメント
```
{
    "content": {
        "comment": {
            "content": "test comment", 
            "id": 200
        }, 
        "description": "test description", 
        "id": 100, 
        "key_id": 100, 
        "summary": "test issue"
    }, 
    "created": "2016-10-15T09:41:39Z", 
    "createdUser": {
        "id": 46584, 
        "mailAddress": null, 
        "name": "高橋洋樹", 
        "nulabAccount": {
            "name": "高橋洋樹", 
            "nulabId": "xxxxxxxx", 
            "uniqueId": "xxxxxxxx"
        }, 
        "roleType": 1, 
        "userId": null
    }, 
    "id": 10, 
    "notifications": [], 
    "project": {
        "archived": false, 
        "chartEnabled": false, 
        "id": 100, 
        "name": "TestProject", 
        "projectKey": "TEST", 
        "subtaskingEnabled": false
    }, 
    "type": 3
}
```

##課題をまとめて更新
```
{
    "content": {
        "changes": [
            {
                "field": "priority", 
                "new_value": "高", 
                "type": "standard"
            }
        ], 
        "link": [
            {
                "id": "100", 
                "key_id": "100", 
                "title": "test issue1"
            }, 
            {
                "id": "101", 
                "key_id": "101", 
                "title": "test issue2"
            }
        ], 
        "tx_id": "200"
    }, 
    "created": "2016-10-15T09:42:29Z", 
    "createdUser": {
        "id": 46584, 
        "mailAddress": null, 
        "name": "高橋洋樹", 
        "nulabAccount": {
            "name": "高橋洋樹", 
            "nulabId": "xxxxxxxx", 
            "uniqueId": "xxxxxxxx"
        }, 
        "roleType": 1, 
        "userId": null
    }, 
    "id": 10, 
    "notifications": [], 
    "project": {
        "archived": false, 
        "chartEnabled": false, 
        "id": 100, 
        "name": "TestProject", 
        "projectKey": "TEST", 
        "subtaskingEnabled": false
    }, 
    "type": 14
}
```