It's all about the answers!

Ask a question

how to list the attributes of various enumerations like severity, priority in rtc through rest query


BHUSHAN PUNJABI (111) | asked Feb 03 '14, 12:59 a.m.
edited Feb 23 '14, 8:00 a.m. by Sreerupa Sen (1.0k4)
I want to list down attributes of fields like severity, priority, etc through rest query. How do i achieve my goal?

One answer



permanent link
Donald Nong (14.5k414) | answered Feb 23 '14, 11:48 p.m.
edited Feb 23 '14, 11:49 p.m.
You can use the discovery chain method to figure it out.
http://www.ibm.com/developerworks/rational/library/10/programmatic-authentication-and-certificate-handling-for-rational-team-concert-2-0/
In this document, it shows you how to get the work item services. From the output, locate the work item type that you are interested in, say, defect.
<oslc:creationFactory>
<oslc:CreationFactory>
<dcterms:title rdf:parseType="Literal">Location for creation of change requests</dcterms:title>
<oslc:resourceType rdf:resource="http://open-services.net/ns/cm#ChangeRequest"/>
<oslc:resourceShape rdf:resource="https://clm404.sydney.rcs:9443/ccm/oslc/context/_U-8CoCGlEeOpzLt8rZoBTA/shapes/workitems/defect"/>
<oslc:creation rdf:resource="https://clm404.sydney.rcs:9443/ccm/oslc/contexts/_U-8CoCGlEeOpzLt8rZoBTA/workitems"/>
</oslc:CreationFactory>
</oslc:creationFactory>

Follow the link of the resourceShape, and in this output you will see the enumerations for an attribute, such as
<rdf:Description rdf:about="https://clm404.sydney.rcs:9443/ccm/oslc/context/_U-8CoCGlEeOpzLt8rZoBTA/shapes/workitems/defect/property/internalSeverity/allowedValues">
<rdf:type rdf:resource="http://open-services.net/ns/core#AllowedValues"/>
<oslc:allowedValue rdf:resource="https://clm404.sydney.rcs:9443/ccm/oslc/enumerations/_U-8CoCGlEeOpzLt8rZoBTA/severity/severity.literal.l6"/>
<oslc:allowedValue rdf:resource="https://clm404.sydney.rcs:9443/ccm/oslc/enumerations/_U-8CoCGlEeOpzLt8rZoBTA/severity/severity.literal.l5"/>
<oslc:allowedValue rdf:resource="https://clm404.sydney.rcs:9443/ccm/oslc/enumerations/_U-8CoCGlEeOpzLt8rZoBTA/severity/severity.literal.l4"/>
<oslc:allowedValue rdf:resource="https://clm404.sydney.rcs:9443/ccm/oslc/enumerations/_U-8CoCGlEeOpzLt8rZoBTA/severity/severity.literal.l3"/>
<oslc:allowedValue rdf:resource="https://clm404.sydney.rcs:9443/ccm/oslc/enumerations/_U-8CoCGlEeOpzLt8rZoBTA/severity/severity.literal.l2"/>
<oslc:allowedValue rdf:resource="https://clm404.sydney.rcs:9443/ccm/oslc/enumerations/_U-8CoCGlEeOpzLt8rZoBTA/severity/severity.literal.l1"/>
</rdf:Description>

You can get the literal of the allowed values by following their respective links.

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.