It's all about the answers!

Ask a question

retrieving rational team concert work items via REST api

David Todd (812) | asked Mar 31 '15, 2:46 p.m.

I'm trying to retrieve rational team concert work items via REST api and curl.

I can login successfully with these two statements:
curl -k -c $COOKIES
curl -k -L -b $COOKIES -c $COOKIES -d j_username=$USER -d j_password=$PWD

# I get a simple query url with this statement:
curl -k -b $COOKIES

However, when I issue the following simple query to get the work items: 
curl -k -b $COOKIES

I get no work items. This is returned:
   "userId": "",
   "roles": [

Can someone tell me what I'm doing wrong? Thanks

Accepted answer

permanent link
Donald Nong (14.4k314) | answered Mar 31 '15, 8:26 p.m.
Not sure why you got such response for the last URL, as it should output nothing in the console. To understand what's going on, use "-v" to show more information. The last URL normally returns a HTTP 302 with a location link, and you should use "-L" to tell cURL to redirect to that link. This post should help you.
David Todd selected this answer as the correct answer

David Todd commented Apr 01 '15, 9:14 a.m.

 Thank you Donald! The information you provided helped me to get further.

Your answer

Register or to post your answer.