In the webhooks documentation there is one form of the payload presented, this payload is sent as a json body during the create, and update webhook events.
The comment payload is as follows:
{
"comment": {
"body": "another",
"bug": {
"alias": "",
"assigned_to": {
"id": 1,
"login": "nobody@mozilla.org",
"real_name": "Nobody; OK to take it and work on it"
},
"cf_crash_signature": "",
"cf_fission_milestone": "---",
"cf_fx_iteration": "",
"cf_fx_points": "",
"cf_has_regression_range": "",
"cf_has_str": "",
"cf_last_resolved": null,
"cf_qa_whiteboard": "",
"cf_rank": "",
"cf_root_cause": "---",
"cf_status_firefox74": "---",
"cf_status_firefox75": "---",
"cf_status_firefox76": "---",
"cf_status_firefox77": "---",
"cf_status_firefox_esr68": "---",
"cf_tracking_firefox74": "---",
"cf_tracking_firefox75": "---",
"cf_tracking_firefox76": "---",
"cf_tracking_firefox77": "---",
"cf_tracking_firefox_esr68": "---",
"cf_tracking_firefox_relnote": "---",
"cf_tracking_firefox_sumo": "---",
"cf_user_story": "",
"cf_webcompat_priority": "---",
"classification": "Client Software",
"component": {
"id": 1876,
"name": "Sync"
},
"creation_time": "2020-10-16T06:24:06",
"flags": [],
"id": 1629704,
"is_private": false,
"keywords": [],
"last_change_time": "2020-10-16T06:26:21",
"operating_system": "Unspecified",
"platform": "Unspecified",
"priority": "",
"product": {
"id": 21,
"name": "Firefox"
},
"qa_contact": null,
"reporter": {
"id": 644672,
"login": "bsieber@mozilla.com",
"real_name": "Bryan Sieber [ :bsieber ]"
},
"resolution": "",
"severity": "--",
"status": {
"id": 2,
"name": "NEW"
},
"summary": "Webhook Test - Disregard",
"target_milestone": null,
"type": "defect",
"url": "",
"version": {
"id": 282,
"name": "unspecified"
},
"whiteboard": ""
},
"creation_time": "2020-10-16T06:28:41",
"id": 14748073,
"is_private": false,
"number": 2
},
"event": {
"action": "create",
"routing_key": "comment.create",
"target": "comment",
"time": "2020-10-16T06:28:41",
"user": {
"id": 644672,
"login": "bsieber@mozilla.com",
"real_name": "Bryan Sieber [ :bsieber ]"
}
},
"webhook_id": 11,
"webhook_name": "test-comment"
}
The attachment payload is as follows:
{
"attachment": {
"bug": {
"alias": "",
"assigned_to": {
"id": 1,
"login": "nobody@mozilla.org",
"real_name": "Nobody; OK to take it and work on it"
},
"cf_crash_signature": "",
"cf_fission_milestone": "---",
"cf_fx_iteration": "",
"cf_fx_points": "",
"cf_has_regression_range": "",
"cf_has_str": "",
"cf_last_resolved": null,
"cf_qa_whiteboard": "",
"cf_rank": "",
"cf_root_cause": "---",
"cf_status_firefox74": "---",
"cf_status_firefox75": "---",
"cf_status_firefox76": "---",
"cf_status_firefox77": "---",
"cf_status_firefox_esr68": "---",
"cf_tracking_firefox74": "---",
"cf_tracking_firefox75": "---",
"cf_tracking_firefox76": "---",
"cf_tracking_firefox77": "---",
"cf_tracking_firefox_esr68": "---",
"cf_tracking_firefox_relnote": "---",
"cf_tracking_firefox_sumo": "---",
"cf_user_story": "",
"cf_webcompat_priority": "---",
"classification": "Client Software",
"component": {
"id": 1876,
"name": "Sync"
},
"creation_time": "2020-10-16T06:24:06",
"flags": [],
"id": 1629704,
"is_private": false,
"keywords": [],
"last_change_time": "2020-10-16T07:05:47",
"operating_system": "Unspecified",
"platform": "Unspecified",
"priority": "",
"product": {
"id": 21,
"name": "Firefox"
},
"qa_contact": null,
"reporter": {
"id": 644672,
"login": "bsieber@mozilla.com",
"real_name": "Bryan Sieber [ :bsieber ]"
},
"resolution": "",
"severity": "--",
"status": {
"id": 2,
"name": "NEW"
},
"summary": "Webhook Test - Disregard",
"target_milestone": null,
"type": "defect",
"url": "",
"version": {
"id": 282,
"name": "unspecified"
},
"whiteboard": ""
},
"content_type": "text/plain",
"creation_time": "2020-10-16T07:08:12",
"description": "text test attachment",
"file_name": "file_1629704.txt",
"flags": [],
"id": 9180115,
"is_obsolete": false,
"is_patch": false,
"is_private": false,
"last_change_time": "2020-10-16T07:08:12"
},
"event": {
"action": "create",
"routing_key": "attachment.create",
"target": "attachment",
"time": "2020-10-16T07:08:12",
"user": {
"id": 644672,
"login": "bsieber@mozilla.com",
"real_name": "Bryan Sieber [ :bsieber ]"
}
},
"webhook_id": 12,
"webhook_name": "test-attachment"
}
The difference can be displayed as such:
Create/Update -- webhook_id, webhook_name, event, "bug"
Comment -- webhook_id, webhook_name, event, "comment"
Attachment -- webhook_id, webhook_name, event, "attachment"
Where the "object" in quotes is a nested json object.
The "comment" and "attachment" object embed the "bug" object
Bug 1675075 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
In the webhooks documentation there is one form of the payload presented, this payload is sent as a json body during the create, and update webhook events.
The comment payload is as follows:
```json
{
"comment": {
"body": "another",
"bug": {
"alias": "",
"assigned_to": {
"id": 1,
"login": "nobody@mozilla.org",
"real_name": "Nobody; OK to take it and work on it"
},
"cf_crash_signature": "",
"cf_fission_milestone": "---",
"cf_fx_iteration": "",
"cf_fx_points": "",
"cf_has_regression_range": "",
"cf_has_str": "",
"cf_last_resolved": null,
"cf_qa_whiteboard": "",
"cf_rank": "",
"cf_root_cause": "---",
"cf_status_firefox74": "---",
"cf_status_firefox75": "---",
"cf_status_firefox76": "---",
"cf_status_firefox77": "---",
"cf_status_firefox_esr68": "---",
"cf_tracking_firefox74": "---",
"cf_tracking_firefox75": "---",
"cf_tracking_firefox76": "---",
"cf_tracking_firefox77": "---",
"cf_tracking_firefox_esr68": "---",
"cf_tracking_firefox_relnote": "---",
"cf_tracking_firefox_sumo": "---",
"cf_user_story": "",
"cf_webcompat_priority": "---",
"classification": "Client Software",
"component": {
"id": 1876,
"name": "Sync"
},
"creation_time": "2020-10-16T06:24:06",
"flags": [],
"id": 1629704,
"is_private": false,
"keywords": [],
"last_change_time": "2020-10-16T06:26:21",
"operating_system": "Unspecified",
"platform": "Unspecified",
"priority": "",
"product": {
"id": 21,
"name": "Firefox"
},
"qa_contact": null,
"reporter": {
"id": 644672,
"login": "bsieber@mozilla.com",
"real_name": "Bryan Sieber [ :bsieber ]"
},
"resolution": "",
"severity": "--",
"status": {
"id": 2,
"name": "NEW"
},
"summary": "Webhook Test - Disregard",
"target_milestone": null,
"type": "defect",
"url": "",
"version": {
"id": 282,
"name": "unspecified"
},
"whiteboard": ""
},
"creation_time": "2020-10-16T06:28:41",
"id": 14748073,
"is_private": false,
"number": 2
},
"event": {
"action": "create",
"routing_key": "comment.create",
"target": "comment",
"time": "2020-10-16T06:28:41",
"user": {
"id": 644672,
"login": "bsieber@mozilla.com",
"real_name": "Bryan Sieber [ :bsieber ]"
}
},
"webhook_id": 11,
"webhook_name": "test-comment"
}
```
The attachment payload is as follows:
```json
{
"attachment": {
"bug": {
"alias": "",
"assigned_to": {
"id": 1,
"login": "nobody@mozilla.org",
"real_name": "Nobody; OK to take it and work on it"
},
"cf_crash_signature": "",
"cf_fission_milestone": "---",
"cf_fx_iteration": "",
"cf_fx_points": "",
"cf_has_regression_range": "",
"cf_has_str": "",
"cf_last_resolved": null,
"cf_qa_whiteboard": "",
"cf_rank": "",
"cf_root_cause": "---",
"cf_status_firefox74": "---",
"cf_status_firefox75": "---",
"cf_status_firefox76": "---",
"cf_status_firefox77": "---",
"cf_status_firefox_esr68": "---",
"cf_tracking_firefox74": "---",
"cf_tracking_firefox75": "---",
"cf_tracking_firefox76": "---",
"cf_tracking_firefox77": "---",
"cf_tracking_firefox_esr68": "---",
"cf_tracking_firefox_relnote": "---",
"cf_tracking_firefox_sumo": "---",
"cf_user_story": "",
"cf_webcompat_priority": "---",
"classification": "Client Software",
"component": {
"id": 1876,
"name": "Sync"
},
"creation_time": "2020-10-16T06:24:06",
"flags": [],
"id": 1629704,
"is_private": false,
"keywords": [],
"last_change_time": "2020-10-16T07:05:47",
"operating_system": "Unspecified",
"platform": "Unspecified",
"priority": "",
"product": {
"id": 21,
"name": "Firefox"
},
"qa_contact": null,
"reporter": {
"id": 644672,
"login": "bsieber@mozilla.com",
"real_name": "Bryan Sieber [ :bsieber ]"
},
"resolution": "",
"severity": "--",
"status": {
"id": 2,
"name": "NEW"
},
"summary": "Webhook Test - Disregard",
"target_milestone": null,
"type": "defect",
"url": "",
"version": {
"id": 282,
"name": "unspecified"
},
"whiteboard": ""
},
"content_type": "text/plain",
"creation_time": "2020-10-16T07:08:12",
"description": "text test attachment",
"file_name": "file_1629704.txt",
"flags": [],
"id": 9180115,
"is_obsolete": false,
"is_patch": false,
"is_private": false,
"last_change_time": "2020-10-16T07:08:12"
},
"event": {
"action": "create",
"routing_key": "attachment.create",
"target": "attachment",
"time": "2020-10-16T07:08:12",
"user": {
"id": 644672,
"login": "bsieber@mozilla.com",
"real_name": "Bryan Sieber [ :bsieber ]"
}
},
"webhook_id": 12,
"webhook_name": "test-attachment"
}
```
The difference can be displayed as such:
Create/Update -- webhook_id, webhook_name, event, "bug"
Comment -- webhook_id, webhook_name, event, "comment"
Attachment -- webhook_id, webhook_name, event, "attachment"
Where the "object" in quotes is a nested json object.
The "comment" and "attachment" object embed the "bug" object