What are the possible kinds of webhooks Trello can send? What attributes come in each?

混江龙づ霸主 提交于 2019-12-06 12:25:30

After fighting against these issues and my raw memory of what data should come in each webhook, along with the name of each different action, I decided to document this myself and released it as a (constantly updating as I find new webhooks out there) set of JSON files showing samples of the data each webhook will send to your endpoint:

https://github.com/websitesfortrello/trello-webhooks

For example, when a board is closed, a webhook will be sent with

{
  "id": "55d7232fc3597726f3e13ddf",
  "idMemberCreator": "50e853a3a98492ed05002257",
  "data": {
    "old": {
      "closed": false
    },
    "board": {
      "shortLink": "V50D5SXr",
      "id": "55af0b659f5c12edf972ac2e",
      "closed": true,
      "name": "Communal Website"
    }
  },
  "type": "updateBoard",
  "date": "2015-08-21T13:10:07.216Z",
  "memberCreator": {
    "username": "fiatjaf",
    "fullName": "Giovanni Parra",
    "avatarHash": "d2f9f8c8995019e2d3fda00f45d939b8",
    "id": "50e853a3a98492ed05002257",
    "initials": "GP"
  }
}

In fact, what comes is a JSON object like {"model": ..., "action": ... the data you see up there...}, but I've removed these for the sake o brevity and I'm showing only what comes inside the "action" key.

based on @flatjaf's repo, I gathered and summarized all* the webhooks types.

addAttachmentToCard
addChecklistToCard
addLabelToCard
addMemberToBoard
addMemberToCard
commentCard
convertToCardFromCheckItem
copyCard
createCard
createCheckItem
createLabel
createList
deleteAttachmentFromCard
deleteCard
deleteCheckItem
deleteComment
deleteLabel
emailCard
moveCardFromBoard
moveCardToBoard
moveListFromBoard
moveListToBoard
removeChecklistFromCard
removeLabelFromCard
removeMemberFromBoard
removeMemberFromCard
updateBoard
updateCard
updateCheckItem
updateCheckItemStateOnCard
updateChecklist
updateComment
updateLabel
updateList

hope it helps!

*I don't know if that list includes all the available webhooks types because as i already said, it's based on flatjaf's repo created 2 years ago

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!