Skip to content

Commit

Permalink
Add Content - Examples of Event Payloads
Browse files Browse the repository at this point in the history
 - #18
  • Loading branch information
aljawaid committed Sep 13, 2023
1 parent 60ffa12 commit 089e447
Showing 1 changed file with 358 additions and 1 deletion.
359 changes: 358 additions & 1 deletion Template/config/webhook-code-examples-event-payloads.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,362 @@
</p>
<h3 class=""><?= t('Task Creation') ?></h3>
<div class="panel">
<pre class=""></pre>
<pre class="">
{
"event_name": "task.create",
"event_data": {
"task_id": 5,
"task": {
"id": "5",
"reference": "",
"title": "My new task",
"description": "",
"date_creation": "1469315481",
"date_completed": null,
"date_modification": "1469315481",
"date_due": "0",
"date_started": "0",
"time_estimated": "0",
"time_spent": "0",
"color_id": "orange",
"project_id": "1",
"column_id": "2",
"owner_id": "1",
"creator_id": "1",
"position": "1",
"is_active": "1",
"score": "3",
"category_id": "0",
"priority": "2",
"swimlane_id": "0",
"date_moved": "1469315481",
"recurrence_status": "0",
"recurrence_trigger": "0",
"recurrence_factor": "0",
"recurrence_timeframe": "0",
"recurrence_basedate": "0",
"recurrence_parent": null,
"recurrence_child": null,
"category_name": null,
"swimlane_name": null,
"project_name": "Demo Project",
"default_swimlane": "Default swimlane",
"column_title": "Ready",
"assignee_username": "admin",
"assignee_name": null,
"creator_username": "admin",
"creator_name": null
}
}
}
</pre>
</div>
<h3 class=""><?= t('Task Modification') ?></h3>
<div class="panel">
<pre class="">
{
"event_name": "task.update",
"event_data": {
"task_id": "5",
"task": {
"id": "5",
"reference": "",
"title": "My new task",
"description": "New description",
"date_creation": "1469315481",
"date_completed": null,
"date_modification": "1469315531",
"date_due": "1469836800",
"date_started": "0",
"time_estimated": "0",
"time_spent": "0",
"color_id": "purple",
"project_id": "1",
"column_id": "2",
"owner_id": "1",
"creator_id": "1",
"position": "1",
"is_active": "1",
"score": "3",
"category_id": "0",
"priority": "2",
"swimlane_id": "0",
"date_moved": "1469315481",
"recurrence_status": "0",
"recurrence_trigger": "0",
"recurrence_factor": "0",
"recurrence_timeframe": "0",
"recurrence_basedate": "0",
"recurrence_parent": null,
"recurrence_child": null,
"category_name": null,
"swimlane_name": null,
"project_name": "Demo Project",
"default_swimlane": "Default swimlane",
"column_title": "Ready",
"assignee_username": "admin",
"assignee_name": null,
"creator_username": "admin",
"creator_name": null
},
"changes": {
"description": "New description",
"color_id": "purple",
"date_due": 1469836800
}
}
}
</pre>
</div>
<p class="">
<?= e('Task update events have a field called %s that contains updated values.', '<strong><code>changes</code></strong>') ?>
</p>
<h3 class=""><?= t('Comment Creation') ?></h3>
<div class="panel">
<pre class="">
{
"event_name": "comment.create",
"event_data": {
"comment": {
"id": "1",
"task_id": "5",
"user_id": "1",
"date_creation": "1469315727",
"comment": "My comment.",
"reference": null,
"username": "admin",
"name": null,
"email": null,
"avatar_path": null
},
"task": {
"id": "5",
"reference": "",
"title": "My new task",
"description": "New description",
"date_creation": "1469315481",
"date_completed": null,
"date_modification": "1469315531",
"date_due": "1469836800",
"date_started": "0",
"time_estimated": "0",
"time_spent": "0",
"color_id": "purple",
"project_id": "1",
"column_id": "2",
"owner_id": "1",
"creator_id": "1",
"position": "1",
"is_active": "1",
"score": "3",
"category_id": "0",
"priority": "2",
"swimlane_id": "0",
"date_moved": "1469315481",
"recurrence_status": "0",
"recurrence_trigger": "0",
"recurrence_factor": "0",
"recurrence_timeframe": "0",
"recurrence_basedate": "0",
"recurrence_parent": null,
"recurrence_child": null,
"category_name": null,
"swimlane_name": null,
"project_name": "Demo Project",
"default_swimlane": "Default swimlane",
"column_title": "Ready",
"assignee_username": "admin",
"assignee_name": null,
"creator_username": "admin",
"creator_name": null
}
}
}
</pre>
</div>
<h3 class=""><?= t('Subtask Creation') ?></h3>
<div class="panel">
<pre class="">
{
"event_name": "subtask.create",
"event_data": {
"subtask": {
"id": "1",
"title": "My subtask",
"status": "0",
"time_estimated": "0",
"time_spent": "0",
"task_id": "5",
"user_id": "1",
"position": "1",
"username": "admin",
"name": null,
"timer_start_date": 0,
"status_name": "Todo",
"is_timer_started": false
},
"task": {
"id": "5",
"reference": "",
"title": "My new task",
"description": "New description",
"date_creation": "1469315481",
"date_completed": null,
"date_modification": "1469315531",
"date_due": "1469836800",
"date_started": "0",
"time_estimated": "0",
"time_spent": "0",
"color_id": "purple",
"project_id": "1",
"column_id": "2",
"owner_id": "1",
"creator_id": "1",
"position": "1",
"is_active": "1",
"score": "3",
"category_id": "0",
"priority": "2",
"swimlane_id": "0",
"date_moved": "1469315481",
"recurrence_status": "0",
"recurrence_trigger": "0",
"recurrence_factor": "0",
"recurrence_timeframe": "0",
"recurrence_basedate": "0",
"recurrence_parent": null,
"recurrence_child": null,
"category_name": null,
"swimlane_name": null,
"project_name": "Demo Project",
"default_swimlane": "Default swimlane",
"column_title": "Ready",
"assignee_username": "admin",
"assignee_name": null,
"creator_username": "admin",
"creator_name": null
}
}
}
</pre>
</div>
<h3 class=""><?= t('Task Link Creation') ?></h3>
<div class="panel">
<pre class="">
{
"event_name": "task_internal_link.create_update",
"event_data": {
"task_link": {
"id": "2",
"opposite_task_id": "5",
"task_id": "4",
"link_id": "3",
"label": "is blocked by",
"opposite_link_id": "2"
},
"task": {
"id": "4",
"reference": "",
"title": "My task",
"description": "",
"date_creation": "1469314356",
"date_completed": null,
"date_modification": "1469315422",
"date_due": "1469491200",
"date_started": "0",
"time_estimated": "0",
"time_spent": "0",
"color_id": "green",
"project_id": "1",
"column_id": "1",
"owner_id": "1",
"creator_id": "1",
"position": "1",
"is_active": "1",
"score": "0",
"category_id": "0",
"priority": "0",
"swimlane_id": "0",
"date_moved": "1469315422",
"recurrence_status": "0",
"recurrence_trigger": "0",
"recurrence_factor": "0",
"recurrence_timeframe": "0",
"recurrence_basedate": "0",
"recurrence_parent": null,
"recurrence_child": null,
"category_name": null,
"swimlane_name": null,
"project_name": "Demo Project",
"default_swimlane": "Default swimlane",
"column_title": "Backlog",
"assignee_username": "admin",
"assignee_name": null,
"creator_username": "admin",
"creator_name": null
}
}
}
</pre>
</div>
<h3 class=""><?= t('File Upload') ?></h3>
<div class="panel">
<pre class="">
{
"event_name": "task.file.create",
"event_data": {
"file": {
"id": "1",
"name": "kanboard-latest.zip",
"path": "tasks/5/6f32893e467e76671965b1ec58c06a2440823752",
"is_image": "0",
"task_id": "5",
"date": "1469315613",
"user_id": "1",
"size": "4907308"
},
"task": {
"id": "5",
"reference": "",
"title": "My new task",
"description": "New description",
"date_creation": "1469315481",
"date_completed": null,
"date_modification": "1469315531",
"date_due": "1469836800",
"date_started": "0",
"time_estimated": "0",
"time_spent": "0",
"color_id": "purple",
"project_id": "1",
"column_id": "2",
"owner_id": "1",
"creator_id": "1",
"position": "1",
"is_active": "1",
"score": "3",
"category_id": "0",
"priority": "2",
"swimlane_id": "0",
"date_moved": "1469315481",
"recurrence_status": "0",
"recurrence_trigger": "0",
"recurrence_factor": "0",
"recurrence_timeframe": "0",
"recurrence_basedate": "0",
"recurrence_parent": null,
"recurrence_child": null,
"category_name": null,
"swimlane_name": null,
"project_name": "Demo Project",
"default_swimlane": "Default swimlane",
"column_title": "Ready",
"assignee_username": "admin",
"assignee_name": null,
"creator_username": "admin",
"creator_name": null
}
}
}
</pre>
</div>

0 comments on commit 089e447

Please sign in to comment.