It's all about the answers!

Ask a question

How to login to JAZZ Team Server using REST Client.


0
1
Aju Samuel Raju (362710) | asked Mar 12 '15, 9:43 a.m.
Hi,
I want to login to JAZZ TEAM SERVER, using the rest client.  I give the  URI https://localhost:9443/ccm/
in the browser address l  will  get  pop for credentials
I want to do this using  REST Client addon in firefox browser. when I gave  URI  https://localhost:9443/ccm/
in the rest client URL, I got the response
  1. Status Code: 200 OK
  2. Content-Encoding: gzip
  3. Content-Length: 1029
  4. Content-Type: text/html;charset=UTF-8
  5. Date: Thu, 12 Mar 2015 13:35:42 GMT
  6. Server: Apache-Coyote/1.1
  7. Set-Cookie: JSESSIONID=9F60DAB58471A21F6E25BAD4F6A74F33; Path=/ccm/; Secure; HttpOnly JazzFormAuth=Form; Path=/ccm; Secure x-com-ibm -team-scenario=38e61c75-9ed4-4d10-b5e3-32e4cc1222bf%3Bname%3DInitial+Page+Load%3Bextras%3D%2Fccm%2Fauthenticated%2Fidentity%2C1426167342257; Path=/
  8. X-com-ibm-team-repository-web-auth-msg: authrequired

 How to pass the user credentials to JAZZ Team Server  and log in using REST Client.

I was not able to find a way to do that using  REST Client.
Please Help.

Regards
Aju
 

2 answers



permanent link
Evan Hughes (2.4k1318) | answered Mar 12 '15, 10:20 a.m.
JAZZ DEVELOPER
There's a great example on the jazz.net wiki. Here's the example:
COOKIES=./cookies.txt

USER=username
PASSWORD=password
HOST="https://localhost:9443/jazz"

curl -k -c $COOKIES "$HOST/authenticated/identity"

curl -k -L -b $COOKIES -c $COOKIES -d j_username=$USER -d j_password=$PASSWORD "$HOST/authenticated/j_security_check"

# If this line returns the JSON representation of work item 1, authentication was successful
#curl -k -b $COOKIES "$HOST/oslc/workitems/1.json"
	

Comments
Aju Samuel Raju commented Mar 12 '15, 10:48 a.m.

Hi Evan,
How can do this Auth using REST client ?


Kevin Ramer commented Mar 12 '15, 10:54 a.m.

Do you mean the RESTClient browser add-on ?  If so, login via browser, then go to the rest client addon.   There are other authentication examples provided using Perl scripts you can find in this site.


Evan Hughes commented Mar 13 '15, 12:15 p.m.
JAZZ DEVELOPER

I'm not sure what you mean by "REST client". You can use the REST APIs from a programming language of your choice, using the flow described in the link. 


permanent link
Kevin Ramer (4.5k9186201) | answered Mar 13 '15, 2:19 p.m.
edited Mar 13 '15, 2:19 p.m.
You said:

"I want to do this using  REST Client addon in firefox browser."

Just login to the repository as if to visit the repository, then go to the RESTClient and tool around.  e.g.  look at the root services document, etc.  

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.