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 (18126) | 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.5k6184201) | 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.