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

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?

0 votes



3 answers

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

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.

1 vote


Permanent link
Count me in!
I have the same question.

Maybe can a developer give some advice and samples?

0 votes


Permanent link
Thanks!
I forgot the Reporting API, which I should not have. :-))
Yes, through the publish call I also found the list value.

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

Question asked: May 18 '12, 2:20 p.m.

Question was seen: 5,885 times

Last updated: May 18 '12, 2:20 p.m.

Confirmation Cancel Confirm