Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How do I sort the results of a query using REST API?

Hello,

I have a very simple REST API query to retrieve all work items created within a time frame:

https://localhost:9443/ccm/rpt/repository/workitem?fields=workitem/workItem[creationDate>2014-07-14T00:00:00.00-0300 and creationDate<2014-07-20T23:59:59.99-0300]/(id|summary|creator/name)&size=100

The question is: is it possible to sort the results by any of the attributes? For example, I would like to sort the results by the creator name.

Thanks in advance.

0 votes


Accepted answer

Permanent link
You're using reportable REST API which does not mention sorting in its specification. Depending on your programming language, you can do the sorting on the resulting XML response once you get it.
If you don't have to use the reportable REST API, consider using the OSLC REST API (they are different). Below is a previous discussion on this topic.
https://jazz.net/forum/questions/157431/how-to-get-sorted-workitems-list-by-using-oslc
Andre Gusmao selected this answer as the correct answer

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Jul 22 '14, 1:42 p.m.

Question was seen: 4,592 times

Last updated: Jul 22 '14, 9:43 p.m.

Confirmation Cancel Confirm