Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

ClearQuest OSLC 2.0 REST API Session Variables

 Hi,

I'm unable to find any information about my problem. Maybe someone from jazz community will be able to help me.

Question:
Is it possible to get and set clearquest session variables using REST API? I mean equivalent of cq api: $session->SetNameValue() $session->GetNameValue()

0 votes


Accepted answer

Permanent link
Hi Michal,

You can you can set your own session variable by doing a PUT call to
http://server/cqweb/oslc/repo/<your-dbset>/db/<your-db>/session

Here is an example of the xml file - this sets session variable _MY_CQ_OSLC_SESSION, and clears _OTHER_CQ_SESSION (I am not suggesting you clear session variable set by CQWeb though - just an example)

<?xml version="1.0" encoding="UTF-8"?>
<cq:Session xmlns:cq="http://www.ibm.com/xmlns/prod/rational/clearquest/1.0/">
<cq:property cq:name="_MY_CQ_OSLC_SESSION">MY_OSLC_SESSSION</cq:property>
<cq:property cq:name="_OTHER_CQ_SESSION"></cq:property>
</cq:Session>

Note, you cannot retrieve session variable with OSLC call, but you can use them in your CQ hook once you set via a PUT call.

Hope this helps,

- Yuhong

Yuhong Yin

Sr. Dev Manager, ClearCase/ClearQuest Jazz Integrations
Michał Kotas selected this answer as the correct answer

2 votes


3 other answers

Permanent link
 Hi,

Works as expected. Thanks for comprehensive answer.

1 vote


Permanent link
Hi Michal,

Do the examples on this wiki help?  If not, let me know and I'll find someone who can help.

https://jazz.net/wiki/bin/view/Main/CqOslcV2

0 votes


Permanent link
Hi Matthew,

Thanks for quick hint. This wiki article is very helpful in general. There are some informations in "Session Management" part, but unfortunately this is not what I'm looking for.

What I would like to know is how to use clearquest session variables. I'm looking for equivalent of:
Using Session variables

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 515
× 137
× 18
× 10

Question asked: May 15 '13, 6:58 a.m.

Question was seen: 7,593 times

Last updated: Jul 16 '14, 8:23 a.m.

Confirmation Cancel Confirm