It's all about the answers!

Ask a question

ROWI API: query parameter oslc_cm.properties does not work


Alex Matei (156) | asked Jun 15 '10, 4:04 p.m.
I'm using Resource Oriented Work Item API 2.0: https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2

When using media type "application/atom+xml", I can search only defects and APARs(that's all we need) by using
the following query(searching for "Sensor Failure"):

oslc_cm.query=oslc_cm:searchTerms="Sensor Failure" and dc:type in

# curl -k -b $COOKIES -o "result.out" -H "Accept: application/atom+xml" https://aaa.bbb.ccc.ibm.com:9443/jazz/oslc/contexts/_MNPQRSaIEdyPnMbFLxrS7Q/workitems?oslc_cm%2Equery=oslc_cm%3AsearchTerms%3D%22Sensor%20Failure%22%20and%20dc%3Atype%20in%20%5B%22defect%22%2C%22apar%22%5D

I need to get the following returning properties for each defect/apar:
- id
- title
- type
- last modified
- link to the work item

The problem is that the results do not have the type of the work item.
I am not able to get the type with the URI query parameter oslc_cm.properties=dc:type, dc:identifier,dc:title,dc:modified.
oslc_cm.properties is just ignored.
How can I get the type (defect or apar) of the work item from the query?

One answer



permanent link
Patrick Streule (4.9k21) | answered Jun 17 '10, 10:24 a.m.
JAZZ DEVELOPER
I'm using Resource Oriented Work Item API 2.0:
https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2

When using media type "application/atom+xml", I can search
only defects and APARs(that's all we need) by using
the following query(searching for "Sensor Failure"):

oslc_cm.query=oslc_cm:searchTerms="Sensor Failure" and
dc:type in

# curl -k -b $COOKIES -o "result.out" -H "Accept:
application/atom+xml"
https://aaa.bbb.ccc.ibm.com:9443/jazz/oslc/contexts/_MNPQRSaIEdyPnMbFLxrS7Q/workitems?oslc_cm%2Equery=oslc_cm%3AsearchTerms%3D%22Sensor%20Failure%22%20and%20dc%3Atype%20in%20%5B%22defect%22%2C%22apar%22%5D

I need to get the following returning properties for each
defect/apar:
- id
- title
- type
- last modified
- link to the work item

The problem is that the results do not have the type of the work
item.
I am not able to get the type with the URI query parameter
oslc_cm.properties=dc:type, dc:identifier,dc:title,dc:modified.
oslc_cm.properties is just ignored.
How can I get the type (defect or apar) of the work item from the
query?

ATOM has a fixed set of attributes. To cover your case, I'd suggest to
use the XML representation instead.

--
Regards,
Patrick
Jazz Work Item Team

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.