I am able to get workitem if I know the ticket id using following request https://example.com:8081/ccm/oslc/workitems/37702.json. I want to query RTC to get all wrorkitems owned by a gievn user or based on tags.
I am using the folllowing query to get data but unable to get the details.
Search based on owner of workitem https://example.com:8081/ccm/oslc?oslc_cm.query=dc:owner="abc@gmail.com"
Search based on tags https://example.com:8081/ccm/oslc?oslc_cm.query=dc:subject="mc"
Another way of getting data out of jazz is using SPARQL. You can find the SPARQL endpoint from the rootservices (GET h_ttps://jazzserver:9443/ccm/rootservices) by looking for jp06:query.
While I'm sure it's possible to construct the SPARQL by hand, it is far easier to use the new-in-6.0 report builder, using LQE as the data source. Go to the format->Advanced area to see the generated SPARQL, and should you feel the urge you can edit there although you lose the graphical query building when you do that. It's a few clicks to create a SPARQL query which will return all the WIs created by Fred (using his user ID fred) like:
Then, to get the result as an Atom feed, do a GET from h_ttps:/jazzserver:9443/ccm/query with parameter query=YourSPARQL which must be encoded of course.
I'm sure it's not to hard to build this simple query by hand, but Report Builder makes it trivial, and also it understands the metamodel so helps with selecting relationships and attribute names - less errors because you don't have to (mis)type these. Also you can publish/share the queries, and use them to populate dashboards :-)
Hopefully one of these three methods will meet your needs.
The reportable REST API might offer another way of getting the info you want: https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI
For example, this query returns XML list of work item IDs created by Fred: h_ttps://jazzserver:9443/ccm/rpt/repository/workitem?fields=workitem/workItem[creator/name=%27Fred%27]/id
Note the Fred is the user's name, NOT the user ID (user ID is used to login). In the oslc example I posted, the user id is used.
ADDITION: There is a lot more detail on OSLC queries on CCM for work items here https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2#Querying_Work_Items
Not sure about your example, but what I show below works in Jazz 6.0. There may be other ways to do this. You might get more responses asking on jazz.net.
BTW I've had to obfuscate/mutilate the urls in this post because I don't have enough rep points. They aren't real URLs anyway. Fix by deleting _ from h_ttps.
There is an OSLC spec for CM query: http://open-services.net/bin/view/Main/OSLCCoreSpecQuery
To apply a query to a project area, first you have to get the project area identifier, you get that from the list of projects, and you get the URL to get the list of projects by querying the rootservices.
In this example my server is on jazzserver:9443. All the GETs need a header Accept value application/xml. It's probably possible to get JSON format results.
So it goes like this:
You probably have to authenticate your client with the server before continuing
GET https://jazzserver:9443/ccm/rootservices
XML result, extract the url for the list of project areas in tag jp06:projectAreas attribute rdf:resource e.g.
<jp06:projectAreas rdf:resource="h_ttps://jazzserver:9443/ccm/process/project-areas"/>
XML result, extract the project URL from text content of jp06:url nested as follows:
jp06:project-areas... jp06:project-area... jp06:url
In my case this is h_ttps://jazzserver:9443/ccm/process/project-areas/_pXsVsRmqEeWdnsGEjrjqng
The _pXsVsRmqEeWdnsGEjrjqng is the project identifier.
HOWEVER NOTE the step 4 URL is simplified - specifically, the parameter value dc.owner="fred" has to be encoded so the " and = aren't misinterpreted by your browser as they would be if you simply paste that URL into your browser address bar - I did this query in POSTER by putting the parameter name/value into the parameters.
HTH