It's all about the answers!

Ask a question

RTC OSLC query not working

Oana Capatana (23111) | asked Dec 04 '18, 9:18 a.m.


I have RTC 6.0.6 installed.
I am trying to filter the workitems from a project area by type but I keep ending up with a list of all workitems from the project.
I have tried encoding and not encoding the oslc_cm.query parameter as follows but all attempts were unsuccessful.

The selection part works. Query I couldnt get any of the examples here to work.

Any suggestions?


Accepted answer

permanent link
Jim Amsden (25837) | answered Dec 10 '18, 9:57 a.m.

dcterms:type with a string value is not considered a reliable mechanism for typing. I believe this usage is left over from OSLC 1.0. 

For OSLC Core 2.0, dcterms:type is deprecated and attempting to access it in a oslc.where query parameter fails indicating the property is an unknown attribute id. However, a GET on the work item does show that property.

RTC uses its own typing mechanism that is extensible and has proper namespaces. 

Use rtc_cm:type="" in the oslc.where clause to find RTC defects.

OSLC Core 3.0 and OSLC Change Management 3.0 use rdf:type with standard OSLC namespaces to define specific subclasses of oslc_cm:ChangeRequest.

See this jazz forum entry for further details.

Oana Capatana selected this answer as the correct answer

Oana Capatana commented Dec 11 '18, 12:18 a.m.

Thank you for clarifying 

4 other answers

permanent link
Jim Amsden (25837) | answered Dec 04 '18, 1:31 p.m.

 Try setting header OSLC-Core-Version=2.0 and use OSLC 2.0 query: 

Oana Capatana commented Dec 05 '18, 12:39 a.m.

Thanks for your answer Jim!

If I use oslc.where from oslc 2.0 specification I can filter by common attributes like identifier or title but it still doesn;t work to filter by type.
I tried this (with OSLC-Core-Version header set to 2.0):
and i get this response:
  "oslc:statusCode": 400,
  "prefixes": {
    "oslc": "http:\/\/\/ns\/core#"
  "oslc:message": "Unexpected symbol: null"

Oana Capatana commented Dec 05 '18, 12:46 a.m.

 if I set "defect" instead of defect in the above url, I still get a 400 status and the error message is Unknown attribute id: [http:\/\/\/dc\/terms\/type], which is strange because it allows me to select it with 

permanent link
Jim Amsden (25837) | answered Dec 05 '18, 7:35 a.m.

You need to escape the # in the prefix definition URI with %23.

Oana Capatana commented Dec 05 '18, 7:46 a.m.

permanent link
Jim Amsden (25837) | answered Dec 05 '18, 9:23 a.m.


should work. Here's the dcterms:type property of a defect work item I created:

        <dcterms:type rdf:datatype="">Defect</dcterms:type>

But I see it doesn't. I'll look into it.

permanent link
Oana Capatana (23111) | answered Dec 10 '18, 3:34 a.m.

 I found the answer to this issue.

The oslc.where value should be rtc_cm:type="task" instead of dcterms:type="task"

This I think is non-intuitive since in the response the attribute show up as:

Your answer

Register or to post your answer.