It's all about the answers!

Ask a question

How Can I use REST API in Perl to connect to JAZZ and get the user information back in perl


Hillel Awaskar (111) | asked Apr 29 '13, 8:51 a.m.
edited Apr 29 '13, 10:28 a.m. by Stef van Dijk (2.0k179)
I want to loging using Perl to JAZZ RTC and get the User details (like user id, name etc) Can one guide me please. How do I use REST API to do this work

2 answers



permanent link
sam detweiler (12.5k6195201) | answered Apr 29 '13, 11:14 a.m.
currently I don't think anyone has built any perl modules to wrapper oslc.

one could certainly do it.   the Eclipse Lyo project http://www.eclipse.org/lyo/ intends to support other languages.

this article  does a good job of describing the data flows, authorization and services catalog discovery

here is a little windows batch file that will pull back the project list from a server.. it does not use the proper discovery methodology defined

<code>
set COOKIES=.\cookies.txt

set USER=xxxxx
set PASSWORD=yyyyy
set HOST=https://server:port


curl -k -c %cookies% "%host%/jts/authenticated/identity" >nul

curl -k -L -b %COOKIES% -c %COOKIES% -d j_username=%USER% -d j_password=%PASSWORD% "%host%/jts/authenticated/j_security_check" >nul

curl -k -L -b %COOKIES% "%host%/ccm/oslc/workitems/catalog
</code>


permanent link
Guido Schneider (3.4k1486115) | answered Apr 29 '13, 12:24 p.m.
I posted another example to read/write SystemMessages with perl over REST. This shows you how to connect and login.


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.