Incoming
The purpose of the incoming webhook is to push data into taskblitz from another service or interface. Currently we support two types of incoming webhooks:
- Create tasks in a desired project
- Post a message in a desired chat channel
To send data via a incoming webhook you have to send a POST request to the shown webhook URL. The request must contain a JSON string as the body of a POST request with the payload data.
Create task
| Parameter | Type | Example |
|---|---|---|
| title | String | do something |
| note | String | some greate note text |
| duedate | Date (ISO 8601) | 2017-12-31 |
Example data Create Task
{
"title":"do something",
"note":"some greate note text",
"duedate":"2017-12-31"
}
Example using CURL
curl -X POST --data-urlencode '{"title":"something","note":"note text","duedate":"2017-12-31"}' https://app.taskblitz.com/webhook/incoming/fa57ff2f23937c543234f5asdadsas498f3a3061
Create message
| Parameter | Type | Example |
|---|---|---|
| text | String | a message to a chat channel |
Example data Create Message
{
"text":"a message to a chat channel",
}
Example using CURL
curl -X POST --data-urlencode '{"text":"a message to a chat channel"}' https://app.taskblitz.com/webhook/incoming/fa57ff2f23937c54323asdad4f5498f3a3061
User association
You can specify a userid in the request paylod: "uid":1234. If not given the new message/task will be automatically associated with the creator of the webhook.
Outgoing
Outgoing Webhooks allow you to listen for triggers, which will then send relevant data to external URL(s) in real-time. There are several triggers and conditions when a webhook will be send. You will receive a POST call containing a json with the type of element, its url, its id and the action that took place. To verify that the request is from us we include a secret hash parameter in the request.
Example playload
{"url":"https:\\app.taskblitz.com/tasks/show/3905",
"message":"Set task to done",
"type":"task",
"action":"setdone",
"id":"3905",
"hash":"8541074e2e7aa7131c5e33849e463266",
"user":"erich@test.com"}
| Parameter | Type | Example | Description |
|---|---|---|---|
| type | String | task | The element type |
| action | String | setdone | The action that has been triggerd |
| id | Integer | 123 | Id of the element |
| user | String | erich@test.com | Email of the user that triggerd the action |
| url | String | https:\\app.taskblitz.com/tasks/show/390l | Url to the element |
| apiurl | String | https:\\app.taskblitz.com/api/tasks/3901 | API call to the element |
| hash | String | 8541074e2e7aa7131c5e33849e463266 | Hash to verify the request’s origin |