Forums Mingle API

Creating/updating cards#638

Subscribe to Creating/updating cards 5 post(s), 3 voice(s)

 
Avatar Wouter van H... 2 post(s) #1624

Hi,

according to http://studios.thoughtworks.com/mingle/2.0/help/mingle_api_cards.html I should be able to use POST and PUT requests to
change properties of my cards.

When I use a POST to http://mingle/projects/project/cards.xml with the data section set to urlencoded ‘card[name]=foo&card[card_type_name]=Story’, I see the request come by in the mingle server log like thus:

Parameters: {"card"=>{"name"=>"foo", "card_type_name"=>"Story"}, "controller"=>"cards", "action"=>"create", "project_id"=>"placeholder", "format"=>"xml"}

The card does get created, but it is not of the type I requested. Neither do other fields seem to come across.
In the hope updating it might work, I then try to PUT to …/project/cards/<dbid>.xml, but again, no fields change.

Is this supposed to work? If so, any idea what I’m doing wrong?

Wouter

 
Avatar LiXiao Administrator 21 post(s) #1710

Hi Wouter,

Creating/updating card with card_type_name by REST API works well for me (just tested it again).
And your log is also looks fine.

If you can provide more details about what you tried, like code or the steps you did, I would like to retry it and see what’s problem.

 
Avatar aking 3 post(s) #1887

Hi,

Wondering why the API says to post to ...../cards.xml to create a new card? I cannot seem to get that to work. It does however work when i use …./cards/create. Is using …./cards/create a valid and acceptable way to use the API to make a new card?

[Alex]

 
Avatar aking 3 post(s) #1893

Hi again,

Took care of the previous post. Got the ../cards.xml post to work properly. However it is still possible to create a card using ../cards/create. Curious if either method has an advantage?

[Alex]

 
Avatar LiXiao Administrator 21 post(s) #1942

Hi Alex,

You can create a card using ../cards/create which is action used to create a card in the Mingle now.
You can access it and all other links/actions which you can access by browser after login.
But they all are not part of API, which means they maybe changed without any document or notification for you.
We recommend you build on the published API.

Cheers,

Li Xiao

Forums Mingle API