It's all about the answers!

Ask a question

How to get all information rather than parts returned from RTC using Rest API?


shichen x (1144) | asked Jun 14 '13, 7:23 a.m.
 Hi all,

    When I use Rest API to get the information in the RTC, but I can only get parts of all the information .

    For  example,the counts of members returned from RTC using Rest API should be 451, but the result set only display 50?How can I get the others?

Thanks for any help in advance!

2 answers



permanent link
Guido Schneider (3.4k1491115) | answered Jun 14 '13, 9:04 a.m.

Normaly you control this with the size parameter in the URL:

e.g.

&size=2000
	

Comments
shichen x commented Jun 17 '13, 8:12 a.m. | edited Jun 25 '13, 9:04 a.m.

 Hi,Guido,

      Thanks for your comments! According to your suggest, I set the size parameter(oslc.pageSize) in my URL The URL can work when the value of oslc.pageSize is less than 100.But  it can't work when value of oslc.pageSize equals to the totalCount(the counts >100),  returning 500 state code .Besides, I have tried to use the property value of nextpage as the URL, but the returned results were not right. I have no ideas about these,can you give me some guidance?
Thanks in advance!


Brian Fleming commented Jun 17 '13, 11:33 a.m.

Can you elaborate on what was wrong when you used the "nextpage" url?


shichen x commented Jun 18 '13, 7:40 a.m. | edited Jun 25 '13, 9:04 a.m.

Hi,Brian, thanks for your attention. <o:p> </o:p>

I want to get all work items belong to a Planned For. So My query URL is https://igartc03.swg.usma.ibm.com/jazz/oslc/contexts/_83qvgGzSEd-Xqre3_CpPFQ/workitems?oslc.where=rtc_cm:plannedFor=https://igartc03.swg.usma.ibm.com/jazz/oslc/iterations/_bDaAEAmeEeKapp8glHcCLw>. 

When I send request to this URL using the rest add-on in mozilla, the returned result is.

Then I send request to the “nextpage” URL, the result is: <o:p> </o:p>

I have no ideas about why this happened, can you give me some guidance? <o:p> </o:p>

Thanks in advance! <o:p> </o:p>

 
<o:p> </o:p>


permanent link
shichen x (1144) | answered Jun 25 '13, 7:17 a.m.
Hi all,
This question has been solved by replacing the "&amp;"with "&" in the "nextPage" URL!

Comments
Stephane Leroy commented Jun 25 '13, 3:15 p.m.
JAZZ DEVELOPER

+1
I've reproduced this behavior (I'm using REST client on Firefox and a Jazz 4.0.3 server).

To be more precise, I've fixed the problem by replacing the "&amp;" string with '&' character.
You'd certainly want to open a defect on this.

Regards,
Stéphane


Brian Fleming commented Jun 25 '13, 3:57 p.m.

https://jazz.net/wiki/bin/view/Main/RqmApi actually documents this...

"Note: The links to other pages in a feed cannot be pasted directly into a browser to get that page. This is because the link contains a query segment that looks something like this: ?token=_C8DasVZWEeG429XX9GztHA%26page=1 where the &'s are escaped (e.g. %26). To use the link the &'s must be unescaped by turning all instances of "%26" to "&". That would make the query segment look something like: ?token=_C8DasVZWEeG429XX9GztHA&page=1 "

I suspect this is "working as designed" in the RTC API as well.

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.