It's all about the answers!

Ask a question

Rational Publishing Engine RTC Contributor Custom Attributes


Russell Norlund (17211622) | asked Feb 04 '14, 8:40 a.m.
retagged Feb 04 '14, 1:49 p.m. by Brian Fleming (1.6k11928)
 Hi Folks, does anyone know how to retrieve the value of  a RTC Contributor custom attribute  in Rational Publishing Engine?

Accepted answer


permanent link
Brian Fleming (1.6k11928) | answered Feb 04 '14, 1:49 p.m.
Custom contributor attributes were added to the REST API in 4.0.3, in the "itemExtensions" property of the workItem element.  If you are on an older version than 4.0.3, I don't think you have any options.  Assuming you are on 4.0.3 or later, you can use a query such as:

https://HOSTNAME:PORT/CONTEXT_ROOT/rpt/repository/workitem?fields=workitem/workItem[id=1234]/itemExtensions[key="YOUR_CUSTOM_ATTRIBUTE_ID"]/value/itemId

to retrieve a pointer to the contributor object (replacing HOSTNAME, PORT, CONTEXT_ROOT and YOUR_CUSTOM_ATTRIBUTE_ID with the appropriate values).  This query scopes the results to only workitem 1234 but you can modify that as required.  Then a query such as

https://HOSTNAME:PORT/CONTEXT_ROOT/rpt/repository/foundation?fields=foundation/contributor[itemId="ITEMID_RETURNED_IN_FIRST_QUERY"]/emailAddress

to retrieve the users email address.  Note you could also replace "emailAddress" with "name" or "userId" depending on what you want to include in your report.

REST API documentation can be found here:
https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI
Russell Norlund selected this answer as the correct answer

Comments
Russell Norlund commented Feb 05 '14, 4:27 a.m.

Thanks Brian, this works a treat.

Your answer


Register or to post your answer.