I have been trying to play around a little with Trello's REST API. So far I am able to push some cards into the system with the regular POST call. What I would like to do now is to update a card with new information (i.e. new description, new comments or move the card to new list etc.).
Can I do this with a PUT- or a POST-method or do I first need to delete the old card and create a new one? If so, could anybody give an example of how they're doing this?
I've tried the following PUT-method, but it didn't seem to work:
PUT https://api.trello.com/1/cards/[existing card id]?key=[key]&token=[TOKEN]
and then I'll supply the parameters in the body of the request, like this:
{
"id": "542de77c832cff3f97884ad8",
"badges": {
"votes": 0,
"viewingMemberVoted": false,
"subscribed": false,
"fogbugz": "",
"checkItems": 0,
"checkItemsChecked": 0,
"comments": 0,
"attachments": 0,
"description": true,
"due": null
},
"checkItemStates": [],
"closed": false,
"dateLastActivity": "2014-10-03T00:02:04.042Z",
"desc": "test",
"descData": null,
"due": null,
"idBoard": "5417684179931e027c3d6bb9",
"idChecklists": [],
"idList": "5417684179931e027c3d6bbc",
"idMembers": [],
"idShort": 14,
"idAttachmentCover": null,
"manualCoverAttachment": false,
"labels": [],
"name": "new test #1 updated",
"pos": 131072,
"shortUrl": "https://trello.com/c/XYZ",
}
By the way, I am using Postman Client to execute my HTTP-methods. In the end I want to implement these functions into a small javascript module. Does anyone have an idea what I am doing wrong?
Thanks in advance!
x-www-form-urlencodedbody. - Aaron Dufour