It's all about the answers!

Ask a question

How to get OSLC link for Work Item


Chandan M B (1012761) | asked Apr 09 '15, 11:29 p.m.
retagged Apr 10 '15, 12:46 a.m. by Shubjit Naik (1.5k1613)
Hi,

I have a workitem running on my local jazz server. I need to get rdf format of the work item.
How to do it.

I tried by puting url etc in Rest Client. I am getting Html put indicating errors.
I need to get rdf format of a WI in Rest client. How to achieve it. Please let me know.

Regards
Chandan

2 answers



permanent link
Shubjit Naik (1.5k1613) | answered Apr 10 '15, 12:42 a.m.
edited Apr 10 '15, 12:45 a.m.
HI Chandan

How about using the URL format below?
https://<host>:<port>/ccm/oslc/workitems/90

Where ccm is your RTC context root and 90 is the Work Item ID.

You can check the following URLs for additional information:
https://jazz.net/library/article/352
 http://www.ibm.com/developerworks/rational/library/rational-team-concert-oslc/

Regards
Shubjit

Comments
Chandan M B commented Apr 10 '15, 1:08 a.m.

Hi Shubjit
I tried its not working
https://localhost:9443/ccm/oslc/workitems/8

Even though i added the header Accept and OSLC core version 2.0 and basic authentication


Chandan M B commented Apr 10 '15, 1:10 a.m.

Response
Status Code: 200 OK
    Cache-Control: private
    Content-Encoding: gzip
    Content-Length: 1031
    Content-Type: text/html;charset=UTF-8
    Date: Fri, 10 Apr 2015 05:06:39 GMT
    Expires: Thu, 01 Jan 1970 05:30:00 IST
    Server: Apache-Coyote/1.1
    Set-Cookie: JSESSIONID=06C24F7496F4DEA3BD65D59A6CD589D9; Path=/ccm/; Secure; HttpOnly JazzFormAuth=Form; Path=/ccm; Secure x-com-ibm -team-scenario=11541864-6722-44b8-be77-9d6ab3d8599f%3Bname%3DInitial+Page+Load%3Bextras%3D%2Fccm%2Fauthenticated%2Fidentity%2C1428642400263; Path=/
    X-com-ibm-team-repository-web-auth-msg: authrequired


Chandan M B commented Apr 10 '15, 1:35 a.m.

I need in rdf+xml format with OSLC version 2.0


Shubjit Naik commented Apr 10 '15, 3:57 a.m. | edited Apr 10 '15, 4:06 a.m.

 Hi Chandan

Looks like an authentication issue. If for example you are using Firefox REST Client , You need to login to CLM on a different tab prior to running it on REST client


I tried this on Firefox with following Headers added. 

Name: Content-Type
Value: application/rdf+xml

Name: oslc-core-version
Value: 2.0

Here is a screenshot
GET


permanent link
Donald Nong (14.4k314) | answered Apr 12 '15, 8:54 p.m.
edited Apr 12 '15, 8:55 p.m.
If you're using a browser-based REST client such as Poster or RESTClient, log on CCM in the browser first, as Shubjit mentioned. Otherwise, you need to do log-on programmatically in your REST client and retain the logged on session (via cookies) all the way through. Note that CCM uses form authentication by default, and basic authentication will not work. I suggest you read the following articles.
https://jazz.net/library/article/1001
http://www.ibm.com/developerworks/rational/library/rational-team-concert-oslc/
(the work flow is exactly the same regardless the choice of programming/scripting languages)

Comments
Ralph Schoon commented Apr 13 '15, 3:47 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

In addition, check the link formats in existing repositories. You will notice that links with the requirement number are usually workitem to work item links that are local to the repository. Other links use a different format using the work item UUID. Which one is used in which context can be found by creating the links in the tool and getting the data.

Your answer


Register or to post your answer.