Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

I want to list down attributes of fields like severity, priority, etc through rest query. How do i achieve my goal?

0 votes



One answer

Permanent link
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.

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,927
× 368

Question asked: Feb 03 '14, 12:59 a.m.

Question was seen: 6,752 times

Last updated: Feb 23 '14, 11:49 p.m.

Confirmation Cancel Confirm