REST API: How to get the value of a List custom attribute?
![](http://jazz.net/_images/myphoto/a11360cfc12d9abb0261882dcce210f4.jpg)
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:
However, all of the List attributes show up as blank:
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?
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
![](http://jazz.net/_images/myphoto/a11360cfc12d9abb0261882dcce210f4.jpg)
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
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.
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
https://server:port/rm/publish/resources?resourceURI=_W-vmnoJAEeGu_srBRZVCTg
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.