REST API: How to get the value of a List custom attribute?
Given a custom attribute that is a list, how to I get the selected value via the REST API?
When I use the direct url for the requirement, string based custom attributes show up with the value: <rm_property:_DMhjGCz-EeG6U9u3DDmcLw rdf:datatype="http://www.w3.org/2001/XMLSchema#string">0.01</rm_property:_DMhjGCz-EeG6U9u3DDmcLw>"0.01" is the value of this text attribute. However, all of the List attributes show up as blank: <rm_property:_6AmpPS0BEeG6U9u3DDmcLw rdf:resource="https://my_server:9443/rm/types/_0KlRCy0BEeG6U9u3DDmcLw#7631d913-cef1-494d-86ea-b85f424bbad8"/> I can find the shape, the "allowedValues" for the list, etc., but I simply cannot find the selected item for the list attribute for a given requirement. Any ideas? |
3 answers
Looks like the trick is to use the Reporting API: https://jazz.net/forums/viewtopic.php?p=81791#81791
Ex: if your requirement's id is "_W-vmnoJAEeGu_srBRZVCTg" i.e. the REST url is https://rrc.it.att.com:9443/rm/resources/_W-vmnoJAEeGu_srBRZVCTg then use
as per the "Filter id(s)" on https://jazz.net/wiki/bin/view/Main/RRCReportableRestAPI You will see the values for list attributes, the traceability links, etc.. The actual value is visible in attribute:literalName. |
Count me in!
I have the same question. Maybe can a developer give some advice and samples? |
Thanks!
I forgot the Reporting API, which I should not have. :-)) Yes, through the publish call I also found the list value. |
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.