It's all about the answers!

Ask a question

When using the REST API is there a modifier for an item such as first and last?


Shaule Sachs (18137) | asked Aug 15 '16, 11:53 a.m.
 When using the report repository, I can do...

https://itprojmgmt.penfed.org:9443/ccm/rpt/repository/generic?fields=generic/com.ibm.team.process.ProjectArea/(name|archived|itemHistory/*)

which gives me all the itemHistory elements, but in truth, I just want the first and last itemHistory.

In XPath (and such) you can do:
https://itprojmgmt.penfed.org:9443/ccm/rpt/repository/generic?fields=generic/com.ibm.team.process.ProjectArea/(name|archived|itemHistory[first()]/*|itemHistory[last()]/*)
but that gives me a 500 error.

Anyone have any ideas?

One answer



permanent link
sam detweiler (12.5k6195201) | answered Aug 15 '16, 2:00 p.m.
I think you have to make two calls, size=1, sort = old to new, and sort = new to old.

Comments
Shaule Sachs commented Aug 15 '16, 2:01 p.m.

 Where do I place those modifiers?

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.