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

Rational Publishing Engine RTC Contributor Custom Attributes

 Hi Folks, does anyone know how to retrieve the value of  a RTC Contributor custom attribute  in Rational Publishing Engine?

0 votes


Accepted answer

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

1 vote

Comments

Thanks Brian, this works a treat.

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
× 481

Question asked: Feb 04 '14, 8:40 a.m.

Question was seen: 4,919 times

Last updated: Feb 05 '14, 4:27 a.m.

Confirmation Cancel Confirm