Forums Mingle API

Accessing card views#716

Subscribe to Accessing card views 5 post(s), 2 voice(s)

 
Avatar Gavin 19 post(s) #1881

Hi, I’m still on Mingle 2.0 – so please let me know if this has been fixed in 2.01 (or if this is working as designed….)

When I access a view from the API, if the view is a hierarchical one then all I get back is a ‘records’ array with a single record in it, which is the ‘root’ of my hierarchy. If I switch my view to a list view, and save it, then mingle returns me the card list (which is what I expected to be returned when the view was in hierarchy mode).

What’s the deal here? Is my use case off base? My scenario is that I have a bunch of hierarchy views in my project which I use in my day to day scrum meetings. I’m trying to access these views views over the API so I can rank them with my card ranker app, but I’m not getting all the cards that ‘belong’ to that view, just the root of the hierarchy. Should I be able to get my list of cards this way, or should I be going about it in a different fashion?

 
Avatar LiXiao Administrator 21 post(s) #1884

Hi Gavin,

There is no hierarchical view for REST API, cards API can only get a list of cards no matter what’s view it is.
As you said, it should be a bug.
Could you provide more details about it?
What’s params and values you send out for the request?
I just checked on our trunk version, there is no same problem.
It maybe fixed. I would like to try again if you provide more specific details.

Thanks

Li Xiao

 
Avatar Gavin 19 post(s) #1885

I just tried this on the latest build of Mingle on Mac OS X and it worked as expected. Well, apart from the fact that when accessing a hierarchy view the API returns xml in the form <records><record>...card details</record><record>.....car details</record>...<records> and when the view is a list view you get <cards><card>...card details…</card><card>...card details…</card>....</cards> – that’s a bit of a pain because I don’t know whether to expect ‘record’ or ‘card’ xml when I call the API, so my code needs to handle both…

I’m not at my client’s office today, but I’ll check this behaviour again tomorrow on the older build of Mingle (8540) and ensure I wasn’t doing something stupid when I reported the original problem :-)

 
Avatar Gavin 19 post(s) #1891

Just confirmed that the older build of mingle is indeed only pulling back one ‘record’ when accessing hierarchy views.

Fairly moot point since this seems to work in 2.01, but you might get someone else hitting the same issue.

 
Avatar LiXiao Administrator 21 post(s) #1943

Hi Gavin,

It is a bug. I reported it to Mingle team.

Thank you.

Li Xiao

Forums Mingle API