It's all about the answers!

Ask a question

Querying Work Items via OSLC


Krzysztof Kaźmierczyk (7.4k373103) | asked Jun 04 '12, 10:33 a.m.
Hello I am trying to create new OSLC work item query. I am using instructions from https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2#Querying_Work_Items
There is written following statement:

Queries are run by appending the parameter ?oslc_cm.query=[query] to the simpleQuery URL from the services discovery document:


However I have no idea what simpleQuery URL is. How can I retrieve it from the server?

Comments
Krzysztof Kaźmierczyk commented Jun 22 '12, 8:23 a.m. | edited Sep 18 '13, 7:15 a.m.

any ideas?

Accepted answer


permanent link
Krzysztof Kaźmierczyk (7.4k373103) | answered Jun 22 '12, 9:21 a.m.
I solved it.
I ran https://localhost:9443/ccm/oslc/workitems/catalog to get list of all PAs including PA context.
Rosa Naranjo selected this answer as the correct answer

5 other answers



permanent link
Karthik Krishnan (8825117163) | answered Jun 04 '12, 11:17 a.m.
To list all queries you can do the following

https://myjazz.server.com:9443/ccm/oslc/queries.xml

This will provide all the list of queries including Personal and Shared

To execute a query you need to do the following

https:///myjazz.server.com:9443/ccm/oslc/queries/_afdfaQCAPDiEeCdF7QTxWQU-g/rtc_cm:results

where _afdfaQCAPDiEeCdF7QTxWQU-g is the ID of the query you want to execute. you will get this from the queries.xml

Hope this helps

Regards
Karthik


permanent link
Christophe Elek (2.9k13021) | answered Jun 04 '12, 11:20 a.m.
JAZZ DEVELOPER
Get the catalog
https://jazzdev.torolab.ibm.com:9443/jazz/oslc/workitems/catalog

Find your services URL
<oslc_disc:services rdf:resource="https://jazzdev.torolab.ibm.com:9443/jazz/oslc/contexts/_Q2fMII8EEd2Q-OW8dr3S5w/workitems/services.xml"/>

from there build the query (ex dc:type="defect")
The query depends on the attributes of the workitems - check what is returned





permanent link
Krzysztof Kaźmierczyk (7.4k373103) | answered Jun 11 '12, 11:48 a.m.
Does it mean, that to run the query using OSLC must I create and save it in RTC? Or there is any way to run OSLC query without creating it in RTC?

I just would like to display work item id and value of custom attribute called "update value" where custom attribute called "needs updating" is set to true. Is there any simple http get or post command for that?

Comments
navneet kumar commented Feb 11 '13, 3:32 p.m.

Did you manage to get an answer for this ? Even I am running into similar issue 


permanent link
Jan Wloka (4161) | answered Feb 24 '13, 5:11 a.m.
JAZZ DEVELOPER
 I updated the Wiki page on Resource Oriented Work Item API with OSLC with details on how to obtain the simpleQuery URL.

permanent link
Stephane Leroy (1.4k149) | answered May 13 '13, 1:08 p.m.
JAZZ DEVELOPER
Hi,

I'd advise you to have a read at this article (based on OSLC CM v2.0 spec) :
https://jazz.net/library/article/1001/#consuming_oslc_services
It provides some convenient sample URLs, etc. you could start from.

Regards,
Stéphane



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.